diff --git a/AwsCryptographicMaterialProviders/project.properties b/AwsCryptographicMaterialProviders/project.properties index 02e193a7d..f5e8cdf0b 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.8.0 -dafnyRuntimeJavaVersion=4.8.0 +dafnyVersion=4.8.1 +dafnyRuntimeJavaVersion=4.8.1 diff --git a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/keystore/model/CreateKeyStoreOutput.java b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/keystore/model/CreateKeyStoreOutput.java index c6e6529e7..945107a45 100644 --- a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/keystore/model/CreateKeyStoreOutput.java +++ b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/keystore/model/CreateKeyStoreOutput.java @@ -73,6 +73,16 @@ public CreateKeyStoreOutput build() { "Missing value for required field `tableArn`" ); } + if (Objects.nonNull(this.tableArn()) && this.tableArn().length() < 1) { + throw new IllegalArgumentException( + "The size of `tableArn` must be greater than or equal to 1" + ); + } + if (Objects.nonNull(this.tableArn()) && this.tableArn().length() > 1024) { + throw new IllegalArgumentException( + "The size of `tableArn` must be less than or equal to 1024" + ); + } return new CreateKeyStoreOutput(this); } } 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 48d701b7a..9201de5f5 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.8.0.0" +dafny_version = "4.8.1.0" [options_by_module.AwsCryptographyKeyStoreTypes] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" diff --git a/AwsCryptographyPrimitives/project.properties b/AwsCryptographyPrimitives/project.properties index 02e193a7d..f5e8cdf0b 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.8.0 -dafnyRuntimeJavaVersion=4.8.0 +dafnyVersion=4.8.1 +dafnyRuntimeJavaVersion=4.8.1 diff --git a/AwsCryptographyPrimitives/runtimes/net/Extern/RSAEncryption.cs b/AwsCryptographyPrimitives/runtimes/net/Extern/RSAEncryption.cs index 0df8d2c9a..50d161b28 100644 --- a/AwsCryptographyPrimitives/runtimes/net/Extern/RSAEncryption.cs +++ b/AwsCryptographyPrimitives/runtimes/net/Extern/RSAEncryption.cs @@ -99,7 +99,6 @@ private static IAsymmetricBlockCipher GetEngineForPadding(_IRSAPaddingMode paddi // key and returns the AsymmetricKeyParameter for that public key, encoded using UTF-8 private static AsymmetricKeyParameter GetPublicKeyFromByteSeq(ibyteseq key) { - AsymmetricKeyParameter keyParam; using (var stringReader = new StringReader(Encoding.UTF8.GetString(key.CloneAsArray()))) { return (AsymmetricKeyParameter)new PemReader(stringReader).ReadObject(); 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 603c44587..14d0303fa 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.8.0.0" +dafny_version = "4.8.1.0" [options_by_module.AwsCryptographyPrimitivesTypes] legacy-module-names = false python-module-name = "aws_cryptography_primitives.internaldafny.generated" diff --git a/ComAmazonawsDynamodb/project.properties b/ComAmazonawsDynamodb/project.properties index 02e193a7d..f5e8cdf0b 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.8.0 -dafnyRuntimeJavaVersion=4.8.0 +dafnyVersion=4.8.1 +dafnyRuntimeJavaVersion=4.8.1 diff --git a/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/Shim.java b/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/Shim.java index 635c8cfa0..847a55bd6 100644 --- a/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/Shim.java +++ b/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/Shim.java @@ -28,6 +28,8 @@ import software.amazon.awssdk.services.dynamodb.model.DeleteBackupResponse; import software.amazon.awssdk.services.dynamodb.model.DeleteItemRequest; import software.amazon.awssdk.services.dynamodb.model.DeleteItemResponse; +import software.amazon.awssdk.services.dynamodb.model.DeleteResourcePolicyRequest; +import software.amazon.awssdk.services.dynamodb.model.DeleteResourcePolicyResponse; import software.amazon.awssdk.services.dynamodb.model.DeleteTableRequest; import software.amazon.awssdk.services.dynamodb.model.DeleteTableResponse; import software.amazon.awssdk.services.dynamodb.model.DescribeBackupRequest; @@ -70,6 +72,8 @@ import software.amazon.awssdk.services.dynamodb.model.ExportTableToPointInTimeResponse; import software.amazon.awssdk.services.dynamodb.model.GetItemRequest; import software.amazon.awssdk.services.dynamodb.model.GetItemResponse; +import software.amazon.awssdk.services.dynamodb.model.GetResourcePolicyRequest; +import software.amazon.awssdk.services.dynamodb.model.GetResourcePolicyResponse; import software.amazon.awssdk.services.dynamodb.model.GlobalTableAlreadyExistsException; import software.amazon.awssdk.services.dynamodb.model.GlobalTableNotFoundException; import software.amazon.awssdk.services.dynamodb.model.IdempotentParameterMismatchException; @@ -98,9 +102,12 @@ import software.amazon.awssdk.services.dynamodb.model.ListTagsOfResourceRequest; import software.amazon.awssdk.services.dynamodb.model.ListTagsOfResourceResponse; import software.amazon.awssdk.services.dynamodb.model.PointInTimeRecoveryUnavailableException; +import software.amazon.awssdk.services.dynamodb.model.PolicyNotFoundException; import software.amazon.awssdk.services.dynamodb.model.ProvisionedThroughputExceededException; import software.amazon.awssdk.services.dynamodb.model.PutItemRequest; import software.amazon.awssdk.services.dynamodb.model.PutItemResponse; +import software.amazon.awssdk.services.dynamodb.model.PutResourcePolicyRequest; +import software.amazon.awssdk.services.dynamodb.model.PutResourcePolicyResponse; import software.amazon.awssdk.services.dynamodb.model.QueryRequest; import software.amazon.awssdk.services.dynamodb.model.QueryResponse; import software.amazon.awssdk.services.dynamodb.model.ReplicaAlreadyExistsException; @@ -136,6 +143,8 @@ import software.amazon.awssdk.services.dynamodb.model.UpdateGlobalTableSettingsResponse; import software.amazon.awssdk.services.dynamodb.model.UpdateItemRequest; import software.amazon.awssdk.services.dynamodb.model.UpdateItemResponse; +import software.amazon.awssdk.services.dynamodb.model.UpdateKinesisStreamingDestinationRequest; +import software.amazon.awssdk.services.dynamodb.model.UpdateKinesisStreamingDestinationResponse; import software.amazon.awssdk.services.dynamodb.model.UpdateTableReplicaAutoScalingRequest; import software.amazon.awssdk.services.dynamodb.model.UpdateTableReplicaAutoScalingResponse; import software.amazon.awssdk.services.dynamodb.model.UpdateTableRequest; @@ -158,6 +167,8 @@ import software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteBackupOutput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteItemInput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteItemOutput; +import software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteResourcePolicyInput; +import software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteResourcePolicyOutput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteTableInput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteTableOutput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeBackupInput; @@ -199,6 +210,8 @@ import software.amazon.cryptography.services.dynamodb.internaldafny.types.ExportTableToPointInTimeOutput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.GetItemInput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.GetItemOutput; +import software.amazon.cryptography.services.dynamodb.internaldafny.types.GetResourcePolicyInput; +import software.amazon.cryptography.services.dynamodb.internaldafny.types.GetResourcePolicyOutput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.IDynamoDBClient; import software.amazon.cryptography.services.dynamodb.internaldafny.types.ImportTableInput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.ImportTableOutput; @@ -218,6 +231,8 @@ import software.amazon.cryptography.services.dynamodb.internaldafny.types.ListTagsOfResourceOutput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.PutItemInput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.PutItemOutput; +import software.amazon.cryptography.services.dynamodb.internaldafny.types.PutResourcePolicyInput; +import software.amazon.cryptography.services.dynamodb.internaldafny.types.PutResourcePolicyOutput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.QueryInput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.QueryOutput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.RestoreTableFromBackupInput; @@ -242,6 +257,8 @@ import software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateGlobalTableSettingsOutput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateItemInput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateItemOutput; +import software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateKinesisStreamingDestinationInput; +import software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateKinesisStreamingDestinationOutput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateTableInput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateTableOutput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateTableReplicaAutoScalingInput; @@ -704,6 +721,69 @@ public Result DeleteItem(DeleteItemInput input) { } } + @Override + public Result DeleteResourcePolicy( + DeleteResourcePolicyInput input + ) { + DeleteResourcePolicyRequest converted = ToNative.DeleteResourcePolicyInput( + input + ); + try { + DeleteResourcePolicyResponse result = _impl.deleteResourcePolicy( + converted + ); + DeleteResourcePolicyOutput dafnyResponse = + ToDafny.DeleteResourcePolicyOutput(result); + return Result.create_Success( + DeleteResourcePolicyOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); + } catch (InternalServerErrorException ex) { + return Result.create_Failure( + DeleteResourcePolicyOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); + } catch (LimitExceededException ex) { + return Result.create_Failure( + DeleteResourcePolicyOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); + } catch (PolicyNotFoundException ex) { + return Result.create_Failure( + DeleteResourcePolicyOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); + } catch (ResourceInUseException ex) { + return Result.create_Failure( + DeleteResourcePolicyOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); + } catch (ResourceNotFoundException ex) { + return Result.create_Failure( + DeleteResourcePolicyOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); + } catch (DynamoDbException ex) { + return Result.create_Failure( + DeleteResourcePolicyOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); + } catch (Exception ex) { + return Result.create_Failure( + DeleteResourcePolicyOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); + } + } + @Override public Result DeleteTable(DeleteTableInput input) { DeleteTableRequest converted = ToNative.DeleteTableInput(input); @@ -1676,6 +1756,54 @@ public Result GetItem(GetItemInput input) { } } + @Override + public Result GetResourcePolicy( + GetResourcePolicyInput input + ) { + GetResourcePolicyRequest converted = ToNative.GetResourcePolicyInput(input); + try { + GetResourcePolicyResponse result = _impl.getResourcePolicy(converted); + GetResourcePolicyOutput dafnyResponse = ToDafny.GetResourcePolicyOutput( + result + ); + return Result.create_Success( + GetResourcePolicyOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); + } catch (InternalServerErrorException ex) { + return Result.create_Failure( + GetResourcePolicyOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); + } catch (PolicyNotFoundException ex) { + return Result.create_Failure( + GetResourcePolicyOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); + } catch (ResourceNotFoundException ex) { + return Result.create_Failure( + GetResourcePolicyOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); + } catch (DynamoDbException ex) { + return Result.create_Failure( + GetResourcePolicyOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); + } catch (Exception ex) { + return Result.create_Failure( + GetResourcePolicyOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); + } + } + @Override public Result ImportTable(ImportTableInput input) { ImportTableRequest converted = ToNative.ImportTableInput(input); @@ -2046,6 +2174,66 @@ public Result PutItem(PutItemInput input) { } } + @Override + public Result PutResourcePolicy( + PutResourcePolicyInput input + ) { + PutResourcePolicyRequest converted = ToNative.PutResourcePolicyInput(input); + try { + PutResourcePolicyResponse result = _impl.putResourcePolicy(converted); + PutResourcePolicyOutput dafnyResponse = ToDafny.PutResourcePolicyOutput( + result + ); + return Result.create_Success( + PutResourcePolicyOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); + } catch (InternalServerErrorException ex) { + return Result.create_Failure( + PutResourcePolicyOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); + } catch (LimitExceededException ex) { + return Result.create_Failure( + PutResourcePolicyOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); + } catch (PolicyNotFoundException ex) { + return Result.create_Failure( + PutResourcePolicyOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); + } catch (ResourceInUseException ex) { + return Result.create_Failure( + PutResourcePolicyOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); + } catch (ResourceNotFoundException ex) { + return Result.create_Failure( + PutResourcePolicyOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); + } catch (DynamoDbException ex) { + return Result.create_Failure( + PutResourcePolicyOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); + } catch (Exception ex) { + return Result.create_Failure( + PutResourcePolicyOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); + } + } + @Override public Result Query(QueryInput input) { QueryRequest converted = ToNative.QueryInput(input); @@ -2810,6 +2998,64 @@ public Result UpdateItem(UpdateItemInput input) { } } + @Override + public Result< + UpdateKinesisStreamingDestinationOutput, + Error + > UpdateKinesisStreamingDestination( + UpdateKinesisStreamingDestinationInput input + ) { + UpdateKinesisStreamingDestinationRequest converted = + ToNative.UpdateKinesisStreamingDestinationInput(input); + try { + UpdateKinesisStreamingDestinationResponse result = + _impl.updateKinesisStreamingDestination(converted); + UpdateKinesisStreamingDestinationOutput dafnyResponse = + ToDafny.UpdateKinesisStreamingDestinationOutput(result); + return Result.create_Success( + UpdateKinesisStreamingDestinationOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); + } catch (InternalServerErrorException ex) { + return Result.create_Failure( + UpdateKinesisStreamingDestinationOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); + } catch (LimitExceededException ex) { + return Result.create_Failure( + UpdateKinesisStreamingDestinationOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); + } catch (ResourceInUseException ex) { + return Result.create_Failure( + UpdateKinesisStreamingDestinationOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); + } catch (ResourceNotFoundException ex) { + return Result.create_Failure( + UpdateKinesisStreamingDestinationOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); + } catch (DynamoDbException ex) { + return Result.create_Failure( + UpdateKinesisStreamingDestinationOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); + } catch (Exception ex) { + return Result.create_Failure( + UpdateKinesisStreamingDestinationOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); + } + } + @Override public Result UpdateTable(UpdateTableInput input) { UpdateTableRequest converted = ToNative.UpdateTableInput(input); diff --git a/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToDafny.java b/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToDafny.java index bdf4ccc44..45a50ea4f 100644 --- a/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToDafny.java +++ b/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToDafny.java @@ -43,6 +43,8 @@ import software.amazon.awssdk.services.dynamodb.model.DeleteBackupResponse; import software.amazon.awssdk.services.dynamodb.model.DeleteItemRequest; import software.amazon.awssdk.services.dynamodb.model.DeleteItemResponse; +import software.amazon.awssdk.services.dynamodb.model.DeleteResourcePolicyRequest; +import software.amazon.awssdk.services.dynamodb.model.DeleteResourcePolicyResponse; import software.amazon.awssdk.services.dynamodb.model.DeleteTableRequest; import software.amazon.awssdk.services.dynamodb.model.DeleteTableResponse; import software.amazon.awssdk.services.dynamodb.model.DescribeBackupRequest; @@ -85,6 +87,8 @@ import software.amazon.awssdk.services.dynamodb.model.ExportTableToPointInTimeResponse; import software.amazon.awssdk.services.dynamodb.model.GetItemRequest; import software.amazon.awssdk.services.dynamodb.model.GetItemResponse; +import software.amazon.awssdk.services.dynamodb.model.GetResourcePolicyRequest; +import software.amazon.awssdk.services.dynamodb.model.GetResourcePolicyResponse; import software.amazon.awssdk.services.dynamodb.model.GlobalTableAlreadyExistsException; import software.amazon.awssdk.services.dynamodb.model.GlobalTableNotFoundException; import software.amazon.awssdk.services.dynamodb.model.IdempotentParameterMismatchException; @@ -113,9 +117,12 @@ import software.amazon.awssdk.services.dynamodb.model.ListTagsOfResourceRequest; import software.amazon.awssdk.services.dynamodb.model.ListTagsOfResourceResponse; import software.amazon.awssdk.services.dynamodb.model.PointInTimeRecoveryUnavailableException; +import software.amazon.awssdk.services.dynamodb.model.PolicyNotFoundException; import software.amazon.awssdk.services.dynamodb.model.ProvisionedThroughputExceededException; import software.amazon.awssdk.services.dynamodb.model.PutItemRequest; import software.amazon.awssdk.services.dynamodb.model.PutItemResponse; +import software.amazon.awssdk.services.dynamodb.model.PutResourcePolicyRequest; +import software.amazon.awssdk.services.dynamodb.model.PutResourcePolicyResponse; import software.amazon.awssdk.services.dynamodb.model.QueryRequest; import software.amazon.awssdk.services.dynamodb.model.QueryResponse; import software.amazon.awssdk.services.dynamodb.model.ReplicaAlreadyExistsException; @@ -151,12 +158,15 @@ import software.amazon.awssdk.services.dynamodb.model.UpdateGlobalTableSettingsResponse; import software.amazon.awssdk.services.dynamodb.model.UpdateItemRequest; import software.amazon.awssdk.services.dynamodb.model.UpdateItemResponse; +import software.amazon.awssdk.services.dynamodb.model.UpdateKinesisStreamingDestinationRequest; +import software.amazon.awssdk.services.dynamodb.model.UpdateKinesisStreamingDestinationResponse; import software.amazon.awssdk.services.dynamodb.model.UpdateTableReplicaAutoScalingRequest; import software.amazon.awssdk.services.dynamodb.model.UpdateTableReplicaAutoScalingResponse; import software.amazon.awssdk.services.dynamodb.model.UpdateTableRequest; import software.amazon.awssdk.services.dynamodb.model.UpdateTableResponse; import software.amazon.awssdk.services.dynamodb.model.UpdateTimeToLiveRequest; import software.amazon.awssdk.services.dynamodb.model.UpdateTimeToLiveResponse; +import software.amazon.cryptography.services.dynamodb.internaldafny.types.ApproximateCreationDateTimePrecision; import software.amazon.cryptography.services.dynamodb.internaldafny.types.ArchivalSummary; import software.amazon.cryptography.services.dynamodb.internaldafny.types.AttributeAction; import software.amazon.cryptography.services.dynamodb.internaldafny.types.AttributeDefinition; @@ -218,6 +228,8 @@ import software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteReplicaAction; import software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteReplicationGroupMemberAction; import software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteRequest; +import software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteResourcePolicyInput; +import software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteResourcePolicyOutput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteTableInput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteTableOutput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeBackupInput; @@ -249,6 +261,7 @@ import software.amazon.cryptography.services.dynamodb.internaldafny.types.DestinationStatus; import software.amazon.cryptography.services.dynamodb.internaldafny.types.DisableKinesisStreamingDestinationInput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.DisableKinesisStreamingDestinationOutput; +import software.amazon.cryptography.services.dynamodb.internaldafny.types.EnableKinesisStreamingConfiguration; import software.amazon.cryptography.services.dynamodb.internaldafny.types.EnableKinesisStreamingDestinationInput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.EnableKinesisStreamingDestinationOutput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.Endpoint; @@ -272,6 +285,7 @@ import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ItemCollectionSizeLimitExceededException; import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_LimitExceededException; import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_PointInTimeRecoveryUnavailableException; +import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_PolicyNotFoundException; import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ProvisionedThroughputExceededException; import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ReplicaAlreadyExistsException; import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ReplicaNotFoundException; @@ -295,10 +309,14 @@ import software.amazon.cryptography.services.dynamodb.internaldafny.types.ExportSummary; import software.amazon.cryptography.services.dynamodb.internaldafny.types.ExportTableToPointInTimeInput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.ExportTableToPointInTimeOutput; +import software.amazon.cryptography.services.dynamodb.internaldafny.types.ExportType; +import software.amazon.cryptography.services.dynamodb.internaldafny.types.ExportViewType; import software.amazon.cryptography.services.dynamodb.internaldafny.types.FailureException; import software.amazon.cryptography.services.dynamodb.internaldafny.types.Get; import software.amazon.cryptography.services.dynamodb.internaldafny.types.GetItemInput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.GetItemOutput; +import software.amazon.cryptography.services.dynamodb.internaldafny.types.GetResourcePolicyInput; +import software.amazon.cryptography.services.dynamodb.internaldafny.types.GetResourcePolicyOutput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.GlobalSecondaryIndex; import software.amazon.cryptography.services.dynamodb.internaldafny.types.GlobalSecondaryIndexAutoScalingUpdate; import software.amazon.cryptography.services.dynamodb.internaldafny.types.GlobalSecondaryIndexDescription; @@ -314,6 +332,7 @@ import software.amazon.cryptography.services.dynamodb.internaldafny.types.ImportTableDescription; import software.amazon.cryptography.services.dynamodb.internaldafny.types.ImportTableInput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.ImportTableOutput; +import software.amazon.cryptography.services.dynamodb.internaldafny.types.IncrementalExportSpecification; import software.amazon.cryptography.services.dynamodb.internaldafny.types.IndexStatus; import software.amazon.cryptography.services.dynamodb.internaldafny.types.InputCompressionType; import software.amazon.cryptography.services.dynamodb.internaldafny.types.InputFormat; @@ -342,6 +361,8 @@ import software.amazon.cryptography.services.dynamodb.internaldafny.types.LocalSecondaryIndex; import software.amazon.cryptography.services.dynamodb.internaldafny.types.LocalSecondaryIndexDescription; import software.amazon.cryptography.services.dynamodb.internaldafny.types.LocalSecondaryIndexInfo; +import software.amazon.cryptography.services.dynamodb.internaldafny.types.OnDemandThroughput; +import software.amazon.cryptography.services.dynamodb.internaldafny.types.OnDemandThroughputOverride; import software.amazon.cryptography.services.dynamodb.internaldafny.types.ParameterizedStatement; import software.amazon.cryptography.services.dynamodb.internaldafny.types.PointInTimeRecoveryDescription; import software.amazon.cryptography.services.dynamodb.internaldafny.types.PointInTimeRecoverySpecification; @@ -355,6 +376,8 @@ import software.amazon.cryptography.services.dynamodb.internaldafny.types.PutItemInput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.PutItemOutput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.PutRequest; +import software.amazon.cryptography.services.dynamodb.internaldafny.types.PutResourcePolicyInput; +import software.amazon.cryptography.services.dynamodb.internaldafny.types.PutResourcePolicyOutput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.QueryInput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.QueryOutput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.Replica; @@ -425,6 +448,9 @@ import software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateGlobalTableSettingsOutput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateItemInput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateItemOutput; +import software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateKinesisStreamingConfiguration; +import software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateKinesisStreamingDestinationInput; +import software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateKinesisStreamingDestinationOutput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateReplicationGroupMemberAction; import software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateTableInput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateTableOutput; @@ -1376,7 +1402,36 @@ public static BatchStatementError BatchStatementError( : Option.create_None( DafnySequence._typeDescriptor(TypeDescriptor.CHAR) ); - return new BatchStatementError(code, message); + Option< + DafnyMap< + ? extends DafnySequence, + ? extends AttributeValue + > + > item; + item = + (Objects.nonNull(nativeValue.item()) && nativeValue.item().size() > 0) + ? Option.create_Some( + TypeDescriptor.referenceWithInitializer( + dafny.DafnyMap.class, + () -> + dafny.DafnyMap.< + dafny.DafnySequence, + AttributeValue + >empty() + ), + ToDafny.AttributeMap(nativeValue.item()) + ) + : Option.create_None( + TypeDescriptor.referenceWithInitializer( + dafny.DafnyMap.class, + () -> + dafny.DafnyMap.< + dafny.DafnySequence, + AttributeValue + >empty() + ) + ); + return new BatchStatementError(code, message, item); } public static BatchStatementRequest BatchStatementRequest( @@ -1406,7 +1461,26 @@ public static BatchStatementRequest BatchStatementRequest( (nativeValue.consistentRead()) ) : Option.create_None(TypeDescriptor.BOOLEAN); - return new BatchStatementRequest(statement, parameters, consistentRead); + Option< + ReturnValuesOnConditionCheckFailure + > returnValuesOnConditionCheckFailure; + returnValuesOnConditionCheckFailure = + Objects.nonNull(nativeValue.returnValuesOnConditionCheckFailure()) + ? Option.create_Some( + ReturnValuesOnConditionCheckFailure._typeDescriptor(), + ToDafny.ReturnValuesOnConditionCheckFailure( + nativeValue.returnValuesOnConditionCheckFailure() + ) + ) + : Option.create_None( + ReturnValuesOnConditionCheckFailure._typeDescriptor() + ); + return new BatchStatementRequest( + statement, + parameters, + consistentRead, + returnValuesOnConditionCheckFailure + ); } public static BatchStatementResponse BatchStatementResponse( @@ -2104,11 +2178,20 @@ public static CreateGlobalSecondaryIndexAction CreateGlobalSecondaryIndexAction( ToDafny.ProvisionedThroughput(nativeValue.provisionedThroughput()) ) : Option.create_None(ProvisionedThroughput._typeDescriptor()); + Option onDemandThroughput; + onDemandThroughput = + Objects.nonNull(nativeValue.onDemandThroughput()) + ? Option.create_Some( + OnDemandThroughput._typeDescriptor(), + ToDafny.OnDemandThroughput(nativeValue.onDemandThroughput()) + ) + : Option.create_None(OnDemandThroughput._typeDescriptor()); return new CreateGlobalSecondaryIndexAction( indexName, keySchema, projection, - provisionedThroughput + provisionedThroughput, + onDemandThroughput ); } @@ -2180,6 +2263,16 @@ public static CreateReplicationGroupMemberAction CreateReplicationGroupMemberAct ) ) : Option.create_None(ProvisionedThroughputOverride._typeDescriptor()); + Option onDemandThroughputOverride; + onDemandThroughputOverride = + Objects.nonNull(nativeValue.onDemandThroughputOverride()) + ? Option.create_Some( + OnDemandThroughputOverride._typeDescriptor(), + ToDafny.OnDemandThroughputOverride( + nativeValue.onDemandThroughputOverride() + ) + ) + : Option.create_None(OnDemandThroughputOverride._typeDescriptor()); Option< DafnySequence > globalSecondaryIndexes; @@ -2211,6 +2304,7 @@ public static CreateReplicationGroupMemberAction CreateReplicationGroupMemberAct regionName, kMSMasterKeyId, provisionedThroughputOverride, + onDemandThroughputOverride, globalSecondaryIndexes, tableClassOverride ); @@ -2303,6 +2397,34 @@ public static CreateTableInput CreateTableInput( ToDafny.TableClass(nativeValue.tableClass()) ) : Option.create_None(TableClass._typeDescriptor()); + Option deletionProtectionEnabled; + deletionProtectionEnabled = + Objects.nonNull(nativeValue.deletionProtectionEnabled()) + ? Option.create_Some( + TypeDescriptor.BOOLEAN, + (nativeValue.deletionProtectionEnabled()) + ) + : Option.create_None(TypeDescriptor.BOOLEAN); + Option> resourcePolicy; + resourcePolicy = + Objects.nonNull(nativeValue.resourcePolicy()) + ? Option.create_Some( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.resourcePolicy() + ) + ) + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); + Option onDemandThroughput; + onDemandThroughput = + Objects.nonNull(nativeValue.onDemandThroughput()) + ? Option.create_Some( + OnDemandThroughput._typeDescriptor(), + ToDafny.OnDemandThroughput(nativeValue.onDemandThroughput()) + ) + : Option.create_None(OnDemandThroughput._typeDescriptor()); return new CreateTableInput( attributeDefinitions, tableName, @@ -2314,7 +2436,10 @@ public static CreateTableInput CreateTableInput( streamSpecification, sSESpecification, tags, - tableClass + tableClass, + deletionProtectionEnabled, + resourcePolicy, + onDemandThroughput ); } @@ -2637,6 +2762,20 @@ public static DeleteItemInput DeleteItemInput(DeleteItemRequest nativeValue) { AttributeValue._typeDescriptor() ) ); + Option< + ReturnValuesOnConditionCheckFailure + > returnValuesOnConditionCheckFailure; + returnValuesOnConditionCheckFailure = + Objects.nonNull(nativeValue.returnValuesOnConditionCheckFailure()) + ? Option.create_Some( + ReturnValuesOnConditionCheckFailure._typeDescriptor(), + ToDafny.ReturnValuesOnConditionCheckFailure( + nativeValue.returnValuesOnConditionCheckFailure() + ) + ) + : Option.create_None( + ReturnValuesOnConditionCheckFailure._typeDescriptor() + ); return new DeleteItemInput( tableName, key, @@ -2647,7 +2786,8 @@ public static DeleteItemInput DeleteItemInput(DeleteItemRequest nativeValue) { returnItemCollectionMetrics, conditionExpression, expressionAttributeNames, - expressionAttributeValues + expressionAttributeValues, + returnValuesOnConditionCheckFailure ); } @@ -2740,6 +2880,47 @@ public static DeleteRequest DeleteRequest( return new DeleteRequest(key); } + public static DeleteResourcePolicyInput DeleteResourcePolicyInput( + DeleteResourcePolicyRequest nativeValue + ) { + DafnySequence resourceArn; + resourceArn = + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.resourceArn() + ); + Option> expectedRevisionId; + expectedRevisionId = + Objects.nonNull(nativeValue.expectedRevisionId()) + ? Option.create_Some( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.expectedRevisionId() + ) + ) + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); + return new DeleteResourcePolicyInput(resourceArn, expectedRevisionId); + } + + public static DeleteResourcePolicyOutput DeleteResourcePolicyOutput( + DeleteResourcePolicyResponse nativeValue + ) { + Option> revisionId; + revisionId = + Objects.nonNull(nativeValue.revisionId()) + ? Option.create_Some( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.revisionId() + ) + ) + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); + return new DeleteResourcePolicyOutput(revisionId); + } + public static DeleteTableInput DeleteTableInput( DeleteTableRequest nativeValue ) { @@ -3249,7 +3430,25 @@ public static DisableKinesisStreamingDestinationInput DisableKinesisStreamingDes software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( nativeValue.streamArn() ); - return new DisableKinesisStreamingDestinationInput(tableName, streamArn); + Option< + EnableKinesisStreamingConfiguration + > enableKinesisStreamingConfiguration; + enableKinesisStreamingConfiguration = + Objects.nonNull(nativeValue.enableKinesisStreamingConfiguration()) + ? Option.create_Some( + EnableKinesisStreamingConfiguration._typeDescriptor(), + ToDafny.EnableKinesisStreamingConfiguration( + nativeValue.enableKinesisStreamingConfiguration() + ) + ) + : Option.create_None( + EnableKinesisStreamingConfiguration._typeDescriptor() + ); + return new DisableKinesisStreamingDestinationInput( + tableName, + streamArn, + enableKinesisStreamingConfiguration + ); } public static DisableKinesisStreamingDestinationOutput DisableKinesisStreamingDestinationOutput( @@ -3287,10 +3486,47 @@ public static DisableKinesisStreamingDestinationOutput DisableKinesisStreamingDe ToDafny.DestinationStatus(nativeValue.destinationStatus()) ) : Option.create_None(DestinationStatus._typeDescriptor()); + Option< + EnableKinesisStreamingConfiguration + > enableKinesisStreamingConfiguration; + enableKinesisStreamingConfiguration = + Objects.nonNull(nativeValue.enableKinesisStreamingConfiguration()) + ? Option.create_Some( + EnableKinesisStreamingConfiguration._typeDescriptor(), + ToDafny.EnableKinesisStreamingConfiguration( + nativeValue.enableKinesisStreamingConfiguration() + ) + ) + : Option.create_None( + EnableKinesisStreamingConfiguration._typeDescriptor() + ); return new DisableKinesisStreamingDestinationOutput( tableName, streamArn, - destinationStatus + destinationStatus, + enableKinesisStreamingConfiguration + ); + } + + public static EnableKinesisStreamingConfiguration EnableKinesisStreamingConfiguration( + software.amazon.awssdk.services.dynamodb.model.EnableKinesisStreamingConfiguration nativeValue + ) { + Option< + ApproximateCreationDateTimePrecision + > approximateCreationDateTimePrecision; + approximateCreationDateTimePrecision = + Objects.nonNull(nativeValue.approximateCreationDateTimePrecision()) + ? Option.create_Some( + ApproximateCreationDateTimePrecision._typeDescriptor(), + ToDafny.ApproximateCreationDateTimePrecision( + nativeValue.approximateCreationDateTimePrecision() + ) + ) + : Option.create_None( + ApproximateCreationDateTimePrecision._typeDescriptor() + ); + return new EnableKinesisStreamingConfiguration( + approximateCreationDateTimePrecision ); } @@ -3307,7 +3543,25 @@ public static EnableKinesisStreamingDestinationInput EnableKinesisStreamingDesti software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( nativeValue.streamArn() ); - return new EnableKinesisStreamingDestinationInput(tableName, streamArn); + Option< + EnableKinesisStreamingConfiguration + > enableKinesisStreamingConfiguration; + enableKinesisStreamingConfiguration = + Objects.nonNull(nativeValue.enableKinesisStreamingConfiguration()) + ? Option.create_Some( + EnableKinesisStreamingConfiguration._typeDescriptor(), + ToDafny.EnableKinesisStreamingConfiguration( + nativeValue.enableKinesisStreamingConfiguration() + ) + ) + : Option.create_None( + EnableKinesisStreamingConfiguration._typeDescriptor() + ); + return new EnableKinesisStreamingDestinationInput( + tableName, + streamArn, + enableKinesisStreamingConfiguration + ); } public static EnableKinesisStreamingDestinationOutput EnableKinesisStreamingDestinationOutput( @@ -3345,10 +3599,25 @@ public static EnableKinesisStreamingDestinationOutput EnableKinesisStreamingDest ToDafny.DestinationStatus(nativeValue.destinationStatus()) ) : Option.create_None(DestinationStatus._typeDescriptor()); + Option< + EnableKinesisStreamingConfiguration + > enableKinesisStreamingConfiguration; + enableKinesisStreamingConfiguration = + Objects.nonNull(nativeValue.enableKinesisStreamingConfiguration()) + ? Option.create_Some( + EnableKinesisStreamingConfiguration._typeDescriptor(), + ToDafny.EnableKinesisStreamingConfiguration( + nativeValue.enableKinesisStreamingConfiguration() + ) + ) + : Option.create_None( + EnableKinesisStreamingConfiguration._typeDescriptor() + ); return new EnableKinesisStreamingDestinationOutput( tableName, streamArn, - destinationStatus + destinationStatus, + enableKinesisStreamingConfiguration ); } @@ -3427,13 +3696,28 @@ public static ExecuteStatementInput ExecuteStatementInput( Objects.nonNull(nativeValue.limit()) ? Option.create_Some(TypeDescriptor.INT, (nativeValue.limit())) : Option.create_None(TypeDescriptor.INT); + Option< + ReturnValuesOnConditionCheckFailure + > returnValuesOnConditionCheckFailure; + returnValuesOnConditionCheckFailure = + Objects.nonNull(nativeValue.returnValuesOnConditionCheckFailure()) + ? Option.create_Some( + ReturnValuesOnConditionCheckFailure._typeDescriptor(), + ToDafny.ReturnValuesOnConditionCheckFailure( + nativeValue.returnValuesOnConditionCheckFailure() + ) + ) + : Option.create_None( + ReturnValuesOnConditionCheckFailure._typeDescriptor() + ); return new ExecuteStatementInput( statement, parameters, consistentRead, nextToken, returnConsumedCapacity, - limit + limit, + returnValuesOnConditionCheckFailure ); } @@ -3861,6 +4145,24 @@ public static ExportDescription ExportDescription( Objects.nonNull(nativeValue.itemCount()) ? Option.create_Some(TypeDescriptor.LONG, (nativeValue.itemCount())) : Option.create_None(TypeDescriptor.LONG); + Option exportType; + exportType = + Objects.nonNull(nativeValue.exportType()) + ? Option.create_Some( + ExportType._typeDescriptor(), + ToDafny.ExportType(nativeValue.exportType()) + ) + : Option.create_None(ExportType._typeDescriptor()); + Option incrementalExportSpecification; + incrementalExportSpecification = + Objects.nonNull(nativeValue.incrementalExportSpecification()) + ? Option.create_Some( + IncrementalExportSpecification._typeDescriptor(), + ToDafny.IncrementalExportSpecification( + nativeValue.incrementalExportSpecification() + ) + ) + : Option.create_None(IncrementalExportSpecification._typeDescriptor()); return new ExportDescription( exportArn, exportStatus, @@ -3880,7 +4182,9 @@ public static ExportDescription ExportDescription( failureMessage, exportFormat, billedSizeBytes, - itemCount + itemCount, + exportType, + incrementalExportSpecification ); } @@ -3919,7 +4223,15 @@ public static ExportSummary ExportSummary( ToDafny.ExportStatus(nativeValue.exportStatus()) ) : Option.create_None(ExportStatus._typeDescriptor()); - return new ExportSummary(exportArn, exportStatus); + Option exportType; + exportType = + Objects.nonNull(nativeValue.exportType()) + ? Option.create_Some( + ExportType._typeDescriptor(), + ToDafny.ExportType(nativeValue.exportType()) + ) + : Option.create_None(ExportType._typeDescriptor()); + return new ExportSummary(exportArn, exportStatus, exportType); } public static ExportTableToPointInTimeInput ExportTableToPointInTimeInput( @@ -4011,6 +4323,24 @@ public static ExportTableToPointInTimeInput ExportTableToPointInTimeInput( ToDafny.ExportFormat(nativeValue.exportFormat()) ) : Option.create_None(ExportFormat._typeDescriptor()); + Option exportType; + exportType = + Objects.nonNull(nativeValue.exportType()) + ? Option.create_Some( + ExportType._typeDescriptor(), + ToDafny.ExportType(nativeValue.exportType()) + ) + : Option.create_None(ExportType._typeDescriptor()); + Option incrementalExportSpecification; + incrementalExportSpecification = + Objects.nonNull(nativeValue.incrementalExportSpecification()) + ? Option.create_Some( + IncrementalExportSpecification._typeDescriptor(), + ToDafny.IncrementalExportSpecification( + nativeValue.incrementalExportSpecification() + ) + ) + : Option.create_None(IncrementalExportSpecification._typeDescriptor()); return new ExportTableToPointInTimeInput( tableArn, exportTime, @@ -4020,7 +4350,9 @@ public static ExportTableToPointInTimeInput ExportTableToPointInTimeInput( s3Prefix, s3SseAlgorithm, s3SseKmsKeyId, - exportFormat + exportFormat, + exportType, + incrementalExportSpecification ); } @@ -4300,6 +4632,47 @@ public static GetItemOutput GetItemOutput(GetItemResponse nativeValue) { return new GetItemOutput(item, consumedCapacity); } + public static GetResourcePolicyInput GetResourcePolicyInput( + GetResourcePolicyRequest nativeValue + ) { + DafnySequence resourceArn; + resourceArn = + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.resourceArn() + ); + return new GetResourcePolicyInput(resourceArn); + } + + public static GetResourcePolicyOutput GetResourcePolicyOutput( + GetResourcePolicyResponse nativeValue + ) { + Option> policy; + policy = + Objects.nonNull(nativeValue.policy()) + ? Option.create_Some( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.policy() + ) + ) + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); + Option> revisionId; + revisionId = + Objects.nonNull(nativeValue.revisionId()) + ? Option.create_Some( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.revisionId() + ) + ) + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); + return new GetResourcePolicyOutput(policy, revisionId); + } + public static GlobalSecondaryIndex GlobalSecondaryIndex( software.amazon.awssdk.services.dynamodb.model.GlobalSecondaryIndex nativeValue ) { @@ -4320,11 +4693,20 @@ public static GlobalSecondaryIndex GlobalSecondaryIndex( ToDafny.ProvisionedThroughput(nativeValue.provisionedThroughput()) ) : Option.create_None(ProvisionedThroughput._typeDescriptor()); + Option onDemandThroughput; + onDemandThroughput = + Objects.nonNull(nativeValue.onDemandThroughput()) + ? Option.create_Some( + OnDemandThroughput._typeDescriptor(), + ToDafny.OnDemandThroughput(nativeValue.onDemandThroughput()) + ) + : Option.create_None(OnDemandThroughput._typeDescriptor()); return new GlobalSecondaryIndex( indexName, keySchema, projection, - provisionedThroughput + provisionedThroughput, + onDemandThroughput ); } @@ -4460,6 +4842,14 @@ public static GlobalSecondaryIndexDescription GlobalSecondaryIndexDescription( : Option.create_None( DafnySequence._typeDescriptor(TypeDescriptor.CHAR) ); + Option onDemandThroughput; + onDemandThroughput = + Objects.nonNull(nativeValue.onDemandThroughput()) + ? Option.create_Some( + OnDemandThroughput._typeDescriptor(), + ToDafny.OnDemandThroughput(nativeValue.onDemandThroughput()) + ) + : Option.create_None(OnDemandThroughput._typeDescriptor()); return new GlobalSecondaryIndexDescription( indexName, keySchema, @@ -4469,7 +4859,8 @@ public static GlobalSecondaryIndexDescription GlobalSecondaryIndexDescription( provisionedThroughput, indexSizeBytes, itemCount, - indexArn + indexArn, + onDemandThroughput ); } @@ -4543,11 +4934,20 @@ public static GlobalSecondaryIndexInfo GlobalSecondaryIndexInfo( ToDafny.ProvisionedThroughput(nativeValue.provisionedThroughput()) ) : Option.create_None(ProvisionedThroughput._typeDescriptor()); + Option onDemandThroughput; + onDemandThroughput = + Objects.nonNull(nativeValue.onDemandThroughput()) + ? Option.create_Some( + OnDemandThroughput._typeDescriptor(), + ToDafny.OnDemandThroughput(nativeValue.onDemandThroughput()) + ) + : Option.create_None(OnDemandThroughput._typeDescriptor()); return new GlobalSecondaryIndexInfo( indexName, keySchema, projection, - provisionedThroughput + provisionedThroughput, + onDemandThroughput ); } @@ -5151,6 +5551,48 @@ public static ImportTableOutput ImportTableOutput( return new ImportTableOutput(importTableDescription); } + public static IncrementalExportSpecification IncrementalExportSpecification( + software.amazon.awssdk.services.dynamodb.model.IncrementalExportSpecification nativeValue + ) { + Option> exportFromTime; + exportFromTime = + Objects.nonNull(nativeValue.exportFromTime()) + ? Option.create_Some( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.exportFromTime() + ) + ) + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); + Option> exportToTime; + exportToTime = + Objects.nonNull(nativeValue.exportToTime()) + ? Option.create_Some( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.exportToTime() + ) + ) + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); + Option exportViewType; + exportViewType = + Objects.nonNull(nativeValue.exportViewType()) + ? Option.create_Some( + ExportViewType._typeDescriptor(), + ToDafny.ExportViewType(nativeValue.exportViewType()) + ) + : Option.create_None(ExportViewType._typeDescriptor()); + return new IncrementalExportSpecification( + exportFromTime, + exportToTime, + exportViewType + ); + } + public static InputFormatOptions InputFormatOptions( software.amazon.awssdk.services.dynamodb.model.InputFormatOptions nativeValue ) { @@ -5547,10 +5989,25 @@ public static KinesisDataStreamDestination KinesisDataStreamDestination( : Option.create_None( DafnySequence._typeDescriptor(TypeDescriptor.CHAR) ); + Option< + ApproximateCreationDateTimePrecision + > approximateCreationDateTimePrecision; + approximateCreationDateTimePrecision = + Objects.nonNull(nativeValue.approximateCreationDateTimePrecision()) + ? Option.create_Some( + ApproximateCreationDateTimePrecision._typeDescriptor(), + ToDafny.ApproximateCreationDateTimePrecision( + nativeValue.approximateCreationDateTimePrecision() + ) + ) + : Option.create_None( + ApproximateCreationDateTimePrecision._typeDescriptor() + ); return new KinesisDataStreamDestination( streamArn, destinationStatus, - destinationStatusDescription + destinationStatusDescription, + approximateCreationDateTimePrecision ); } @@ -6263,6 +6720,42 @@ > NumberSetAttributeValue(List nativeValue) { ); } + public static OnDemandThroughput OnDemandThroughput( + software.amazon.awssdk.services.dynamodb.model.OnDemandThroughput nativeValue + ) { + Option maxReadRequestUnits; + maxReadRequestUnits = + Objects.nonNull(nativeValue.maxReadRequestUnits()) + ? Option.create_Some( + TypeDescriptor.LONG, + (nativeValue.maxReadRequestUnits()) + ) + : Option.create_None(TypeDescriptor.LONG); + Option maxWriteRequestUnits; + maxWriteRequestUnits = + Objects.nonNull(nativeValue.maxWriteRequestUnits()) + ? Option.create_Some( + TypeDescriptor.LONG, + (nativeValue.maxWriteRequestUnits()) + ) + : Option.create_None(TypeDescriptor.LONG); + return new OnDemandThroughput(maxReadRequestUnits, maxWriteRequestUnits); + } + + public static OnDemandThroughputOverride OnDemandThroughputOverride( + software.amazon.awssdk.services.dynamodb.model.OnDemandThroughputOverride nativeValue + ) { + Option maxReadRequestUnits; + maxReadRequestUnits = + Objects.nonNull(nativeValue.maxReadRequestUnits()) + ? Option.create_Some( + TypeDescriptor.LONG, + (nativeValue.maxReadRequestUnits()) + ) + : Option.create_None(TypeDescriptor.LONG); + return new OnDemandThroughputOverride(maxReadRequestUnits); + } + public static ParameterizedStatement ParameterizedStatement( software.amazon.awssdk.services.dynamodb.model.ParameterizedStatement nativeValue ) { @@ -6282,7 +6775,25 @@ public static ParameterizedStatement ParameterizedStatement( : Option.create_None( DafnySequence._typeDescriptor(AttributeValue._typeDescriptor()) ); - return new ParameterizedStatement(statement, parameters); + Option< + ReturnValuesOnConditionCheckFailure + > returnValuesOnConditionCheckFailure; + returnValuesOnConditionCheckFailure = + Objects.nonNull(nativeValue.returnValuesOnConditionCheckFailure()) + ? Option.create_Some( + ReturnValuesOnConditionCheckFailure._typeDescriptor(), + ToDafny.ReturnValuesOnConditionCheckFailure( + nativeValue.returnValuesOnConditionCheckFailure() + ) + ) + : Option.create_None( + ReturnValuesOnConditionCheckFailure._typeDescriptor() + ); + return new ParameterizedStatement( + statement, + parameters, + returnValuesOnConditionCheckFailure + ); } public static DafnySequence< @@ -6732,6 +7243,20 @@ public static PutItemInput PutItemInput(PutItemRequest nativeValue) { AttributeValue._typeDescriptor() ) ); + Option< + ReturnValuesOnConditionCheckFailure + > returnValuesOnConditionCheckFailure; + returnValuesOnConditionCheckFailure = + Objects.nonNull(nativeValue.returnValuesOnConditionCheckFailure()) + ? Option.create_Some( + ReturnValuesOnConditionCheckFailure._typeDescriptor(), + ToDafny.ReturnValuesOnConditionCheckFailure( + nativeValue.returnValuesOnConditionCheckFailure() + ) + ) + : Option.create_None( + ReturnValuesOnConditionCheckFailure._typeDescriptor() + ); return new PutItemInput( tableName, item, @@ -6742,7 +7267,8 @@ public static PutItemInput PutItemInput(PutItemRequest nativeValue) { conditionalOperator, conditionExpression, expressionAttributeNames, - expressionAttributeValues + expressionAttributeValues, + returnValuesOnConditionCheckFailure ); } @@ -6827,6 +7353,65 @@ public static PutRequest PutRequest( return new PutRequest(item); } + public static PutResourcePolicyInput PutResourcePolicyInput( + PutResourcePolicyRequest nativeValue + ) { + DafnySequence resourceArn; + resourceArn = + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.resourceArn() + ); + DafnySequence policy; + policy = + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.policy() + ); + Option> expectedRevisionId; + expectedRevisionId = + Objects.nonNull(nativeValue.expectedRevisionId()) + ? Option.create_Some( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.expectedRevisionId() + ) + ) + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); + Option confirmRemoveSelfResourceAccess; + confirmRemoveSelfResourceAccess = + Objects.nonNull(nativeValue.confirmRemoveSelfResourceAccess()) + ? Option.create_Some( + TypeDescriptor.BOOLEAN, + (nativeValue.confirmRemoveSelfResourceAccess()) + ) + : Option.create_None(TypeDescriptor.BOOLEAN); + return new PutResourcePolicyInput( + resourceArn, + policy, + expectedRevisionId, + confirmRemoveSelfResourceAccess + ); + } + + public static PutResourcePolicyOutput PutResourcePolicyOutput( + PutResourcePolicyResponse nativeValue + ) { + Option> revisionId; + revisionId = + Objects.nonNull(nativeValue.revisionId()) + ? Option.create_Some( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.revisionId() + ) + ) + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); + return new PutResourcePolicyOutput(revisionId); + } + public static QueryInput QueryInput(QueryRequest nativeValue) { DafnySequence tableName; tableName = @@ -7421,6 +8006,16 @@ public static ReplicaDescription ReplicaDescription( ) ) : Option.create_None(ProvisionedThroughputOverride._typeDescriptor()); + Option onDemandThroughputOverride; + onDemandThroughputOverride = + Objects.nonNull(nativeValue.onDemandThroughputOverride()) + ? Option.create_Some( + OnDemandThroughputOverride._typeDescriptor(), + ToDafny.OnDemandThroughputOverride( + nativeValue.onDemandThroughputOverride() + ) + ) + : Option.create_None(OnDemandThroughputOverride._typeDescriptor()); Option< DafnySequence > globalSecondaryIndexes; @@ -7467,6 +8062,7 @@ public static ReplicaDescription ReplicaDescription( replicaStatusPercentProgress, kMSMasterKeyId, provisionedThroughputOverride, + onDemandThroughputOverride, globalSecondaryIndexes, replicaInaccessibleDateTime, replicaTableClassSummary @@ -7505,9 +8101,20 @@ public static ReplicaGlobalSecondaryIndex ReplicaGlobalSecondaryIndex( ) ) : Option.create_None(ProvisionedThroughputOverride._typeDescriptor()); + Option onDemandThroughputOverride; + onDemandThroughputOverride = + Objects.nonNull(nativeValue.onDemandThroughputOverride()) + ? Option.create_Some( + OnDemandThroughputOverride._typeDescriptor(), + ToDafny.OnDemandThroughputOverride( + nativeValue.onDemandThroughputOverride() + ) + ) + : Option.create_None(OnDemandThroughputOverride._typeDescriptor()); return new ReplicaGlobalSecondaryIndex( indexName, - provisionedThroughputOverride + provisionedThroughputOverride, + onDemandThroughputOverride ); } @@ -7650,9 +8257,20 @@ public static ReplicaGlobalSecondaryIndexDescription ReplicaGlobalSecondaryIndex ) ) : Option.create_None(ProvisionedThroughputOverride._typeDescriptor()); + Option onDemandThroughputOverride; + onDemandThroughputOverride = + Objects.nonNull(nativeValue.onDemandThroughputOverride()) + ? Option.create_Some( + OnDemandThroughputOverride._typeDescriptor(), + ToDafny.OnDemandThroughputOverride( + nativeValue.onDemandThroughputOverride() + ) + ) + : Option.create_None(OnDemandThroughputOverride._typeDescriptor()); return new ReplicaGlobalSecondaryIndexDescription( indexName, - provisionedThroughputOverride + provisionedThroughputOverride, + onDemandThroughputOverride ); } @@ -8216,6 +8834,14 @@ public static RestoreTableFromBackupInput RestoreTableFromBackupInput( ) ) : Option.create_None(ProvisionedThroughput._typeDescriptor()); + Option onDemandThroughputOverride; + onDemandThroughputOverride = + Objects.nonNull(nativeValue.onDemandThroughputOverride()) + ? Option.create_Some( + OnDemandThroughput._typeDescriptor(), + ToDafny.OnDemandThroughput(nativeValue.onDemandThroughputOverride()) + ) + : Option.create_None(OnDemandThroughput._typeDescriptor()); Option sSESpecificationOverride; sSESpecificationOverride = Objects.nonNull(nativeValue.sseSpecificationOverride()) @@ -8231,6 +8857,7 @@ public static RestoreTableFromBackupInput RestoreTableFromBackupInput( globalSecondaryIndexOverride, localSecondaryIndexOverride, provisionedThroughputOverride, + onDemandThroughputOverride, sSESpecificationOverride ); } @@ -8349,6 +8976,14 @@ public static RestoreTableToPointInTimeInput RestoreTableToPointInTimeInput( ) ) : Option.create_None(ProvisionedThroughput._typeDescriptor()); + Option onDemandThroughputOverride; + onDemandThroughputOverride = + Objects.nonNull(nativeValue.onDemandThroughputOverride()) + ? Option.create_Some( + OnDemandThroughput._typeDescriptor(), + ToDafny.OnDemandThroughput(nativeValue.onDemandThroughputOverride()) + ) + : Option.create_None(OnDemandThroughput._typeDescriptor()); Option sSESpecificationOverride; sSESpecificationOverride = Objects.nonNull(nativeValue.sseSpecificationOverride()) @@ -8367,6 +9002,7 @@ public static RestoreTableToPointInTimeInput RestoreTableToPointInTimeInput( globalSecondaryIndexOverride, localSecondaryIndexOverride, provisionedThroughputOverride, + onDemandThroughputOverride, sSESpecificationOverride ); } @@ -8798,6 +9434,14 @@ public static SourceTableDetails SourceTableDetails( ProvisionedThroughput provisionedThroughput; provisionedThroughput = ToDafny.ProvisionedThroughput(nativeValue.provisionedThroughput()); + Option onDemandThroughput; + onDemandThroughput = + Objects.nonNull(nativeValue.onDemandThroughput()) + ? Option.create_Some( + OnDemandThroughput._typeDescriptor(), + ToDafny.OnDemandThroughput(nativeValue.onDemandThroughput()) + ) + : Option.create_None(OnDemandThroughput._typeDescriptor()); Option itemCount; itemCount = Objects.nonNull(nativeValue.itemCount()) @@ -8819,6 +9463,7 @@ public static SourceTableDetails SourceTableDetails( keySchema, tableCreationDateTime, provisionedThroughput, + onDemandThroughput, itemCount, billingMode ); @@ -9098,6 +9743,14 @@ public static TableCreationParameters TableCreationParameters( ToDafny.ProvisionedThroughput(nativeValue.provisionedThroughput()) ) : Option.create_None(ProvisionedThroughput._typeDescriptor()); + Option onDemandThroughput; + onDemandThroughput = + Objects.nonNull(nativeValue.onDemandThroughput()) + ? Option.create_Some( + OnDemandThroughput._typeDescriptor(), + ToDafny.OnDemandThroughput(nativeValue.onDemandThroughput()) + ) + : Option.create_None(OnDemandThroughput._typeDescriptor()); Option sSESpecification; sSESpecification = Objects.nonNull(nativeValue.sseSpecification()) @@ -9125,6 +9778,7 @@ public static TableCreationParameters TableCreationParameters( keySchema, billingMode, provisionedThroughput, + onDemandThroughput, sSESpecification, globalSecondaryIndexes ); @@ -9369,6 +10023,22 @@ public static TableDescription TableDescription( ToDafny.TableClassSummary(nativeValue.tableClassSummary()) ) : Option.create_None(TableClassSummary._typeDescriptor()); + Option deletionProtectionEnabled; + deletionProtectionEnabled = + Objects.nonNull(nativeValue.deletionProtectionEnabled()) + ? Option.create_Some( + TypeDescriptor.BOOLEAN, + (nativeValue.deletionProtectionEnabled()) + ) + : Option.create_None(TypeDescriptor.BOOLEAN); + Option onDemandThroughput; + onDemandThroughput = + Objects.nonNull(nativeValue.onDemandThroughput()) + ? Option.create_Some( + OnDemandThroughput._typeDescriptor(), + ToDafny.OnDemandThroughput(nativeValue.onDemandThroughput()) + ) + : Option.create_None(OnDemandThroughput._typeDescriptor()); return new TableDescription( attributeDefinitions, tableName, @@ -9391,7 +10061,9 @@ public static TableDescription TableDescription( restoreSummary, sSEDescription, archivalSummary, - tableClassSummary + tableClassSummary, + deletionProtectionEnabled, + onDemandThroughput ); } @@ -9935,12 +10607,26 @@ public static UpdateGlobalSecondaryIndexAction UpdateGlobalSecondaryIndexAction( software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( nativeValue.indexName() ); - ProvisionedThroughput provisionedThroughput; + Option provisionedThroughput; provisionedThroughput = - ToDafny.ProvisionedThroughput(nativeValue.provisionedThroughput()); + Objects.nonNull(nativeValue.provisionedThroughput()) + ? Option.create_Some( + ProvisionedThroughput._typeDescriptor(), + ToDafny.ProvisionedThroughput(nativeValue.provisionedThroughput()) + ) + : Option.create_None(ProvisionedThroughput._typeDescriptor()); + Option onDemandThroughput; + onDemandThroughput = + Objects.nonNull(nativeValue.onDemandThroughput()) + ? Option.create_Some( + OnDemandThroughput._typeDescriptor(), + ToDafny.OnDemandThroughput(nativeValue.onDemandThroughput()) + ) + : Option.create_None(OnDemandThroughput._typeDescriptor()); return new UpdateGlobalSecondaryIndexAction( indexName, - provisionedThroughput + provisionedThroughput, + onDemandThroughput ); } @@ -10253,6 +10939,20 @@ public static UpdateItemInput UpdateItemInput(UpdateItemRequest nativeValue) { AttributeValue._typeDescriptor() ) ); + Option< + ReturnValuesOnConditionCheckFailure + > returnValuesOnConditionCheckFailure; + returnValuesOnConditionCheckFailure = + Objects.nonNull(nativeValue.returnValuesOnConditionCheckFailure()) + ? Option.create_Some( + ReturnValuesOnConditionCheckFailure._typeDescriptor(), + ToDafny.ReturnValuesOnConditionCheckFailure( + nativeValue.returnValuesOnConditionCheckFailure() + ) + ) + : Option.create_None( + ReturnValuesOnConditionCheckFailure._typeDescriptor() + ); return new UpdateItemInput( tableName, key, @@ -10265,7 +10965,8 @@ public static UpdateItemInput UpdateItemInput(UpdateItemRequest nativeValue) { updateExpression, conditionExpression, expressionAttributeNames, - expressionAttributeValues + expressionAttributeValues, + returnValuesOnConditionCheckFailure ); } @@ -10325,6 +11026,119 @@ public static UpdateItemOutput UpdateItemOutput( ); } + public static UpdateKinesisStreamingConfiguration UpdateKinesisStreamingConfiguration( + software.amazon.awssdk.services.dynamodb.model.UpdateKinesisStreamingConfiguration nativeValue + ) { + Option< + ApproximateCreationDateTimePrecision + > approximateCreationDateTimePrecision; + approximateCreationDateTimePrecision = + Objects.nonNull(nativeValue.approximateCreationDateTimePrecision()) + ? Option.create_Some( + ApproximateCreationDateTimePrecision._typeDescriptor(), + ToDafny.ApproximateCreationDateTimePrecision( + nativeValue.approximateCreationDateTimePrecision() + ) + ) + : Option.create_None( + ApproximateCreationDateTimePrecision._typeDescriptor() + ); + return new UpdateKinesisStreamingConfiguration( + approximateCreationDateTimePrecision + ); + } + + public static UpdateKinesisStreamingDestinationInput UpdateKinesisStreamingDestinationInput( + UpdateKinesisStreamingDestinationRequest nativeValue + ) { + DafnySequence tableName; + tableName = + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.tableName() + ); + DafnySequence streamArn; + streamArn = + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.streamArn() + ); + Option< + UpdateKinesisStreamingConfiguration + > updateKinesisStreamingConfiguration; + updateKinesisStreamingConfiguration = + Objects.nonNull(nativeValue.updateKinesisStreamingConfiguration()) + ? Option.create_Some( + UpdateKinesisStreamingConfiguration._typeDescriptor(), + ToDafny.UpdateKinesisStreamingConfiguration( + nativeValue.updateKinesisStreamingConfiguration() + ) + ) + : Option.create_None( + UpdateKinesisStreamingConfiguration._typeDescriptor() + ); + return new UpdateKinesisStreamingDestinationInput( + tableName, + streamArn, + updateKinesisStreamingConfiguration + ); + } + + public static UpdateKinesisStreamingDestinationOutput UpdateKinesisStreamingDestinationOutput( + UpdateKinesisStreamingDestinationResponse nativeValue + ) { + Option> tableName; + tableName = + Objects.nonNull(nativeValue.tableName()) + ? Option.create_Some( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.tableName() + ) + ) + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); + Option> streamArn; + streamArn = + Objects.nonNull(nativeValue.streamArn()) + ? Option.create_Some( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.streamArn() + ) + ) + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); + Option destinationStatus; + destinationStatus = + Objects.nonNull(nativeValue.destinationStatus()) + ? Option.create_Some( + DestinationStatus._typeDescriptor(), + ToDafny.DestinationStatus(nativeValue.destinationStatus()) + ) + : Option.create_None(DestinationStatus._typeDescriptor()); + Option< + UpdateKinesisStreamingConfiguration + > updateKinesisStreamingConfiguration; + updateKinesisStreamingConfiguration = + Objects.nonNull(nativeValue.updateKinesisStreamingConfiguration()) + ? Option.create_Some( + UpdateKinesisStreamingConfiguration._typeDescriptor(), + ToDafny.UpdateKinesisStreamingConfiguration( + nativeValue.updateKinesisStreamingConfiguration() + ) + ) + : Option.create_None( + UpdateKinesisStreamingConfiguration._typeDescriptor() + ); + return new UpdateKinesisStreamingDestinationOutput( + tableName, + streamArn, + destinationStatus, + updateKinesisStreamingConfiguration + ); + } + public static UpdateReplicationGroupMemberAction UpdateReplicationGroupMemberAction( software.amazon.awssdk.services.dynamodb.model.UpdateReplicationGroupMemberAction nativeValue ) { @@ -10355,6 +11169,16 @@ public static UpdateReplicationGroupMemberAction UpdateReplicationGroupMemberAct ) ) : Option.create_None(ProvisionedThroughputOverride._typeDescriptor()); + Option onDemandThroughputOverride; + onDemandThroughputOverride = + Objects.nonNull(nativeValue.onDemandThroughputOverride()) + ? Option.create_Some( + OnDemandThroughputOverride._typeDescriptor(), + ToDafny.OnDemandThroughputOverride( + nativeValue.onDemandThroughputOverride() + ) + ) + : Option.create_None(OnDemandThroughputOverride._typeDescriptor()); Option< DafnySequence > globalSecondaryIndexes; @@ -10386,6 +11210,7 @@ public static UpdateReplicationGroupMemberAction UpdateReplicationGroupMemberAct regionName, kMSMasterKeyId, provisionedThroughputOverride, + onDemandThroughputOverride, globalSecondaryIndexes, tableClassOverride ); @@ -10484,6 +11309,22 @@ public static UpdateTableInput UpdateTableInput( ToDafny.TableClass(nativeValue.tableClass()) ) : Option.create_None(TableClass._typeDescriptor()); + Option deletionProtectionEnabled; + deletionProtectionEnabled = + Objects.nonNull(nativeValue.deletionProtectionEnabled()) + ? Option.create_Some( + TypeDescriptor.BOOLEAN, + (nativeValue.deletionProtectionEnabled()) + ) + : Option.create_None(TypeDescriptor.BOOLEAN); + Option onDemandThroughput; + onDemandThroughput = + Objects.nonNull(nativeValue.onDemandThroughput()) + ? Option.create_Some( + OnDemandThroughput._typeDescriptor(), + ToDafny.OnDemandThroughput(nativeValue.onDemandThroughput()) + ) + : Option.create_None(OnDemandThroughput._typeDescriptor()); return new UpdateTableInput( attributeDefinitions, tableName, @@ -10493,7 +11334,9 @@ public static UpdateTableInput UpdateTableInput( streamSpecification, sSESpecification, replicaUpdates, - tableClass + tableClass, + deletionProtectionEnabled, + onDemandThroughput ); } @@ -10694,7 +11537,36 @@ public static Error Error(ConditionalCheckFailedException nativeValue) { : Option.create_None( DafnySequence._typeDescriptor(TypeDescriptor.CHAR) ); - return new Error_ConditionalCheckFailedException(message); + Option< + DafnyMap< + ? extends DafnySequence, + ? extends AttributeValue + > + > item; + item = + (Objects.nonNull(nativeValue.item()) && nativeValue.item().size() > 0) + ? Option.create_Some( + TypeDescriptor.referenceWithInitializer( + dafny.DafnyMap.class, + () -> + dafny.DafnyMap.< + dafny.DafnySequence, + AttributeValue + >empty() + ), + ToDafny.AttributeMap(nativeValue.item()) + ) + : Option.create_None( + TypeDescriptor.referenceWithInitializer( + dafny.DafnyMap.class, + () -> + dafny.DafnyMap.< + dafny.DafnySequence, + AttributeValue + >empty() + ) + ); + return new Error_ConditionalCheckFailedException(message, item); } public static Error Error(ContinuousBackupsUnavailableException nativeValue) { @@ -10957,6 +11829,22 @@ public static Error Error( return new Error_PointInTimeRecoveryUnavailableException(message); } + public static Error Error(PolicyNotFoundException nativeValue) { + Option> message; + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); + return new Error_PolicyNotFoundException(message); + } + public static Error Error( ProvisionedThroughputExceededException nativeValue ) { @@ -11162,6 +12050,29 @@ public static Error Error(TransactionInProgressException nativeValue) { return new Error_TransactionInProgressException(message); } + public static ApproximateCreationDateTimePrecision ApproximateCreationDateTimePrecision( + software.amazon.awssdk.services.dynamodb.model.ApproximateCreationDateTimePrecision nativeValue + ) { + switch (nativeValue) { + case MILLISECOND: + { + return ApproximateCreationDateTimePrecision.create_MILLISECOND(); + } + case MICROSECOND: + { + return ApproximateCreationDateTimePrecision.create_MICROSECOND(); + } + default: + { + throw new RuntimeException( + "Cannot convert " + + nativeValue + + " to software.amazon.cryptography.services.dynamodb.internaldafny.types.ApproximateCreationDateTimePrecision." + ); + } + } + } + public static AttributeAction AttributeAction( software.amazon.awssdk.services.dynamodb.model.AttributeAction nativeValue ) { @@ -11551,6 +12462,10 @@ public static DestinationStatus DestinationStatus( { return DestinationStatus.create_ENABLE__FAILED(); } + case UPDATING: + { + return DestinationStatus.create_UPDATING(); + } default: { throw new RuntimeException( @@ -11612,6 +12527,52 @@ public static ExportStatus ExportStatus( } } + public static ExportType ExportType( + software.amazon.awssdk.services.dynamodb.model.ExportType nativeValue + ) { + switch (nativeValue) { + case FULL_EXPORT: + { + return ExportType.create_FULL__EXPORT(); + } + case INCREMENTAL_EXPORT: + { + return ExportType.create_INCREMENTAL__EXPORT(); + } + default: + { + throw new RuntimeException( + "Cannot convert " + + nativeValue + + " to software.amazon.cryptography.services.dynamodb.internaldafny.types.ExportType." + ); + } + } + } + + public static ExportViewType ExportViewType( + software.amazon.awssdk.services.dynamodb.model.ExportViewType nativeValue + ) { + switch (nativeValue) { + case NEW_IMAGE: + { + return ExportViewType.create_NEW__IMAGE(); + } + case NEW_AND_OLD_IMAGES: + { + return ExportViewType.create_NEW__AND__OLD__IMAGES(); + } + default: + { + throw new RuntimeException( + "Cannot convert " + + nativeValue + + " to software.amazon.cryptography.services.dynamodb.internaldafny.types.ExportViewType." + ); + } + } + } + public static GlobalTableStatus GlobalTableStatus( software.amazon.awssdk.services.dynamodb.model.GlobalTableStatus nativeValue ) { @@ -12254,6 +13215,16 @@ public static TimeToLiveStatus TimeToLiveStatus( } } + public static ApproximateCreationDateTimePrecision ApproximateCreationDateTimePrecision( + String nativeValue + ) { + return ApproximateCreationDateTimePrecision( + software.amazon.awssdk.services.dynamodb.model.ApproximateCreationDateTimePrecision.fromValue( + nativeValue + ) + ); + } + public static AttributeAction AttributeAction(String nativeValue) { return AttributeAction( software.amazon.awssdk.services.dynamodb.model.AttributeAction.fromValue( @@ -12374,6 +13345,22 @@ public static ExportStatus ExportStatus(String nativeValue) { ); } + public static ExportType ExportType(String nativeValue) { + return ExportType( + software.amazon.awssdk.services.dynamodb.model.ExportType.fromValue( + nativeValue + ) + ); + } + + public static ExportViewType ExportViewType(String nativeValue) { + return ExportViewType( + software.amazon.awssdk.services.dynamodb.model.ExportViewType.fromValue( + nativeValue + ) + ); + } + public static GlobalTableStatus GlobalTableStatus(String nativeValue) { return GlobalTableStatus( software.amazon.awssdk.services.dynamodb.model.GlobalTableStatus.fromValue( diff --git a/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToNative.java b/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToNative.java index 89e444e05..74b2aa12b 100644 --- a/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToNative.java +++ b/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToNative.java @@ -16,6 +16,7 @@ import java.util.Map; import software.amazon.awssdk.core.SdkBytes; import software.amazon.awssdk.services.dynamodb.DynamoDbClient; +import software.amazon.awssdk.services.dynamodb.model.ApproximateCreationDateTimePrecision; import software.amazon.awssdk.services.dynamodb.model.ArchivalSummary; import software.amazon.awssdk.services.dynamodb.model.AttributeAction; import software.amazon.awssdk.services.dynamodb.model.AttributeDefinition; @@ -80,6 +81,8 @@ import software.amazon.awssdk.services.dynamodb.model.DeleteReplicaAction; import software.amazon.awssdk.services.dynamodb.model.DeleteReplicationGroupMemberAction; import software.amazon.awssdk.services.dynamodb.model.DeleteRequest; +import software.amazon.awssdk.services.dynamodb.model.DeleteResourcePolicyRequest; +import software.amazon.awssdk.services.dynamodb.model.DeleteResourcePolicyResponse; import software.amazon.awssdk.services.dynamodb.model.DeleteTableRequest; import software.amazon.awssdk.services.dynamodb.model.DeleteTableResponse; import software.amazon.awssdk.services.dynamodb.model.DescribeBackupRequest; @@ -113,6 +116,7 @@ import software.amazon.awssdk.services.dynamodb.model.DisableKinesisStreamingDestinationResponse; import software.amazon.awssdk.services.dynamodb.model.DuplicateItemException; import software.amazon.awssdk.services.dynamodb.model.DynamoDbException; +import software.amazon.awssdk.services.dynamodb.model.EnableKinesisStreamingConfiguration; import software.amazon.awssdk.services.dynamodb.model.EnableKinesisStreamingDestinationRequest; import software.amazon.awssdk.services.dynamodb.model.EnableKinesisStreamingDestinationResponse; import software.amazon.awssdk.services.dynamodb.model.Endpoint; @@ -129,10 +133,14 @@ import software.amazon.awssdk.services.dynamodb.model.ExportSummary; import software.amazon.awssdk.services.dynamodb.model.ExportTableToPointInTimeRequest; import software.amazon.awssdk.services.dynamodb.model.ExportTableToPointInTimeResponse; +import software.amazon.awssdk.services.dynamodb.model.ExportType; +import software.amazon.awssdk.services.dynamodb.model.ExportViewType; import software.amazon.awssdk.services.dynamodb.model.FailureException; import software.amazon.awssdk.services.dynamodb.model.Get; import software.amazon.awssdk.services.dynamodb.model.GetItemRequest; import software.amazon.awssdk.services.dynamodb.model.GetItemResponse; +import software.amazon.awssdk.services.dynamodb.model.GetResourcePolicyRequest; +import software.amazon.awssdk.services.dynamodb.model.GetResourcePolicyResponse; import software.amazon.awssdk.services.dynamodb.model.GlobalSecondaryIndex; import software.amazon.awssdk.services.dynamodb.model.GlobalSecondaryIndexAutoScalingUpdate; import software.amazon.awssdk.services.dynamodb.model.GlobalSecondaryIndexDescription; @@ -152,6 +160,7 @@ import software.amazon.awssdk.services.dynamodb.model.ImportTableDescription; import software.amazon.awssdk.services.dynamodb.model.ImportTableRequest; import software.amazon.awssdk.services.dynamodb.model.ImportTableResponse; +import software.amazon.awssdk.services.dynamodb.model.IncrementalExportSpecification; import software.amazon.awssdk.services.dynamodb.model.IndexNotFoundException; import software.amazon.awssdk.services.dynamodb.model.IndexStatus; import software.amazon.awssdk.services.dynamodb.model.InputCompressionType; @@ -185,11 +194,14 @@ import software.amazon.awssdk.services.dynamodb.model.LocalSecondaryIndex; import software.amazon.awssdk.services.dynamodb.model.LocalSecondaryIndexDescription; import software.amazon.awssdk.services.dynamodb.model.LocalSecondaryIndexInfo; +import software.amazon.awssdk.services.dynamodb.model.OnDemandThroughput; +import software.amazon.awssdk.services.dynamodb.model.OnDemandThroughputOverride; import software.amazon.awssdk.services.dynamodb.model.ParameterizedStatement; import software.amazon.awssdk.services.dynamodb.model.PointInTimeRecoveryDescription; import software.amazon.awssdk.services.dynamodb.model.PointInTimeRecoverySpecification; import software.amazon.awssdk.services.dynamodb.model.PointInTimeRecoveryStatus; import software.amazon.awssdk.services.dynamodb.model.PointInTimeRecoveryUnavailableException; +import software.amazon.awssdk.services.dynamodb.model.PolicyNotFoundException; import software.amazon.awssdk.services.dynamodb.model.Projection; import software.amazon.awssdk.services.dynamodb.model.ProjectionType; import software.amazon.awssdk.services.dynamodb.model.ProvisionedThroughput; @@ -200,6 +212,8 @@ import software.amazon.awssdk.services.dynamodb.model.PutItemRequest; import software.amazon.awssdk.services.dynamodb.model.PutItemResponse; import software.amazon.awssdk.services.dynamodb.model.PutRequest; +import software.amazon.awssdk.services.dynamodb.model.PutResourcePolicyRequest; +import software.amazon.awssdk.services.dynamodb.model.PutResourcePolicyResponse; import software.amazon.awssdk.services.dynamodb.model.QueryRequest; import software.amazon.awssdk.services.dynamodb.model.QueryResponse; import software.amazon.awssdk.services.dynamodb.model.Replica; @@ -281,6 +295,9 @@ import software.amazon.awssdk.services.dynamodb.model.UpdateGlobalTableSettingsResponse; import software.amazon.awssdk.services.dynamodb.model.UpdateItemRequest; import software.amazon.awssdk.services.dynamodb.model.UpdateItemResponse; +import software.amazon.awssdk.services.dynamodb.model.UpdateKinesisStreamingConfiguration; +import software.amazon.awssdk.services.dynamodb.model.UpdateKinesisStreamingDestinationRequest; +import software.amazon.awssdk.services.dynamodb.model.UpdateKinesisStreamingDestinationResponse; import software.amazon.awssdk.services.dynamodb.model.UpdateReplicationGroupMemberAction; import software.amazon.awssdk.services.dynamodb.model.UpdateTableReplicaAutoScalingRequest; import software.amazon.awssdk.services.dynamodb.model.UpdateTableReplicaAutoScalingResponse; @@ -305,6 +322,8 @@ import software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteBackupOutput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteItemInput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteItemOutput; +import software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteResourcePolicyInput; +import software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteResourcePolicyOutput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteTableInput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteTableOutput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeBackupInput; @@ -355,6 +374,7 @@ import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_LimitExceededException; import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_Opaque; import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_PointInTimeRecoveryUnavailableException; +import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_PolicyNotFoundException; import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ProvisionedThroughputExceededException; import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ReplicaAlreadyExistsException; import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ReplicaNotFoundException; @@ -375,6 +395,8 @@ import software.amazon.cryptography.services.dynamodb.internaldafny.types.ExportTableToPointInTimeOutput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.GetItemInput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.GetItemOutput; +import software.amazon.cryptography.services.dynamodb.internaldafny.types.GetResourcePolicyInput; +import software.amazon.cryptography.services.dynamodb.internaldafny.types.GetResourcePolicyOutput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.IDynamoDBClient; import software.amazon.cryptography.services.dynamodb.internaldafny.types.ImportTableInput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.ImportTableOutput; @@ -394,6 +416,8 @@ import software.amazon.cryptography.services.dynamodb.internaldafny.types.ListTagsOfResourceOutput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.PutItemInput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.PutItemOutput; +import software.amazon.cryptography.services.dynamodb.internaldafny.types.PutResourcePolicyInput; +import software.amazon.cryptography.services.dynamodb.internaldafny.types.PutResourcePolicyOutput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.QueryInput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.QueryOutput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.RestoreTableFromBackupInput; @@ -418,6 +442,8 @@ import software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateGlobalTableSettingsOutput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateItemInput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateItemOutput; +import software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateKinesisStreamingDestinationInput; +import software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateKinesisStreamingDestinationOutput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateTableInput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateTableOutput; import software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateTableReplicaAutoScalingInput; @@ -427,6 +453,20 @@ public class ToNative { + public static ApproximateCreationDateTimePrecision ApproximateCreationDateTimePrecision( + software.amazon.cryptography.services.dynamodb.internaldafny.types.ApproximateCreationDateTimePrecision dafnyValue + ) { + if (dafnyValue.is_MILLISECOND()) { + return ApproximateCreationDateTimePrecision.MILLISECOND; + } + if (dafnyValue.is_MICROSECOND()) { + return ApproximateCreationDateTimePrecision.MICROSECOND; + } + return ApproximateCreationDateTimePrecision.fromValue( + dafnyValue.toString() + ); + } + public static ArchivalSummary ArchivalSummary( software.amazon.cryptography.services.dynamodb.internaldafny.types.ArchivalSummary dafnyValue ) { @@ -1090,6 +1130,9 @@ public static BatchStatementError BatchStatementError( ) ); } + if (dafnyValue.dtor_Item().is_Some()) { + builder.item(ToNative.AttributeMap(dafnyValue.dtor_Item().dtor_value())); + } if (dafnyValue.dtor_Message().is_Some()) { builder.message( software.amazon.smithy.dafny.conversion.ToNative.Simple.String( @@ -1153,6 +1196,13 @@ public static BatchStatementRequest BatchStatementRequest( ) ); } + if (dafnyValue.dtor_ReturnValuesOnConditionCheckFailure().is_Some()) { + builder.returnValuesOnConditionCheckFailure( + ToNative.ReturnValuesOnConditionCheckFailure( + dafnyValue.dtor_ReturnValuesOnConditionCheckFailure().dtor_value() + ) + ); + } builder.statement( software.amazon.smithy.dafny.conversion.ToNative.Simple.String( dafnyValue.dtor_Statement() @@ -1690,6 +1740,13 @@ public static CreateGlobalSecondaryIndexAction CreateGlobalSecondaryIndexAction( ) ); builder.keySchema(ToNative.KeySchema(dafnyValue.dtor_KeySchema())); + if (dafnyValue.dtor_OnDemandThroughput().is_Some()) { + builder.onDemandThroughput( + ToNative.OnDemandThroughput( + dafnyValue.dtor_OnDemandThroughput().dtor_value() + ) + ); + } builder.projection(ToNative.Projection(dafnyValue.dtor_Projection())); if (dafnyValue.dtor_ProvisionedThroughput().is_Some()) { builder.provisionedThroughput( @@ -1763,6 +1820,13 @@ public static CreateReplicationGroupMemberAction CreateReplicationGroupMemberAct ) ); } + if (dafnyValue.dtor_OnDemandThroughputOverride().is_Some()) { + builder.onDemandThroughputOverride( + ToNative.OnDemandThroughputOverride( + dafnyValue.dtor_OnDemandThroughputOverride().dtor_value() + ) + ); + } if (dafnyValue.dtor_ProvisionedThroughputOverride().is_Some()) { builder.provisionedThroughputOverride( ToNative.ProvisionedThroughputOverride( @@ -1795,6 +1859,11 @@ public static CreateTableRequest CreateTableInput( ToNative.BillingMode(dafnyValue.dtor_BillingMode().dtor_value()) ); } + if (dafnyValue.dtor_DeletionProtectionEnabled().is_Some()) { + builder.deletionProtectionEnabled( + (dafnyValue.dtor_DeletionProtectionEnabled().dtor_value()) + ); + } if (dafnyValue.dtor_GlobalSecondaryIndexes().is_Some()) { builder.globalSecondaryIndexes( ToNative.GlobalSecondaryIndexList( @@ -1810,6 +1879,13 @@ public static CreateTableRequest CreateTableInput( ) ); } + if (dafnyValue.dtor_OnDemandThroughput().is_Some()) { + builder.onDemandThroughput( + ToNative.OnDemandThroughput( + dafnyValue.dtor_OnDemandThroughput().dtor_value() + ) + ); + } if (dafnyValue.dtor_ProvisionedThroughput().is_Some()) { builder.provisionedThroughput( ToNative.ProvisionedThroughput( @@ -1817,6 +1893,13 @@ public static CreateTableRequest CreateTableInput( ) ); } + if (dafnyValue.dtor_ResourcePolicy().is_Some()) { + builder.resourcePolicy( + software.amazon.smithy.dafny.conversion.ToNative.Simple.String( + dafnyValue.dtor_ResourcePolicy().dtor_value() + ) + ); + } if (dafnyValue.dtor_SSESpecification().is_Some()) { builder.sseSpecification( ToNative.SSESpecification( @@ -2024,6 +2107,13 @@ public static DeleteItemRequest DeleteItemInput(DeleteItemInput dafnyValue) { ToNative.ReturnValue(dafnyValue.dtor_ReturnValues().dtor_value()) ); } + if (dafnyValue.dtor_ReturnValuesOnConditionCheckFailure().is_Some()) { + builder.returnValuesOnConditionCheckFailure( + ToNative.ReturnValuesOnConditionCheckFailure( + dafnyValue.dtor_ReturnValuesOnConditionCheckFailure().dtor_value() + ) + ); + } builder.tableName( software.amazon.smithy.dafny.conversion.ToNative.Simple.String( dafnyValue.dtor_TableName() @@ -2091,6 +2181,41 @@ public static DeleteRequest DeleteRequest( return builder.build(); } + public static DeleteResourcePolicyRequest DeleteResourcePolicyInput( + DeleteResourcePolicyInput dafnyValue + ) { + DeleteResourcePolicyRequest.Builder builder = + DeleteResourcePolicyRequest.builder(); + if (dafnyValue.dtor_ExpectedRevisionId().is_Some()) { + builder.expectedRevisionId( + software.amazon.smithy.dafny.conversion.ToNative.Simple.String( + dafnyValue.dtor_ExpectedRevisionId().dtor_value() + ) + ); + } + builder.resourceArn( + software.amazon.smithy.dafny.conversion.ToNative.Simple.String( + dafnyValue.dtor_ResourceArn() + ) + ); + return builder.build(); + } + + public static DeleteResourcePolicyResponse DeleteResourcePolicyOutput( + DeleteResourcePolicyOutput dafnyValue + ) { + DeleteResourcePolicyResponse.Builder builder = + DeleteResourcePolicyResponse.builder(); + if (dafnyValue.dtor_RevisionId().is_Some()) { + builder.revisionId( + software.amazon.smithy.dafny.conversion.ToNative.Simple.String( + dafnyValue.dtor_RevisionId().dtor_value() + ) + ); + } + return builder.build(); + } + public static DeleteTableRequest DeleteTableInput( DeleteTableInput dafnyValue ) { @@ -2533,6 +2658,9 @@ public static DestinationStatus DestinationStatus( if (dafnyValue.is_ENABLE__FAILED()) { return DestinationStatus.ENABLE_FAILED; } + if (dafnyValue.is_UPDATING()) { + return DestinationStatus.UPDATING; + } return DestinationStatus.fromValue(dafnyValue.toString()); } @@ -2541,6 +2669,13 @@ public static DisableKinesisStreamingDestinationRequest DisableKinesisStreamingD ) { DisableKinesisStreamingDestinationRequest.Builder builder = DisableKinesisStreamingDestinationRequest.builder(); + if (dafnyValue.dtor_EnableKinesisStreamingConfiguration().is_Some()) { + builder.enableKinesisStreamingConfiguration( + ToNative.EnableKinesisStreamingConfiguration( + dafnyValue.dtor_EnableKinesisStreamingConfiguration().dtor_value() + ) + ); + } builder.streamArn( software.amazon.smithy.dafny.conversion.ToNative.Simple.String( dafnyValue.dtor_StreamArn() @@ -2566,6 +2701,13 @@ public static DisableKinesisStreamingDestinationResponse DisableKinesisStreaming ) ); } + if (dafnyValue.dtor_EnableKinesisStreamingConfiguration().is_Some()) { + builder.enableKinesisStreamingConfiguration( + ToNative.EnableKinesisStreamingConfiguration( + dafnyValue.dtor_EnableKinesisStreamingConfiguration().dtor_value() + ) + ); + } if (dafnyValue.dtor_StreamArn().is_Some()) { builder.streamArn( software.amazon.smithy.dafny.conversion.ToNative.Simple.String( @@ -2583,11 +2725,33 @@ public static DisableKinesisStreamingDestinationResponse DisableKinesisStreaming return builder.build(); } + public static EnableKinesisStreamingConfiguration EnableKinesisStreamingConfiguration( + software.amazon.cryptography.services.dynamodb.internaldafny.types.EnableKinesisStreamingConfiguration dafnyValue + ) { + EnableKinesisStreamingConfiguration.Builder builder = + EnableKinesisStreamingConfiguration.builder(); + if (dafnyValue.dtor_ApproximateCreationDateTimePrecision().is_Some()) { + builder.approximateCreationDateTimePrecision( + ToNative.ApproximateCreationDateTimePrecision( + dafnyValue.dtor_ApproximateCreationDateTimePrecision().dtor_value() + ) + ); + } + return builder.build(); + } + public static EnableKinesisStreamingDestinationRequest EnableKinesisStreamingDestinationInput( EnableKinesisStreamingDestinationInput dafnyValue ) { EnableKinesisStreamingDestinationRequest.Builder builder = EnableKinesisStreamingDestinationRequest.builder(); + if (dafnyValue.dtor_EnableKinesisStreamingConfiguration().is_Some()) { + builder.enableKinesisStreamingConfiguration( + ToNative.EnableKinesisStreamingConfiguration( + dafnyValue.dtor_EnableKinesisStreamingConfiguration().dtor_value() + ) + ); + } builder.streamArn( software.amazon.smithy.dafny.conversion.ToNative.Simple.String( dafnyValue.dtor_StreamArn() @@ -2613,6 +2777,13 @@ public static EnableKinesisStreamingDestinationResponse EnableKinesisStreamingDe ) ); } + if (dafnyValue.dtor_EnableKinesisStreamingConfiguration().is_Some()) { + builder.enableKinesisStreamingConfiguration( + ToNative.EnableKinesisStreamingConfiguration( + dafnyValue.dtor_EnableKinesisStreamingConfiguration().dtor_value() + ) + ); + } if (dafnyValue.dtor_StreamArn().is_Some()) { builder.streamArn( software.amazon.smithy.dafny.conversion.ToNative.Simple.String( @@ -2685,6 +2856,13 @@ public static ExecuteStatementRequest ExecuteStatementInput( ) ); } + if (dafnyValue.dtor_ReturnValuesOnConditionCheckFailure().is_Some()) { + builder.returnValuesOnConditionCheckFailure( + ToNative.ReturnValuesOnConditionCheckFailure( + dafnyValue.dtor_ReturnValuesOnConditionCheckFailure().dtor_value() + ) + ); + } builder.statement( software.amazon.smithy.dafny.conversion.ToNative.Simple.String( dafnyValue.dtor_Statement() @@ -2862,6 +3040,11 @@ public static ExportDescription ExportDescription( ) ); } + if (dafnyValue.dtor_ExportType().is_Some()) { + builder.exportType( + ToNative.ExportType(dafnyValue.dtor_ExportType().dtor_value()) + ); + } if (dafnyValue.dtor_FailureCode().is_Some()) { builder.failureCode( software.amazon.smithy.dafny.conversion.ToNative.Simple.String( @@ -2876,6 +3059,13 @@ public static ExportDescription ExportDescription( ) ); } + if (dafnyValue.dtor_IncrementalExportSpecification().is_Some()) { + builder.incrementalExportSpecification( + ToNative.IncrementalExportSpecification( + dafnyValue.dtor_IncrementalExportSpecification().dtor_value() + ) + ); + } if (dafnyValue.dtor_ItemCount().is_Some()) { builder.itemCount((dafnyValue.dtor_ItemCount().dtor_value())); } @@ -2990,6 +3180,11 @@ public static ExportSummary ExportSummary( ToNative.ExportStatus(dafnyValue.dtor_ExportStatus().dtor_value()) ); } + if (dafnyValue.dtor_ExportType().is_Some()) { + builder.exportType( + ToNative.ExportType(dafnyValue.dtor_ExportType().dtor_value()) + ); + } return builder.build(); } @@ -3017,6 +3212,18 @@ public static ExportTableToPointInTimeRequest ExportTableToPointInTimeInput( ) ); } + if (dafnyValue.dtor_ExportType().is_Some()) { + builder.exportType( + ToNative.ExportType(dafnyValue.dtor_ExportType().dtor_value()) + ); + } + if (dafnyValue.dtor_IncrementalExportSpecification().is_Some()) { + builder.incrementalExportSpecification( + ToNative.IncrementalExportSpecification( + dafnyValue.dtor_IncrementalExportSpecification().dtor_value() + ) + ); + } builder.s3Bucket( software.amazon.smithy.dafny.conversion.ToNative.Simple.String( dafnyValue.dtor_S3Bucket() @@ -3071,6 +3278,30 @@ public static ExportTableToPointInTimeResponse ExportTableToPointInTimeOutput( return builder.build(); } + public static ExportType ExportType( + software.amazon.cryptography.services.dynamodb.internaldafny.types.ExportType dafnyValue + ) { + if (dafnyValue.is_FULL__EXPORT()) { + return ExportType.FULL_EXPORT; + } + if (dafnyValue.is_INCREMENTAL__EXPORT()) { + return ExportType.INCREMENTAL_EXPORT; + } + return ExportType.fromValue(dafnyValue.toString()); + } + + public static ExportViewType ExportViewType( + software.amazon.cryptography.services.dynamodb.internaldafny.types.ExportViewType dafnyValue + ) { + if (dafnyValue.is_NEW__IMAGE()) { + return ExportViewType.NEW_IMAGE; + } + if (dafnyValue.is_NEW__AND__OLD__IMAGES()) { + return ExportViewType.NEW_AND_OLD_IMAGES; + } + return ExportViewType.fromValue(dafnyValue.toString()); + } + public static Map ExpressionAttributeNameMap( DafnyMap< ? extends DafnySequence, @@ -3215,6 +3446,41 @@ public static GetItemResponse GetItemOutput(GetItemOutput dafnyValue) { return builder.build(); } + public static GetResourcePolicyRequest GetResourcePolicyInput( + GetResourcePolicyInput dafnyValue + ) { + GetResourcePolicyRequest.Builder builder = + GetResourcePolicyRequest.builder(); + builder.resourceArn( + software.amazon.smithy.dafny.conversion.ToNative.Simple.String( + dafnyValue.dtor_ResourceArn() + ) + ); + return builder.build(); + } + + public static GetResourcePolicyResponse GetResourcePolicyOutput( + GetResourcePolicyOutput dafnyValue + ) { + GetResourcePolicyResponse.Builder builder = + GetResourcePolicyResponse.builder(); + if (dafnyValue.dtor_Policy().is_Some()) { + builder.policy( + software.amazon.smithy.dafny.conversion.ToNative.Simple.String( + dafnyValue.dtor_Policy().dtor_value() + ) + ); + } + if (dafnyValue.dtor_RevisionId().is_Some()) { + builder.revisionId( + software.amazon.smithy.dafny.conversion.ToNative.Simple.String( + dafnyValue.dtor_RevisionId().dtor_value() + ) + ); + } + return builder.build(); + } + public static GlobalSecondaryIndex GlobalSecondaryIndex( software.amazon.cryptography.services.dynamodb.internaldafny.types.GlobalSecondaryIndex dafnyValue ) { @@ -3225,6 +3491,13 @@ public static GlobalSecondaryIndex GlobalSecondaryIndex( ) ); builder.keySchema(ToNative.KeySchema(dafnyValue.dtor_KeySchema())); + if (dafnyValue.dtor_OnDemandThroughput().is_Some()) { + builder.onDemandThroughput( + ToNative.OnDemandThroughput( + dafnyValue.dtor_OnDemandThroughput().dtor_value() + ) + ); + } builder.projection(ToNative.Projection(dafnyValue.dtor_Projection())); if (dafnyValue.dtor_ProvisionedThroughput().is_Some()) { builder.provisionedThroughput( @@ -3311,6 +3584,13 @@ public static GlobalSecondaryIndexDescription GlobalSecondaryIndexDescription( ToNative.KeySchema(dafnyValue.dtor_KeySchema().dtor_value()) ); } + if (dafnyValue.dtor_OnDemandThroughput().is_Some()) { + builder.onDemandThroughput( + ToNative.OnDemandThroughput( + dafnyValue.dtor_OnDemandThroughput().dtor_value() + ) + ); + } if (dafnyValue.dtor_Projection().is_Some()) { builder.projection( ToNative.Projection(dafnyValue.dtor_Projection().dtor_value()) @@ -3367,6 +3647,13 @@ public static GlobalSecondaryIndexInfo GlobalSecondaryIndexInfo( ToNative.KeySchema(dafnyValue.dtor_KeySchema().dtor_value()) ); } + if (dafnyValue.dtor_OnDemandThroughput().is_Some()) { + builder.onDemandThroughput( + ToNative.OnDemandThroughput( + dafnyValue.dtor_OnDemandThroughput().dtor_value() + ) + ); + } if (dafnyValue.dtor_Projection().is_Some()) { builder.projection( ToNative.Projection(dafnyValue.dtor_Projection().dtor_value()) @@ -3827,6 +4114,33 @@ public static ImportTableResponse ImportTableOutput( return builder.build(); } + public static IncrementalExportSpecification IncrementalExportSpecification( + software.amazon.cryptography.services.dynamodb.internaldafny.types.IncrementalExportSpecification dafnyValue + ) { + IncrementalExportSpecification.Builder builder = + IncrementalExportSpecification.builder(); + if (dafnyValue.dtor_ExportFromTime().is_Some()) { + builder.exportFromTime( + software.amazon.smithy.dafny.conversion.ToNative.Simple.Instant( + dafnyValue.dtor_ExportFromTime().dtor_value() + ) + ); + } + if (dafnyValue.dtor_ExportToTime().is_Some()) { + builder.exportToTime( + software.amazon.smithy.dafny.conversion.ToNative.Simple.Instant( + dafnyValue.dtor_ExportToTime().dtor_value() + ) + ); + } + if (dafnyValue.dtor_ExportViewType().is_Some()) { + builder.exportViewType( + ToNative.ExportViewType(dafnyValue.dtor_ExportViewType().dtor_value()) + ); + } + return builder.build(); + } + public static IndexStatus IndexStatus( software.amazon.cryptography.services.dynamodb.internaldafny.types.IndexStatus dafnyValue ) { @@ -4105,6 +4419,13 @@ public static KinesisDataStreamDestination KinesisDataStreamDestination( ) { KinesisDataStreamDestination.Builder builder = KinesisDataStreamDestination.builder(); + if (dafnyValue.dtor_ApproximateCreationDateTimePrecision().is_Some()) { + builder.approximateCreationDateTimePrecision( + ToNative.ApproximateCreationDateTimePrecision( + dafnyValue.dtor_ApproximateCreationDateTimePrecision().dtor_value() + ) + ); + } if (dafnyValue.dtor_DestinationStatus().is_Some()) { builder.destinationStatus( ToNative.DestinationStatus( @@ -4608,6 +4929,36 @@ public static List NumberSetAttributeValue( ); } + public static OnDemandThroughput OnDemandThroughput( + software.amazon.cryptography.services.dynamodb.internaldafny.types.OnDemandThroughput dafnyValue + ) { + OnDemandThroughput.Builder builder = OnDemandThroughput.builder(); + if (dafnyValue.dtor_MaxReadRequestUnits().is_Some()) { + builder.maxReadRequestUnits( + (dafnyValue.dtor_MaxReadRequestUnits().dtor_value()) + ); + } + if (dafnyValue.dtor_MaxWriteRequestUnits().is_Some()) { + builder.maxWriteRequestUnits( + (dafnyValue.dtor_MaxWriteRequestUnits().dtor_value()) + ); + } + return builder.build(); + } + + public static OnDemandThroughputOverride OnDemandThroughputOverride( + software.amazon.cryptography.services.dynamodb.internaldafny.types.OnDemandThroughputOverride dafnyValue + ) { + OnDemandThroughputOverride.Builder builder = + OnDemandThroughputOverride.builder(); + if (dafnyValue.dtor_MaxReadRequestUnits().is_Some()) { + builder.maxReadRequestUnits( + (dafnyValue.dtor_MaxReadRequestUnits().dtor_value()) + ); + } + return builder.build(); + } + public static ParameterizedStatement ParameterizedStatement( software.amazon.cryptography.services.dynamodb.internaldafny.types.ParameterizedStatement dafnyValue ) { @@ -4619,6 +4970,13 @@ public static ParameterizedStatement ParameterizedStatement( ) ); } + if (dafnyValue.dtor_ReturnValuesOnConditionCheckFailure().is_Some()) { + builder.returnValuesOnConditionCheckFailure( + ToNative.ReturnValuesOnConditionCheckFailure( + dafnyValue.dtor_ReturnValuesOnConditionCheckFailure().dtor_value() + ) + ); + } builder.statement( software.amazon.smithy.dafny.conversion.ToNative.Simple.String( dafnyValue.dtor_Statement() @@ -4912,6 +5270,13 @@ public static PutItemRequest PutItemInput(PutItemInput dafnyValue) { ToNative.ReturnValue(dafnyValue.dtor_ReturnValues().dtor_value()) ); } + if (dafnyValue.dtor_ReturnValuesOnConditionCheckFailure().is_Some()) { + builder.returnValuesOnConditionCheckFailure( + ToNative.ReturnValuesOnConditionCheckFailure( + dafnyValue.dtor_ReturnValuesOnConditionCheckFailure().dtor_value() + ) + ); + } builder.tableName( software.amazon.smithy.dafny.conversion.ToNative.Simple.String( dafnyValue.dtor_TableName() @@ -4965,6 +5330,51 @@ public static PutRequest PutRequest( return builder.build(); } + public static PutResourcePolicyRequest PutResourcePolicyInput( + PutResourcePolicyInput dafnyValue + ) { + PutResourcePolicyRequest.Builder builder = + PutResourcePolicyRequest.builder(); + if (dafnyValue.dtor_ConfirmRemoveSelfResourceAccess().is_Some()) { + builder.confirmRemoveSelfResourceAccess( + (dafnyValue.dtor_ConfirmRemoveSelfResourceAccess().dtor_value()) + ); + } + if (dafnyValue.dtor_ExpectedRevisionId().is_Some()) { + builder.expectedRevisionId( + software.amazon.smithy.dafny.conversion.ToNative.Simple.String( + dafnyValue.dtor_ExpectedRevisionId().dtor_value() + ) + ); + } + builder.policy( + software.amazon.smithy.dafny.conversion.ToNative.Simple.String( + dafnyValue.dtor_Policy() + ) + ); + builder.resourceArn( + software.amazon.smithy.dafny.conversion.ToNative.Simple.String( + dafnyValue.dtor_ResourceArn() + ) + ); + return builder.build(); + } + + public static PutResourcePolicyResponse PutResourcePolicyOutput( + PutResourcePolicyOutput dafnyValue + ) { + PutResourcePolicyResponse.Builder builder = + PutResourcePolicyResponse.builder(); + if (dafnyValue.dtor_RevisionId().is_Some()) { + builder.revisionId( + software.amazon.smithy.dafny.conversion.ToNative.Simple.String( + dafnyValue.dtor_RevisionId().dtor_value() + ) + ); + } + return builder.build(); + } + public static QueryRequest QueryInput(QueryInput dafnyValue) { QueryRequest.Builder builder = QueryRequest.builder(); if (dafnyValue.dtor_AttributesToGet().is_Some()) { @@ -5235,6 +5645,13 @@ public static ReplicaDescription ReplicaDescription( ) ); } + if (dafnyValue.dtor_OnDemandThroughputOverride().is_Some()) { + builder.onDemandThroughputOverride( + ToNative.OnDemandThroughputOverride( + dafnyValue.dtor_OnDemandThroughputOverride().dtor_value() + ) + ); + } if (dafnyValue.dtor_ProvisionedThroughputOverride().is_Some()) { builder.provisionedThroughputOverride( ToNative.ProvisionedThroughputOverride( @@ -5306,6 +5723,13 @@ public static ReplicaGlobalSecondaryIndex ReplicaGlobalSecondaryIndex( dafnyValue.dtor_IndexName() ) ); + if (dafnyValue.dtor_OnDemandThroughputOverride().is_Some()) { + builder.onDemandThroughputOverride( + ToNative.OnDemandThroughputOverride( + dafnyValue.dtor_OnDemandThroughputOverride().dtor_value() + ) + ); + } if (dafnyValue.dtor_ProvisionedThroughputOverride().is_Some()) { builder.provisionedThroughputOverride( ToNative.ProvisionedThroughputOverride( @@ -5420,6 +5844,13 @@ public static ReplicaGlobalSecondaryIndexDescription ReplicaGlobalSecondaryIndex ) ); } + if (dafnyValue.dtor_OnDemandThroughputOverride().is_Some()) { + builder.onDemandThroughputOverride( + ToNative.OnDemandThroughputOverride( + dafnyValue.dtor_OnDemandThroughputOverride().dtor_value() + ) + ); + } if (dafnyValue.dtor_ProvisionedThroughputOverride().is_Some()) { builder.provisionedThroughputOverride( ToNative.ProvisionedThroughputOverride( @@ -5865,6 +6296,13 @@ public static RestoreTableFromBackupRequest RestoreTableFromBackupInput( ) ); } + if (dafnyValue.dtor_OnDemandThroughputOverride().is_Some()) { + builder.onDemandThroughputOverride( + ToNative.OnDemandThroughput( + dafnyValue.dtor_OnDemandThroughputOverride().dtor_value() + ) + ); + } if (dafnyValue.dtor_ProvisionedThroughputOverride().is_Some()) { builder.provisionedThroughputOverride( ToNative.ProvisionedThroughput( @@ -5926,6 +6364,13 @@ public static RestoreTableToPointInTimeRequest RestoreTableToPointInTimeInput( ) ); } + if (dafnyValue.dtor_OnDemandThroughputOverride().is_Some()) { + builder.onDemandThroughputOverride( + ToNative.OnDemandThroughput( + dafnyValue.dtor_OnDemandThroughputOverride().dtor_value() + ) + ); + } if (dafnyValue.dtor_ProvisionedThroughputOverride().is_Some()) { builder.provisionedThroughputOverride( ToNative.ProvisionedThroughput( @@ -6263,6 +6708,13 @@ public static SourceTableDetails SourceTableDetails( builder.itemCount((dafnyValue.dtor_ItemCount().dtor_value())); } builder.keySchema(ToNative.KeySchema(dafnyValue.dtor_KeySchema())); + if (dafnyValue.dtor_OnDemandThroughput().is_Some()) { + builder.onDemandThroughput( + ToNative.OnDemandThroughput( + dafnyValue.dtor_OnDemandThroughput().dtor_value() + ) + ); + } builder.provisionedThroughput( ToNative.ProvisionedThroughput(dafnyValue.dtor_ProvisionedThroughput()) ); @@ -6533,6 +6985,13 @@ public static TableCreationParameters TableCreationParameters( ); } builder.keySchema(ToNative.KeySchema(dafnyValue.dtor_KeySchema())); + if (dafnyValue.dtor_OnDemandThroughput().is_Some()) { + builder.onDemandThroughput( + ToNative.OnDemandThroughput( + dafnyValue.dtor_OnDemandThroughput().dtor_value() + ) + ); + } if (dafnyValue.dtor_ProvisionedThroughput().is_Some()) { builder.provisionedThroughput( ToNative.ProvisionedThroughput( @@ -6585,6 +7044,11 @@ public static TableDescription TableDescription( ) ); } + if (dafnyValue.dtor_DeletionProtectionEnabled().is_Some()) { + builder.deletionProtectionEnabled( + (dafnyValue.dtor_DeletionProtectionEnabled().dtor_value()) + ); + } if (dafnyValue.dtor_GlobalSecondaryIndexes().is_Some()) { builder.globalSecondaryIndexes( ToNative.GlobalSecondaryIndexDescriptionList( @@ -6628,6 +7092,13 @@ public static TableDescription TableDescription( ) ); } + if (dafnyValue.dtor_OnDemandThroughput().is_Some()) { + builder.onDemandThroughput( + ToNative.OnDemandThroughput( + dafnyValue.dtor_OnDemandThroughput().dtor_value() + ) + ); + } if (dafnyValue.dtor_ProvisionedThroughput().is_Some()) { builder.provisionedThroughput( ToNative.ProvisionedThroughputDescription( @@ -7132,9 +7603,20 @@ public static UpdateGlobalSecondaryIndexAction UpdateGlobalSecondaryIndexAction( dafnyValue.dtor_IndexName() ) ); - builder.provisionedThroughput( - ToNative.ProvisionedThroughput(dafnyValue.dtor_ProvisionedThroughput()) - ); + if (dafnyValue.dtor_OnDemandThroughput().is_Some()) { + builder.onDemandThroughput( + ToNative.OnDemandThroughput( + dafnyValue.dtor_OnDemandThroughput().dtor_value() + ) + ); + } + if (dafnyValue.dtor_ProvisionedThroughput().is_Some()) { + builder.provisionedThroughput( + ToNative.ProvisionedThroughput( + dafnyValue.dtor_ProvisionedThroughput().dtor_value() + ) + ); + } return builder.build(); } @@ -7311,6 +7793,13 @@ public static UpdateItemRequest UpdateItemInput(UpdateItemInput dafnyValue) { ToNative.ReturnValue(dafnyValue.dtor_ReturnValues().dtor_value()) ); } + if (dafnyValue.dtor_ReturnValuesOnConditionCheckFailure().is_Some()) { + builder.returnValuesOnConditionCheckFailure( + ToNative.ReturnValuesOnConditionCheckFailure( + dafnyValue.dtor_ReturnValuesOnConditionCheckFailure().dtor_value() + ) + ); + } builder.tableName( software.amazon.smithy.dafny.conversion.ToNative.Simple.String( dafnyValue.dtor_TableName() @@ -7352,6 +7841,82 @@ public static UpdateItemResponse UpdateItemOutput( return builder.build(); } + public static UpdateKinesisStreamingConfiguration UpdateKinesisStreamingConfiguration( + software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateKinesisStreamingConfiguration dafnyValue + ) { + UpdateKinesisStreamingConfiguration.Builder builder = + UpdateKinesisStreamingConfiguration.builder(); + if (dafnyValue.dtor_ApproximateCreationDateTimePrecision().is_Some()) { + builder.approximateCreationDateTimePrecision( + ToNative.ApproximateCreationDateTimePrecision( + dafnyValue.dtor_ApproximateCreationDateTimePrecision().dtor_value() + ) + ); + } + return builder.build(); + } + + public static UpdateKinesisStreamingDestinationRequest UpdateKinesisStreamingDestinationInput( + UpdateKinesisStreamingDestinationInput dafnyValue + ) { + UpdateKinesisStreamingDestinationRequest.Builder builder = + UpdateKinesisStreamingDestinationRequest.builder(); + builder.streamArn( + software.amazon.smithy.dafny.conversion.ToNative.Simple.String( + dafnyValue.dtor_StreamArn() + ) + ); + builder.tableName( + software.amazon.smithy.dafny.conversion.ToNative.Simple.String( + dafnyValue.dtor_TableName() + ) + ); + if (dafnyValue.dtor_UpdateKinesisStreamingConfiguration().is_Some()) { + builder.updateKinesisStreamingConfiguration( + ToNative.UpdateKinesisStreamingConfiguration( + dafnyValue.dtor_UpdateKinesisStreamingConfiguration().dtor_value() + ) + ); + } + return builder.build(); + } + + public static UpdateKinesisStreamingDestinationResponse UpdateKinesisStreamingDestinationOutput( + UpdateKinesisStreamingDestinationOutput dafnyValue + ) { + UpdateKinesisStreamingDestinationResponse.Builder builder = + UpdateKinesisStreamingDestinationResponse.builder(); + if (dafnyValue.dtor_DestinationStatus().is_Some()) { + builder.destinationStatus( + ToNative.DestinationStatus( + dafnyValue.dtor_DestinationStatus().dtor_value() + ) + ); + } + if (dafnyValue.dtor_StreamArn().is_Some()) { + builder.streamArn( + software.amazon.smithy.dafny.conversion.ToNative.Simple.String( + dafnyValue.dtor_StreamArn().dtor_value() + ) + ); + } + if (dafnyValue.dtor_TableName().is_Some()) { + builder.tableName( + software.amazon.smithy.dafny.conversion.ToNative.Simple.String( + dafnyValue.dtor_TableName().dtor_value() + ) + ); + } + if (dafnyValue.dtor_UpdateKinesisStreamingConfiguration().is_Some()) { + builder.updateKinesisStreamingConfiguration( + ToNative.UpdateKinesisStreamingConfiguration( + dafnyValue.dtor_UpdateKinesisStreamingConfiguration().dtor_value() + ) + ); + } + return builder.build(); + } + public static UpdateReplicationGroupMemberAction UpdateReplicationGroupMemberAction( software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateReplicationGroupMemberAction dafnyValue ) { @@ -7371,6 +7936,13 @@ public static UpdateReplicationGroupMemberAction UpdateReplicationGroupMemberAct ) ); } + if (dafnyValue.dtor_OnDemandThroughputOverride().is_Some()) { + builder.onDemandThroughputOverride( + ToNative.OnDemandThroughputOverride( + dafnyValue.dtor_OnDemandThroughputOverride().dtor_value() + ) + ); + } if (dafnyValue.dtor_ProvisionedThroughputOverride().is_Some()) { builder.provisionedThroughputOverride( ToNative.ProvisionedThroughputOverride( @@ -7407,6 +7979,11 @@ public static UpdateTableRequest UpdateTableInput( ToNative.BillingMode(dafnyValue.dtor_BillingMode().dtor_value()) ); } + if (dafnyValue.dtor_DeletionProtectionEnabled().is_Some()) { + builder.deletionProtectionEnabled( + (dafnyValue.dtor_DeletionProtectionEnabled().dtor_value()) + ); + } if (dafnyValue.dtor_GlobalSecondaryIndexUpdates().is_Some()) { builder.globalSecondaryIndexUpdates( ToNative.GlobalSecondaryIndexUpdateList( @@ -7414,6 +7991,13 @@ public static UpdateTableRequest UpdateTableInput( ) ); } + if (dafnyValue.dtor_OnDemandThroughput().is_Some()) { + builder.onDemandThroughput( + ToNative.OnDemandThroughput( + dafnyValue.dtor_OnDemandThroughput().dtor_value() + ) + ); + } if (dafnyValue.dtor_ProvisionedThroughput().is_Some()) { builder.provisionedThroughput( ToNative.ProvisionedThroughput( @@ -7613,6 +8197,9 @@ public static ConditionalCheckFailedException Error( ) { ConditionalCheckFailedException.Builder builder = ConditionalCheckFailedException.builder(); + if (dafnyValue.dtor_Item().is_Some()) { + builder.item(ToNative.AttributeMap(dafnyValue.dtor_Item().dtor_value())); + } if (dafnyValue.dtor_message().is_Some()) { builder.message( software.amazon.smithy.dafny.conversion.ToNative.Simple.String( @@ -7856,6 +8443,20 @@ public static PointInTimeRecoveryUnavailableException Error( return builder.build(); } + public static PolicyNotFoundException Error( + Error_PolicyNotFoundException dafnyValue + ) { + PolicyNotFoundException.Builder builder = PolicyNotFoundException.builder(); + if (dafnyValue.dtor_message().is_Some()) { + builder.message( + software.amazon.smithy.dafny.conversion.ToNative.Simple.String( + dafnyValue.dtor_message().dtor_value() + ) + ); + } + return builder.build(); + } + public static ProvisionedThroughputExceededException Error( Error_ProvisionedThroughputExceededException dafnyValue ) { 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 c512ff4c0..566672500 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.8.0.0" +dafny_version = "4.8.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/__init__.py b/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/__init__.py index 09be6133b..89d64801a 100644 --- a/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/__init__.py +++ b/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/__init__.py @@ -1,3 +1,4 @@ # 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. + diff --git a/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/aws_sdk_to_dafny.py b/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/aws_sdk_to_dafny.py index 1b27a3c35..c92084850 100644 --- a/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/aws_sdk_to_dafny.py +++ b/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/aws_sdk_to_dafny.py @@ -5,6 +5,8 @@ import _dafny from _dafny import Map, Seq from aws_cryptography_internal_dynamodb.internaldafny.generated.ComAmazonawsDynamodbTypes import ( + ApproximateCreationDateTimePrecision_MICROSECOND, + ApproximateCreationDateTimePrecision_MILLISECOND, ArchivalSummary_ArchivalSummary as DafnyArchivalSummary, AttributeAction_ADD, AttributeAction_DELETE, @@ -112,6 +114,8 @@ DeleteReplicaAction_DeleteReplicaAction as DafnyDeleteReplicaAction, DeleteReplicationGroupMemberAction_DeleteReplicationGroupMemberAction as DafnyDeleteReplicationGroupMemberAction, DeleteRequest_DeleteRequest as DafnyDeleteRequest, + DeleteResourcePolicyInput_DeleteResourcePolicyInput as DafnyDeleteResourcePolicyInput, + DeleteResourcePolicyOutput_DeleteResourcePolicyOutput as DafnyDeleteResourcePolicyOutput, DeleteTableInput_DeleteTableInput as DafnyDeleteTableInput, DeleteTableOutput_DeleteTableOutput as DafnyDeleteTableOutput, Delete_Delete as DafnyDelete, @@ -146,8 +150,10 @@ DestinationStatus_DISABLING, DestinationStatus_ENABLE__FAILED, DestinationStatus_ENABLING, + DestinationStatus_UPDATING, DisableKinesisStreamingDestinationInput_DisableKinesisStreamingDestinationInput as DafnyDisableKinesisStreamingDestinationInput, DisableKinesisStreamingDestinationOutput_DisableKinesisStreamingDestinationOutput as DafnyDisableKinesisStreamingDestinationOutput, + EnableKinesisStreamingConfiguration_EnableKinesisStreamingConfiguration as DafnyEnableKinesisStreamingConfiguration, EnableKinesisStreamingDestinationInput_EnableKinesisStreamingDestinationInput as DafnyEnableKinesisStreamingDestinationInput, EnableKinesisStreamingDestinationOutput_EnableKinesisStreamingDestinationOutput as DafnyEnableKinesisStreamingDestinationOutput, Endpoint_Endpoint as DafnyEndpoint, @@ -171,6 +177,7 @@ Error_ItemCollectionSizeLimitExceededException, Error_LimitExceededException, Error_PointInTimeRecoveryUnavailableException, + Error_PolicyNotFoundException, Error_ProvisionedThroughputExceededException, Error_ReplicaAlreadyExistsException, Error_ReplicaNotFoundException, @@ -197,9 +204,15 @@ ExportSummary_ExportSummary as DafnyExportSummary, ExportTableToPointInTimeInput_ExportTableToPointInTimeInput as DafnyExportTableToPointInTimeInput, ExportTableToPointInTimeOutput_ExportTableToPointInTimeOutput as DafnyExportTableToPointInTimeOutput, + ExportType_FULL__EXPORT, + ExportType_INCREMENTAL__EXPORT, + ExportViewType_NEW__AND__OLD__IMAGES, + ExportViewType_NEW__IMAGE, FailureException_FailureException as DafnyFailureException, GetItemInput_GetItemInput as DafnyGetItemInput, GetItemOutput_GetItemOutput as DafnyGetItemOutput, + GetResourcePolicyInput_GetResourcePolicyInput as DafnyGetResourcePolicyInput, + GetResourcePolicyOutput_GetResourcePolicyOutput as DafnyGetResourcePolicyOutput, Get_Get as DafnyGet, GlobalSecondaryIndexAutoScalingUpdate_GlobalSecondaryIndexAutoScalingUpdate as DafnyGlobalSecondaryIndexAutoScalingUpdate, GlobalSecondaryIndexDescription_GlobalSecondaryIndexDescription as DafnyGlobalSecondaryIndexDescription, @@ -222,6 +235,7 @@ ImportTableDescription_ImportTableDescription as DafnyImportTableDescription, ImportTableInput_ImportTableInput as DafnyImportTableInput, ImportTableOutput_ImportTableOutput as DafnyImportTableOutput, + IncrementalExportSpecification_IncrementalExportSpecification as DafnyIncrementalExportSpecification, IndexStatus_ACTIVE, IndexStatus_CREATING, IndexStatus_DELETING, @@ -257,6 +271,8 @@ LocalSecondaryIndexDescription_LocalSecondaryIndexDescription as DafnyLocalSecondaryIndexDescription, LocalSecondaryIndexInfo_LocalSecondaryIndexInfo as DafnyLocalSecondaryIndexInfo, LocalSecondaryIndex_LocalSecondaryIndex as DafnyLocalSecondaryIndex, + OnDemandThroughputOverride_OnDemandThroughputOverride as DafnyOnDemandThroughputOverride, + OnDemandThroughput_OnDemandThroughput as DafnyOnDemandThroughput, ParameterizedStatement_ParameterizedStatement as DafnyParameterizedStatement, PointInTimeRecoveryDescription_PointInTimeRecoveryDescription as DafnyPointInTimeRecoveryDescription, PointInTimeRecoverySpecification_PointInTimeRecoverySpecification as DafnyPointInTimeRecoverySpecification, @@ -272,6 +288,8 @@ PutItemInput_PutItemInput as DafnyPutItemInput, PutItemOutput_PutItemOutput as DafnyPutItemOutput, PutRequest_PutRequest as DafnyPutRequest, + PutResourcePolicyInput_PutResourcePolicyInput as DafnyPutResourcePolicyInput, + PutResourcePolicyOutput_PutResourcePolicyOutput as DafnyPutResourcePolicyOutput, Put_Put as DafnyPut, QueryInput_QueryInput as DafnyQueryInput, QueryOutput_QueryOutput as DafnyQueryOutput, @@ -380,6 +398,9 @@ UpdateGlobalTableSettingsOutput_UpdateGlobalTableSettingsOutput as DafnyUpdateGlobalTableSettingsOutput, UpdateItemInput_UpdateItemInput as DafnyUpdateItemInput, UpdateItemOutput_UpdateItemOutput as DafnyUpdateItemOutput, + UpdateKinesisStreamingConfiguration_UpdateKinesisStreamingConfiguration as DafnyUpdateKinesisStreamingConfiguration, + UpdateKinesisStreamingDestinationInput_UpdateKinesisStreamingDestinationInput as DafnyUpdateKinesisStreamingDestinationInput, + UpdateKinesisStreamingDestinationOutput_UpdateKinesisStreamingDestinationOutput as DafnyUpdateKinesisStreamingDestinationOutput, UpdateReplicationGroupMemberAction_UpdateReplicationGroupMemberAction as DafnyUpdateReplicationGroupMemberAction, UpdateTableInput_UpdateTableInput as DafnyUpdateTableInput, UpdateTableOutput_UpdateTableOutput as DafnyUpdateTableOutput, @@ -400,749 +421,226 @@ def com_amazonaws_dynamodb_BackupInUseException(native_input): return Error_BackupInUseException( - message=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Error"]["Message"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ), + message=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input['Error']["Message"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_BackupNotFoundException(native_input): return Error_BackupNotFoundException( - message=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Error"]["Message"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ), + message=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input['Error']["Message"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_ConditionalCheckFailedException(native_input): return Error_ConditionalCheckFailedException( - message=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Error"]["Message"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ), + message=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input['Error']["Message"].encode('utf-16-be'))]*2)])), + Item=Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input['Error']["Item"].items() }), ) +def com_amazonaws_dynamodb_AttributeValue(native_input): + if "S" in native_input.keys(): + AttributeValue_union_value = AttributeValue_S(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["S"].encode('utf-16-be'))]*2)]))) + elif "N" in native_input.keys(): + AttributeValue_union_value = AttributeValue_N(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["N"].encode('utf-16-be'))]*2)]))) + elif "B" in native_input.keys(): + AttributeValue_union_value = AttributeValue_B(Seq(native_input["B"])) + elif "SS" in native_input.keys(): + AttributeValue_union_value = AttributeValue_SS(Seq([Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(list_element.encode('utf-16-be'))]*2)])) for list_element in native_input["SS"]])) + elif "NS" in native_input.keys(): + AttributeValue_union_value = AttributeValue_NS(Seq([Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(list_element.encode('utf-16-be'))]*2)])) for list_element in native_input["NS"]])) + elif "BS" in native_input.keys(): + AttributeValue_union_value = AttributeValue_BS(Seq([Seq(list_element) for list_element in native_input["BS"]])) + elif "M" in native_input.keys(): + AttributeValue_union_value = AttributeValue_M(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input["M"].items() })) + elif "L" in native_input.keys(): + AttributeValue_union_value = AttributeValue_L(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(list_element) for list_element in native_input["L"]])) + elif "NULL" in native_input.keys(): + AttributeValue_union_value = AttributeValue_NULL(native_input["NULL"]) + elif "BOOL" in native_input.keys(): + AttributeValue_union_value = AttributeValue_BOOL(native_input["BOOL"]) + else: + raise ValueError("No recognized union value in union type: " + str(native_input)) + + return AttributeValue_union_value def com_amazonaws_dynamodb_ContinuousBackupsUnavailableException(native_input): return Error_ContinuousBackupsUnavailableException( - message=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Error"]["Message"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ), + message=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input['Error']["Message"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_DuplicateItemException(native_input): return Error_DuplicateItemException( - message=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Error"]["Message"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ), + message=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input['Error']["Message"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_ExportConflictException(native_input): return Error_ExportConflictException( - message=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Error"]["Message"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ), + message=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input['Error']["Message"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_ExportNotFoundException(native_input): return Error_ExportNotFoundException( - message=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Error"]["Message"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ), + message=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input['Error']["Message"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_GlobalTableAlreadyExistsException(native_input): return Error_GlobalTableAlreadyExistsException( - message=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Error"]["Message"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ), + message=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input['Error']["Message"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_GlobalTableNotFoundException(native_input): return Error_GlobalTableNotFoundException( - message=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Error"]["Message"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ), + message=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input['Error']["Message"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_IdempotentParameterMismatchException(native_input): return Error_IdempotentParameterMismatchException( - Message=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Error"]["Message"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ), + Message=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input['Error']["Message"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_ImportConflictException(native_input): return Error_ImportConflictException( - message=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Error"]["Message"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ), + message=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input['Error']["Message"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_ImportNotFoundException(native_input): return Error_ImportNotFoundException( - message=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Error"]["Message"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ), + message=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input['Error']["Message"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_IndexNotFoundException(native_input): return Error_IndexNotFoundException( - message=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Error"]["Message"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ), + message=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input['Error']["Message"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_InternalServerError(native_input): return Error_InternalServerError( - message=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Error"]["Message"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ), + message=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input['Error']["Message"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_InvalidEndpointException(native_input): return Error_InvalidEndpointException( - Message=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Error"]["Message"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ), + Message=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input['Error']["Message"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_InvalidExportTimeException(native_input): return Error_InvalidExportTimeException( - message=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Error"]["Message"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ), + message=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input['Error']["Message"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_InvalidRestoreTimeException(native_input): return Error_InvalidRestoreTimeException( - message=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Error"]["Message"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ), + message=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input['Error']["Message"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_ItemCollectionSizeLimitExceededException(native_input): return Error_ItemCollectionSizeLimitExceededException( - message=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Error"]["Message"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ), + message=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input['Error']["Message"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_LimitExceededException(native_input): return Error_LimitExceededException( - message=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Error"]["Message"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ), + message=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input['Error']["Message"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_PointInTimeRecoveryUnavailableException(native_input): return Error_PointInTimeRecoveryUnavailableException( - message=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Error"]["Message"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ), + message=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input['Error']["Message"].encode('utf-16-be'))]*2)])), ) +def com_amazonaws_dynamodb_PolicyNotFoundException(native_input): + return Error_PolicyNotFoundException( + message=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input['Error']["Message"].encode('utf-16-be'))]*2)])), + ) def com_amazonaws_dynamodb_ProvisionedThroughputExceededException(native_input): return Error_ProvisionedThroughputExceededException( - message=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Error"]["Message"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ), + message=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input['Error']["Message"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_ReplicaAlreadyExistsException(native_input): return Error_ReplicaAlreadyExistsException( - message=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Error"]["Message"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ), + message=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input['Error']["Message"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_ReplicaNotFoundException(native_input): return Error_ReplicaNotFoundException( - message=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Error"]["Message"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ), + message=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input['Error']["Message"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_RequestLimitExceeded(native_input): return Error_RequestLimitExceeded( - message=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Error"]["Message"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ), + message=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input['Error']["Message"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_ResourceInUseException(native_input): return Error_ResourceInUseException( - message=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Error"]["Message"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ), + message=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input['Error']["Message"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_ResourceNotFoundException(native_input): return Error_ResourceNotFoundException( - message=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Error"]["Message"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ), + message=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input['Error']["Message"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_TableAlreadyExistsException(native_input): return Error_TableAlreadyExistsException( - message=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Error"]["Message"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ), + message=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input['Error']["Message"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_TableInUseException(native_input): return Error_TableInUseException( - message=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Error"]["Message"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ), + message=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input['Error']["Message"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_TableNotFoundException(native_input): return Error_TableNotFoundException( - message=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Error"]["Message"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ), + message=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input['Error']["Message"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_TransactionCanceledException(native_input): return Error_TransactionCanceledException( - Message=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Error"]["Message"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ), - CancellationReasons=Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_CancellationReason( - list_element - ) - for list_element in native_input["CancellationReasons"] - ] - ), + Message=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input['Error']["Message"].encode('utf-16-be'))]*2)])), + CancellationReasons=Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_CancellationReason(list_element) for list_element in native_input["CancellationReasons"]]), ) - def com_amazonaws_dynamodb_CancellationReason(native_input): return DafnyCancellationReason( - Item=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in native_input["Item"].items() - } - ) - ) - if "Item" in native_input.keys() - else Option_None() - ), - Code=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Code"].encode("utf-16-be"))] * 2 - ) - ] - ) - ) - ) - if "Code" in native_input.keys() - else Option_None() - ), - Message=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Message"].encode("utf-16-be"))] * 2 - ) - ] - ) - ) - ) - if "Message" in native_input.keys() - else Option_None() - ), + Item=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input["Item"].items() })) if "Item" in native_input.keys() else Option_None(), + Code=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["Code"].encode('utf-16-be'))]*2)]))) if "Code" in native_input.keys() else Option_None(), + Message=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["Message"].encode('utf-16-be'))]*2)]))) if "Message" in native_input.keys() else Option_None(), ) - -def com_amazonaws_dynamodb_AttributeValue(native_input): - if "S" in native_input.keys(): - AttributeValue_union_value = AttributeValue_S( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["S"].encode("utf-16-be"))] * 2 - ) - ] - ) - ) - ) - elif "N" in native_input.keys(): - AttributeValue_union_value = AttributeValue_N( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["N"].encode("utf-16-be"))] * 2 - ) - ] - ) - ) - ) - elif "B" in native_input.keys(): - AttributeValue_union_value = AttributeValue_B(Seq(native_input["B"])) - elif "SS" in native_input.keys(): - AttributeValue_union_value = AttributeValue_SS( - Seq( - [ - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(list_element.encode("utf-16-be"))] * 2 - ) - ] - ) - ) - for list_element in native_input["SS"] - ] - ) - ) - elif "NS" in native_input.keys(): - AttributeValue_union_value = AttributeValue_NS( - Seq( - [ - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(list_element.encode("utf-16-be"))] * 2 - ) - ] - ) - ) - for list_element in native_input["NS"] - ] - ) - ) - elif "BS" in native_input.keys(): - AttributeValue_union_value = AttributeValue_BS( - Seq([Seq(list_element) for list_element in native_input["BS"]]) - ) - elif "M" in native_input.keys(): - AttributeValue_union_value = AttributeValue_M( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip(*[iter(key.encode("utf-16-be"))] * 2) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in native_input["M"].items() - } - ) - ) - elif "L" in native_input.keys(): - AttributeValue_union_value = AttributeValue_L( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - list_element - ) - for list_element in native_input["L"] - ] - ) - ) - elif "NULL" in native_input.keys(): - AttributeValue_union_value = AttributeValue_NULL(native_input["NULL"]) - elif "BOOL" in native_input.keys(): - AttributeValue_union_value = AttributeValue_BOOL(native_input["BOOL"]) - else: - raise ValueError( - "No recognized union value in union type: " + str(native_input) - ) - - return AttributeValue_union_value - - def com_amazonaws_dynamodb_TransactionConflictException(native_input): return Error_TransactionConflictException( - message=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Error"]["Message"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ), + message=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input['Error']["Message"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_TransactionInProgressException(native_input): return Error_TransactionInProgressException( - Message=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Error"]["Message"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ), + Message=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input['Error']["Message"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_BatchExecuteStatementInput(native_input): return DafnyBatchExecuteStatementInput( - Statements=Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BatchStatementRequest( - list_element - ) - for list_element in native_input["Statements"] - ] - ), - ReturnConsumedCapacity=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnConsumedCapacity( - native_input["ReturnConsumedCapacity"] - ) - ) - if "ReturnConsumedCapacity" in native_input.keys() - else Option_None() - ), + Statements=Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BatchStatementRequest(list_element) for list_element in native_input["Statements"]]), + ReturnConsumedCapacity=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnConsumedCapacity(native_input["ReturnConsumedCapacity"])) if "ReturnConsumedCapacity" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_BatchStatementRequest(native_input): return DafnyBatchStatementRequest( - Statement=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Statement"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - Parameters=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - list_element - ) - for list_element in native_input["Parameters"] - ] - ) - ) - if "Parameters" in native_input.keys() - else Option_None() - ), - ConsistentRead=( - Option_Some(native_input["ConsistentRead"]) - if "ConsistentRead" in native_input.keys() - else Option_None() - ), + Statement=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["Statement"].encode('utf-16-be'))]*2)])), + Parameters=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(list_element) for list_element in native_input["Parameters"]])) if "Parameters" in native_input.keys() else Option_None(), + ConsistentRead=Option_Some(native_input["ConsistentRead"]) if "ConsistentRead" in native_input.keys() else Option_None(), + ReturnValuesOnConditionCheckFailure=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure(native_input["ReturnValuesOnConditionCheckFailure"])) if "ReturnValuesOnConditionCheckFailure" in native_input.keys() else Option_None(), ) +def com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure(native_input): + # Convert ReturnValuesOnConditionCheckFailure + if native_input == "ALL_OLD": + return ReturnValuesOnConditionCheckFailure_ALL__OLD() + elif native_input == "NONE": + return ReturnValuesOnConditionCheckFailure_NONE() + else: + raise ValueError("No recognized enum value in enum type: " + native_input) def com_amazonaws_dynamodb_ReturnConsumedCapacity(native_input): # Convert ReturnConsumedCapacity @@ -1155,124 +653,26 @@ def com_amazonaws_dynamodb_ReturnConsumedCapacity(native_input): else: raise ValueError("No recognized enum value in enum type: " + native_input) - def com_amazonaws_dynamodb_BatchExecuteStatementOutput(native_input): return DafnyBatchExecuteStatementOutput( - Responses=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BatchStatementResponse( - list_element - ) - for list_element in native_input["Responses"] - ] - ) - ) - if "Responses" in native_input.keys() - else Option_None() - ), - ConsumedCapacity=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConsumedCapacity( - list_element - ) - for list_element in native_input["ConsumedCapacity"] - ] - ) - ) - if "ConsumedCapacity" in native_input.keys() - else Option_None() - ), + Responses=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BatchStatementResponse(list_element) for list_element in native_input["Responses"]])) if "Responses" in native_input.keys() else Option_None(), + ConsumedCapacity=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConsumedCapacity(list_element) for list_element in native_input["ConsumedCapacity"]])) if "ConsumedCapacity" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_BatchStatementResponse(native_input): return DafnyBatchStatementResponse( - Error=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BatchStatementError( - native_input["Error"] - ) - ) - if "Error" in native_input.keys() - else Option_None() - ), - TableName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "TableName" in native_input.keys() - else Option_None() - ), - Item=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in native_input["Item"].items() - } - ) - ) - if "Item" in native_input.keys() - else Option_None() - ), + Error=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BatchStatementError(native_input["Error"])) if "Error" in native_input.keys() else Option_None(), + TableName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)]))) if "TableName" in native_input.keys() else Option_None(), + Item=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input["Item"].items() })) if "Item" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_BatchStatementError(native_input): return DafnyBatchStatementError( - Code=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BatchStatementErrorCodeEnum( - native_input["Code"] - ) - ) - if "Code" in native_input.keys() - else Option_None() - ), - Message=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Message"].encode("utf-16-be"))] * 2 - ) - ] - ) - ) - ) - if "Message" in native_input.keys() - else Option_None() - ), + Code=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BatchStatementErrorCodeEnum(native_input["Code"])) if "Code" in native_input.keys() else Option_None(), + Message=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["Message"].encode('utf-16-be'))]*2)]))) if "Message" in native_input.keys() else Option_None(), + Item=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input["Item"].items() })) if "Item" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_BatchStatementErrorCodeEnum(native_input): # Convert BatchStatementErrorCodeEnum if native_input == "ConditionalCheckFailed": @@ -1300,451 +700,69 @@ def com_amazonaws_dynamodb_BatchStatementErrorCodeEnum(native_input): else: raise ValueError("No recognized enum value in enum type: " + native_input) - def com_amazonaws_dynamodb_ConsumedCapacity(native_input): return DafnyConsumedCapacity( - TableName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "TableName" in native_input.keys() - else Option_None() - ), - CapacityUnits=( - Option_Some(native_input["CapacityUnits"]) - if "CapacityUnits" in native_input.keys() - else Option_None() - ), - ReadCapacityUnits=( - Option_Some(native_input["ReadCapacityUnits"]) - if "ReadCapacityUnits" in native_input.keys() - else Option_None() - ), - WriteCapacityUnits=( - Option_Some(native_input["WriteCapacityUnits"]) - if "WriteCapacityUnits" in native_input.keys() - else Option_None() - ), - Table=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Capacity( - native_input["Table"] - ) - ) - if "Table" in native_input.keys() - else Option_None() - ), - LocalSecondaryIndexes=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Capacity( - value - ) - for (key, value) in native_input[ - "LocalSecondaryIndexes" - ].items() - } - ) - ) - if "LocalSecondaryIndexes" in native_input.keys() - else Option_None() - ), - GlobalSecondaryIndexes=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Capacity( - value - ) - for (key, value) in native_input[ - "GlobalSecondaryIndexes" - ].items() - } - ) - ) - if "GlobalSecondaryIndexes" in native_input.keys() - else Option_None() - ), + TableName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)]))) if "TableName" in native_input.keys() else Option_None(), + CapacityUnits=Option_Some(native_input["CapacityUnits"]) if "CapacityUnits" in native_input.keys() else Option_None(), + ReadCapacityUnits=Option_Some(native_input["ReadCapacityUnits"]) if "ReadCapacityUnits" in native_input.keys() else Option_None(), + WriteCapacityUnits=Option_Some(native_input["WriteCapacityUnits"]) if "WriteCapacityUnits" in native_input.keys() else Option_None(), + Table=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Capacity(native_input["Table"])) if "Table" in native_input.keys() else Option_None(), + LocalSecondaryIndexes=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Capacity(value) for (key, value) in native_input["LocalSecondaryIndexes"].items() })) if "LocalSecondaryIndexes" in native_input.keys() else Option_None(), + GlobalSecondaryIndexes=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Capacity(value) for (key, value) in native_input["GlobalSecondaryIndexes"].items() })) if "GlobalSecondaryIndexes" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_Capacity(native_input): return DafnyCapacity( - ReadCapacityUnits=( - Option_Some(native_input["ReadCapacityUnits"]) - if "ReadCapacityUnits" in native_input.keys() - else Option_None() - ), - WriteCapacityUnits=( - Option_Some(native_input["WriteCapacityUnits"]) - if "WriteCapacityUnits" in native_input.keys() - else Option_None() - ), - CapacityUnits=( - Option_Some(native_input["CapacityUnits"]) - if "CapacityUnits" in native_input.keys() - else Option_None() - ), + ReadCapacityUnits=Option_Some(native_input["ReadCapacityUnits"]) if "ReadCapacityUnits" in native_input.keys() else Option_None(), + WriteCapacityUnits=Option_Some(native_input["WriteCapacityUnits"]) if "WriteCapacityUnits" in native_input.keys() else Option_None(), + CapacityUnits=Option_Some(native_input["CapacityUnits"]) if "CapacityUnits" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_BatchGetItemInput(native_input): return DafnyBatchGetItemInput( - RequestItems=Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip(*[iter(key.encode("utf-16-be"))] * 2) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_KeysAndAttributes( - value - ) - for (key, value) in native_input["RequestItems"].items() - } - ), - ReturnConsumedCapacity=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnConsumedCapacity( - native_input["ReturnConsumedCapacity"] - ) - ) - if "ReturnConsumedCapacity" in native_input.keys() - else Option_None() - ), + RequestItems=Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_KeysAndAttributes(value) for (key, value) in native_input["RequestItems"].items() }), + ReturnConsumedCapacity=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnConsumedCapacity(native_input["ReturnConsumedCapacity"])) if "ReturnConsumedCapacity" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_KeysAndAttributes(native_input): return DafnyKeysAndAttributes( - Keys=Seq( - [ - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in list_element.items() - } - ) - for list_element in native_input["Keys"] - ] - ), - AttributesToGet=( - Option_Some( - Seq( - [ - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(list_element.encode("utf-16-be"))] * 2 - ) - ] - ) - ) - for list_element in native_input["AttributesToGet"] - ] - ) - ) - if "AttributesToGet" in native_input.keys() - else Option_None() - ), - ConsistentRead=( - Option_Some(native_input["ConsistentRead"]) - if "ConsistentRead" in native_input.keys() - else Option_None() - ), - ProjectionExpression=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["ProjectionExpression"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "ProjectionExpression" in native_input.keys() - else Option_None() - ), - ExpressionAttributeNames=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(value.encode("utf-16-be"))] * 2 - ) - ] - ) - ) - for (key, value) in native_input[ - "ExpressionAttributeNames" - ].items() - } - ) - ) - if "ExpressionAttributeNames" in native_input.keys() - else Option_None() - ), + Keys=Seq([Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in list_element.items() }) for list_element in native_input["Keys"]]), + AttributesToGet=Option_Some(Seq([Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(list_element.encode('utf-16-be'))]*2)])) for list_element in native_input["AttributesToGet"]])) if "AttributesToGet" in native_input.keys() else Option_None(), + ConsistentRead=Option_Some(native_input["ConsistentRead"]) if "ConsistentRead" in native_input.keys() else Option_None(), + ProjectionExpression=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ProjectionExpression"].encode('utf-16-be'))]*2)]))) if "ProjectionExpression" in native_input.keys() else Option_None(), + ExpressionAttributeNames=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(value.encode('utf-16-be'))]*2)])) for (key, value) in native_input["ExpressionAttributeNames"].items() })) if "ExpressionAttributeNames" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_BatchGetItemOutput(native_input): return DafnyBatchGetItemOutput( - Responses=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): Seq( - [ - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] - * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in list_element.items() - } - ) - for list_element in value - ] - ) - for (key, value) in native_input["Responses"].items() - } - ) - ) - if "Responses" in native_input.keys() - else Option_None() - ), - UnprocessedKeys=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_KeysAndAttributes( - value - ) - for (key, value) in native_input["UnprocessedKeys"].items() - } - ) - ) - if "UnprocessedKeys" in native_input.keys() - else Option_None() - ), - ConsumedCapacity=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConsumedCapacity( - list_element - ) - for list_element in native_input["ConsumedCapacity"] - ] - ) - ) - if "ConsumedCapacity" in native_input.keys() - else Option_None() - ), + Responses=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): Seq([Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in list_element.items() }) for list_element in value]) for (key, value) in native_input["Responses"].items() })) if "Responses" in native_input.keys() else Option_None(), + UnprocessedKeys=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_KeysAndAttributes(value) for (key, value) in native_input["UnprocessedKeys"].items() })) if "UnprocessedKeys" in native_input.keys() else Option_None(), + ConsumedCapacity=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConsumedCapacity(list_element) for list_element in native_input["ConsumedCapacity"]])) if "ConsumedCapacity" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_BatchWriteItemInput(native_input): return DafnyBatchWriteItemInput( - RequestItems=Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip(*[iter(key.encode("utf-16-be"))] * 2) - ] - ) - ): Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_WriteRequest( - list_element - ) - for list_element in value - ] - ) - for (key, value) in native_input["RequestItems"].items() - } - ), - ReturnConsumedCapacity=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnConsumedCapacity( - native_input["ReturnConsumedCapacity"] - ) - ) - if "ReturnConsumedCapacity" in native_input.keys() - else Option_None() - ), - ReturnItemCollectionMetrics=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnItemCollectionMetrics( - native_input["ReturnItemCollectionMetrics"] - ) - ) - if "ReturnItemCollectionMetrics" in native_input.keys() - else Option_None() - ), + RequestItems=Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_WriteRequest(list_element) for list_element in value]) for (key, value) in native_input["RequestItems"].items() }), + ReturnConsumedCapacity=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnConsumedCapacity(native_input["ReturnConsumedCapacity"])) if "ReturnConsumedCapacity" in native_input.keys() else Option_None(), + ReturnItemCollectionMetrics=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnItemCollectionMetrics(native_input["ReturnItemCollectionMetrics"])) if "ReturnItemCollectionMetrics" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_WriteRequest(native_input): return DafnyWriteRequest( - PutRequest=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_PutRequest( - native_input["PutRequest"] - ) - ) - if "PutRequest" in native_input.keys() - else Option_None() - ), - DeleteRequest=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DeleteRequest( - native_input["DeleteRequest"] - ) - ) - if "DeleteRequest" in native_input.keys() - else Option_None() - ), + PutRequest=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_PutRequest(native_input["PutRequest"])) if "PutRequest" in native_input.keys() else Option_None(), + DeleteRequest=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DeleteRequest(native_input["DeleteRequest"])) if "DeleteRequest" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_PutRequest(native_input): return DafnyPutRequest( - Item=Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip(*[iter(key.encode("utf-16-be"))] * 2) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in native_input["Item"].items() - } - ), + Item=Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input["Item"].items() }), ) - def com_amazonaws_dynamodb_DeleteRequest(native_input): return DafnyDeleteRequest( - Key=Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip(*[iter(key.encode("utf-16-be"))] * 2) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in native_input["Key"].items() - } - ), + Key=Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input["Key"].items() }), ) - def com_amazonaws_dynamodb_ReturnItemCollectionMetrics(native_input): # Convert ReturnItemCollectionMetrics if native_input == "SIZE": @@ -1754,207 +772,41 @@ def com_amazonaws_dynamodb_ReturnItemCollectionMetrics(native_input): else: raise ValueError("No recognized enum value in enum type: " + native_input) - def com_amazonaws_dynamodb_BatchWriteItemOutput(native_input): return DafnyBatchWriteItemOutput( - UnprocessedItems=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_WriteRequest( - list_element - ) - for list_element in value - ] - ) - for (key, value) in native_input["UnprocessedItems"].items() - } - ) - ) - if "UnprocessedItems" in native_input.keys() - else Option_None() - ), - ItemCollectionMetrics=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ItemCollectionMetrics( - list_element - ) - for list_element in value - ] - ) - for (key, value) in native_input[ - "ItemCollectionMetrics" - ].items() - } - ) - ) - if "ItemCollectionMetrics" in native_input.keys() - else Option_None() - ), - ConsumedCapacity=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConsumedCapacity( - list_element - ) - for list_element in native_input["ConsumedCapacity"] - ] - ) - ) - if "ConsumedCapacity" in native_input.keys() - else Option_None() - ), + UnprocessedItems=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_WriteRequest(list_element) for list_element in value]) for (key, value) in native_input["UnprocessedItems"].items() })) if "UnprocessedItems" in native_input.keys() else Option_None(), + ItemCollectionMetrics=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ItemCollectionMetrics(list_element) for list_element in value]) for (key, value) in native_input["ItemCollectionMetrics"].items() })) if "ItemCollectionMetrics" in native_input.keys() else Option_None(), + ConsumedCapacity=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConsumedCapacity(list_element) for list_element in native_input["ConsumedCapacity"]])) if "ConsumedCapacity" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ItemCollectionMetrics(native_input): return DafnyItemCollectionMetrics( - ItemCollectionKey=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in native_input["ItemCollectionKey"].items() - } - ) - ) - if "ItemCollectionKey" in native_input.keys() - else Option_None() - ), - SizeEstimateRangeGB=( - Option_Some( - Seq( - [ - list_element - for list_element in native_input["SizeEstimateRangeGB"] - ] - ) - ) - if "SizeEstimateRangeGB" in native_input.keys() - else Option_None() - ), + ItemCollectionKey=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input["ItemCollectionKey"].items() })) if "ItemCollectionKey" in native_input.keys() else Option_None(), + SizeEstimateRangeGB=Option_Some(Seq([list_element for list_element in native_input["SizeEstimateRangeGB"]])) if "SizeEstimateRangeGB" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_CreateBackupInput(native_input): return DafnyCreateBackupInput( - TableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - BackupName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["BackupName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), + TableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)])), + BackupName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["BackupName"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_CreateBackupOutput(native_input): return DafnyCreateBackupOutput( - BackupDetails=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BackupDetails( - native_input["BackupDetails"] - ) - ) - if "BackupDetails" in native_input.keys() - else Option_None() - ), + BackupDetails=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BackupDetails(native_input["BackupDetails"])) if "BackupDetails" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_BackupDetails(native_input): return DafnyBackupDetails( - BackupArn=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["BackupArn"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - BackupName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["BackupName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - BackupSizeBytes=( - Option_Some(native_input["BackupSizeBytes"]) - if "BackupSizeBytes" in native_input.keys() - else Option_None() - ), - BackupStatus=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BackupStatus( - native_input["BackupStatus"] - ), - BackupType=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BackupType( - native_input["BackupType"] - ), - BackupCreationDateTime=_dafny.Seq( - native_input["BackupCreationDateTime"].isoformat() - ), - BackupExpiryDateTime=( - Option_Some(_dafny.Seq(native_input["BackupExpiryDateTime"].isoformat())) - if "BackupExpiryDateTime" in native_input.keys() - else Option_None() - ), + BackupArn=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["BackupArn"].encode('utf-16-be'))]*2)])), + BackupName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["BackupName"].encode('utf-16-be'))]*2)])), + BackupSizeBytes=Option_Some(native_input["BackupSizeBytes"]) if "BackupSizeBytes" in native_input.keys() else Option_None(), + BackupStatus=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BackupStatus(native_input["BackupStatus"]), + BackupType=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BackupType(native_input["BackupType"]), + BackupCreationDateTime=_dafny.Seq(native_input["BackupCreationDateTime"].isoformat()), + BackupExpiryDateTime=Option_Some(_dafny.Seq(native_input["BackupExpiryDateTime"].isoformat())) if "BackupExpiryDateTime" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_BackupStatus(native_input): # Convert BackupStatus if native_input == "CREATING": @@ -1966,7 +818,6 @@ def com_amazonaws_dynamodb_BackupStatus(native_input): else: raise ValueError("No recognized enum value in enum type: " + native_input) - def com_amazonaws_dynamodb_BackupType(native_input): # Convert BackupType if native_input == "USER": @@ -1978,284 +829,45 @@ def com_amazonaws_dynamodb_BackupType(native_input): else: raise ValueError("No recognized enum value in enum type: " + native_input) - def com_amazonaws_dynamodb_CreateGlobalTableInput(native_input): return DafnyCreateGlobalTableInput( - GlobalTableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["GlobalTableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - ReplicationGroup=Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Replica( - list_element - ) - for list_element in native_input["ReplicationGroup"] - ] - ), + GlobalTableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["GlobalTableName"].encode('utf-16-be'))]*2)])), + ReplicationGroup=Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Replica(list_element) for list_element in native_input["ReplicationGroup"]]), ) - def com_amazonaws_dynamodb_Replica(native_input): return DafnyReplica( - RegionName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["RegionName"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "RegionName" in native_input.keys() - else Option_None() - ), + RegionName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["RegionName"].encode('utf-16-be'))]*2)]))) if "RegionName" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_CreateGlobalTableOutput(native_input): return DafnyCreateGlobalTableOutput( - GlobalTableDescription=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_GlobalTableDescription( - native_input["GlobalTableDescription"] - ) - ) - if "GlobalTableDescription" in native_input.keys() - else Option_None() - ), + GlobalTableDescription=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_GlobalTableDescription(native_input["GlobalTableDescription"])) if "GlobalTableDescription" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_GlobalTableDescription(native_input): return DafnyGlobalTableDescription( - ReplicationGroup=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaDescription( - list_element - ) - for list_element in native_input["ReplicationGroup"] - ] - ) - ) - if "ReplicationGroup" in native_input.keys() - else Option_None() - ), - GlobalTableArn=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["GlobalTableArn"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "GlobalTableArn" in native_input.keys() - else Option_None() - ), - CreationDateTime=( - Option_Some(_dafny.Seq(native_input["CreationDateTime"].isoformat())) - if "CreationDateTime" in native_input.keys() - else Option_None() - ), - GlobalTableStatus=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_GlobalTableStatus( - native_input["GlobalTableStatus"] - ) - ) - if "GlobalTableStatus" in native_input.keys() - else Option_None() - ), - GlobalTableName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["GlobalTableName"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "GlobalTableName" in native_input.keys() - else Option_None() - ), + ReplicationGroup=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaDescription(list_element) for list_element in native_input["ReplicationGroup"]])) if "ReplicationGroup" in native_input.keys() else Option_None(), + GlobalTableArn=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["GlobalTableArn"].encode('utf-16-be'))]*2)]))) if "GlobalTableArn" in native_input.keys() else Option_None(), + CreationDateTime=Option_Some(_dafny.Seq(native_input["CreationDateTime"].isoformat())) if "CreationDateTime" in native_input.keys() else Option_None(), + GlobalTableStatus=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_GlobalTableStatus(native_input["GlobalTableStatus"])) if "GlobalTableStatus" in native_input.keys() else Option_None(), + GlobalTableName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["GlobalTableName"].encode('utf-16-be'))]*2)]))) if "GlobalTableName" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ReplicaDescription(native_input): return DafnyReplicaDescription( - RegionName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["RegionName"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "RegionName" in native_input.keys() - else Option_None() - ), - ReplicaStatus=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaStatus( - native_input["ReplicaStatus"] - ) - ) - if "ReplicaStatus" in native_input.keys() - else Option_None() - ), - ReplicaStatusDescription=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["ReplicaStatusDescription"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "ReplicaStatusDescription" in native_input.keys() - else Option_None() - ), - ReplicaStatusPercentProgress=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input[ - "ReplicaStatusPercentProgress" - ].encode("utf-16-be") - ) - ] - * 2 - ) - ] - ) - ) - ) - if "ReplicaStatusPercentProgress" in native_input.keys() - else Option_None() - ), - KMSMasterKeyId=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["KMSMasterKeyId"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "KMSMasterKeyId" in native_input.keys() - else Option_None() - ), - ProvisionedThroughputOverride=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughputOverride( - native_input["ProvisionedThroughputOverride"] - ) - ) - if "ProvisionedThroughputOverride" in native_input.keys() - else Option_None() - ), - GlobalSecondaryIndexes=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexDescription( - list_element - ) - for list_element in native_input["GlobalSecondaryIndexes"] - ] - ) - ) - if "GlobalSecondaryIndexes" in native_input.keys() - else Option_None() - ), - ReplicaInaccessibleDateTime=( - Option_Some( - _dafny.Seq(native_input["ReplicaInaccessibleDateTime"].isoformat()) - ) - if "ReplicaInaccessibleDateTime" in native_input.keys() - else Option_None() - ), - ReplicaTableClassSummary=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableClassSummary( - native_input["ReplicaTableClassSummary"] - ) - ) - if "ReplicaTableClassSummary" in native_input.keys() - else Option_None() - ), + RegionName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["RegionName"].encode('utf-16-be'))]*2)]))) if "RegionName" in native_input.keys() else Option_None(), + ReplicaStatus=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaStatus(native_input["ReplicaStatus"])) if "ReplicaStatus" in native_input.keys() else Option_None(), + ReplicaStatusDescription=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ReplicaStatusDescription"].encode('utf-16-be'))]*2)]))) if "ReplicaStatusDescription" in native_input.keys() else Option_None(), + ReplicaStatusPercentProgress=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ReplicaStatusPercentProgress"].encode('utf-16-be'))]*2)]))) if "ReplicaStatusPercentProgress" in native_input.keys() else Option_None(), + KMSMasterKeyId=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["KMSMasterKeyId"].encode('utf-16-be'))]*2)]))) if "KMSMasterKeyId" in native_input.keys() else Option_None(), + ProvisionedThroughputOverride=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughputOverride(native_input["ProvisionedThroughputOverride"])) if "ProvisionedThroughputOverride" in native_input.keys() else Option_None(), + OnDemandThroughputOverride=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_OnDemandThroughputOverride(native_input["OnDemandThroughputOverride"])) if "OnDemandThroughputOverride" in native_input.keys() else Option_None(), + GlobalSecondaryIndexes=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexDescription(list_element) for list_element in native_input["GlobalSecondaryIndexes"]])) if "GlobalSecondaryIndexes" in native_input.keys() else Option_None(), + ReplicaInaccessibleDateTime=Option_Some(_dafny.Seq(native_input["ReplicaInaccessibleDateTime"].isoformat())) if "ReplicaInaccessibleDateTime" in native_input.keys() else Option_None(), + ReplicaTableClassSummary=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableClassSummary(native_input["ReplicaTableClassSummary"])) if "ReplicaTableClassSummary" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_GlobalTableStatus(native_input): # Convert GlobalTableStatus if native_input == "CREATING": @@ -2269,7 +881,6 @@ def com_amazonaws_dynamodb_GlobalTableStatus(native_input): else: raise ValueError("No recognized enum value in enum type: " + native_input) - def com_amazonaws_dynamodb_ReplicaStatus(native_input): # Convert ReplicaStatus if native_input == "CREATING": @@ -2289,67 +900,29 @@ def com_amazonaws_dynamodb_ReplicaStatus(native_input): else: raise ValueError("No recognized enum value in enum type: " + native_input) - def com_amazonaws_dynamodb_ProvisionedThroughputOverride(native_input): return DafnyProvisionedThroughputOverride( - ReadCapacityUnits=( - Option_Some(native_input["ReadCapacityUnits"]) - if "ReadCapacityUnits" in native_input.keys() - else Option_None() - ), + ReadCapacityUnits=Option_Some(native_input["ReadCapacityUnits"]) if "ReadCapacityUnits" in native_input.keys() else Option_None(), ) +def com_amazonaws_dynamodb_OnDemandThroughputOverride(native_input): + return DafnyOnDemandThroughputOverride( + MaxReadRequestUnits=Option_Some(native_input["MaxReadRequestUnits"]) if "MaxReadRequestUnits" in native_input.keys() else Option_None(), + ) def com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexDescription(native_input): return DafnyReplicaGlobalSecondaryIndexDescription( - IndexName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["IndexName"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "IndexName" in native_input.keys() - else Option_None() - ), - ProvisionedThroughputOverride=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughputOverride( - native_input["ProvisionedThroughputOverride"] - ) - ) - if "ProvisionedThroughputOverride" in native_input.keys() - else Option_None() - ), + IndexName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["IndexName"].encode('utf-16-be'))]*2)]))) if "IndexName" in native_input.keys() else Option_None(), + ProvisionedThroughputOverride=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughputOverride(native_input["ProvisionedThroughputOverride"])) if "ProvisionedThroughputOverride" in native_input.keys() else Option_None(), + OnDemandThroughputOverride=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_OnDemandThroughputOverride(native_input["OnDemandThroughputOverride"])) if "OnDemandThroughputOverride" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_TableClassSummary(native_input): return DafnyTableClassSummary( - TableClass=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableClass( - native_input["TableClass"] - ) - ) - if "TableClass" in native_input.keys() - else Option_None() - ), - LastUpdateDateTime=( - Option_Some(_dafny.Seq(native_input["LastUpdateDateTime"].isoformat())) - if "LastUpdateDateTime" in native_input.keys() - else Option_None() - ), + TableClass=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableClass(native_input["TableClass"])) if "TableClass" in native_input.keys() else Option_None(), + LastUpdateDateTime=Option_Some(_dafny.Seq(native_input["LastUpdateDateTime"].isoformat())) if "LastUpdateDateTime" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_TableClass(native_input): # Convert TableClass if native_input == "STANDARD": @@ -2359,143 +932,30 @@ def com_amazonaws_dynamodb_TableClass(native_input): else: raise ValueError("No recognized enum value in enum type: " + native_input) - def com_amazonaws_dynamodb_CreateTableInput(native_input): return DafnyCreateTableInput( - AttributeDefinitions=Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeDefinition( - list_element - ) - for list_element in native_input["AttributeDefinitions"] - ] - ), - TableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - KeySchema=Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_KeySchemaElement( - list_element - ) - for list_element in native_input["KeySchema"] - ] - ), - LocalSecondaryIndexes=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_LocalSecondaryIndex( - list_element - ) - for list_element in native_input["LocalSecondaryIndexes"] - ] - ) - ) - if "LocalSecondaryIndexes" in native_input.keys() - else Option_None() - ), - GlobalSecondaryIndexes=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_GlobalSecondaryIndex( - list_element - ) - for list_element in native_input["GlobalSecondaryIndexes"] - ] - ) - ) - if "GlobalSecondaryIndexes" in native_input.keys() - else Option_None() - ), - BillingMode=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BillingMode( - native_input["BillingMode"] - ) - ) - if "BillingMode" in native_input.keys() - else Option_None() - ), - ProvisionedThroughput=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughput( - native_input["ProvisionedThroughput"] - ) - ) - if "ProvisionedThroughput" in native_input.keys() - else Option_None() - ), - StreamSpecification=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_StreamSpecification( - native_input["StreamSpecification"] - ) - ) - if "StreamSpecification" in native_input.keys() - else Option_None() - ), - SSESpecification=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_SSESpecification( - native_input["SSESpecification"] - ) - ) - if "SSESpecification" in native_input.keys() - else Option_None() - ), - Tags=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Tag( - list_element - ) - for list_element in native_input["Tags"] - ] - ) - ) - if "Tags" in native_input.keys() - else Option_None() - ), - TableClass=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableClass( - native_input["TableClass"] - ) - ) - if "TableClass" in native_input.keys() - else Option_None() - ), + AttributeDefinitions=Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeDefinition(list_element) for list_element in native_input["AttributeDefinitions"]]), + TableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)])), + KeySchema=Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_KeySchemaElement(list_element) for list_element in native_input["KeySchema"]]), + LocalSecondaryIndexes=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_LocalSecondaryIndex(list_element) for list_element in native_input["LocalSecondaryIndexes"]])) if "LocalSecondaryIndexes" in native_input.keys() else Option_None(), + GlobalSecondaryIndexes=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_GlobalSecondaryIndex(list_element) for list_element in native_input["GlobalSecondaryIndexes"]])) if "GlobalSecondaryIndexes" in native_input.keys() else Option_None(), + BillingMode=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BillingMode(native_input["BillingMode"])) if "BillingMode" in native_input.keys() else Option_None(), + ProvisionedThroughput=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughput(native_input["ProvisionedThroughput"])) if "ProvisionedThroughput" in native_input.keys() else Option_None(), + StreamSpecification=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_StreamSpecification(native_input["StreamSpecification"])) if "StreamSpecification" in native_input.keys() else Option_None(), + SSESpecification=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_SSESpecification(native_input["SSESpecification"])) if "SSESpecification" in native_input.keys() else Option_None(), + Tags=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Tag(list_element) for list_element in native_input["Tags"]])) if "Tags" in native_input.keys() else Option_None(), + TableClass=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableClass(native_input["TableClass"])) if "TableClass" in native_input.keys() else Option_None(), + DeletionProtectionEnabled=Option_Some(native_input["DeletionProtectionEnabled"]) if "DeletionProtectionEnabled" in native_input.keys() else Option_None(), + ResourcePolicy=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ResourcePolicy"].encode('utf-16-be'))]*2)]))) if "ResourcePolicy" in native_input.keys() else Option_None(), + OnDemandThroughput=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_OnDemandThroughput(native_input["OnDemandThroughput"])) if "OnDemandThroughput" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_AttributeDefinition(native_input): return DafnyAttributeDefinition( - AttributeName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["AttributeName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - AttributeType=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ScalarAttributeType( - native_input["AttributeType"] - ), + AttributeName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["AttributeName"].encode('utf-16-be'))]*2)])), + AttributeType=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ScalarAttributeType(native_input["AttributeType"]), ) - def com_amazonaws_dynamodb_ScalarAttributeType(native_input): # Convert ScalarAttributeType if native_input == "S": @@ -2507,25 +967,12 @@ def com_amazonaws_dynamodb_ScalarAttributeType(native_input): else: raise ValueError("No recognized enum value in enum type: " + native_input) - def com_amazonaws_dynamodb_KeySchemaElement(native_input): return DafnyKeySchemaElement( - AttributeName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["AttributeName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - KeyType=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_KeyType( - native_input["KeyType"] - ), + AttributeName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["AttributeName"].encode('utf-16-be'))]*2)])), + KeyType=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_KeyType(native_input["KeyType"]), ) - def com_amazonaws_dynamodb_KeyType(native_input): # Convert KeyType if native_input == "HASH": @@ -2535,68 +982,19 @@ def com_amazonaws_dynamodb_KeyType(native_input): else: raise ValueError("No recognized enum value in enum type: " + native_input) - def com_amazonaws_dynamodb_LocalSecondaryIndex(native_input): return DafnyLocalSecondaryIndex( - IndexName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["IndexName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - KeySchema=Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_KeySchemaElement( - list_element - ) - for list_element in native_input["KeySchema"] - ] - ), - Projection=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Projection( - native_input["Projection"] - ), + IndexName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["IndexName"].encode('utf-16-be'))]*2)])), + KeySchema=Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_KeySchemaElement(list_element) for list_element in native_input["KeySchema"]]), + Projection=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Projection(native_input["Projection"]), ) - def com_amazonaws_dynamodb_Projection(native_input): return DafnyProjection( - ProjectionType=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProjectionType( - native_input["ProjectionType"] - ) - ) - if "ProjectionType" in native_input.keys() - else Option_None() - ), - NonKeyAttributes=( - Option_Some( - Seq( - [ - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(list_element.encode("utf-16-be"))] * 2 - ) - ] - ) - ) - for list_element in native_input["NonKeyAttributes"] - ] - ) - ) - if "NonKeyAttributes" in native_input.keys() - else Option_None() - ), + ProjectionType=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProjectionType(native_input["ProjectionType"])) if "ProjectionType" in native_input.keys() else Option_None(), + NonKeyAttributes=Option_Some(Seq([Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(list_element.encode('utf-16-be'))]*2)])) for list_element in native_input["NonKeyAttributes"]])) if "NonKeyAttributes" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ProjectionType(native_input): # Convert ProjectionType if native_input == "ALL": @@ -2608,48 +1006,26 @@ def com_amazonaws_dynamodb_ProjectionType(native_input): else: raise ValueError("No recognized enum value in enum type: " + native_input) - def com_amazonaws_dynamodb_GlobalSecondaryIndex(native_input): return DafnyGlobalSecondaryIndex( - IndexName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["IndexName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - KeySchema=Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_KeySchemaElement( - list_element - ) - for list_element in native_input["KeySchema"] - ] - ), - Projection=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Projection( - native_input["Projection"] - ), - ProvisionedThroughput=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughput( - native_input["ProvisionedThroughput"] - ) - ) - if "ProvisionedThroughput" in native_input.keys() - else Option_None() - ), + IndexName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["IndexName"].encode('utf-16-be'))]*2)])), + KeySchema=Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_KeySchemaElement(list_element) for list_element in native_input["KeySchema"]]), + Projection=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Projection(native_input["Projection"]), + ProvisionedThroughput=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughput(native_input["ProvisionedThroughput"])) if "ProvisionedThroughput" in native_input.keys() else Option_None(), + OnDemandThroughput=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_OnDemandThroughput(native_input["OnDemandThroughput"])) if "OnDemandThroughput" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ProvisionedThroughput(native_input): return DafnyProvisionedThroughput( ReadCapacityUnits=native_input["ReadCapacityUnits"], WriteCapacityUnits=native_input["WriteCapacityUnits"], ) +def com_amazonaws_dynamodb_OnDemandThroughput(native_input): + return DafnyOnDemandThroughput( + MaxReadRequestUnits=Option_Some(native_input["MaxReadRequestUnits"]) if "MaxReadRequestUnits" in native_input.keys() else Option_None(), + MaxWriteRequestUnits=Option_Some(native_input["MaxWriteRequestUnits"]) if "MaxWriteRequestUnits" in native_input.keys() else Option_None(), + ) def com_amazonaws_dynamodb_BillingMode(native_input): # Convert BillingMode @@ -2660,22 +1036,12 @@ def com_amazonaws_dynamodb_BillingMode(native_input): else: raise ValueError("No recognized enum value in enum type: " + native_input) - def com_amazonaws_dynamodb_StreamSpecification(native_input): return DafnyStreamSpecification( StreamEnabled=native_input["StreamEnabled"], - StreamViewType=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_StreamViewType( - native_input["StreamViewType"] - ) - ) - if "StreamViewType" in native_input.keys() - else Option_None() - ), + StreamViewType=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_StreamViewType(native_input["StreamViewType"])) if "StreamViewType" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_StreamViewType(native_input): # Convert StreamViewType if native_input == "NEW_IMAGE": @@ -2689,49 +1055,13 @@ def com_amazonaws_dynamodb_StreamViewType(native_input): else: raise ValueError("No recognized enum value in enum type: " + native_input) - def com_amazonaws_dynamodb_SSESpecification(native_input): return DafnySSESpecification( - Enabled=( - Option_Some(native_input["Enabled"]) - if "Enabled" in native_input.keys() - else Option_None() - ), - SSEType=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_SSEType( - native_input["SSEType"] - ) - ) - if "SSEType" in native_input.keys() - else Option_None() - ), - KMSMasterKeyId=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["KMSMasterKeyId"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "KMSMasterKeyId" in native_input.keys() - else Option_None() - ), + Enabled=Option_Some(native_input["Enabled"]) if "Enabled" in native_input.keys() else Option_None(), + SSEType=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_SSEType(native_input["SSEType"])) if "SSEType" in native_input.keys() else Option_None(), + KMSMasterKeyId=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["KMSMasterKeyId"].encode('utf-16-be'))]*2)]))) if "KMSMasterKeyId" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_SSEType(native_input): # Convert SSEType if native_input == "AES256": @@ -2741,327 +1071,45 @@ def com_amazonaws_dynamodb_SSEType(native_input): else: raise ValueError("No recognized enum value in enum type: " + native_input) - def com_amazonaws_dynamodb_Tag(native_input): return DafnyTag( - Key=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Key"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - Value=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Value"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), + Key=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["Key"].encode('utf-16-be'))]*2)])), + Value=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["Value"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_CreateTableOutput(native_input): return DafnyCreateTableOutput( - TableDescription=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableDescription( - native_input["TableDescription"] - ) - ) - if "TableDescription" in native_input.keys() - else Option_None() - ), + TableDescription=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableDescription(native_input["TableDescription"])) if "TableDescription" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_TableDescription(native_input): return DafnyTableDescription( - AttributeDefinitions=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeDefinition( - list_element - ) - for list_element in native_input["AttributeDefinitions"] - ] - ) - ) - if "AttributeDefinitions" in native_input.keys() - else Option_None() - ), - TableName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "TableName" in native_input.keys() - else Option_None() - ), - KeySchema=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_KeySchemaElement( - list_element - ) - for list_element in native_input["KeySchema"] - ] - ) - ) - if "KeySchema" in native_input.keys() - else Option_None() - ), - TableStatus=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableStatus( - native_input["TableStatus"] - ) - ) - if "TableStatus" in native_input.keys() - else Option_None() - ), - CreationDateTime=( - Option_Some(_dafny.Seq(native_input["CreationDateTime"].isoformat())) - if "CreationDateTime" in native_input.keys() - else Option_None() - ), - ProvisionedThroughput=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughputDescription( - native_input["ProvisionedThroughput"] - ) - ) - if "ProvisionedThroughput" in native_input.keys() - else Option_None() - ), - TableSizeBytes=( - Option_Some(native_input["TableSizeBytes"]) - if "TableSizeBytes" in native_input.keys() - else Option_None() - ), - ItemCount=( - Option_Some(native_input["ItemCount"]) - if "ItemCount" in native_input.keys() - else Option_None() - ), - TableArn=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableArn"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "TableArn" in native_input.keys() - else Option_None() - ), - TableId=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableId"].encode("utf-16-be"))] * 2 - ) - ] - ) - ) - ) - if "TableId" in native_input.keys() - else Option_None() - ), - BillingModeSummary=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BillingModeSummary( - native_input["BillingModeSummary"] - ) - ) - if "BillingModeSummary" in native_input.keys() - else Option_None() - ), - LocalSecondaryIndexes=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_LocalSecondaryIndexDescription( - list_element - ) - for list_element in native_input["LocalSecondaryIndexes"] - ] - ) - ) - if "LocalSecondaryIndexes" in native_input.keys() - else Option_None() - ), - GlobalSecondaryIndexes=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_GlobalSecondaryIndexDescription( - list_element - ) - for list_element in native_input["GlobalSecondaryIndexes"] - ] - ) - ) - if "GlobalSecondaryIndexes" in native_input.keys() - else Option_None() - ), - StreamSpecification=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_StreamSpecification( - native_input["StreamSpecification"] - ) - ) - if "StreamSpecification" in native_input.keys() - else Option_None() - ), - LatestStreamLabel=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["LatestStreamLabel"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "LatestStreamLabel" in native_input.keys() - else Option_None() - ), - LatestStreamArn=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["LatestStreamArn"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "LatestStreamArn" in native_input.keys() - else Option_None() - ), - GlobalTableVersion=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["GlobalTableVersion"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "GlobalTableVersion" in native_input.keys() - else Option_None() - ), - Replicas=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaDescription( - list_element - ) - for list_element in native_input["Replicas"] - ] - ) - ) - if "Replicas" in native_input.keys() - else Option_None() - ), - RestoreSummary=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_RestoreSummary( - native_input["RestoreSummary"] - ) - ) - if "RestoreSummary" in native_input.keys() - else Option_None() - ), - SSEDescription=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_SSEDescription( - native_input["SSEDescription"] - ) - ) - if "SSEDescription" in native_input.keys() - else Option_None() - ), - ArchivalSummary=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ArchivalSummary( - native_input["ArchivalSummary"] - ) - ) - if "ArchivalSummary" in native_input.keys() - else Option_None() - ), - TableClassSummary=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableClassSummary( - native_input["TableClassSummary"] - ) - ) - if "TableClassSummary" in native_input.keys() - else Option_None() - ), + AttributeDefinitions=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeDefinition(list_element) for list_element in native_input["AttributeDefinitions"]])) if "AttributeDefinitions" in native_input.keys() else Option_None(), + TableName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)]))) if "TableName" in native_input.keys() else Option_None(), + KeySchema=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_KeySchemaElement(list_element) for list_element in native_input["KeySchema"]])) if "KeySchema" in native_input.keys() else Option_None(), + TableStatus=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableStatus(native_input["TableStatus"])) if "TableStatus" in native_input.keys() else Option_None(), + CreationDateTime=Option_Some(_dafny.Seq(native_input["CreationDateTime"].isoformat())) if "CreationDateTime" in native_input.keys() else Option_None(), + ProvisionedThroughput=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughputDescription(native_input["ProvisionedThroughput"])) if "ProvisionedThroughput" in native_input.keys() else Option_None(), + TableSizeBytes=Option_Some(native_input["TableSizeBytes"]) if "TableSizeBytes" in native_input.keys() else Option_None(), + ItemCount=Option_Some(native_input["ItemCount"]) if "ItemCount" in native_input.keys() else Option_None(), + TableArn=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableArn"].encode('utf-16-be'))]*2)]))) if "TableArn" in native_input.keys() else Option_None(), + TableId=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableId"].encode('utf-16-be'))]*2)]))) if "TableId" in native_input.keys() else Option_None(), + BillingModeSummary=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BillingModeSummary(native_input["BillingModeSummary"])) if "BillingModeSummary" in native_input.keys() else Option_None(), + LocalSecondaryIndexes=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_LocalSecondaryIndexDescription(list_element) for list_element in native_input["LocalSecondaryIndexes"]])) if "LocalSecondaryIndexes" in native_input.keys() else Option_None(), + GlobalSecondaryIndexes=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_GlobalSecondaryIndexDescription(list_element) for list_element in native_input["GlobalSecondaryIndexes"]])) if "GlobalSecondaryIndexes" in native_input.keys() else Option_None(), + StreamSpecification=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_StreamSpecification(native_input["StreamSpecification"])) if "StreamSpecification" in native_input.keys() else Option_None(), + LatestStreamLabel=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["LatestStreamLabel"].encode('utf-16-be'))]*2)]))) if "LatestStreamLabel" in native_input.keys() else Option_None(), + LatestStreamArn=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["LatestStreamArn"].encode('utf-16-be'))]*2)]))) if "LatestStreamArn" in native_input.keys() else Option_None(), + GlobalTableVersion=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["GlobalTableVersion"].encode('utf-16-be'))]*2)]))) if "GlobalTableVersion" in native_input.keys() else Option_None(), + Replicas=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaDescription(list_element) for list_element in native_input["Replicas"]])) if "Replicas" in native_input.keys() else Option_None(), + RestoreSummary=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_RestoreSummary(native_input["RestoreSummary"])) if "RestoreSummary" in native_input.keys() else Option_None(), + SSEDescription=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_SSEDescription(native_input["SSEDescription"])) if "SSEDescription" in native_input.keys() else Option_None(), + ArchivalSummary=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ArchivalSummary(native_input["ArchivalSummary"])) if "ArchivalSummary" in native_input.keys() else Option_None(), + TableClassSummary=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableClassSummary(native_input["TableClassSummary"])) if "TableClassSummary" in native_input.keys() else Option_None(), + DeletionProtectionEnabled=Option_Some(native_input["DeletionProtectionEnabled"]) if "DeletionProtectionEnabled" in native_input.keys() else Option_None(), + OnDemandThroughput=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_OnDemandThroughput(native_input["OnDemandThroughput"])) if "OnDemandThroughput" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_TableStatus(native_input): # Convert TableStatus if native_input == "CREATING": @@ -3081,389 +1129,68 @@ def com_amazonaws_dynamodb_TableStatus(native_input): else: raise ValueError("No recognized enum value in enum type: " + native_input) - def com_amazonaws_dynamodb_ProvisionedThroughputDescription(native_input): return DafnyProvisionedThroughputDescription( - LastIncreaseDateTime=( - Option_Some(_dafny.Seq(native_input["LastIncreaseDateTime"].isoformat())) - if "LastIncreaseDateTime" in native_input.keys() - else Option_None() - ), - LastDecreaseDateTime=( - Option_Some(_dafny.Seq(native_input["LastDecreaseDateTime"].isoformat())) - if "LastDecreaseDateTime" in native_input.keys() - else Option_None() - ), - NumberOfDecreasesToday=( - Option_Some(native_input["NumberOfDecreasesToday"]) - if "NumberOfDecreasesToday" in native_input.keys() - else Option_None() - ), - ReadCapacityUnits=( - Option_Some(native_input["ReadCapacityUnits"]) - if "ReadCapacityUnits" in native_input.keys() - else Option_None() - ), - WriteCapacityUnits=( - Option_Some(native_input["WriteCapacityUnits"]) - if "WriteCapacityUnits" in native_input.keys() - else Option_None() - ), + LastIncreaseDateTime=Option_Some(_dafny.Seq(native_input["LastIncreaseDateTime"].isoformat())) if "LastIncreaseDateTime" in native_input.keys() else Option_None(), + LastDecreaseDateTime=Option_Some(_dafny.Seq(native_input["LastDecreaseDateTime"].isoformat())) if "LastDecreaseDateTime" in native_input.keys() else Option_None(), + NumberOfDecreasesToday=Option_Some(native_input["NumberOfDecreasesToday"]) if "NumberOfDecreasesToday" in native_input.keys() else Option_None(), + ReadCapacityUnits=Option_Some(native_input["ReadCapacityUnits"]) if "ReadCapacityUnits" in native_input.keys() else Option_None(), + WriteCapacityUnits=Option_Some(native_input["WriteCapacityUnits"]) if "WriteCapacityUnits" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_BillingModeSummary(native_input): return DafnyBillingModeSummary( - BillingMode=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BillingMode( - native_input["BillingMode"] - ) - ) - if "BillingMode" in native_input.keys() - else Option_None() - ), - LastUpdateToPayPerRequestDateTime=( - Option_Some( - _dafny.Seq( - native_input["LastUpdateToPayPerRequestDateTime"].isoformat() - ) - ) - if "LastUpdateToPayPerRequestDateTime" in native_input.keys() - else Option_None() - ), + BillingMode=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BillingMode(native_input["BillingMode"])) if "BillingMode" in native_input.keys() else Option_None(), + LastUpdateToPayPerRequestDateTime=Option_Some(_dafny.Seq(native_input["LastUpdateToPayPerRequestDateTime"].isoformat())) if "LastUpdateToPayPerRequestDateTime" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_LocalSecondaryIndexDescription(native_input): return DafnyLocalSecondaryIndexDescription( - IndexName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["IndexName"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "IndexName" in native_input.keys() - else Option_None() - ), - KeySchema=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_KeySchemaElement( - list_element - ) - for list_element in native_input["KeySchema"] - ] - ) - ) - if "KeySchema" in native_input.keys() - else Option_None() - ), - Projection=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Projection( - native_input["Projection"] - ) - ) - if "Projection" in native_input.keys() - else Option_None() - ), - IndexSizeBytes=( - Option_Some(native_input["IndexSizeBytes"]) - if "IndexSizeBytes" in native_input.keys() - else Option_None() - ), - ItemCount=( - Option_Some(native_input["ItemCount"]) - if "ItemCount" in native_input.keys() - else Option_None() - ), - IndexArn=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["IndexArn"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "IndexArn" in native_input.keys() - else Option_None() - ), + IndexName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["IndexName"].encode('utf-16-be'))]*2)]))) if "IndexName" in native_input.keys() else Option_None(), + KeySchema=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_KeySchemaElement(list_element) for list_element in native_input["KeySchema"]])) if "KeySchema" in native_input.keys() else Option_None(), + Projection=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Projection(native_input["Projection"])) if "Projection" in native_input.keys() else Option_None(), + IndexSizeBytes=Option_Some(native_input["IndexSizeBytes"]) if "IndexSizeBytes" in native_input.keys() else Option_None(), + ItemCount=Option_Some(native_input["ItemCount"]) if "ItemCount" in native_input.keys() else Option_None(), + IndexArn=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["IndexArn"].encode('utf-16-be'))]*2)]))) if "IndexArn" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_GlobalSecondaryIndexDescription(native_input): return DafnyGlobalSecondaryIndexDescription( - IndexName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["IndexName"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "IndexName" in native_input.keys() - else Option_None() - ), - KeySchema=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_KeySchemaElement( - list_element - ) - for list_element in native_input["KeySchema"] - ] - ) - ) - if "KeySchema" in native_input.keys() - else Option_None() - ), - Projection=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Projection( - native_input["Projection"] - ) - ) - if "Projection" in native_input.keys() - else Option_None() - ), - IndexStatus=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_IndexStatus( - native_input["IndexStatus"] - ) - ) - if "IndexStatus" in native_input.keys() - else Option_None() - ), - Backfilling=( - Option_Some(native_input["Backfilling"]) - if "Backfilling" in native_input.keys() - else Option_None() - ), - ProvisionedThroughput=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughputDescription( - native_input["ProvisionedThroughput"] - ) - ) - if "ProvisionedThroughput" in native_input.keys() - else Option_None() - ), - IndexSizeBytes=( - Option_Some(native_input["IndexSizeBytes"]) - if "IndexSizeBytes" in native_input.keys() - else Option_None() - ), - ItemCount=( - Option_Some(native_input["ItemCount"]) - if "ItemCount" in native_input.keys() - else Option_None() - ), - IndexArn=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["IndexArn"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "IndexArn" in native_input.keys() - else Option_None() - ), + IndexName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["IndexName"].encode('utf-16-be'))]*2)]))) if "IndexName" in native_input.keys() else Option_None(), + KeySchema=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_KeySchemaElement(list_element) for list_element in native_input["KeySchema"]])) if "KeySchema" in native_input.keys() else Option_None(), + Projection=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Projection(native_input["Projection"])) if "Projection" in native_input.keys() else Option_None(), + IndexStatus=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_IndexStatus(native_input["IndexStatus"])) if "IndexStatus" in native_input.keys() else Option_None(), + Backfilling=Option_Some(native_input["Backfilling"]) if "Backfilling" in native_input.keys() else Option_None(), + ProvisionedThroughput=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughputDescription(native_input["ProvisionedThroughput"])) if "ProvisionedThroughput" in native_input.keys() else Option_None(), + IndexSizeBytes=Option_Some(native_input["IndexSizeBytes"]) if "IndexSizeBytes" in native_input.keys() else Option_None(), + ItemCount=Option_Some(native_input["ItemCount"]) if "ItemCount" in native_input.keys() else Option_None(), + IndexArn=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["IndexArn"].encode('utf-16-be'))]*2)]))) if "IndexArn" in native_input.keys() else Option_None(), + OnDemandThroughput=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_OnDemandThroughput(native_input["OnDemandThroughput"])) if "OnDemandThroughput" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_RestoreSummary(native_input): return DafnyRestoreSummary( - SourceBackupArn=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["SourceBackupArn"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "SourceBackupArn" in native_input.keys() - else Option_None() - ), - SourceTableArn=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["SourceTableArn"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "SourceTableArn" in native_input.keys() - else Option_None() - ), + SourceBackupArn=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["SourceBackupArn"].encode('utf-16-be'))]*2)]))) if "SourceBackupArn" in native_input.keys() else Option_None(), + SourceTableArn=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["SourceTableArn"].encode('utf-16-be'))]*2)]))) if "SourceTableArn" in native_input.keys() else Option_None(), RestoreDateTime=_dafny.Seq(native_input["RestoreDateTime"].isoformat()), RestoreInProgress=native_input["RestoreInProgress"], ) - def com_amazonaws_dynamodb_SSEDescription(native_input): return DafnySSEDescription( - Status=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_SSEStatus( - native_input["Status"] - ) - ) - if "Status" in native_input.keys() - else Option_None() - ), - SSEType=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_SSEType( - native_input["SSEType"] - ) - ) - if "SSEType" in native_input.keys() - else Option_None() - ), - KMSMasterKeyArn=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["KMSMasterKeyArn"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "KMSMasterKeyArn" in native_input.keys() - else Option_None() - ), - InaccessibleEncryptionDateTime=( - Option_Some( - _dafny.Seq(native_input["InaccessibleEncryptionDateTime"].isoformat()) - ) - if "InaccessibleEncryptionDateTime" in native_input.keys() - else Option_None() - ), + Status=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_SSEStatus(native_input["Status"])) if "Status" in native_input.keys() else Option_None(), + SSEType=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_SSEType(native_input["SSEType"])) if "SSEType" in native_input.keys() else Option_None(), + KMSMasterKeyArn=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["KMSMasterKeyArn"].encode('utf-16-be'))]*2)]))) if "KMSMasterKeyArn" in native_input.keys() else Option_None(), + InaccessibleEncryptionDateTime=Option_Some(_dafny.Seq(native_input["InaccessibleEncryptionDateTime"].isoformat())) if "InaccessibleEncryptionDateTime" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ArchivalSummary(native_input): return DafnyArchivalSummary( - ArchivalDateTime=( - Option_Some(_dafny.Seq(native_input["ArchivalDateTime"].isoformat())) - if "ArchivalDateTime" in native_input.keys() - else Option_None() - ), - ArchivalReason=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["ArchivalReason"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "ArchivalReason" in native_input.keys() - else Option_None() - ), - ArchivalBackupArn=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["ArchivalBackupArn"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "ArchivalBackupArn" in native_input.keys() - else Option_None() - ), + ArchivalDateTime=Option_Some(_dafny.Seq(native_input["ArchivalDateTime"].isoformat())) if "ArchivalDateTime" in native_input.keys() else Option_None(), + ArchivalReason=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ArchivalReason"].encode('utf-16-be'))]*2)]))) if "ArchivalReason" in native_input.keys() else Option_None(), + ArchivalBackupArn=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ArchivalBackupArn"].encode('utf-16-be'))]*2)]))) if "ArchivalBackupArn" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_IndexStatus(native_input): # Convert IndexStatus if native_input == "CREATING": @@ -3477,7 +1204,6 @@ def com_amazonaws_dynamodb_IndexStatus(native_input): else: raise ValueError("No recognized enum value in enum type: " + native_input) - def com_amazonaws_dynamodb_SSEStatus(native_input): # Convert SSEStatus if native_input == "ENABLING": @@ -3493,339 +1219,68 @@ def com_amazonaws_dynamodb_SSEStatus(native_input): else: raise ValueError("No recognized enum value in enum type: " + native_input) - def com_amazonaws_dynamodb_DeleteBackupInput(native_input): return DafnyDeleteBackupInput( - BackupArn=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["BackupArn"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), + BackupArn=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["BackupArn"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_DeleteBackupOutput(native_input): return DafnyDeleteBackupOutput( - BackupDescription=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BackupDescription( - native_input["BackupDescription"] - ) - ) - if "BackupDescription" in native_input.keys() - else Option_None() - ), + BackupDescription=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BackupDescription(native_input["BackupDescription"])) if "BackupDescription" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_BackupDescription(native_input): return DafnyBackupDescription( - BackupDetails=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BackupDetails( - native_input["BackupDetails"] - ) - ) - if "BackupDetails" in native_input.keys() - else Option_None() - ), - SourceTableDetails=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_SourceTableDetails( - native_input["SourceTableDetails"] - ) - ) - if "SourceTableDetails" in native_input.keys() - else Option_None() - ), - SourceTableFeatureDetails=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_SourceTableFeatureDetails( - native_input["SourceTableFeatureDetails"] - ) - ) - if "SourceTableFeatureDetails" in native_input.keys() - else Option_None() - ), + BackupDetails=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BackupDetails(native_input["BackupDetails"])) if "BackupDetails" in native_input.keys() else Option_None(), + SourceTableDetails=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_SourceTableDetails(native_input["SourceTableDetails"])) if "SourceTableDetails" in native_input.keys() else Option_None(), + SourceTableFeatureDetails=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_SourceTableFeatureDetails(native_input["SourceTableFeatureDetails"])) if "SourceTableFeatureDetails" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_SourceTableDetails(native_input): return DafnySourceTableDetails( - TableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - TableId=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableId"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - TableArn=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableArn"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "TableArn" in native_input.keys() - else Option_None() - ), - TableSizeBytes=( - Option_Some(native_input["TableSizeBytes"]) - if "TableSizeBytes" in native_input.keys() - else Option_None() - ), - KeySchema=Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_KeySchemaElement( - list_element - ) - for list_element in native_input["KeySchema"] - ] - ), - TableCreationDateTime=_dafny.Seq( - native_input["TableCreationDateTime"].isoformat() - ), - ProvisionedThroughput=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughput( - native_input["ProvisionedThroughput"] - ), - ItemCount=( - Option_Some(native_input["ItemCount"]) - if "ItemCount" in native_input.keys() - else Option_None() - ), - BillingMode=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BillingMode( - native_input["BillingMode"] - ) - ) - if "BillingMode" in native_input.keys() - else Option_None() - ), + TableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)])), + TableId=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableId"].encode('utf-16-be'))]*2)])), + TableArn=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableArn"].encode('utf-16-be'))]*2)]))) if "TableArn" in native_input.keys() else Option_None(), + TableSizeBytes=Option_Some(native_input["TableSizeBytes"]) if "TableSizeBytes" in native_input.keys() else Option_None(), + KeySchema=Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_KeySchemaElement(list_element) for list_element in native_input["KeySchema"]]), + TableCreationDateTime=_dafny.Seq(native_input["TableCreationDateTime"].isoformat()), + ProvisionedThroughput=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughput(native_input["ProvisionedThroughput"]), + OnDemandThroughput=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_OnDemandThroughput(native_input["OnDemandThroughput"])) if "OnDemandThroughput" in native_input.keys() else Option_None(), + ItemCount=Option_Some(native_input["ItemCount"]) if "ItemCount" in native_input.keys() else Option_None(), + BillingMode=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BillingMode(native_input["BillingMode"])) if "BillingMode" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_SourceTableFeatureDetails(native_input): return DafnySourceTableFeatureDetails( - LocalSecondaryIndexes=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_LocalSecondaryIndexInfo( - list_element - ) - for list_element in native_input["LocalSecondaryIndexes"] - ] - ) - ) - if "LocalSecondaryIndexes" in native_input.keys() - else Option_None() - ), - GlobalSecondaryIndexes=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_GlobalSecondaryIndexInfo( - list_element - ) - for list_element in native_input["GlobalSecondaryIndexes"] - ] - ) - ) - if "GlobalSecondaryIndexes" in native_input.keys() - else Option_None() - ), - StreamDescription=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_StreamSpecification( - native_input["StreamDescription"] - ) - ) - if "StreamDescription" in native_input.keys() - else Option_None() - ), - TimeToLiveDescription=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TimeToLiveDescription( - native_input["TimeToLiveDescription"] - ) - ) - if "TimeToLiveDescription" in native_input.keys() - else Option_None() - ), - SSEDescription=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_SSEDescription( - native_input["SSEDescription"] - ) - ) - if "SSEDescription" in native_input.keys() - else Option_None() - ), + LocalSecondaryIndexes=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_LocalSecondaryIndexInfo(list_element) for list_element in native_input["LocalSecondaryIndexes"]])) if "LocalSecondaryIndexes" in native_input.keys() else Option_None(), + GlobalSecondaryIndexes=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_GlobalSecondaryIndexInfo(list_element) for list_element in native_input["GlobalSecondaryIndexes"]])) if "GlobalSecondaryIndexes" in native_input.keys() else Option_None(), + StreamDescription=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_StreamSpecification(native_input["StreamDescription"])) if "StreamDescription" in native_input.keys() else Option_None(), + TimeToLiveDescription=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TimeToLiveDescription(native_input["TimeToLiveDescription"])) if "TimeToLiveDescription" in native_input.keys() else Option_None(), + SSEDescription=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_SSEDescription(native_input["SSEDescription"])) if "SSEDescription" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_LocalSecondaryIndexInfo(native_input): return DafnyLocalSecondaryIndexInfo( - IndexName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["IndexName"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "IndexName" in native_input.keys() - else Option_None() - ), - KeySchema=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_KeySchemaElement( - list_element - ) - for list_element in native_input["KeySchema"] - ] - ) - ) - if "KeySchema" in native_input.keys() - else Option_None() - ), - Projection=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Projection( - native_input["Projection"] - ) - ) - if "Projection" in native_input.keys() - else Option_None() - ), + IndexName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["IndexName"].encode('utf-16-be'))]*2)]))) if "IndexName" in native_input.keys() else Option_None(), + KeySchema=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_KeySchemaElement(list_element) for list_element in native_input["KeySchema"]])) if "KeySchema" in native_input.keys() else Option_None(), + Projection=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Projection(native_input["Projection"])) if "Projection" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_GlobalSecondaryIndexInfo(native_input): return DafnyGlobalSecondaryIndexInfo( - IndexName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["IndexName"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "IndexName" in native_input.keys() - else Option_None() - ), - KeySchema=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_KeySchemaElement( - list_element - ) - for list_element in native_input["KeySchema"] - ] - ) - ) - if "KeySchema" in native_input.keys() - else Option_None() - ), - Projection=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Projection( - native_input["Projection"] - ) - ) - if "Projection" in native_input.keys() - else Option_None() - ), - ProvisionedThroughput=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughput( - native_input["ProvisionedThroughput"] - ) - ) - if "ProvisionedThroughput" in native_input.keys() - else Option_None() - ), + IndexName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["IndexName"].encode('utf-16-be'))]*2)]))) if "IndexName" in native_input.keys() else Option_None(), + KeySchema=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_KeySchemaElement(list_element) for list_element in native_input["KeySchema"]])) if "KeySchema" in native_input.keys() else Option_None(), + Projection=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Projection(native_input["Projection"])) if "Projection" in native_input.keys() else Option_None(), + ProvisionedThroughput=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughput(native_input["ProvisionedThroughput"])) if "ProvisionedThroughput" in native_input.keys() else Option_None(), + OnDemandThroughput=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_OnDemandThroughput(native_input["OnDemandThroughput"])) if "OnDemandThroughput" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_TimeToLiveDescription(native_input): return DafnyTimeToLiveDescription( - TimeToLiveStatus=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TimeToLiveStatus( - native_input["TimeToLiveStatus"] - ) - ) - if "TimeToLiveStatus" in native_input.keys() - else Option_None() - ), - AttributeName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["AttributeName"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "AttributeName" in native_input.keys() - else Option_None() - ), + TimeToLiveStatus=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TimeToLiveStatus(native_input["TimeToLiveStatus"])) if "TimeToLiveStatus" in native_input.keys() else Option_None(), + AttributeName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["AttributeName"].encode('utf-16-be'))]*2)]))) if "AttributeName" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_TimeToLiveStatus(native_input): # Convert TimeToLiveStatus if native_input == "ENABLING": @@ -3839,218 +1294,29 @@ def com_amazonaws_dynamodb_TimeToLiveStatus(native_input): else: raise ValueError("No recognized enum value in enum type: " + native_input) - def com_amazonaws_dynamodb_DeleteItemInput(native_input): return DafnyDeleteItemInput( - TableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - Key=Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip(*[iter(key.encode("utf-16-be"))] * 2) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in native_input["Key"].items() - } - ), - Expected=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ExpectedAttributeValue( - value - ) - for (key, value) in native_input["Expected"].items() - } - ) - ) - if "Expected" in native_input.keys() - else Option_None() - ), - ConditionalOperator=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConditionalOperator( - native_input["ConditionalOperator"] - ) - ) - if "ConditionalOperator" in native_input.keys() - else Option_None() - ), - ReturnValues=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnValue( - native_input["ReturnValues"] - ) - ) - if "ReturnValues" in native_input.keys() - else Option_None() - ), - ReturnConsumedCapacity=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnConsumedCapacity( - native_input["ReturnConsumedCapacity"] - ) - ) - if "ReturnConsumedCapacity" in native_input.keys() - else Option_None() - ), - ReturnItemCollectionMetrics=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnItemCollectionMetrics( - native_input["ReturnItemCollectionMetrics"] - ) - ) - if "ReturnItemCollectionMetrics" in native_input.keys() - else Option_None() - ), - ConditionExpression=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["ConditionExpression"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "ConditionExpression" in native_input.keys() - else Option_None() - ), - ExpressionAttributeNames=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(value.encode("utf-16-be"))] * 2 - ) - ] - ) - ) - for (key, value) in native_input[ - "ExpressionAttributeNames" - ].items() - } - ) - ) - if "ExpressionAttributeNames" in native_input.keys() - else Option_None() - ), - ExpressionAttributeValues=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in native_input[ - "ExpressionAttributeValues" - ].items() - } - ) - ) - if "ExpressionAttributeValues" in native_input.keys() - else Option_None() - ), + TableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)])), + Key=Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input["Key"].items() }), + Expected=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ExpectedAttributeValue(value) for (key, value) in native_input["Expected"].items() })) if "Expected" in native_input.keys() else Option_None(), + ConditionalOperator=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConditionalOperator(native_input["ConditionalOperator"])) if "ConditionalOperator" in native_input.keys() else Option_None(), + ReturnValues=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnValue(native_input["ReturnValues"])) if "ReturnValues" in native_input.keys() else Option_None(), + ReturnConsumedCapacity=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnConsumedCapacity(native_input["ReturnConsumedCapacity"])) if "ReturnConsumedCapacity" in native_input.keys() else Option_None(), + ReturnItemCollectionMetrics=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnItemCollectionMetrics(native_input["ReturnItemCollectionMetrics"])) if "ReturnItemCollectionMetrics" in native_input.keys() else Option_None(), + ConditionExpression=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ConditionExpression"].encode('utf-16-be'))]*2)]))) if "ConditionExpression" in native_input.keys() else Option_None(), + ExpressionAttributeNames=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(value.encode('utf-16-be'))]*2)])) for (key, value) in native_input["ExpressionAttributeNames"].items() })) if "ExpressionAttributeNames" in native_input.keys() else Option_None(), + ExpressionAttributeValues=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input["ExpressionAttributeValues"].items() })) if "ExpressionAttributeValues" in native_input.keys() else Option_None(), + ReturnValuesOnConditionCheckFailure=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure(native_input["ReturnValuesOnConditionCheckFailure"])) if "ReturnValuesOnConditionCheckFailure" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ExpectedAttributeValue(native_input): return DafnyExpectedAttributeValue( - Value=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - native_input["Value"] - ) - ) - if "Value" in native_input.keys() - else Option_None() - ), - Exists=( - Option_Some(native_input["Exists"]) - if "Exists" in native_input.keys() - else Option_None() - ), - ComparisonOperator=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ComparisonOperator( - native_input["ComparisonOperator"] - ) - ) - if "ComparisonOperator" in native_input.keys() - else Option_None() - ), - AttributeValueList=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - list_element - ) - for list_element in native_input["AttributeValueList"] - ] - ) - ) - if "AttributeValueList" in native_input.keys() - else Option_None() - ), + Value=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(native_input["Value"])) if "Value" in native_input.keys() else Option_None(), + Exists=Option_Some(native_input["Exists"]) if "Exists" in native_input.keys() else Option_None(), + ComparisonOperator=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ComparisonOperator(native_input["ComparisonOperator"])) if "ComparisonOperator" in native_input.keys() else Option_None(), + AttributeValueList=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(list_element) for list_element in native_input["AttributeValueList"]])) if "AttributeValueList" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ComparisonOperator(native_input): # Convert ComparisonOperator if native_input == "EQ": @@ -4082,7 +1348,6 @@ def com_amazonaws_dynamodb_ComparisonOperator(native_input): else: raise ValueError("No recognized enum value in enum type: " + native_input) - def com_amazonaws_dynamodb_ConditionalOperator(native_input): # Convert ConditionalOperator if native_input == "AND": @@ -4092,7 +1357,6 @@ def com_amazonaws_dynamodb_ConditionalOperator(native_input): else: raise ValueError("No recognized enum value in enum type: " + native_input) - def com_amazonaws_dynamodb_ReturnValue(native_input): # Convert ReturnValue if native_input == "NONE": @@ -4108,157 +1372,60 @@ def com_amazonaws_dynamodb_ReturnValue(native_input): else: raise ValueError("No recognized enum value in enum type: " + native_input) - def com_amazonaws_dynamodb_DeleteItemOutput(native_input): return DafnyDeleteItemOutput( - Attributes=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in native_input["Attributes"].items() - } - ) - ) - if "Attributes" in native_input.keys() - else Option_None() - ), - ConsumedCapacity=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConsumedCapacity( - native_input["ConsumedCapacity"] - ) - ) - if "ConsumedCapacity" in native_input.keys() - else Option_None() - ), - ItemCollectionMetrics=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ItemCollectionMetrics( - native_input["ItemCollectionMetrics"] - ) - ) - if "ItemCollectionMetrics" in native_input.keys() - else Option_None() - ), + Attributes=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input["Attributes"].items() })) if "Attributes" in native_input.keys() else Option_None(), + ConsumedCapacity=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConsumedCapacity(native_input["ConsumedCapacity"])) if "ConsumedCapacity" in native_input.keys() else Option_None(), + ItemCollectionMetrics=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ItemCollectionMetrics(native_input["ItemCollectionMetrics"])) if "ItemCollectionMetrics" in native_input.keys() else Option_None(), ) +def com_amazonaws_dynamodb_DeleteResourcePolicyInput(native_input): + return DafnyDeleteResourcePolicyInput( + ResourceArn=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ResourceArn"].encode('utf-16-be'))]*2)])), + ExpectedRevisionId=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ExpectedRevisionId"].encode('utf-16-be'))]*2)]))) if "ExpectedRevisionId" in native_input.keys() else Option_None(), + ) + +def com_amazonaws_dynamodb_DeleteResourcePolicyOutput(native_input): + return DafnyDeleteResourcePolicyOutput( + RevisionId=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["RevisionId"].encode('utf-16-be'))]*2)]))) if "RevisionId" in native_input.keys() else Option_None(), + ) def com_amazonaws_dynamodb_DeleteTableInput(native_input): return DafnyDeleteTableInput( - TableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), + TableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_DeleteTableOutput(native_input): return DafnyDeleteTableOutput( - TableDescription=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableDescription( - native_input["TableDescription"] - ) - ) - if "TableDescription" in native_input.keys() - else Option_None() - ), + TableDescription=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableDescription(native_input["TableDescription"])) if "TableDescription" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_DescribeBackupInput(native_input): return DafnyDescribeBackupInput( - BackupArn=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["BackupArn"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), + BackupArn=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["BackupArn"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_DescribeBackupOutput(native_input): return DafnyDescribeBackupOutput( - BackupDescription=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BackupDescription( - native_input["BackupDescription"] - ) - ) - if "BackupDescription" in native_input.keys() - else Option_None() - ), + BackupDescription=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BackupDescription(native_input["BackupDescription"])) if "BackupDescription" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_DescribeContinuousBackupsInput(native_input): return DafnyDescribeContinuousBackupsInput( - TableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), + TableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_DescribeContinuousBackupsOutput(native_input): return DafnyDescribeContinuousBackupsOutput( - ContinuousBackupsDescription=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ContinuousBackupsDescription( - native_input["ContinuousBackupsDescription"] - ) - ) - if "ContinuousBackupsDescription" in native_input.keys() - else Option_None() - ), + ContinuousBackupsDescription=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ContinuousBackupsDescription(native_input["ContinuousBackupsDescription"])) if "ContinuousBackupsDescription" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ContinuousBackupsDescription(native_input): return DafnyContinuousBackupsDescription( - ContinuousBackupsStatus=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ContinuousBackupsStatus( - native_input["ContinuousBackupsStatus"] - ), - PointInTimeRecoveryDescription=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_PointInTimeRecoveryDescription( - native_input["PointInTimeRecoveryDescription"] - ) - ) - if "PointInTimeRecoveryDescription" in native_input.keys() - else Option_None() - ), + ContinuousBackupsStatus=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ContinuousBackupsStatus(native_input["ContinuousBackupsStatus"]), + PointInTimeRecoveryDescription=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_PointInTimeRecoveryDescription(native_input["PointInTimeRecoveryDescription"])) if "PointInTimeRecoveryDescription" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ContinuousBackupsStatus(native_input): # Convert ContinuousBackupsStatus if native_input == "ENABLED": @@ -4268,35 +1435,13 @@ def com_amazonaws_dynamodb_ContinuousBackupsStatus(native_input): else: raise ValueError("No recognized enum value in enum type: " + native_input) - def com_amazonaws_dynamodb_PointInTimeRecoveryDescription(native_input): return DafnyPointInTimeRecoveryDescription( - PointInTimeRecoveryStatus=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_PointInTimeRecoveryStatus( - native_input["PointInTimeRecoveryStatus"] - ) - ) - if "PointInTimeRecoveryStatus" in native_input.keys() - else Option_None() - ), - EarliestRestorableDateTime=( - Option_Some( - _dafny.Seq(native_input["EarliestRestorableDateTime"].isoformat()) - ) - if "EarliestRestorableDateTime" in native_input.keys() - else Option_None() - ), - LatestRestorableDateTime=( - Option_Some( - _dafny.Seq(native_input["LatestRestorableDateTime"].isoformat()) - ) - if "LatestRestorableDateTime" in native_input.keys() - else Option_None() - ), + PointInTimeRecoveryStatus=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_PointInTimeRecoveryStatus(native_input["PointInTimeRecoveryStatus"])) if "PointInTimeRecoveryStatus" in native_input.keys() else Option_None(), + EarliestRestorableDateTime=Option_Some(_dafny.Seq(native_input["EarliestRestorableDateTime"].isoformat())) if "EarliestRestorableDateTime" in native_input.keys() else Option_None(), + LatestRestorableDateTime=Option_Some(_dafny.Seq(native_input["LatestRestorableDateTime"].isoformat())) if "LatestRestorableDateTime" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_PointInTimeRecoveryStatus(native_input): # Convert PointInTimeRecoveryStatus if native_input == "ENABLED": @@ -4306,122 +1451,22 @@ def com_amazonaws_dynamodb_PointInTimeRecoveryStatus(native_input): else: raise ValueError("No recognized enum value in enum type: " + native_input) - def com_amazonaws_dynamodb_DescribeContributorInsightsInput(native_input): return DafnyDescribeContributorInsightsInput( - TableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - IndexName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["IndexName"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "IndexName" in native_input.keys() - else Option_None() - ), + TableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)])), + IndexName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["IndexName"].encode('utf-16-be'))]*2)]))) if "IndexName" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_DescribeContributorInsightsOutput(native_input): return DafnyDescribeContributorInsightsOutput( - TableName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "TableName" in native_input.keys() - else Option_None() - ), - IndexName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["IndexName"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "IndexName" in native_input.keys() - else Option_None() - ), - ContributorInsightsRuleList=( - Option_Some( - Seq( - [ - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(list_element.encode("utf-16-be"))] * 2 - ) - ] - ) - ) - for list_element in native_input["ContributorInsightsRuleList"] - ] - ) - ) - if "ContributorInsightsRuleList" in native_input.keys() - else Option_None() - ), - ContributorInsightsStatus=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ContributorInsightsStatus( - native_input["ContributorInsightsStatus"] - ) - ) - if "ContributorInsightsStatus" in native_input.keys() - else Option_None() - ), - LastUpdateDateTime=( - Option_Some(_dafny.Seq(native_input["LastUpdateDateTime"].isoformat())) - if "LastUpdateDateTime" in native_input.keys() - else Option_None() - ), - FailureException=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_FailureException( - native_input["FailureException"] - ) - ) - if "FailureException" in native_input.keys() - else Option_None() - ), + TableName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)]))) if "TableName" in native_input.keys() else Option_None(), + IndexName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["IndexName"].encode('utf-16-be'))]*2)]))) if "IndexName" in native_input.keys() else Option_None(), + ContributorInsightsRuleList=Option_Some(Seq([Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(list_element.encode('utf-16-be'))]*2)])) for list_element in native_input["ContributorInsightsRuleList"]])) if "ContributorInsightsRuleList" in native_input.keys() else Option_None(), + ContributorInsightsStatus=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ContributorInsightsStatus(native_input["ContributorInsightsStatus"])) if "ContributorInsightsStatus" in native_input.keys() else Option_None(), + LastUpdateDateTime=Option_Some(_dafny.Seq(native_input["LastUpdateDateTime"].isoformat())) if "LastUpdateDateTime" in native_input.keys() else Option_None(), + FailureException=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_FailureException(native_input["FailureException"])) if "FailureException" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ContributorInsightsStatus(native_input): # Convert ContributorInsightsStatus if native_input == "ENABLING": @@ -4437,387 +1482,62 @@ def com_amazonaws_dynamodb_ContributorInsightsStatus(native_input): else: raise ValueError("No recognized enum value in enum type: " + native_input) - def com_amazonaws_dynamodb_FailureException(native_input): return DafnyFailureException( - ExceptionName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["ExceptionName"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "ExceptionName" in native_input.keys() - else Option_None() - ), - ExceptionDescription=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["ExceptionDescription"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "ExceptionDescription" in native_input.keys() - else Option_None() - ), + ExceptionName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ExceptionName"].encode('utf-16-be'))]*2)]))) if "ExceptionName" in native_input.keys() else Option_None(), + ExceptionDescription=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ExceptionDescription"].encode('utf-16-be'))]*2)]))) if "ExceptionDescription" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_DescribeEndpointsRequest(native_input): - return DafnyDescribeEndpointsRequest() - + return DafnyDescribeEndpointsRequest( + ) def com_amazonaws_dynamodb_DescribeEndpointsResponse(native_input): return DafnyDescribeEndpointsResponse( - Endpoints=Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Endpoint( - list_element - ) - for list_element in native_input["Endpoints"] - ] - ), + Endpoints=Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Endpoint(list_element) for list_element in native_input["Endpoints"]]), ) - def com_amazonaws_dynamodb_Endpoint(native_input): return DafnyEndpoint( - Address=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Address"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), + Address=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["Address"].encode('utf-16-be'))]*2)])), CachePeriodInMinutes=native_input["CachePeriodInMinutes"], ) - def com_amazonaws_dynamodb_DescribeExportInput(native_input): return DafnyDescribeExportInput( - ExportArn=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["ExportArn"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), + ExportArn=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ExportArn"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_DescribeExportOutput(native_input): return DafnyDescribeExportOutput( - ExportDescription=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ExportDescription( - native_input["ExportDescription"] - ) - ) - if "ExportDescription" in native_input.keys() - else Option_None() - ), + ExportDescription=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ExportDescription(native_input["ExportDescription"])) if "ExportDescription" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ExportDescription(native_input): return DafnyExportDescription( - ExportArn=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["ExportArn"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "ExportArn" in native_input.keys() - else Option_None() - ), - ExportStatus=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ExportStatus( - native_input["ExportStatus"] - ) - ) - if "ExportStatus" in native_input.keys() - else Option_None() - ), - StartTime=( - Option_Some(_dafny.Seq(native_input["StartTime"].isoformat())) - if "StartTime" in native_input.keys() - else Option_None() - ), - EndTime=( - Option_Some(_dafny.Seq(native_input["EndTime"].isoformat())) - if "EndTime" in native_input.keys() - else Option_None() - ), - ExportManifest=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["ExportManifest"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "ExportManifest" in native_input.keys() - else Option_None() - ), - TableArn=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableArn"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "TableArn" in native_input.keys() - else Option_None() - ), - TableId=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableId"].encode("utf-16-be"))] * 2 - ) - ] - ) - ) - ) - if "TableId" in native_input.keys() - else Option_None() - ), - ExportTime=( - Option_Some(_dafny.Seq(native_input["ExportTime"].isoformat())) - if "ExportTime" in native_input.keys() - else Option_None() - ), - ClientToken=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["ClientToken"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "ClientToken" in native_input.keys() - else Option_None() - ), - S3Bucket=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["S3Bucket"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "S3Bucket" in native_input.keys() - else Option_None() - ), - S3BucketOwner=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["S3BucketOwner"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "S3BucketOwner" in native_input.keys() - else Option_None() - ), - S3Prefix=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["S3Prefix"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "S3Prefix" in native_input.keys() - else Option_None() - ), - S3SseAlgorithm=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_S3SseAlgorithm( - native_input["S3SseAlgorithm"] - ) - ) - if "S3SseAlgorithm" in native_input.keys() - else Option_None() - ), - S3SseKmsKeyId=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["S3SseKmsKeyId"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "S3SseKmsKeyId" in native_input.keys() - else Option_None() - ), - FailureCode=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["FailureCode"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "FailureCode" in native_input.keys() - else Option_None() - ), - FailureMessage=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["FailureMessage"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "FailureMessage" in native_input.keys() - else Option_None() - ), - ExportFormat=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ExportFormat( - native_input["ExportFormat"] - ) - ) - if "ExportFormat" in native_input.keys() - else Option_None() - ), - BilledSizeBytes=( - Option_Some(native_input["BilledSizeBytes"]) - if "BilledSizeBytes" in native_input.keys() - else Option_None() - ), - ItemCount=( - Option_Some(native_input["ItemCount"]) - if "ItemCount" in native_input.keys() - else Option_None() - ), + ExportArn=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ExportArn"].encode('utf-16-be'))]*2)]))) if "ExportArn" in native_input.keys() else Option_None(), + ExportStatus=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ExportStatus(native_input["ExportStatus"])) if "ExportStatus" in native_input.keys() else Option_None(), + StartTime=Option_Some(_dafny.Seq(native_input["StartTime"].isoformat())) if "StartTime" in native_input.keys() else Option_None(), + EndTime=Option_Some(_dafny.Seq(native_input["EndTime"].isoformat())) if "EndTime" in native_input.keys() else Option_None(), + ExportManifest=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ExportManifest"].encode('utf-16-be'))]*2)]))) if "ExportManifest" in native_input.keys() else Option_None(), + TableArn=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableArn"].encode('utf-16-be'))]*2)]))) if "TableArn" in native_input.keys() else Option_None(), + TableId=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableId"].encode('utf-16-be'))]*2)]))) if "TableId" in native_input.keys() else Option_None(), + ExportTime=Option_Some(_dafny.Seq(native_input["ExportTime"].isoformat())) if "ExportTime" in native_input.keys() else Option_None(), + ClientToken=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ClientToken"].encode('utf-16-be'))]*2)]))) if "ClientToken" in native_input.keys() else Option_None(), + S3Bucket=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["S3Bucket"].encode('utf-16-be'))]*2)]))) if "S3Bucket" in native_input.keys() else Option_None(), + S3BucketOwner=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["S3BucketOwner"].encode('utf-16-be'))]*2)]))) if "S3BucketOwner" in native_input.keys() else Option_None(), + S3Prefix=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["S3Prefix"].encode('utf-16-be'))]*2)]))) if "S3Prefix" in native_input.keys() else Option_None(), + S3SseAlgorithm=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_S3SseAlgorithm(native_input["S3SseAlgorithm"])) if "S3SseAlgorithm" in native_input.keys() else Option_None(), + S3SseKmsKeyId=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["S3SseKmsKeyId"].encode('utf-16-be'))]*2)]))) if "S3SseKmsKeyId" in native_input.keys() else Option_None(), + FailureCode=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["FailureCode"].encode('utf-16-be'))]*2)]))) if "FailureCode" in native_input.keys() else Option_None(), + FailureMessage=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["FailureMessage"].encode('utf-16-be'))]*2)]))) if "FailureMessage" in native_input.keys() else Option_None(), + ExportFormat=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ExportFormat(native_input["ExportFormat"])) if "ExportFormat" in native_input.keys() else Option_None(), + BilledSizeBytes=Option_Some(native_input["BilledSizeBytes"]) if "BilledSizeBytes" in native_input.keys() else Option_None(), + ItemCount=Option_Some(native_input["ItemCount"]) if "ItemCount" in native_input.keys() else Option_None(), + ExportType=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ExportType(native_input["ExportType"])) if "ExportType" in native_input.keys() else Option_None(), + IncrementalExportSpecification=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_IncrementalExportSpecification(native_input["IncrementalExportSpecification"])) if "IncrementalExportSpecification" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ExportStatus(native_input): # Convert ExportStatus if native_input == "IN_PROGRESS": @@ -4829,7 +1549,6 @@ def com_amazonaws_dynamodb_ExportStatus(native_input): else: raise ValueError("No recognized enum value in enum type: " + native_input) - def com_amazonaws_dynamodb_S3SseAlgorithm(native_input): # Convert S3SseAlgorithm if native_input == "AES256": @@ -4839,7 +1558,6 @@ def com_amazonaws_dynamodb_S3SseAlgorithm(native_input): else: raise ValueError("No recognized enum value in enum type: " + native_input) - def com_amazonaws_dynamodb_ExportFormat(native_input): # Convert ExportFormat if native_input == "DYNAMODB_JSON": @@ -4849,586 +1567,131 @@ def com_amazonaws_dynamodb_ExportFormat(native_input): else: raise ValueError("No recognized enum value in enum type: " + native_input) +def com_amazonaws_dynamodb_ExportType(native_input): + # Convert ExportType + if native_input == "FULL_EXPORT": + return ExportType_FULL__EXPORT() + elif native_input == "INCREMENTAL_EXPORT": + return ExportType_INCREMENTAL__EXPORT() + else: + raise ValueError("No recognized enum value in enum type: " + native_input) + +def com_amazonaws_dynamodb_IncrementalExportSpecification(native_input): + return DafnyIncrementalExportSpecification( + ExportFromTime=Option_Some(_dafny.Seq(native_input["ExportFromTime"].isoformat())) if "ExportFromTime" in native_input.keys() else Option_None(), + ExportToTime=Option_Some(_dafny.Seq(native_input["ExportToTime"].isoformat())) if "ExportToTime" in native_input.keys() else Option_None(), + ExportViewType=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ExportViewType(native_input["ExportViewType"])) if "ExportViewType" in native_input.keys() else Option_None(), + ) + +def com_amazonaws_dynamodb_ExportViewType(native_input): + # Convert ExportViewType + if native_input == "NEW_IMAGE": + return ExportViewType_NEW__IMAGE() + elif native_input == "NEW_AND_OLD_IMAGES": + return ExportViewType_NEW__AND__OLD__IMAGES() + else: + raise ValueError("No recognized enum value in enum type: " + native_input) def com_amazonaws_dynamodb_DescribeGlobalTableInput(native_input): return DafnyDescribeGlobalTableInput( - GlobalTableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["GlobalTableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), + GlobalTableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["GlobalTableName"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_DescribeGlobalTableOutput(native_input): return DafnyDescribeGlobalTableOutput( - GlobalTableDescription=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_GlobalTableDescription( - native_input["GlobalTableDescription"] - ) - ) - if "GlobalTableDescription" in native_input.keys() - else Option_None() - ), + GlobalTableDescription=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_GlobalTableDescription(native_input["GlobalTableDescription"])) if "GlobalTableDescription" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_DescribeGlobalTableSettingsInput(native_input): return DafnyDescribeGlobalTableSettingsInput( - GlobalTableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["GlobalTableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), + GlobalTableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["GlobalTableName"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_DescribeGlobalTableSettingsOutput(native_input): return DafnyDescribeGlobalTableSettingsOutput( - GlobalTableName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["GlobalTableName"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "GlobalTableName" in native_input.keys() - else Option_None() - ), - ReplicaSettings=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaSettingsDescription( - list_element - ) - for list_element in native_input["ReplicaSettings"] - ] - ) - ) - if "ReplicaSettings" in native_input.keys() - else Option_None() - ), + GlobalTableName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["GlobalTableName"].encode('utf-16-be'))]*2)]))) if "GlobalTableName" in native_input.keys() else Option_None(), + ReplicaSettings=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaSettingsDescription(list_element) for list_element in native_input["ReplicaSettings"]])) if "ReplicaSettings" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ReplicaSettingsDescription(native_input): return DafnyReplicaSettingsDescription( - RegionName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["RegionName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - ReplicaStatus=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaStatus( - native_input["ReplicaStatus"] - ) - ) - if "ReplicaStatus" in native_input.keys() - else Option_None() - ), - ReplicaBillingModeSummary=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BillingModeSummary( - native_input["ReplicaBillingModeSummary"] - ) - ) - if "ReplicaBillingModeSummary" in native_input.keys() - else Option_None() - ), - ReplicaProvisionedReadCapacityUnits=( - Option_Some(native_input["ReplicaProvisionedReadCapacityUnits"]) - if "ReplicaProvisionedReadCapacityUnits" in native_input.keys() - else Option_None() - ), - ReplicaProvisionedReadCapacityAutoScalingSettings=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingSettingsDescription( - native_input["ReplicaProvisionedReadCapacityAutoScalingSettings"] - ) - ) - if "ReplicaProvisionedReadCapacityAutoScalingSettings" - in native_input.keys() - else Option_None() - ), - ReplicaProvisionedWriteCapacityUnits=( - Option_Some(native_input["ReplicaProvisionedWriteCapacityUnits"]) - if "ReplicaProvisionedWriteCapacityUnits" in native_input.keys() - else Option_None() - ), - ReplicaProvisionedWriteCapacityAutoScalingSettings=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingSettingsDescription( - native_input["ReplicaProvisionedWriteCapacityAutoScalingSettings"] - ) - ) - if "ReplicaProvisionedWriteCapacityAutoScalingSettings" - in native_input.keys() - else Option_None() - ), - ReplicaGlobalSecondaryIndexSettings=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexSettingsDescription( - list_element - ) - for list_element in native_input[ - "ReplicaGlobalSecondaryIndexSettings" - ] - ] - ) - ) - if "ReplicaGlobalSecondaryIndexSettings" in native_input.keys() - else Option_None() - ), - ReplicaTableClassSummary=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableClassSummary( - native_input["ReplicaTableClassSummary"] - ) - ) - if "ReplicaTableClassSummary" in native_input.keys() - else Option_None() - ), + RegionName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["RegionName"].encode('utf-16-be'))]*2)])), + ReplicaStatus=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaStatus(native_input["ReplicaStatus"])) if "ReplicaStatus" in native_input.keys() else Option_None(), + ReplicaBillingModeSummary=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BillingModeSummary(native_input["ReplicaBillingModeSummary"])) if "ReplicaBillingModeSummary" in native_input.keys() else Option_None(), + ReplicaProvisionedReadCapacityUnits=Option_Some(native_input["ReplicaProvisionedReadCapacityUnits"]) if "ReplicaProvisionedReadCapacityUnits" in native_input.keys() else Option_None(), + ReplicaProvisionedReadCapacityAutoScalingSettings=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingSettingsDescription(native_input["ReplicaProvisionedReadCapacityAutoScalingSettings"])) if "ReplicaProvisionedReadCapacityAutoScalingSettings" in native_input.keys() else Option_None(), + ReplicaProvisionedWriteCapacityUnits=Option_Some(native_input["ReplicaProvisionedWriteCapacityUnits"]) if "ReplicaProvisionedWriteCapacityUnits" in native_input.keys() else Option_None(), + ReplicaProvisionedWriteCapacityAutoScalingSettings=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingSettingsDescription(native_input["ReplicaProvisionedWriteCapacityAutoScalingSettings"])) if "ReplicaProvisionedWriteCapacityAutoScalingSettings" in native_input.keys() else Option_None(), + ReplicaGlobalSecondaryIndexSettings=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexSettingsDescription(list_element) for list_element in native_input["ReplicaGlobalSecondaryIndexSettings"]])) if "ReplicaGlobalSecondaryIndexSettings" in native_input.keys() else Option_None(), + ReplicaTableClassSummary=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableClassSummary(native_input["ReplicaTableClassSummary"])) if "ReplicaTableClassSummary" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_AutoScalingSettingsDescription(native_input): return DafnyAutoScalingSettingsDescription( - MinimumUnits=( - Option_Some(native_input["MinimumUnits"]) - if "MinimumUnits" in native_input.keys() - else Option_None() - ), - MaximumUnits=( - Option_Some(native_input["MaximumUnits"]) - if "MaximumUnits" in native_input.keys() - else Option_None() - ), - AutoScalingDisabled=( - Option_Some(native_input["AutoScalingDisabled"]) - if "AutoScalingDisabled" in native_input.keys() - else Option_None() - ), - AutoScalingRoleArn=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["AutoScalingRoleArn"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "AutoScalingRoleArn" in native_input.keys() - else Option_None() - ), - ScalingPolicies=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingPolicyDescription( - list_element - ) - for list_element in native_input["ScalingPolicies"] - ] - ) - ) - if "ScalingPolicies" in native_input.keys() - else Option_None() - ), + MinimumUnits=Option_Some(native_input["MinimumUnits"]) if "MinimumUnits" in native_input.keys() else Option_None(), + MaximumUnits=Option_Some(native_input["MaximumUnits"]) if "MaximumUnits" in native_input.keys() else Option_None(), + AutoScalingDisabled=Option_Some(native_input["AutoScalingDisabled"]) if "AutoScalingDisabled" in native_input.keys() else Option_None(), + AutoScalingRoleArn=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["AutoScalingRoleArn"].encode('utf-16-be'))]*2)]))) if "AutoScalingRoleArn" in native_input.keys() else Option_None(), + ScalingPolicies=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingPolicyDescription(list_element) for list_element in native_input["ScalingPolicies"]])) if "ScalingPolicies" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexSettingsDescription(native_input): return DafnyReplicaGlobalSecondaryIndexSettingsDescription( - IndexName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["IndexName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - IndexStatus=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_IndexStatus( - native_input["IndexStatus"] - ) - ) - if "IndexStatus" in native_input.keys() - else Option_None() - ), - ProvisionedReadCapacityUnits=( - Option_Some(native_input["ProvisionedReadCapacityUnits"]) - if "ProvisionedReadCapacityUnits" in native_input.keys() - else Option_None() - ), - ProvisionedReadCapacityAutoScalingSettings=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingSettingsDescription( - native_input["ProvisionedReadCapacityAutoScalingSettings"] - ) - ) - if "ProvisionedReadCapacityAutoScalingSettings" in native_input.keys() - else Option_None() - ), - ProvisionedWriteCapacityUnits=( - Option_Some(native_input["ProvisionedWriteCapacityUnits"]) - if "ProvisionedWriteCapacityUnits" in native_input.keys() - else Option_None() - ), - ProvisionedWriteCapacityAutoScalingSettings=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingSettingsDescription( - native_input["ProvisionedWriteCapacityAutoScalingSettings"] - ) - ) - if "ProvisionedWriteCapacityAutoScalingSettings" in native_input.keys() - else Option_None() - ), + IndexName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["IndexName"].encode('utf-16-be'))]*2)])), + IndexStatus=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_IndexStatus(native_input["IndexStatus"])) if "IndexStatus" in native_input.keys() else Option_None(), + ProvisionedReadCapacityUnits=Option_Some(native_input["ProvisionedReadCapacityUnits"]) if "ProvisionedReadCapacityUnits" in native_input.keys() else Option_None(), + ProvisionedReadCapacityAutoScalingSettings=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingSettingsDescription(native_input["ProvisionedReadCapacityAutoScalingSettings"])) if "ProvisionedReadCapacityAutoScalingSettings" in native_input.keys() else Option_None(), + ProvisionedWriteCapacityUnits=Option_Some(native_input["ProvisionedWriteCapacityUnits"]) if "ProvisionedWriteCapacityUnits" in native_input.keys() else Option_None(), + ProvisionedWriteCapacityAutoScalingSettings=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingSettingsDescription(native_input["ProvisionedWriteCapacityAutoScalingSettings"])) if "ProvisionedWriteCapacityAutoScalingSettings" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_AutoScalingPolicyDescription(native_input): return DafnyAutoScalingPolicyDescription( - PolicyName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["PolicyName"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "PolicyName" in native_input.keys() - else Option_None() - ), - TargetTrackingScalingPolicyConfiguration=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingTargetTrackingScalingPolicyConfigurationDescription( - native_input["TargetTrackingScalingPolicyConfiguration"] - ) - ) - if "TargetTrackingScalingPolicyConfiguration" in native_input.keys() - else Option_None() - ), - ) - - -def com_amazonaws_dynamodb_AutoScalingTargetTrackingScalingPolicyConfigurationDescription( - native_input, -): + PolicyName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["PolicyName"].encode('utf-16-be'))]*2)]))) if "PolicyName" in native_input.keys() else Option_None(), + TargetTrackingScalingPolicyConfiguration=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingTargetTrackingScalingPolicyConfigurationDescription(native_input["TargetTrackingScalingPolicyConfiguration"])) if "TargetTrackingScalingPolicyConfiguration" in native_input.keys() else Option_None(), + ) + +def com_amazonaws_dynamodb_AutoScalingTargetTrackingScalingPolicyConfigurationDescription(native_input): return DafnyAutoScalingTargetTrackingScalingPolicyConfigurationDescription( - DisableScaleIn=( - Option_Some(native_input["DisableScaleIn"]) - if "DisableScaleIn" in native_input.keys() - else Option_None() - ), - ScaleInCooldown=( - Option_Some(native_input["ScaleInCooldown"]) - if "ScaleInCooldown" in native_input.keys() - else Option_None() - ), - ScaleOutCooldown=( - Option_Some(native_input["ScaleOutCooldown"]) - if "ScaleOutCooldown" in native_input.keys() - else Option_None() - ), + DisableScaleIn=Option_Some(native_input["DisableScaleIn"]) if "DisableScaleIn" in native_input.keys() else Option_None(), + ScaleInCooldown=Option_Some(native_input["ScaleInCooldown"]) if "ScaleInCooldown" in native_input.keys() else Option_None(), + ScaleOutCooldown=Option_Some(native_input["ScaleOutCooldown"]) if "ScaleOutCooldown" in native_input.keys() else Option_None(), TargetValue=native_input["TargetValue"], ) - def com_amazonaws_dynamodb_DescribeImportInput(native_input): return DafnyDescribeImportInput( - ImportArn=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["ImportArn"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), + ImportArn=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ImportArn"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_DescribeImportOutput(native_input): return DafnyDescribeImportOutput( - ImportTableDescription=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ImportTableDescription( - native_input["ImportTableDescription"] - ), + ImportTableDescription=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ImportTableDescription(native_input["ImportTableDescription"]), ) - def com_amazonaws_dynamodb_ImportTableDescription(native_input): return DafnyImportTableDescription( - ImportArn=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["ImportArn"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "ImportArn" in native_input.keys() - else Option_None() - ), - ImportStatus=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ImportStatus( - native_input["ImportStatus"] - ) - ) - if "ImportStatus" in native_input.keys() - else Option_None() - ), - TableArn=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableArn"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "TableArn" in native_input.keys() - else Option_None() - ), - TableId=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableId"].encode("utf-16-be"))] * 2 - ) - ] - ) - ) - ) - if "TableId" in native_input.keys() - else Option_None() - ), - ClientToken=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["ClientToken"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "ClientToken" in native_input.keys() - else Option_None() - ), - S3BucketSource=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_S3BucketSource( - native_input["S3BucketSource"] - ) - ) - if "S3BucketSource" in native_input.keys() - else Option_None() - ), - ErrorCount=( - Option_Some(native_input["ErrorCount"]) - if "ErrorCount" in native_input.keys() - else Option_None() - ), - CloudWatchLogGroupArn=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["CloudWatchLogGroupArn"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "CloudWatchLogGroupArn" in native_input.keys() - else Option_None() - ), - InputFormat=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_InputFormat( - native_input["InputFormat"] - ) - ) - if "InputFormat" in native_input.keys() - else Option_None() - ), - InputFormatOptions=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_InputFormatOptions( - native_input["InputFormatOptions"] - ) - ) - if "InputFormatOptions" in native_input.keys() - else Option_None() - ), - InputCompressionType=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_InputCompressionType( - native_input["InputCompressionType"] - ) - ) - if "InputCompressionType" in native_input.keys() - else Option_None() - ), - TableCreationParameters=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableCreationParameters( - native_input["TableCreationParameters"] - ) - ) - if "TableCreationParameters" in native_input.keys() - else Option_None() - ), - StartTime=( - Option_Some(_dafny.Seq(native_input["StartTime"].isoformat())) - if "StartTime" in native_input.keys() - else Option_None() - ), - EndTime=( - Option_Some(_dafny.Seq(native_input["EndTime"].isoformat())) - if "EndTime" in native_input.keys() - else Option_None() - ), - ProcessedSizeBytes=( - Option_Some(native_input["ProcessedSizeBytes"]) - if "ProcessedSizeBytes" in native_input.keys() - else Option_None() - ), - ProcessedItemCount=( - Option_Some(native_input["ProcessedItemCount"]) - if "ProcessedItemCount" in native_input.keys() - else Option_None() - ), - ImportedItemCount=( - Option_Some(native_input["ImportedItemCount"]) - if "ImportedItemCount" in native_input.keys() - else Option_None() - ), - FailureCode=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["FailureCode"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "FailureCode" in native_input.keys() - else Option_None() - ), - FailureMessage=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["FailureMessage"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "FailureMessage" in native_input.keys() - else Option_None() - ), + ImportArn=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ImportArn"].encode('utf-16-be'))]*2)]))) if "ImportArn" in native_input.keys() else Option_None(), + ImportStatus=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ImportStatus(native_input["ImportStatus"])) if "ImportStatus" in native_input.keys() else Option_None(), + TableArn=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableArn"].encode('utf-16-be'))]*2)]))) if "TableArn" in native_input.keys() else Option_None(), + TableId=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableId"].encode('utf-16-be'))]*2)]))) if "TableId" in native_input.keys() else Option_None(), + ClientToken=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ClientToken"].encode('utf-16-be'))]*2)]))) if "ClientToken" in native_input.keys() else Option_None(), + S3BucketSource=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_S3BucketSource(native_input["S3BucketSource"])) if "S3BucketSource" in native_input.keys() else Option_None(), + ErrorCount=Option_Some(native_input["ErrorCount"]) if "ErrorCount" in native_input.keys() else Option_None(), + CloudWatchLogGroupArn=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["CloudWatchLogGroupArn"].encode('utf-16-be'))]*2)]))) if "CloudWatchLogGroupArn" in native_input.keys() else Option_None(), + InputFormat=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_InputFormat(native_input["InputFormat"])) if "InputFormat" in native_input.keys() else Option_None(), + InputFormatOptions=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_InputFormatOptions(native_input["InputFormatOptions"])) if "InputFormatOptions" in native_input.keys() else Option_None(), + InputCompressionType=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_InputCompressionType(native_input["InputCompressionType"])) if "InputCompressionType" in native_input.keys() else Option_None(), + TableCreationParameters=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableCreationParameters(native_input["TableCreationParameters"])) if "TableCreationParameters" in native_input.keys() else Option_None(), + StartTime=Option_Some(_dafny.Seq(native_input["StartTime"].isoformat())) if "StartTime" in native_input.keys() else Option_None(), + EndTime=Option_Some(_dafny.Seq(native_input["EndTime"].isoformat())) if "EndTime" in native_input.keys() else Option_None(), + ProcessedSizeBytes=Option_Some(native_input["ProcessedSizeBytes"]) if "ProcessedSizeBytes" in native_input.keys() else Option_None(), + ProcessedItemCount=Option_Some(native_input["ProcessedItemCount"]) if "ProcessedItemCount" in native_input.keys() else Option_None(), + ImportedItemCount=Option_Some(native_input["ImportedItemCount"]) if "ImportedItemCount" in native_input.keys() else Option_None(), + FailureCode=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["FailureCode"].encode('utf-16-be'))]*2)]))) if "FailureCode" in native_input.keys() else Option_None(), + FailureMessage=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["FailureMessage"].encode('utf-16-be'))]*2)]))) if "FailureMessage" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ImportStatus(native_input): # Convert ImportStatus if native_input == "IN_PROGRESS": @@ -5444,62 +1707,13 @@ def com_amazonaws_dynamodb_ImportStatus(native_input): else: raise ValueError("No recognized enum value in enum type: " + native_input) - def com_amazonaws_dynamodb_S3BucketSource(native_input): return DafnyS3BucketSource( - S3BucketOwner=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["S3BucketOwner"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "S3BucketOwner" in native_input.keys() - else Option_None() - ), - S3Bucket=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["S3Bucket"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - S3KeyPrefix=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["S3KeyPrefix"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "S3KeyPrefix" in native_input.keys() - else Option_None() - ), + S3BucketOwner=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["S3BucketOwner"].encode('utf-16-be'))]*2)]))) if "S3BucketOwner" in native_input.keys() else Option_None(), + S3Bucket=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["S3Bucket"].encode('utf-16-be'))]*2)])), + S3KeyPrefix=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["S3KeyPrefix"].encode('utf-16-be'))]*2)]))) if "S3KeyPrefix" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_InputFormat(native_input): # Convert InputFormat if native_input == "DYNAMODB_JSON": @@ -5511,21 +1725,11 @@ def com_amazonaws_dynamodb_InputFormat(native_input): else: raise ValueError("No recognized enum value in enum type: " + native_input) - def com_amazonaws_dynamodb_InputFormatOptions(native_input): return DafnyInputFormatOptions( - Csv=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_CsvOptions( - native_input["Csv"] - ) - ) - if "Csv" in native_input.keys() - else Option_None() - ), + Csv=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_CsvOptions(native_input["Csv"])) if "Csv" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_InputCompressionType(native_input): # Convert InputCompressionType if native_input == "GZIP": @@ -5537,229 +1741,43 @@ def com_amazonaws_dynamodb_InputCompressionType(native_input): else: raise ValueError("No recognized enum value in enum type: " + native_input) - def com_amazonaws_dynamodb_TableCreationParameters(native_input): return DafnyTableCreationParameters( - TableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - AttributeDefinitions=Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeDefinition( - list_element - ) - for list_element in native_input["AttributeDefinitions"] - ] - ), - KeySchema=Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_KeySchemaElement( - list_element - ) - for list_element in native_input["KeySchema"] - ] - ), - BillingMode=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BillingMode( - native_input["BillingMode"] - ) - ) - if "BillingMode" in native_input.keys() - else Option_None() - ), - ProvisionedThroughput=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughput( - native_input["ProvisionedThroughput"] - ) - ) - if "ProvisionedThroughput" in native_input.keys() - else Option_None() - ), - SSESpecification=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_SSESpecification( - native_input["SSESpecification"] - ) - ) - if "SSESpecification" in native_input.keys() - else Option_None() - ), - GlobalSecondaryIndexes=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_GlobalSecondaryIndex( - list_element - ) - for list_element in native_input["GlobalSecondaryIndexes"] - ] - ) - ) - if "GlobalSecondaryIndexes" in native_input.keys() - else Option_None() - ), + TableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)])), + AttributeDefinitions=Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeDefinition(list_element) for list_element in native_input["AttributeDefinitions"]]), + KeySchema=Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_KeySchemaElement(list_element) for list_element in native_input["KeySchema"]]), + BillingMode=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BillingMode(native_input["BillingMode"])) if "BillingMode" in native_input.keys() else Option_None(), + ProvisionedThroughput=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughput(native_input["ProvisionedThroughput"])) if "ProvisionedThroughput" in native_input.keys() else Option_None(), + OnDemandThroughput=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_OnDemandThroughput(native_input["OnDemandThroughput"])) if "OnDemandThroughput" in native_input.keys() else Option_None(), + SSESpecification=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_SSESpecification(native_input["SSESpecification"])) if "SSESpecification" in native_input.keys() else Option_None(), + GlobalSecondaryIndexes=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_GlobalSecondaryIndex(list_element) for list_element in native_input["GlobalSecondaryIndexes"]])) if "GlobalSecondaryIndexes" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_CsvOptions(native_input): return DafnyCsvOptions( - Delimiter=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Delimiter"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "Delimiter" in native_input.keys() - else Option_None() - ), - HeaderList=( - Option_Some( - Seq( - [ - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(list_element.encode("utf-16-be"))] * 2 - ) - ] - ) - ) - for list_element in native_input["HeaderList"] - ] - ) - ) - if "HeaderList" in native_input.keys() - else Option_None() - ), + Delimiter=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["Delimiter"].encode('utf-16-be'))]*2)]))) if "Delimiter" in native_input.keys() else Option_None(), + HeaderList=Option_Some(Seq([Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(list_element.encode('utf-16-be'))]*2)])) for list_element in native_input["HeaderList"]])) if "HeaderList" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_DescribeKinesisStreamingDestinationInput(native_input): return DafnyDescribeKinesisStreamingDestinationInput( - TableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), + TableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_DescribeKinesisStreamingDestinationOutput(native_input): return DafnyDescribeKinesisStreamingDestinationOutput( - TableName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "TableName" in native_input.keys() - else Option_None() - ), - KinesisDataStreamDestinations=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_KinesisDataStreamDestination( - list_element - ) - for list_element in native_input[ - "KinesisDataStreamDestinations" - ] - ] - ) - ) - if "KinesisDataStreamDestinations" in native_input.keys() - else Option_None() - ), + TableName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)]))) if "TableName" in native_input.keys() else Option_None(), + KinesisDataStreamDestinations=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_KinesisDataStreamDestination(list_element) for list_element in native_input["KinesisDataStreamDestinations"]])) if "KinesisDataStreamDestinations" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_KinesisDataStreamDestination(native_input): return DafnyKinesisDataStreamDestination( - StreamArn=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["StreamArn"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "StreamArn" in native_input.keys() - else Option_None() - ), - DestinationStatus=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DestinationStatus( - native_input["DestinationStatus"] - ) - ) - if "DestinationStatus" in native_input.keys() - else Option_None() - ), - DestinationStatusDescription=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input[ - "DestinationStatusDescription" - ].encode("utf-16-be") - ) - ] - * 2 - ) - ] - ) - ) - ) - if "DestinationStatusDescription" in native_input.keys() - else Option_None() - ), + StreamArn=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["StreamArn"].encode('utf-16-be'))]*2)]))) if "StreamArn" in native_input.keys() else Option_None(), + DestinationStatus=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DestinationStatus(native_input["DestinationStatus"])) if "DestinationStatus" in native_input.keys() else Option_None(), + DestinationStatusDescription=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["DestinationStatusDescription"].encode('utf-16-be'))]*2)]))) if "DestinationStatusDescription" in native_input.keys() else Option_None(), + ApproximateCreationDateTimePrecision=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ApproximateCreationDateTimePrecision(native_input["ApproximateCreationDateTimePrecision"])) if "ApproximateCreationDateTimePrecision" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_DestinationStatus(native_input): # Convert DestinationStatus if native_input == "ENABLING": @@ -5772,1140 +1790,238 @@ def com_amazonaws_dynamodb_DestinationStatus(native_input): return DestinationStatus_DISABLED() elif native_input == "ENABLE_FAILED": return DestinationStatus_ENABLE__FAILED() + elif native_input == "UPDATING": + return DestinationStatus_UPDATING() else: raise ValueError("No recognized enum value in enum type: " + native_input) +def com_amazonaws_dynamodb_ApproximateCreationDateTimePrecision(native_input): + # Convert ApproximateCreationDateTimePrecision + if native_input == "MILLISECOND": + return ApproximateCreationDateTimePrecision_MILLISECOND() + elif native_input == "MICROSECOND": + return ApproximateCreationDateTimePrecision_MICROSECOND() + else: + raise ValueError("No recognized enum value in enum type: " + native_input) def com_amazonaws_dynamodb_DescribeLimitsInput(native_input): - return DafnyDescribeLimitsInput() - + return DafnyDescribeLimitsInput( + ) def com_amazonaws_dynamodb_DescribeLimitsOutput(native_input): return DafnyDescribeLimitsOutput( - AccountMaxReadCapacityUnits=( - Option_Some(native_input["AccountMaxReadCapacityUnits"]) - if "AccountMaxReadCapacityUnits" in native_input.keys() - else Option_None() - ), - AccountMaxWriteCapacityUnits=( - Option_Some(native_input["AccountMaxWriteCapacityUnits"]) - if "AccountMaxWriteCapacityUnits" in native_input.keys() - else Option_None() - ), - TableMaxReadCapacityUnits=( - Option_Some(native_input["TableMaxReadCapacityUnits"]) - if "TableMaxReadCapacityUnits" in native_input.keys() - else Option_None() - ), - TableMaxWriteCapacityUnits=( - Option_Some(native_input["TableMaxWriteCapacityUnits"]) - if "TableMaxWriteCapacityUnits" in native_input.keys() - else Option_None() - ), + AccountMaxReadCapacityUnits=Option_Some(native_input["AccountMaxReadCapacityUnits"]) if "AccountMaxReadCapacityUnits" in native_input.keys() else Option_None(), + AccountMaxWriteCapacityUnits=Option_Some(native_input["AccountMaxWriteCapacityUnits"]) if "AccountMaxWriteCapacityUnits" in native_input.keys() else Option_None(), + TableMaxReadCapacityUnits=Option_Some(native_input["TableMaxReadCapacityUnits"]) if "TableMaxReadCapacityUnits" in native_input.keys() else Option_None(), + TableMaxWriteCapacityUnits=Option_Some(native_input["TableMaxWriteCapacityUnits"]) if "TableMaxWriteCapacityUnits" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_DescribeTableInput(native_input): return DafnyDescribeTableInput( - TableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), + TableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_DescribeTableOutput(native_input): return DafnyDescribeTableOutput( - Table=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableDescription( - native_input["Table"] - ) - ) - if "Table" in native_input.keys() - else Option_None() - ), + Table=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableDescription(native_input["Table"])) if "Table" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_DescribeTableReplicaAutoScalingInput(native_input): return DafnyDescribeTableReplicaAutoScalingInput( - TableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), + TableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_DescribeTableReplicaAutoScalingOutput(native_input): return DafnyDescribeTableReplicaAutoScalingOutput( - TableAutoScalingDescription=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableAutoScalingDescription( - native_input["TableAutoScalingDescription"] - ) - ) - if "TableAutoScalingDescription" in native_input.keys() - else Option_None() - ), + TableAutoScalingDescription=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableAutoScalingDescription(native_input["TableAutoScalingDescription"])) if "TableAutoScalingDescription" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_TableAutoScalingDescription(native_input): return DafnyTableAutoScalingDescription( - TableName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "TableName" in native_input.keys() - else Option_None() - ), - TableStatus=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableStatus( - native_input["TableStatus"] - ) - ) - if "TableStatus" in native_input.keys() - else Option_None() - ), - Replicas=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaAutoScalingDescription( - list_element - ) - for list_element in native_input["Replicas"] - ] - ) - ) - if "Replicas" in native_input.keys() - else Option_None() - ), + TableName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)]))) if "TableName" in native_input.keys() else Option_None(), + TableStatus=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableStatus(native_input["TableStatus"])) if "TableStatus" in native_input.keys() else Option_None(), + Replicas=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaAutoScalingDescription(list_element) for list_element in native_input["Replicas"]])) if "Replicas" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ReplicaAutoScalingDescription(native_input): return DafnyReplicaAutoScalingDescription( - RegionName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["RegionName"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "RegionName" in native_input.keys() - else Option_None() - ), - GlobalSecondaryIndexes=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexAutoScalingDescription( - list_element - ) - for list_element in native_input["GlobalSecondaryIndexes"] - ] - ) - ) - if "GlobalSecondaryIndexes" in native_input.keys() - else Option_None() - ), - ReplicaProvisionedReadCapacityAutoScalingSettings=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingSettingsDescription( - native_input["ReplicaProvisionedReadCapacityAutoScalingSettings"] - ) - ) - if "ReplicaProvisionedReadCapacityAutoScalingSettings" - in native_input.keys() - else Option_None() - ), - ReplicaProvisionedWriteCapacityAutoScalingSettings=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingSettingsDescription( - native_input["ReplicaProvisionedWriteCapacityAutoScalingSettings"] - ) - ) - if "ReplicaProvisionedWriteCapacityAutoScalingSettings" - in native_input.keys() - else Option_None() - ), - ReplicaStatus=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaStatus( - native_input["ReplicaStatus"] - ) - ) - if "ReplicaStatus" in native_input.keys() - else Option_None() - ), - ) - - -def com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexAutoScalingDescription( - native_input, -): - return DafnyReplicaGlobalSecondaryIndexAutoScalingDescription( - IndexName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["IndexName"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "IndexName" in native_input.keys() - else Option_None() - ), - IndexStatus=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_IndexStatus( - native_input["IndexStatus"] - ) - ) - if "IndexStatus" in native_input.keys() - else Option_None() - ), - ProvisionedReadCapacityAutoScalingSettings=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingSettingsDescription( - native_input["ProvisionedReadCapacityAutoScalingSettings"] - ) - ) - if "ProvisionedReadCapacityAutoScalingSettings" in native_input.keys() - else Option_None() - ), - ProvisionedWriteCapacityAutoScalingSettings=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingSettingsDescription( - native_input["ProvisionedWriteCapacityAutoScalingSettings"] - ) - ) - if "ProvisionedWriteCapacityAutoScalingSettings" in native_input.keys() - else Option_None() - ), + RegionName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["RegionName"].encode('utf-16-be'))]*2)]))) if "RegionName" in native_input.keys() else Option_None(), + GlobalSecondaryIndexes=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexAutoScalingDescription(list_element) for list_element in native_input["GlobalSecondaryIndexes"]])) if "GlobalSecondaryIndexes" in native_input.keys() else Option_None(), + ReplicaProvisionedReadCapacityAutoScalingSettings=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingSettingsDescription(native_input["ReplicaProvisionedReadCapacityAutoScalingSettings"])) if "ReplicaProvisionedReadCapacityAutoScalingSettings" in native_input.keys() else Option_None(), + ReplicaProvisionedWriteCapacityAutoScalingSettings=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingSettingsDescription(native_input["ReplicaProvisionedWriteCapacityAutoScalingSettings"])) if "ReplicaProvisionedWriteCapacityAutoScalingSettings" in native_input.keys() else Option_None(), + ReplicaStatus=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaStatus(native_input["ReplicaStatus"])) if "ReplicaStatus" in native_input.keys() else Option_None(), ) +def com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexAutoScalingDescription(native_input): + return DafnyReplicaGlobalSecondaryIndexAutoScalingDescription( + IndexName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["IndexName"].encode('utf-16-be'))]*2)]))) if "IndexName" in native_input.keys() else Option_None(), + IndexStatus=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_IndexStatus(native_input["IndexStatus"])) if "IndexStatus" in native_input.keys() else Option_None(), + ProvisionedReadCapacityAutoScalingSettings=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingSettingsDescription(native_input["ProvisionedReadCapacityAutoScalingSettings"])) if "ProvisionedReadCapacityAutoScalingSettings" in native_input.keys() else Option_None(), + ProvisionedWriteCapacityAutoScalingSettings=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingSettingsDescription(native_input["ProvisionedWriteCapacityAutoScalingSettings"])) if "ProvisionedWriteCapacityAutoScalingSettings" in native_input.keys() else Option_None(), + ) def com_amazonaws_dynamodb_DescribeTimeToLiveInput(native_input): return DafnyDescribeTimeToLiveInput( - TableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), + TableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_DescribeTimeToLiveOutput(native_input): return DafnyDescribeTimeToLiveOutput( - TimeToLiveDescription=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TimeToLiveDescription( - native_input["TimeToLiveDescription"] - ) - ) - if "TimeToLiveDescription" in native_input.keys() - else Option_None() - ), + TimeToLiveDescription=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TimeToLiveDescription(native_input["TimeToLiveDescription"])) if "TimeToLiveDescription" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_DisableKinesisStreamingDestinationInput(native_input): return DafnyDisableKinesisStreamingDestinationInput( - TableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - StreamArn=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["StreamArn"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), + TableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)])), + StreamArn=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["StreamArn"].encode('utf-16-be'))]*2)])), + EnableKinesisStreamingConfiguration=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_EnableKinesisStreamingConfiguration(native_input["EnableKinesisStreamingConfiguration"])) if "EnableKinesisStreamingConfiguration" in native_input.keys() else Option_None(), ) +def com_amazonaws_dynamodb_EnableKinesisStreamingConfiguration(native_input): + return DafnyEnableKinesisStreamingConfiguration( + ApproximateCreationDateTimePrecision=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ApproximateCreationDateTimePrecision(native_input["ApproximateCreationDateTimePrecision"])) if "ApproximateCreationDateTimePrecision" in native_input.keys() else Option_None(), + ) def com_amazonaws_dynamodb_DisableKinesisStreamingDestinationOutput(native_input): return DafnyDisableKinesisStreamingDestinationOutput( - TableName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "TableName" in native_input.keys() - else Option_None() - ), - StreamArn=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["StreamArn"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "StreamArn" in native_input.keys() - else Option_None() - ), - DestinationStatus=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DestinationStatus( - native_input["DestinationStatus"] - ) - ) - if "DestinationStatus" in native_input.keys() - else Option_None() - ), + TableName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)]))) if "TableName" in native_input.keys() else Option_None(), + StreamArn=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["StreamArn"].encode('utf-16-be'))]*2)]))) if "StreamArn" in native_input.keys() else Option_None(), + DestinationStatus=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DestinationStatus(native_input["DestinationStatus"])) if "DestinationStatus" in native_input.keys() else Option_None(), + EnableKinesisStreamingConfiguration=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_EnableKinesisStreamingConfiguration(native_input["EnableKinesisStreamingConfiguration"])) if "EnableKinesisStreamingConfiguration" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_EnableKinesisStreamingDestinationInput(native_input): return DafnyEnableKinesisStreamingDestinationInput( - TableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - StreamArn=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["StreamArn"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), + TableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)])), + StreamArn=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["StreamArn"].encode('utf-16-be'))]*2)])), + EnableKinesisStreamingConfiguration=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_EnableKinesisStreamingConfiguration(native_input["EnableKinesisStreamingConfiguration"])) if "EnableKinesisStreamingConfiguration" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_EnableKinesisStreamingDestinationOutput(native_input): return DafnyEnableKinesisStreamingDestinationOutput( - TableName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "TableName" in native_input.keys() - else Option_None() - ), - StreamArn=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["StreamArn"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "StreamArn" in native_input.keys() - else Option_None() - ), - DestinationStatus=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DestinationStatus( - native_input["DestinationStatus"] - ) - ) - if "DestinationStatus" in native_input.keys() - else Option_None() - ), + TableName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)]))) if "TableName" in native_input.keys() else Option_None(), + StreamArn=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["StreamArn"].encode('utf-16-be'))]*2)]))) if "StreamArn" in native_input.keys() else Option_None(), + DestinationStatus=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DestinationStatus(native_input["DestinationStatus"])) if "DestinationStatus" in native_input.keys() else Option_None(), + EnableKinesisStreamingConfiguration=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_EnableKinesisStreamingConfiguration(native_input["EnableKinesisStreamingConfiguration"])) if "EnableKinesisStreamingConfiguration" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ExecuteStatementInput(native_input): return DafnyExecuteStatementInput( - Statement=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Statement"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - Parameters=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - list_element - ) - for list_element in native_input["Parameters"] - ] - ) - ) - if "Parameters" in native_input.keys() - else Option_None() - ), - ConsistentRead=( - Option_Some(native_input["ConsistentRead"]) - if "ConsistentRead" in native_input.keys() - else Option_None() - ), - NextToken=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["NextToken"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "NextToken" in native_input.keys() - else Option_None() - ), - ReturnConsumedCapacity=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnConsumedCapacity( - native_input["ReturnConsumedCapacity"] - ) - ) - if "ReturnConsumedCapacity" in native_input.keys() - else Option_None() - ), - Limit=( - Option_Some(native_input["Limit"]) - if "Limit" in native_input.keys() - else Option_None() - ), + Statement=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["Statement"].encode('utf-16-be'))]*2)])), + Parameters=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(list_element) for list_element in native_input["Parameters"]])) if "Parameters" in native_input.keys() else Option_None(), + ConsistentRead=Option_Some(native_input["ConsistentRead"]) if "ConsistentRead" in native_input.keys() else Option_None(), + NextToken=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["NextToken"].encode('utf-16-be'))]*2)]))) if "NextToken" in native_input.keys() else Option_None(), + ReturnConsumedCapacity=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnConsumedCapacity(native_input["ReturnConsumedCapacity"])) if "ReturnConsumedCapacity" in native_input.keys() else Option_None(), + Limit=Option_Some(native_input["Limit"]) if "Limit" in native_input.keys() else Option_None(), + ReturnValuesOnConditionCheckFailure=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure(native_input["ReturnValuesOnConditionCheckFailure"])) if "ReturnValuesOnConditionCheckFailure" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ExecuteStatementOutput(native_input): return DafnyExecuteStatementOutput( - Items=( - Option_Some( - Seq( - [ - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in list_element.items() - } - ) - for list_element in native_input["Items"] - ] - ) - ) - if "Items" in native_input.keys() - else Option_None() - ), - NextToken=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["NextToken"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "NextToken" in native_input.keys() - else Option_None() - ), - ConsumedCapacity=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConsumedCapacity( - native_input["ConsumedCapacity"] - ) - ) - if "ConsumedCapacity" in native_input.keys() - else Option_None() - ), - LastEvaluatedKey=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in native_input["LastEvaluatedKey"].items() - } - ) - ) - if "LastEvaluatedKey" in native_input.keys() - else Option_None() - ), + Items=Option_Some(Seq([Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in list_element.items() }) for list_element in native_input["Items"]])) if "Items" in native_input.keys() else Option_None(), + NextToken=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["NextToken"].encode('utf-16-be'))]*2)]))) if "NextToken" in native_input.keys() else Option_None(), + ConsumedCapacity=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConsumedCapacity(native_input["ConsumedCapacity"])) if "ConsumedCapacity" in native_input.keys() else Option_None(), + LastEvaluatedKey=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input["LastEvaluatedKey"].items() })) if "LastEvaluatedKey" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ExecuteTransactionInput(native_input): return DafnyExecuteTransactionInput( - TransactStatements=Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ParameterizedStatement( - list_element - ) - for list_element in native_input["TransactStatements"] - ] - ), - ClientRequestToken=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["ClientRequestToken"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "ClientRequestToken" in native_input.keys() - else Option_None() - ), - ReturnConsumedCapacity=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnConsumedCapacity( - native_input["ReturnConsumedCapacity"] - ) - ) - if "ReturnConsumedCapacity" in native_input.keys() - else Option_None() - ), + TransactStatements=Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ParameterizedStatement(list_element) for list_element in native_input["TransactStatements"]]), + ClientRequestToken=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ClientRequestToken"].encode('utf-16-be'))]*2)]))) if "ClientRequestToken" in native_input.keys() else Option_None(), + ReturnConsumedCapacity=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnConsumedCapacity(native_input["ReturnConsumedCapacity"])) if "ReturnConsumedCapacity" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ParameterizedStatement(native_input): return DafnyParameterizedStatement( - Statement=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["Statement"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - Parameters=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - list_element - ) - for list_element in native_input["Parameters"] - ] - ) - ) - if "Parameters" in native_input.keys() - else Option_None() - ), + Statement=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["Statement"].encode('utf-16-be'))]*2)])), + Parameters=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(list_element) for list_element in native_input["Parameters"]])) if "Parameters" in native_input.keys() else Option_None(), + ReturnValuesOnConditionCheckFailure=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure(native_input["ReturnValuesOnConditionCheckFailure"])) if "ReturnValuesOnConditionCheckFailure" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ExecuteTransactionOutput(native_input): return DafnyExecuteTransactionOutput( - Responses=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ItemResponse( - list_element - ) - for list_element in native_input["Responses"] - ] - ) - ) - if "Responses" in native_input.keys() - else Option_None() - ), - ConsumedCapacity=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConsumedCapacity( - list_element - ) - for list_element in native_input["ConsumedCapacity"] - ] - ) - ) - if "ConsumedCapacity" in native_input.keys() - else Option_None() - ), + Responses=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ItemResponse(list_element) for list_element in native_input["Responses"]])) if "Responses" in native_input.keys() else Option_None(), + ConsumedCapacity=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConsumedCapacity(list_element) for list_element in native_input["ConsumedCapacity"]])) if "ConsumedCapacity" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ItemResponse(native_input): return DafnyItemResponse( - Item=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in native_input["Item"].items() - } - ) - ) - if "Item" in native_input.keys() - else Option_None() - ), + Item=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input["Item"].items() })) if "Item" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ExportTableToPointInTimeInput(native_input): return DafnyExportTableToPointInTimeInput( - TableArn=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableArn"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - ExportTime=( - Option_Some(_dafny.Seq(native_input["ExportTime"].isoformat())) - if "ExportTime" in native_input.keys() - else Option_None() - ), - ClientToken=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["ClientToken"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "ClientToken" in native_input.keys() - else Option_None() - ), - S3Bucket=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["S3Bucket"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - S3BucketOwner=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["S3BucketOwner"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "S3BucketOwner" in native_input.keys() - else Option_None() - ), - S3Prefix=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["S3Prefix"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "S3Prefix" in native_input.keys() - else Option_None() - ), - S3SseAlgorithm=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_S3SseAlgorithm( - native_input["S3SseAlgorithm"] - ) - ) - if "S3SseAlgorithm" in native_input.keys() - else Option_None() - ), - S3SseKmsKeyId=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["S3SseKmsKeyId"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "S3SseKmsKeyId" in native_input.keys() - else Option_None() - ), - ExportFormat=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ExportFormat( - native_input["ExportFormat"] - ) - ) - if "ExportFormat" in native_input.keys() - else Option_None() - ), + TableArn=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableArn"].encode('utf-16-be'))]*2)])), + ExportTime=Option_Some(_dafny.Seq(native_input["ExportTime"].isoformat())) if "ExportTime" in native_input.keys() else Option_None(), + ClientToken=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ClientToken"].encode('utf-16-be'))]*2)]))) if "ClientToken" in native_input.keys() else Option_None(), + S3Bucket=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["S3Bucket"].encode('utf-16-be'))]*2)])), + S3BucketOwner=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["S3BucketOwner"].encode('utf-16-be'))]*2)]))) if "S3BucketOwner" in native_input.keys() else Option_None(), + S3Prefix=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["S3Prefix"].encode('utf-16-be'))]*2)]))) if "S3Prefix" in native_input.keys() else Option_None(), + S3SseAlgorithm=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_S3SseAlgorithm(native_input["S3SseAlgorithm"])) if "S3SseAlgorithm" in native_input.keys() else Option_None(), + S3SseKmsKeyId=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["S3SseKmsKeyId"].encode('utf-16-be'))]*2)]))) if "S3SseKmsKeyId" in native_input.keys() else Option_None(), + ExportFormat=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ExportFormat(native_input["ExportFormat"])) if "ExportFormat" in native_input.keys() else Option_None(), + ExportType=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ExportType(native_input["ExportType"])) if "ExportType" in native_input.keys() else Option_None(), + IncrementalExportSpecification=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_IncrementalExportSpecification(native_input["IncrementalExportSpecification"])) if "IncrementalExportSpecification" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ExportTableToPointInTimeOutput(native_input): return DafnyExportTableToPointInTimeOutput( - ExportDescription=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ExportDescription( - native_input["ExportDescription"] - ) - ) - if "ExportDescription" in native_input.keys() - else Option_None() - ), + ExportDescription=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ExportDescription(native_input["ExportDescription"])) if "ExportDescription" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_GetItemInput(native_input): return DafnyGetItemInput( - TableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - Key=Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip(*[iter(key.encode("utf-16-be"))] * 2) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in native_input["Key"].items() - } - ), - AttributesToGet=( - Option_Some( - Seq( - [ - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(list_element.encode("utf-16-be"))] * 2 - ) - ] - ) - ) - for list_element in native_input["AttributesToGet"] - ] - ) - ) - if "AttributesToGet" in native_input.keys() - else Option_None() - ), - ConsistentRead=( - Option_Some(native_input["ConsistentRead"]) - if "ConsistentRead" in native_input.keys() - else Option_None() - ), - ReturnConsumedCapacity=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnConsumedCapacity( - native_input["ReturnConsumedCapacity"] - ) - ) - if "ReturnConsumedCapacity" in native_input.keys() - else Option_None() - ), - ProjectionExpression=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["ProjectionExpression"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "ProjectionExpression" in native_input.keys() - else Option_None() - ), - ExpressionAttributeNames=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(value.encode("utf-16-be"))] * 2 - ) - ] - ) - ) - for (key, value) in native_input[ - "ExpressionAttributeNames" - ].items() - } - ) - ) - if "ExpressionAttributeNames" in native_input.keys() - else Option_None() - ), + TableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)])), + Key=Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input["Key"].items() }), + AttributesToGet=Option_Some(Seq([Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(list_element.encode('utf-16-be'))]*2)])) for list_element in native_input["AttributesToGet"]])) if "AttributesToGet" in native_input.keys() else Option_None(), + ConsistentRead=Option_Some(native_input["ConsistentRead"]) if "ConsistentRead" in native_input.keys() else Option_None(), + ReturnConsumedCapacity=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnConsumedCapacity(native_input["ReturnConsumedCapacity"])) if "ReturnConsumedCapacity" in native_input.keys() else Option_None(), + ProjectionExpression=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ProjectionExpression"].encode('utf-16-be'))]*2)]))) if "ProjectionExpression" in native_input.keys() else Option_None(), + ExpressionAttributeNames=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(value.encode('utf-16-be'))]*2)])) for (key, value) in native_input["ExpressionAttributeNames"].items() })) if "ExpressionAttributeNames" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_GetItemOutput(native_input): return DafnyGetItemOutput( - Item=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in native_input["Item"].items() - } - ) - ) - if "Item" in native_input.keys() - else Option_None() - ), - ConsumedCapacity=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConsumedCapacity( - native_input["ConsumedCapacity"] - ) - ) - if "ConsumedCapacity" in native_input.keys() - else Option_None() - ), + Item=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input["Item"].items() })) if "Item" in native_input.keys() else Option_None(), + ConsumedCapacity=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConsumedCapacity(native_input["ConsumedCapacity"])) if "ConsumedCapacity" in native_input.keys() else Option_None(), ) +def com_amazonaws_dynamodb_GetResourcePolicyInput(native_input): + return DafnyGetResourcePolicyInput( + ResourceArn=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ResourceArn"].encode('utf-16-be'))]*2)])), + ) + +def com_amazonaws_dynamodb_GetResourcePolicyOutput(native_input): + return DafnyGetResourcePolicyOutput( + Policy=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["Policy"].encode('utf-16-be'))]*2)]))) if "Policy" in native_input.keys() else Option_None(), + RevisionId=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["RevisionId"].encode('utf-16-be'))]*2)]))) if "RevisionId" in native_input.keys() else Option_None(), + ) def com_amazonaws_dynamodb_ImportTableInput(native_input): return DafnyImportTableInput( - ClientToken=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["ClientToken"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "ClientToken" in native_input.keys() - else Option_None() - ), - S3BucketSource=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_S3BucketSource( - native_input["S3BucketSource"] - ), - InputFormat=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_InputFormat( - native_input["InputFormat"] - ), - InputFormatOptions=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_InputFormatOptions( - native_input["InputFormatOptions"] - ) - ) - if "InputFormatOptions" in native_input.keys() - else Option_None() - ), - InputCompressionType=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_InputCompressionType( - native_input["InputCompressionType"] - ) - ) - if "InputCompressionType" in native_input.keys() - else Option_None() - ), - TableCreationParameters=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableCreationParameters( - native_input["TableCreationParameters"] - ), + ClientToken=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ClientToken"].encode('utf-16-be'))]*2)]))) if "ClientToken" in native_input.keys() else Option_None(), + S3BucketSource=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_S3BucketSource(native_input["S3BucketSource"]), + InputFormat=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_InputFormat(native_input["InputFormat"]), + InputFormatOptions=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_InputFormatOptions(native_input["InputFormatOptions"])) if "InputFormatOptions" in native_input.keys() else Option_None(), + InputCompressionType=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_InputCompressionType(native_input["InputCompressionType"])) if "InputCompressionType" in native_input.keys() else Option_None(), + TableCreationParameters=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableCreationParameters(native_input["TableCreationParameters"]), ) - def com_amazonaws_dynamodb_ImportTableOutput(native_input): return DafnyImportTableOutput( - ImportTableDescription=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ImportTableDescription( - native_input["ImportTableDescription"] - ), + ImportTableDescription=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ImportTableDescription(native_input["ImportTableDescription"]), ) - def com_amazonaws_dynamodb_ListBackupsInput(native_input): return DafnyListBackupsInput( - TableName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "TableName" in native_input.keys() - else Option_None() - ), - Limit=( - Option_Some(native_input["Limit"]) - if "Limit" in native_input.keys() - else Option_None() - ), - TimeRangeLowerBound=( - Option_Some(_dafny.Seq(native_input["TimeRangeLowerBound"].isoformat())) - if "TimeRangeLowerBound" in native_input.keys() - else Option_None() - ), - TimeRangeUpperBound=( - Option_Some(_dafny.Seq(native_input["TimeRangeUpperBound"].isoformat())) - if "TimeRangeUpperBound" in native_input.keys() - else Option_None() - ), - ExclusiveStartBackupArn=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["ExclusiveStartBackupArn"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "ExclusiveStartBackupArn" in native_input.keys() - else Option_None() - ), - BackupType=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BackupTypeFilter( - native_input["BackupType"] - ) - ) - if "BackupType" in native_input.keys() - else Option_None() - ), + TableName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)]))) if "TableName" in native_input.keys() else Option_None(), + Limit=Option_Some(native_input["Limit"]) if "Limit" in native_input.keys() else Option_None(), + TimeRangeLowerBound=Option_Some(_dafny.Seq(native_input["TimeRangeLowerBound"].isoformat())) if "TimeRangeLowerBound" in native_input.keys() else Option_None(), + TimeRangeUpperBound=Option_Some(_dafny.Seq(native_input["TimeRangeUpperBound"].isoformat())) if "TimeRangeUpperBound" in native_input.keys() else Option_None(), + ExclusiveStartBackupArn=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ExclusiveStartBackupArn"].encode('utf-16-be'))]*2)]))) if "ExclusiveStartBackupArn" in native_input.keys() else Option_None(), + BackupType=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BackupTypeFilter(native_input["BackupType"])) if "BackupType" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_BackupTypeFilter(native_input): # Convert BackupTypeFilter if native_input == "USER": @@ -6919,1378 +2035,190 @@ def com_amazonaws_dynamodb_BackupTypeFilter(native_input): else: raise ValueError("No recognized enum value in enum type: " + native_input) - def com_amazonaws_dynamodb_ListBackupsOutput(native_input): return DafnyListBackupsOutput( - BackupSummaries=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BackupSummary( - list_element - ) - for list_element in native_input["BackupSummaries"] - ] - ) - ) - if "BackupSummaries" in native_input.keys() - else Option_None() - ), - LastEvaluatedBackupArn=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["LastEvaluatedBackupArn"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "LastEvaluatedBackupArn" in native_input.keys() - else Option_None() - ), + BackupSummaries=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BackupSummary(list_element) for list_element in native_input["BackupSummaries"]])) if "BackupSummaries" in native_input.keys() else Option_None(), + LastEvaluatedBackupArn=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["LastEvaluatedBackupArn"].encode('utf-16-be'))]*2)]))) if "LastEvaluatedBackupArn" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_BackupSummary(native_input): return DafnyBackupSummary( - TableName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "TableName" in native_input.keys() - else Option_None() - ), - TableId=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableId"].encode("utf-16-be"))] * 2 - ) - ] - ) - ) - ) - if "TableId" in native_input.keys() - else Option_None() - ), - TableArn=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableArn"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "TableArn" in native_input.keys() - else Option_None() - ), - BackupArn=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["BackupArn"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "BackupArn" in native_input.keys() - else Option_None() - ), - BackupName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["BackupName"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "BackupName" in native_input.keys() - else Option_None() - ), - BackupCreationDateTime=( - Option_Some(_dafny.Seq(native_input["BackupCreationDateTime"].isoformat())) - if "BackupCreationDateTime" in native_input.keys() - else Option_None() - ), - BackupExpiryDateTime=( - Option_Some(_dafny.Seq(native_input["BackupExpiryDateTime"].isoformat())) - if "BackupExpiryDateTime" in native_input.keys() - else Option_None() - ), - BackupStatus=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BackupStatus( - native_input["BackupStatus"] - ) - ) - if "BackupStatus" in native_input.keys() - else Option_None() - ), - BackupType=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BackupType( - native_input["BackupType"] - ) - ) - if "BackupType" in native_input.keys() - else Option_None() - ), - BackupSizeBytes=( - Option_Some(native_input["BackupSizeBytes"]) - if "BackupSizeBytes" in native_input.keys() - else Option_None() - ), + TableName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)]))) if "TableName" in native_input.keys() else Option_None(), + TableId=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableId"].encode('utf-16-be'))]*2)]))) if "TableId" in native_input.keys() else Option_None(), + TableArn=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableArn"].encode('utf-16-be'))]*2)]))) if "TableArn" in native_input.keys() else Option_None(), + BackupArn=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["BackupArn"].encode('utf-16-be'))]*2)]))) if "BackupArn" in native_input.keys() else Option_None(), + BackupName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["BackupName"].encode('utf-16-be'))]*2)]))) if "BackupName" in native_input.keys() else Option_None(), + BackupCreationDateTime=Option_Some(_dafny.Seq(native_input["BackupCreationDateTime"].isoformat())) if "BackupCreationDateTime" in native_input.keys() else Option_None(), + BackupExpiryDateTime=Option_Some(_dafny.Seq(native_input["BackupExpiryDateTime"].isoformat())) if "BackupExpiryDateTime" in native_input.keys() else Option_None(), + BackupStatus=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BackupStatus(native_input["BackupStatus"])) if "BackupStatus" in native_input.keys() else Option_None(), + BackupType=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BackupType(native_input["BackupType"])) if "BackupType" in native_input.keys() else Option_None(), + BackupSizeBytes=Option_Some(native_input["BackupSizeBytes"]) if "BackupSizeBytes" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ListContributorInsightsInput(native_input): return DafnyListContributorInsightsInput( - TableName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "TableName" in native_input.keys() - else Option_None() - ), - NextToken=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["NextToken"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "NextToken" in native_input.keys() - else Option_None() - ), - MaxResults=( - Option_Some(native_input["MaxResults"]) - if "MaxResults" in native_input.keys() - else Option_None() - ), + TableName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)]))) if "TableName" in native_input.keys() else Option_None(), + NextToken=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["NextToken"].encode('utf-16-be'))]*2)]))) if "NextToken" in native_input.keys() else Option_None(), + MaxResults=Option_Some(native_input["MaxResults"]) if "MaxResults" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ListContributorInsightsOutput(native_input): return DafnyListContributorInsightsOutput( - ContributorInsightsSummaries=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ContributorInsightsSummary( - list_element - ) - for list_element in native_input["ContributorInsightsSummaries"] - ] - ) - ) - if "ContributorInsightsSummaries" in native_input.keys() - else Option_None() - ), - NextToken=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["NextToken"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "NextToken" in native_input.keys() - else Option_None() - ), + ContributorInsightsSummaries=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ContributorInsightsSummary(list_element) for list_element in native_input["ContributorInsightsSummaries"]])) if "ContributorInsightsSummaries" in native_input.keys() else Option_None(), + NextToken=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["NextToken"].encode('utf-16-be'))]*2)]))) if "NextToken" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ContributorInsightsSummary(native_input): return DafnyContributorInsightsSummary( - TableName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "TableName" in native_input.keys() - else Option_None() - ), - IndexName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["IndexName"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "IndexName" in native_input.keys() - else Option_None() - ), - ContributorInsightsStatus=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ContributorInsightsStatus( - native_input["ContributorInsightsStatus"] - ) - ) - if "ContributorInsightsStatus" in native_input.keys() - else Option_None() - ), + TableName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)]))) if "TableName" in native_input.keys() else Option_None(), + IndexName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["IndexName"].encode('utf-16-be'))]*2)]))) if "IndexName" in native_input.keys() else Option_None(), + ContributorInsightsStatus=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ContributorInsightsStatus(native_input["ContributorInsightsStatus"])) if "ContributorInsightsStatus" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ListExportsInput(native_input): return DafnyListExportsInput( - TableArn=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableArn"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "TableArn" in native_input.keys() - else Option_None() - ), - MaxResults=( - Option_Some(native_input["MaxResults"]) - if "MaxResults" in native_input.keys() - else Option_None() - ), - NextToken=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["NextToken"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "NextToken" in native_input.keys() - else Option_None() - ), + TableArn=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableArn"].encode('utf-16-be'))]*2)]))) if "TableArn" in native_input.keys() else Option_None(), + MaxResults=Option_Some(native_input["MaxResults"]) if "MaxResults" in native_input.keys() else Option_None(), + NextToken=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["NextToken"].encode('utf-16-be'))]*2)]))) if "NextToken" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ListExportsOutput(native_input): return DafnyListExportsOutput( - ExportSummaries=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ExportSummary( - list_element - ) - for list_element in native_input["ExportSummaries"] - ] - ) - ) - if "ExportSummaries" in native_input.keys() - else Option_None() - ), - NextToken=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["NextToken"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "NextToken" in native_input.keys() - else Option_None() - ), + ExportSummaries=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ExportSummary(list_element) for list_element in native_input["ExportSummaries"]])) if "ExportSummaries" in native_input.keys() else Option_None(), + NextToken=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["NextToken"].encode('utf-16-be'))]*2)]))) if "NextToken" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ExportSummary(native_input): return DafnyExportSummary( - ExportArn=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["ExportArn"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "ExportArn" in native_input.keys() - else Option_None() - ), - ExportStatus=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ExportStatus( - native_input["ExportStatus"] - ) - ) - if "ExportStatus" in native_input.keys() - else Option_None() - ), + ExportArn=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ExportArn"].encode('utf-16-be'))]*2)]))) if "ExportArn" in native_input.keys() else Option_None(), + ExportStatus=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ExportStatus(native_input["ExportStatus"])) if "ExportStatus" in native_input.keys() else Option_None(), + ExportType=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ExportType(native_input["ExportType"])) if "ExportType" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ListGlobalTablesInput(native_input): return DafnyListGlobalTablesInput( - ExclusiveStartGlobalTableName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input[ - "ExclusiveStartGlobalTableName" - ].encode("utf-16-be") - ) - ] - * 2 - ) - ] - ) - ) - ) - if "ExclusiveStartGlobalTableName" in native_input.keys() - else Option_None() - ), - Limit=( - Option_Some(native_input["Limit"]) - if "Limit" in native_input.keys() - else Option_None() - ), - RegionName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["RegionName"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "RegionName" in native_input.keys() - else Option_None() - ), + ExclusiveStartGlobalTableName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ExclusiveStartGlobalTableName"].encode('utf-16-be'))]*2)]))) if "ExclusiveStartGlobalTableName" in native_input.keys() else Option_None(), + Limit=Option_Some(native_input["Limit"]) if "Limit" in native_input.keys() else Option_None(), + RegionName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["RegionName"].encode('utf-16-be'))]*2)]))) if "RegionName" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ListGlobalTablesOutput(native_input): return DafnyListGlobalTablesOutput( - GlobalTables=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_GlobalTable( - list_element - ) - for list_element in native_input["GlobalTables"] - ] - ) - ) - if "GlobalTables" in native_input.keys() - else Option_None() - ), - LastEvaluatedGlobalTableName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input[ - "LastEvaluatedGlobalTableName" - ].encode("utf-16-be") - ) - ] - * 2 - ) - ] - ) - ) - ) - if "LastEvaluatedGlobalTableName" in native_input.keys() - else Option_None() - ), + GlobalTables=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_GlobalTable(list_element) for list_element in native_input["GlobalTables"]])) if "GlobalTables" in native_input.keys() else Option_None(), + LastEvaluatedGlobalTableName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["LastEvaluatedGlobalTableName"].encode('utf-16-be'))]*2)]))) if "LastEvaluatedGlobalTableName" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_GlobalTable(native_input): return DafnyGlobalTable( - GlobalTableName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["GlobalTableName"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "GlobalTableName" in native_input.keys() - else Option_None() - ), - ReplicationGroup=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Replica( - list_element - ) - for list_element in native_input["ReplicationGroup"] - ] - ) - ) - if "ReplicationGroup" in native_input.keys() - else Option_None() - ), + GlobalTableName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["GlobalTableName"].encode('utf-16-be'))]*2)]))) if "GlobalTableName" in native_input.keys() else Option_None(), + ReplicationGroup=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Replica(list_element) for list_element in native_input["ReplicationGroup"]])) if "ReplicationGroup" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ListImportsInput(native_input): return DafnyListImportsInput( - TableArn=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableArn"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "TableArn" in native_input.keys() - else Option_None() - ), - PageSize=( - Option_Some(native_input["PageSize"]) - if "PageSize" in native_input.keys() - else Option_None() - ), - NextToken=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["NextToken"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "NextToken" in native_input.keys() - else Option_None() - ), + TableArn=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableArn"].encode('utf-16-be'))]*2)]))) if "TableArn" in native_input.keys() else Option_None(), + PageSize=Option_Some(native_input["PageSize"]) if "PageSize" in native_input.keys() else Option_None(), + NextToken=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["NextToken"].encode('utf-16-be'))]*2)]))) if "NextToken" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ListImportsOutput(native_input): return DafnyListImportsOutput( - ImportSummaryList=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ImportSummary( - list_element - ) - for list_element in native_input["ImportSummaryList"] - ] - ) - ) - if "ImportSummaryList" in native_input.keys() - else Option_None() - ), - NextToken=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["NextToken"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "NextToken" in native_input.keys() - else Option_None() - ), + ImportSummaryList=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ImportSummary(list_element) for list_element in native_input["ImportSummaryList"]])) if "ImportSummaryList" in native_input.keys() else Option_None(), + NextToken=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["NextToken"].encode('utf-16-be'))]*2)]))) if "NextToken" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ImportSummary(native_input): return DafnyImportSummary( - ImportArn=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["ImportArn"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "ImportArn" in native_input.keys() - else Option_None() - ), - ImportStatus=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ImportStatus( - native_input["ImportStatus"] - ) - ) - if "ImportStatus" in native_input.keys() - else Option_None() - ), - TableArn=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableArn"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "TableArn" in native_input.keys() - else Option_None() - ), - S3BucketSource=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_S3BucketSource( - native_input["S3BucketSource"] - ) - ) - if "S3BucketSource" in native_input.keys() - else Option_None() - ), - CloudWatchLogGroupArn=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["CloudWatchLogGroupArn"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "CloudWatchLogGroupArn" in native_input.keys() - else Option_None() - ), - InputFormat=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_InputFormat( - native_input["InputFormat"] - ) - ) - if "InputFormat" in native_input.keys() - else Option_None() - ), - StartTime=( - Option_Some(_dafny.Seq(native_input["StartTime"].isoformat())) - if "StartTime" in native_input.keys() - else Option_None() - ), - EndTime=( - Option_Some(_dafny.Seq(native_input["EndTime"].isoformat())) - if "EndTime" in native_input.keys() - else Option_None() - ), + ImportArn=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ImportArn"].encode('utf-16-be'))]*2)]))) if "ImportArn" in native_input.keys() else Option_None(), + ImportStatus=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ImportStatus(native_input["ImportStatus"])) if "ImportStatus" in native_input.keys() else Option_None(), + TableArn=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableArn"].encode('utf-16-be'))]*2)]))) if "TableArn" in native_input.keys() else Option_None(), + S3BucketSource=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_S3BucketSource(native_input["S3BucketSource"])) if "S3BucketSource" in native_input.keys() else Option_None(), + CloudWatchLogGroupArn=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["CloudWatchLogGroupArn"].encode('utf-16-be'))]*2)]))) if "CloudWatchLogGroupArn" in native_input.keys() else Option_None(), + InputFormat=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_InputFormat(native_input["InputFormat"])) if "InputFormat" in native_input.keys() else Option_None(), + StartTime=Option_Some(_dafny.Seq(native_input["StartTime"].isoformat())) if "StartTime" in native_input.keys() else Option_None(), + EndTime=Option_Some(_dafny.Seq(native_input["EndTime"].isoformat())) if "EndTime" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ListTablesInput(native_input): return DafnyListTablesInput( - ExclusiveStartTableName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["ExclusiveStartTableName"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "ExclusiveStartTableName" in native_input.keys() - else Option_None() - ), - Limit=( - Option_Some(native_input["Limit"]) - if "Limit" in native_input.keys() - else Option_None() - ), + ExclusiveStartTableName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ExclusiveStartTableName"].encode('utf-16-be'))]*2)]))) if "ExclusiveStartTableName" in native_input.keys() else Option_None(), + Limit=Option_Some(native_input["Limit"]) if "Limit" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ListTablesOutput(native_input): return DafnyListTablesOutput( - TableNames=( - Option_Some( - Seq( - [ - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(list_element.encode("utf-16-be"))] * 2 - ) - ] - ) - ) - for list_element in native_input["TableNames"] - ] - ) - ) - if "TableNames" in native_input.keys() - else Option_None() - ), - LastEvaluatedTableName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["LastEvaluatedTableName"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "LastEvaluatedTableName" in native_input.keys() - else Option_None() - ), + TableNames=Option_Some(Seq([Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(list_element.encode('utf-16-be'))]*2)])) for list_element in native_input["TableNames"]])) if "TableNames" in native_input.keys() else Option_None(), + LastEvaluatedTableName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["LastEvaluatedTableName"].encode('utf-16-be'))]*2)]))) if "LastEvaluatedTableName" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ListTagsOfResourceInput(native_input): return DafnyListTagsOfResourceInput( - ResourceArn=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["ResourceArn"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - NextToken=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["NextToken"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "NextToken" in native_input.keys() - else Option_None() - ), + ResourceArn=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ResourceArn"].encode('utf-16-be'))]*2)])), + NextToken=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["NextToken"].encode('utf-16-be'))]*2)]))) if "NextToken" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ListTagsOfResourceOutput(native_input): return DafnyListTagsOfResourceOutput( - Tags=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Tag( - list_element - ) - for list_element in native_input["Tags"] - ] - ) - ) - if "Tags" in native_input.keys() - else Option_None() - ), - NextToken=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["NextToken"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "NextToken" in native_input.keys() - else Option_None() - ), + Tags=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Tag(list_element) for list_element in native_input["Tags"]])) if "Tags" in native_input.keys() else Option_None(), + NextToken=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["NextToken"].encode('utf-16-be'))]*2)]))) if "NextToken" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_PutItemInput(native_input): return DafnyPutItemInput( - TableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - Item=Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip(*[iter(key.encode("utf-16-be"))] * 2) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in native_input["Item"].items() - } - ), - Expected=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ExpectedAttributeValue( - value - ) - for (key, value) in native_input["Expected"].items() - } - ) - ) - if "Expected" in native_input.keys() - else Option_None() - ), - ReturnValues=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnValue( - native_input["ReturnValues"] - ) - ) - if "ReturnValues" in native_input.keys() - else Option_None() - ), - ReturnConsumedCapacity=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnConsumedCapacity( - native_input["ReturnConsumedCapacity"] - ) - ) - if "ReturnConsumedCapacity" in native_input.keys() - else Option_None() - ), - ReturnItemCollectionMetrics=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnItemCollectionMetrics( - native_input["ReturnItemCollectionMetrics"] - ) - ) - if "ReturnItemCollectionMetrics" in native_input.keys() - else Option_None() - ), - ConditionalOperator=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConditionalOperator( - native_input["ConditionalOperator"] - ) - ) - if "ConditionalOperator" in native_input.keys() - else Option_None() - ), - ConditionExpression=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["ConditionExpression"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "ConditionExpression" in native_input.keys() - else Option_None() - ), - ExpressionAttributeNames=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(value.encode("utf-16-be"))] * 2 - ) - ] - ) - ) - for (key, value) in native_input[ - "ExpressionAttributeNames" - ].items() - } - ) - ) - if "ExpressionAttributeNames" in native_input.keys() - else Option_None() - ), - ExpressionAttributeValues=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in native_input[ - "ExpressionAttributeValues" - ].items() - } - ) - ) - if "ExpressionAttributeValues" in native_input.keys() - else Option_None() - ), + TableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)])), + Item=Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input["Item"].items() }), + Expected=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ExpectedAttributeValue(value) for (key, value) in native_input["Expected"].items() })) if "Expected" in native_input.keys() else Option_None(), + ReturnValues=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnValue(native_input["ReturnValues"])) if "ReturnValues" in native_input.keys() else Option_None(), + ReturnConsumedCapacity=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnConsumedCapacity(native_input["ReturnConsumedCapacity"])) if "ReturnConsumedCapacity" in native_input.keys() else Option_None(), + ReturnItemCollectionMetrics=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnItemCollectionMetrics(native_input["ReturnItemCollectionMetrics"])) if "ReturnItemCollectionMetrics" in native_input.keys() else Option_None(), + ConditionalOperator=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConditionalOperator(native_input["ConditionalOperator"])) if "ConditionalOperator" in native_input.keys() else Option_None(), + ConditionExpression=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ConditionExpression"].encode('utf-16-be'))]*2)]))) if "ConditionExpression" in native_input.keys() else Option_None(), + ExpressionAttributeNames=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(value.encode('utf-16-be'))]*2)])) for (key, value) in native_input["ExpressionAttributeNames"].items() })) if "ExpressionAttributeNames" in native_input.keys() else Option_None(), + ExpressionAttributeValues=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input["ExpressionAttributeValues"].items() })) if "ExpressionAttributeValues" in native_input.keys() else Option_None(), + ReturnValuesOnConditionCheckFailure=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure(native_input["ReturnValuesOnConditionCheckFailure"])) if "ReturnValuesOnConditionCheckFailure" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_PutItemOutput(native_input): return DafnyPutItemOutput( - Attributes=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in native_input["Attributes"].items() - } - ) - ) - if "Attributes" in native_input.keys() - else Option_None() - ), - ConsumedCapacity=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConsumedCapacity( - native_input["ConsumedCapacity"] - ) - ) - if "ConsumedCapacity" in native_input.keys() - else Option_None() - ), - ItemCollectionMetrics=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ItemCollectionMetrics( - native_input["ItemCollectionMetrics"] - ) - ) - if "ItemCollectionMetrics" in native_input.keys() - else Option_None() - ), + Attributes=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input["Attributes"].items() })) if "Attributes" in native_input.keys() else Option_None(), + ConsumedCapacity=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConsumedCapacity(native_input["ConsumedCapacity"])) if "ConsumedCapacity" in native_input.keys() else Option_None(), + ItemCollectionMetrics=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ItemCollectionMetrics(native_input["ItemCollectionMetrics"])) if "ItemCollectionMetrics" in native_input.keys() else Option_None(), ) +def com_amazonaws_dynamodb_PutResourcePolicyInput(native_input): + return DafnyPutResourcePolicyInput( + ResourceArn=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ResourceArn"].encode('utf-16-be'))]*2)])), + Policy=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["Policy"].encode('utf-16-be'))]*2)])), + ExpectedRevisionId=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ExpectedRevisionId"].encode('utf-16-be'))]*2)]))) if "ExpectedRevisionId" in native_input.keys() else Option_None(), + ConfirmRemoveSelfResourceAccess=Option_Some(native_input["ConfirmRemoveSelfResourceAccess"]) if "ConfirmRemoveSelfResourceAccess" in native_input.keys() else Option_None(), + ) + +def com_amazonaws_dynamodb_PutResourcePolicyOutput(native_input): + return DafnyPutResourcePolicyOutput( + RevisionId=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["RevisionId"].encode('utf-16-be'))]*2)]))) if "RevisionId" in native_input.keys() else Option_None(), + ) def com_amazonaws_dynamodb_QueryInput(native_input): return DafnyQueryInput( - TableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - IndexName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["IndexName"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "IndexName" in native_input.keys() - else Option_None() - ), - Select=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Select( - native_input["Select"] - ) - ) - if "Select" in native_input.keys() - else Option_None() - ), - AttributesToGet=( - Option_Some( - Seq( - [ - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(list_element.encode("utf-16-be"))] * 2 - ) - ] - ) - ) - for list_element in native_input["AttributesToGet"] - ] - ) - ) - if "AttributesToGet" in native_input.keys() - else Option_None() - ), - Limit=( - Option_Some(native_input["Limit"]) - if "Limit" in native_input.keys() - else Option_None() - ), - ConsistentRead=( - Option_Some(native_input["ConsistentRead"]) - if "ConsistentRead" in native_input.keys() - else Option_None() - ), - KeyConditions=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Condition( - value - ) - for (key, value) in native_input["KeyConditions"].items() - } - ) - ) - if "KeyConditions" in native_input.keys() - else Option_None() - ), - QueryFilter=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Condition( - value - ) - for (key, value) in native_input["QueryFilter"].items() - } - ) - ) - if "QueryFilter" in native_input.keys() - else Option_None() - ), - ConditionalOperator=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConditionalOperator( - native_input["ConditionalOperator"] - ) - ) - if "ConditionalOperator" in native_input.keys() - else Option_None() - ), - ScanIndexForward=( - Option_Some(native_input["ScanIndexForward"]) - if "ScanIndexForward" in native_input.keys() - else Option_None() - ), - ExclusiveStartKey=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in native_input["ExclusiveStartKey"].items() - } - ) - ) - if "ExclusiveStartKey" in native_input.keys() - else Option_None() - ), - ReturnConsumedCapacity=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnConsumedCapacity( - native_input["ReturnConsumedCapacity"] - ) - ) - if "ReturnConsumedCapacity" in native_input.keys() - else Option_None() - ), - ProjectionExpression=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["ProjectionExpression"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "ProjectionExpression" in native_input.keys() - else Option_None() - ), - FilterExpression=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["FilterExpression"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "FilterExpression" in native_input.keys() - else Option_None() - ), - KeyConditionExpression=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["KeyConditionExpression"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "KeyConditionExpression" in native_input.keys() - else Option_None() - ), - ExpressionAttributeNames=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(value.encode("utf-16-be"))] * 2 - ) - ] - ) - ) - for (key, value) in native_input[ - "ExpressionAttributeNames" - ].items() - } - ) - ) - if "ExpressionAttributeNames" in native_input.keys() - else Option_None() - ), - ExpressionAttributeValues=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in native_input[ - "ExpressionAttributeValues" - ].items() - } - ) - ) - if "ExpressionAttributeValues" in native_input.keys() - else Option_None() - ), + TableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)])), + IndexName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["IndexName"].encode('utf-16-be'))]*2)]))) if "IndexName" in native_input.keys() else Option_None(), + Select=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Select(native_input["Select"])) if "Select" in native_input.keys() else Option_None(), + AttributesToGet=Option_Some(Seq([Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(list_element.encode('utf-16-be'))]*2)])) for list_element in native_input["AttributesToGet"]])) if "AttributesToGet" in native_input.keys() else Option_None(), + Limit=Option_Some(native_input["Limit"]) if "Limit" in native_input.keys() else Option_None(), + ConsistentRead=Option_Some(native_input["ConsistentRead"]) if "ConsistentRead" in native_input.keys() else Option_None(), + KeyConditions=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Condition(value) for (key, value) in native_input["KeyConditions"].items() })) if "KeyConditions" in native_input.keys() else Option_None(), + QueryFilter=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Condition(value) for (key, value) in native_input["QueryFilter"].items() })) if "QueryFilter" in native_input.keys() else Option_None(), + ConditionalOperator=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConditionalOperator(native_input["ConditionalOperator"])) if "ConditionalOperator" in native_input.keys() else Option_None(), + ScanIndexForward=Option_Some(native_input["ScanIndexForward"]) if "ScanIndexForward" in native_input.keys() else Option_None(), + ExclusiveStartKey=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input["ExclusiveStartKey"].items() })) if "ExclusiveStartKey" in native_input.keys() else Option_None(), + ReturnConsumedCapacity=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnConsumedCapacity(native_input["ReturnConsumedCapacity"])) if "ReturnConsumedCapacity" in native_input.keys() else Option_None(), + ProjectionExpression=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ProjectionExpression"].encode('utf-16-be'))]*2)]))) if "ProjectionExpression" in native_input.keys() else Option_None(), + FilterExpression=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["FilterExpression"].encode('utf-16-be'))]*2)]))) if "FilterExpression" in native_input.keys() else Option_None(), + KeyConditionExpression=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["KeyConditionExpression"].encode('utf-16-be'))]*2)]))) if "KeyConditionExpression" in native_input.keys() else Option_None(), + ExpressionAttributeNames=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(value.encode('utf-16-be'))]*2)])) for (key, value) in native_input["ExpressionAttributeNames"].items() })) if "ExpressionAttributeNames" in native_input.keys() else Option_None(), + ExpressionAttributeValues=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input["ExpressionAttributeValues"].items() })) if "ExpressionAttributeValues" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_Select(native_input): # Convert Select if native_input == "ALL_ATTRIBUTES": @@ -8304,1565 +2232,210 @@ def com_amazonaws_dynamodb_Select(native_input): else: raise ValueError("No recognized enum value in enum type: " + native_input) - def com_amazonaws_dynamodb_Condition(native_input): return DafnyCondition( - AttributeValueList=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - list_element - ) - for list_element in native_input["AttributeValueList"] - ] - ) - ) - if "AttributeValueList" in native_input.keys() - else Option_None() - ), - ComparisonOperator=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ComparisonOperator( - native_input["ComparisonOperator"] - ), + AttributeValueList=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(list_element) for list_element in native_input["AttributeValueList"]])) if "AttributeValueList" in native_input.keys() else Option_None(), + ComparisonOperator=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ComparisonOperator(native_input["ComparisonOperator"]), ) - def com_amazonaws_dynamodb_QueryOutput(native_input): return DafnyQueryOutput( - Items=( - Option_Some( - Seq( - [ - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in list_element.items() - } - ) - for list_element in native_input["Items"] - ] - ) - ) - if "Items" in native_input.keys() - else Option_None() - ), - Count=( - Option_Some(native_input["Count"]) - if "Count" in native_input.keys() - else Option_None() - ), - ScannedCount=( - Option_Some(native_input["ScannedCount"]) - if "ScannedCount" in native_input.keys() - else Option_None() - ), - LastEvaluatedKey=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in native_input["LastEvaluatedKey"].items() - } - ) - ) - if "LastEvaluatedKey" in native_input.keys() - else Option_None() - ), - ConsumedCapacity=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConsumedCapacity( - native_input["ConsumedCapacity"] - ) - ) - if "ConsumedCapacity" in native_input.keys() - else Option_None() - ), + Items=Option_Some(Seq([Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in list_element.items() }) for list_element in native_input["Items"]])) if "Items" in native_input.keys() else Option_None(), + Count=Option_Some(native_input["Count"]) if "Count" in native_input.keys() else Option_None(), + ScannedCount=Option_Some(native_input["ScannedCount"]) if "ScannedCount" in native_input.keys() else Option_None(), + LastEvaluatedKey=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input["LastEvaluatedKey"].items() })) if "LastEvaluatedKey" in native_input.keys() else Option_None(), + ConsumedCapacity=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConsumedCapacity(native_input["ConsumedCapacity"])) if "ConsumedCapacity" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_RestoreTableFromBackupInput(native_input): return DafnyRestoreTableFromBackupInput( - TargetTableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TargetTableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - BackupArn=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["BackupArn"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - BillingModeOverride=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BillingMode( - native_input["BillingModeOverride"] - ) - ) - if "BillingModeOverride" in native_input.keys() - else Option_None() - ), - GlobalSecondaryIndexOverride=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_GlobalSecondaryIndex( - list_element - ) - for list_element in native_input["GlobalSecondaryIndexOverride"] - ] - ) - ) - if "GlobalSecondaryIndexOverride" in native_input.keys() - else Option_None() - ), - LocalSecondaryIndexOverride=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_LocalSecondaryIndex( - list_element - ) - for list_element in native_input["LocalSecondaryIndexOverride"] - ] - ) - ) - if "LocalSecondaryIndexOverride" in native_input.keys() - else Option_None() - ), - ProvisionedThroughputOverride=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughput( - native_input["ProvisionedThroughputOverride"] - ) - ) - if "ProvisionedThroughputOverride" in native_input.keys() - else Option_None() - ), - SSESpecificationOverride=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_SSESpecification( - native_input["SSESpecificationOverride"] - ) - ) - if "SSESpecificationOverride" in native_input.keys() - else Option_None() - ), + TargetTableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TargetTableName"].encode('utf-16-be'))]*2)])), + BackupArn=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["BackupArn"].encode('utf-16-be'))]*2)])), + BillingModeOverride=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BillingMode(native_input["BillingModeOverride"])) if "BillingModeOverride" in native_input.keys() else Option_None(), + GlobalSecondaryIndexOverride=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_GlobalSecondaryIndex(list_element) for list_element in native_input["GlobalSecondaryIndexOverride"]])) if "GlobalSecondaryIndexOverride" in native_input.keys() else Option_None(), + LocalSecondaryIndexOverride=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_LocalSecondaryIndex(list_element) for list_element in native_input["LocalSecondaryIndexOverride"]])) if "LocalSecondaryIndexOverride" in native_input.keys() else Option_None(), + ProvisionedThroughputOverride=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughput(native_input["ProvisionedThroughputOverride"])) if "ProvisionedThroughputOverride" in native_input.keys() else Option_None(), + OnDemandThroughputOverride=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_OnDemandThroughput(native_input["OnDemandThroughputOverride"])) if "OnDemandThroughputOverride" in native_input.keys() else Option_None(), + SSESpecificationOverride=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_SSESpecification(native_input["SSESpecificationOverride"])) if "SSESpecificationOverride" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_RestoreTableFromBackupOutput(native_input): return DafnyRestoreTableFromBackupOutput( - TableDescription=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableDescription( - native_input["TableDescription"] - ) - ) - if "TableDescription" in native_input.keys() - else Option_None() - ), + TableDescription=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableDescription(native_input["TableDescription"])) if "TableDescription" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_RestoreTableToPointInTimeInput(native_input): return DafnyRestoreTableToPointInTimeInput( - SourceTableArn=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["SourceTableArn"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "SourceTableArn" in native_input.keys() - else Option_None() - ), - SourceTableName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["SourceTableName"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "SourceTableName" in native_input.keys() - else Option_None() - ), - TargetTableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TargetTableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - UseLatestRestorableTime=( - Option_Some(native_input["UseLatestRestorableTime"]) - if "UseLatestRestorableTime" in native_input.keys() - else Option_None() - ), - RestoreDateTime=( - Option_Some(_dafny.Seq(native_input["RestoreDateTime"].isoformat())) - if "RestoreDateTime" in native_input.keys() - else Option_None() - ), - BillingModeOverride=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BillingMode( - native_input["BillingModeOverride"] - ) - ) - if "BillingModeOverride" in native_input.keys() - else Option_None() - ), - GlobalSecondaryIndexOverride=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_GlobalSecondaryIndex( - list_element - ) - for list_element in native_input["GlobalSecondaryIndexOverride"] - ] - ) - ) - if "GlobalSecondaryIndexOverride" in native_input.keys() - else Option_None() - ), - LocalSecondaryIndexOverride=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_LocalSecondaryIndex( - list_element - ) - for list_element in native_input["LocalSecondaryIndexOverride"] - ] - ) - ) - if "LocalSecondaryIndexOverride" in native_input.keys() - else Option_None() - ), - ProvisionedThroughputOverride=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughput( - native_input["ProvisionedThroughputOverride"] - ) - ) - if "ProvisionedThroughputOverride" in native_input.keys() - else Option_None() - ), - SSESpecificationOverride=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_SSESpecification( - native_input["SSESpecificationOverride"] - ) - ) - if "SSESpecificationOverride" in native_input.keys() - else Option_None() - ), + SourceTableArn=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["SourceTableArn"].encode('utf-16-be'))]*2)]))) if "SourceTableArn" in native_input.keys() else Option_None(), + SourceTableName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["SourceTableName"].encode('utf-16-be'))]*2)]))) if "SourceTableName" in native_input.keys() else Option_None(), + TargetTableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TargetTableName"].encode('utf-16-be'))]*2)])), + UseLatestRestorableTime=Option_Some(native_input["UseLatestRestorableTime"]) if "UseLatestRestorableTime" in native_input.keys() else Option_None(), + RestoreDateTime=Option_Some(_dafny.Seq(native_input["RestoreDateTime"].isoformat())) if "RestoreDateTime" in native_input.keys() else Option_None(), + BillingModeOverride=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BillingMode(native_input["BillingModeOverride"])) if "BillingModeOverride" in native_input.keys() else Option_None(), + GlobalSecondaryIndexOverride=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_GlobalSecondaryIndex(list_element) for list_element in native_input["GlobalSecondaryIndexOverride"]])) if "GlobalSecondaryIndexOverride" in native_input.keys() else Option_None(), + LocalSecondaryIndexOverride=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_LocalSecondaryIndex(list_element) for list_element in native_input["LocalSecondaryIndexOverride"]])) if "LocalSecondaryIndexOverride" in native_input.keys() else Option_None(), + ProvisionedThroughputOverride=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughput(native_input["ProvisionedThroughputOverride"])) if "ProvisionedThroughputOverride" in native_input.keys() else Option_None(), + OnDemandThroughputOverride=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_OnDemandThroughput(native_input["OnDemandThroughputOverride"])) if "OnDemandThroughputOverride" in native_input.keys() else Option_None(), + SSESpecificationOverride=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_SSESpecification(native_input["SSESpecificationOverride"])) if "SSESpecificationOverride" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_RestoreTableToPointInTimeOutput(native_input): return DafnyRestoreTableToPointInTimeOutput( - TableDescription=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableDescription( - native_input["TableDescription"] - ) - ) - if "TableDescription" in native_input.keys() - else Option_None() - ), + TableDescription=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableDescription(native_input["TableDescription"])) if "TableDescription" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ScanInput(native_input): return DafnyScanInput( - TableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - IndexName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["IndexName"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "IndexName" in native_input.keys() - else Option_None() - ), - AttributesToGet=( - Option_Some( - Seq( - [ - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(list_element.encode("utf-16-be"))] * 2 - ) - ] - ) - ) - for list_element in native_input["AttributesToGet"] - ] - ) - ) - if "AttributesToGet" in native_input.keys() - else Option_None() - ), - Limit=( - Option_Some(native_input["Limit"]) - if "Limit" in native_input.keys() - else Option_None() - ), - Select=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Select( - native_input["Select"] - ) - ) - if "Select" in native_input.keys() - else Option_None() - ), - ScanFilter=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Condition( - value - ) - for (key, value) in native_input["ScanFilter"].items() - } - ) - ) - if "ScanFilter" in native_input.keys() - else Option_None() - ), - ConditionalOperator=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConditionalOperator( - native_input["ConditionalOperator"] - ) - ) - if "ConditionalOperator" in native_input.keys() - else Option_None() - ), - ExclusiveStartKey=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in native_input["ExclusiveStartKey"].items() - } - ) - ) - if "ExclusiveStartKey" in native_input.keys() - else Option_None() - ), - ReturnConsumedCapacity=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnConsumedCapacity( - native_input["ReturnConsumedCapacity"] - ) - ) - if "ReturnConsumedCapacity" in native_input.keys() - else Option_None() - ), - TotalSegments=( - Option_Some(native_input["TotalSegments"]) - if "TotalSegments" in native_input.keys() - else Option_None() - ), - Segment=( - Option_Some(native_input["Segment"]) - if "Segment" in native_input.keys() - else Option_None() - ), - ProjectionExpression=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["ProjectionExpression"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "ProjectionExpression" in native_input.keys() - else Option_None() - ), - FilterExpression=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["FilterExpression"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "FilterExpression" in native_input.keys() - else Option_None() - ), - ExpressionAttributeNames=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(value.encode("utf-16-be"))] * 2 - ) - ] - ) - ) - for (key, value) in native_input[ - "ExpressionAttributeNames" - ].items() - } - ) - ) - if "ExpressionAttributeNames" in native_input.keys() - else Option_None() - ), - ExpressionAttributeValues=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in native_input[ - "ExpressionAttributeValues" - ].items() - } - ) - ) - if "ExpressionAttributeValues" in native_input.keys() - else Option_None() - ), - ConsistentRead=( - Option_Some(native_input["ConsistentRead"]) - if "ConsistentRead" in native_input.keys() - else Option_None() - ), + TableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)])), + IndexName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["IndexName"].encode('utf-16-be'))]*2)]))) if "IndexName" in native_input.keys() else Option_None(), + AttributesToGet=Option_Some(Seq([Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(list_element.encode('utf-16-be'))]*2)])) for list_element in native_input["AttributesToGet"]])) if "AttributesToGet" in native_input.keys() else Option_None(), + Limit=Option_Some(native_input["Limit"]) if "Limit" in native_input.keys() else Option_None(), + Select=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Select(native_input["Select"])) if "Select" in native_input.keys() else Option_None(), + ScanFilter=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Condition(value) for (key, value) in native_input["ScanFilter"].items() })) if "ScanFilter" in native_input.keys() else Option_None(), + ConditionalOperator=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConditionalOperator(native_input["ConditionalOperator"])) if "ConditionalOperator" in native_input.keys() else Option_None(), + ExclusiveStartKey=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input["ExclusiveStartKey"].items() })) if "ExclusiveStartKey" in native_input.keys() else Option_None(), + ReturnConsumedCapacity=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnConsumedCapacity(native_input["ReturnConsumedCapacity"])) if "ReturnConsumedCapacity" in native_input.keys() else Option_None(), + TotalSegments=Option_Some(native_input["TotalSegments"]) if "TotalSegments" in native_input.keys() else Option_None(), + Segment=Option_Some(native_input["Segment"]) if "Segment" in native_input.keys() else Option_None(), + ProjectionExpression=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ProjectionExpression"].encode('utf-16-be'))]*2)]))) if "ProjectionExpression" in native_input.keys() else Option_None(), + FilterExpression=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["FilterExpression"].encode('utf-16-be'))]*2)]))) if "FilterExpression" in native_input.keys() else Option_None(), + ExpressionAttributeNames=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(value.encode('utf-16-be'))]*2)])) for (key, value) in native_input["ExpressionAttributeNames"].items() })) if "ExpressionAttributeNames" in native_input.keys() else Option_None(), + ExpressionAttributeValues=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input["ExpressionAttributeValues"].items() })) if "ExpressionAttributeValues" in native_input.keys() else Option_None(), + ConsistentRead=Option_Some(native_input["ConsistentRead"]) if "ConsistentRead" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ScanOutput(native_input): return DafnyScanOutput( - Items=( - Option_Some( - Seq( - [ - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in list_element.items() - } - ) - for list_element in native_input["Items"] - ] - ) - ) - if "Items" in native_input.keys() - else Option_None() - ), - Count=( - Option_Some(native_input["Count"]) - if "Count" in native_input.keys() - else Option_None() - ), - ScannedCount=( - Option_Some(native_input["ScannedCount"]) - if "ScannedCount" in native_input.keys() - else Option_None() - ), - LastEvaluatedKey=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in native_input["LastEvaluatedKey"].items() - } - ) - ) - if "LastEvaluatedKey" in native_input.keys() - else Option_None() - ), - ConsumedCapacity=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConsumedCapacity( - native_input["ConsumedCapacity"] - ) - ) - if "ConsumedCapacity" in native_input.keys() - else Option_None() - ), + Items=Option_Some(Seq([Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in list_element.items() }) for list_element in native_input["Items"]])) if "Items" in native_input.keys() else Option_None(), + Count=Option_Some(native_input["Count"]) if "Count" in native_input.keys() else Option_None(), + ScannedCount=Option_Some(native_input["ScannedCount"]) if "ScannedCount" in native_input.keys() else Option_None(), + LastEvaluatedKey=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input["LastEvaluatedKey"].items() })) if "LastEvaluatedKey" in native_input.keys() else Option_None(), + ConsumedCapacity=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConsumedCapacity(native_input["ConsumedCapacity"])) if "ConsumedCapacity" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_TagResourceInput(native_input): return DafnyTagResourceInput( - ResourceArn=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["ResourceArn"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - Tags=Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Tag( - list_element - ) - for list_element in native_input["Tags"] - ] - ), + ResourceArn=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ResourceArn"].encode('utf-16-be'))]*2)])), + Tags=Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Tag(list_element) for list_element in native_input["Tags"]]), ) - def com_amazonaws_dynamodb_TransactGetItemsInput(native_input): return DafnyTransactGetItemsInput( - TransactItems=Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TransactGetItem( - list_element - ) - for list_element in native_input["TransactItems"] - ] - ), - ReturnConsumedCapacity=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnConsumedCapacity( - native_input["ReturnConsumedCapacity"] - ) - ) - if "ReturnConsumedCapacity" in native_input.keys() - else Option_None() - ), + TransactItems=Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TransactGetItem(list_element) for list_element in native_input["TransactItems"]]), + ReturnConsumedCapacity=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnConsumedCapacity(native_input["ReturnConsumedCapacity"])) if "ReturnConsumedCapacity" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_TransactGetItem(native_input): return DafnyTransactGetItem( - Get=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Get( - native_input["Get"] - ), + Get=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Get(native_input["Get"]), ) - def com_amazonaws_dynamodb_Get(native_input): return DafnyGet( - Key=Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip(*[iter(key.encode("utf-16-be"))] * 2) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in native_input["Key"].items() - } - ), - TableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - ProjectionExpression=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["ProjectionExpression"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "ProjectionExpression" in native_input.keys() - else Option_None() - ), - ExpressionAttributeNames=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(value.encode("utf-16-be"))] * 2 - ) - ] - ) - ) - for (key, value) in native_input[ - "ExpressionAttributeNames" - ].items() - } - ) - ) - if "ExpressionAttributeNames" in native_input.keys() - else Option_None() - ), + Key=Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input["Key"].items() }), + TableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)])), + ProjectionExpression=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ProjectionExpression"].encode('utf-16-be'))]*2)]))) if "ProjectionExpression" in native_input.keys() else Option_None(), + ExpressionAttributeNames=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(value.encode('utf-16-be'))]*2)])) for (key, value) in native_input["ExpressionAttributeNames"].items() })) if "ExpressionAttributeNames" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_TransactGetItemsOutput(native_input): return DafnyTransactGetItemsOutput( - ConsumedCapacity=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConsumedCapacity( - list_element - ) - for list_element in native_input["ConsumedCapacity"] - ] - ) - ) - if "ConsumedCapacity" in native_input.keys() - else Option_None() - ), - Responses=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ItemResponse( - list_element - ) - for list_element in native_input["Responses"] - ] - ) - ) - if "Responses" in native_input.keys() - else Option_None() - ), + ConsumedCapacity=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConsumedCapacity(list_element) for list_element in native_input["ConsumedCapacity"]])) if "ConsumedCapacity" in native_input.keys() else Option_None(), + Responses=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ItemResponse(list_element) for list_element in native_input["Responses"]])) if "Responses" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_TransactWriteItemsInput(native_input): return DafnyTransactWriteItemsInput( - TransactItems=Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TransactWriteItem( - list_element - ) - for list_element in native_input["TransactItems"] - ] - ), - ReturnConsumedCapacity=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnConsumedCapacity( - native_input["ReturnConsumedCapacity"] - ) - ) - if "ReturnConsumedCapacity" in native_input.keys() - else Option_None() - ), - ReturnItemCollectionMetrics=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnItemCollectionMetrics( - native_input["ReturnItemCollectionMetrics"] - ) - ) - if "ReturnItemCollectionMetrics" in native_input.keys() - else Option_None() - ), - ClientRequestToken=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["ClientRequestToken"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "ClientRequestToken" in native_input.keys() - else Option_None() - ), + TransactItems=Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TransactWriteItem(list_element) for list_element in native_input["TransactItems"]]), + ReturnConsumedCapacity=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnConsumedCapacity(native_input["ReturnConsumedCapacity"])) if "ReturnConsumedCapacity" in native_input.keys() else Option_None(), + ReturnItemCollectionMetrics=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnItemCollectionMetrics(native_input["ReturnItemCollectionMetrics"])) if "ReturnItemCollectionMetrics" in native_input.keys() else Option_None(), + ClientRequestToken=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ClientRequestToken"].encode('utf-16-be'))]*2)]))) if "ClientRequestToken" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_TransactWriteItem(native_input): return DafnyTransactWriteItem( - ConditionCheck=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConditionCheck( - native_input["ConditionCheck"] - ) - ) - if "ConditionCheck" in native_input.keys() - else Option_None() - ), - Put=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Put( - native_input["Put"] - ) - ) - if "Put" in native_input.keys() - else Option_None() - ), - Delete=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Delete( - native_input["Delete"] - ) - ) - if "Delete" in native_input.keys() - else Option_None() - ), - Update=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Update( - native_input["Update"] - ) - ) - if "Update" in native_input.keys() - else Option_None() - ), + ConditionCheck=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConditionCheck(native_input["ConditionCheck"])) if "ConditionCheck" in native_input.keys() else Option_None(), + Put=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Put(native_input["Put"])) if "Put" in native_input.keys() else Option_None(), + Delete=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Delete(native_input["Delete"])) if "Delete" in native_input.keys() else Option_None(), + Update=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Update(native_input["Update"])) if "Update" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ConditionCheck(native_input): return DafnyConditionCheck( - Key=Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip(*[iter(key.encode("utf-16-be"))] * 2) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in native_input["Key"].items() - } - ), - TableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - ConditionExpression=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["ConditionExpression"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ), - ExpressionAttributeNames=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(value.encode("utf-16-be"))] * 2 - ) - ] - ) - ) - for (key, value) in native_input[ - "ExpressionAttributeNames" - ].items() - } - ) - ) - if "ExpressionAttributeNames" in native_input.keys() - else Option_None() - ), - ExpressionAttributeValues=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in native_input[ - "ExpressionAttributeValues" - ].items() - } - ) - ) - if "ExpressionAttributeValues" in native_input.keys() - else Option_None() - ), - ReturnValuesOnConditionCheckFailure=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure( - native_input["ReturnValuesOnConditionCheckFailure"] - ) - ) - if "ReturnValuesOnConditionCheckFailure" in native_input.keys() - else Option_None() - ), + Key=Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input["Key"].items() }), + TableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)])), + ConditionExpression=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ConditionExpression"].encode('utf-16-be'))]*2)])), + ExpressionAttributeNames=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(value.encode('utf-16-be'))]*2)])) for (key, value) in native_input["ExpressionAttributeNames"].items() })) if "ExpressionAttributeNames" in native_input.keys() else Option_None(), + ExpressionAttributeValues=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input["ExpressionAttributeValues"].items() })) if "ExpressionAttributeValues" in native_input.keys() else Option_None(), + ReturnValuesOnConditionCheckFailure=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure(native_input["ReturnValuesOnConditionCheckFailure"])) if "ReturnValuesOnConditionCheckFailure" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_Put(native_input): return DafnyPut( - Item=Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip(*[iter(key.encode("utf-16-be"))] * 2) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in native_input["Item"].items() - } - ), - TableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - ConditionExpression=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["ConditionExpression"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "ConditionExpression" in native_input.keys() - else Option_None() - ), - ExpressionAttributeNames=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(value.encode("utf-16-be"))] * 2 - ) - ] - ) - ) - for (key, value) in native_input[ - "ExpressionAttributeNames" - ].items() - } - ) - ) - if "ExpressionAttributeNames" in native_input.keys() - else Option_None() - ), - ExpressionAttributeValues=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in native_input[ - "ExpressionAttributeValues" - ].items() - } - ) - ) - if "ExpressionAttributeValues" in native_input.keys() - else Option_None() - ), - ReturnValuesOnConditionCheckFailure=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure( - native_input["ReturnValuesOnConditionCheckFailure"] - ) - ) - if "ReturnValuesOnConditionCheckFailure" in native_input.keys() - else Option_None() - ), + Item=Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input["Item"].items() }), + TableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)])), + ConditionExpression=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ConditionExpression"].encode('utf-16-be'))]*2)]))) if "ConditionExpression" in native_input.keys() else Option_None(), + ExpressionAttributeNames=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(value.encode('utf-16-be'))]*2)])) for (key, value) in native_input["ExpressionAttributeNames"].items() })) if "ExpressionAttributeNames" in native_input.keys() else Option_None(), + ExpressionAttributeValues=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input["ExpressionAttributeValues"].items() })) if "ExpressionAttributeValues" in native_input.keys() else Option_None(), + ReturnValuesOnConditionCheckFailure=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure(native_input["ReturnValuesOnConditionCheckFailure"])) if "ReturnValuesOnConditionCheckFailure" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_Delete(native_input): return DafnyDelete( - Key=Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip(*[iter(key.encode("utf-16-be"))] * 2) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in native_input["Key"].items() - } - ), - TableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - ConditionExpression=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["ConditionExpression"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "ConditionExpression" in native_input.keys() - else Option_None() - ), - ExpressionAttributeNames=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(value.encode("utf-16-be"))] * 2 - ) - ] - ) - ) - for (key, value) in native_input[ - "ExpressionAttributeNames" - ].items() - } - ) - ) - if "ExpressionAttributeNames" in native_input.keys() - else Option_None() - ), - ExpressionAttributeValues=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in native_input[ - "ExpressionAttributeValues" - ].items() - } - ) - ) - if "ExpressionAttributeValues" in native_input.keys() - else Option_None() - ), - ReturnValuesOnConditionCheckFailure=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure( - native_input["ReturnValuesOnConditionCheckFailure"] - ) - ) - if "ReturnValuesOnConditionCheckFailure" in native_input.keys() - else Option_None() - ), + Key=Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input["Key"].items() }), + TableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)])), + ConditionExpression=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ConditionExpression"].encode('utf-16-be'))]*2)]))) if "ConditionExpression" in native_input.keys() else Option_None(), + ExpressionAttributeNames=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(value.encode('utf-16-be'))]*2)])) for (key, value) in native_input["ExpressionAttributeNames"].items() })) if "ExpressionAttributeNames" in native_input.keys() else Option_None(), + ExpressionAttributeValues=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input["ExpressionAttributeValues"].items() })) if "ExpressionAttributeValues" in native_input.keys() else Option_None(), + ReturnValuesOnConditionCheckFailure=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure(native_input["ReturnValuesOnConditionCheckFailure"])) if "ReturnValuesOnConditionCheckFailure" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_Update(native_input): return DafnyUpdate( - Key=Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip(*[iter(key.encode("utf-16-be"))] * 2) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in native_input["Key"].items() - } - ), - UpdateExpression=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["UpdateExpression"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ), - TableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - ConditionExpression=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["ConditionExpression"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "ConditionExpression" in native_input.keys() - else Option_None() - ), - ExpressionAttributeNames=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(value.encode("utf-16-be"))] * 2 - ) - ] - ) - ) - for (key, value) in native_input[ - "ExpressionAttributeNames" - ].items() - } - ) - ) - if "ExpressionAttributeNames" in native_input.keys() - else Option_None() - ), - ExpressionAttributeValues=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in native_input[ - "ExpressionAttributeValues" - ].items() - } - ) - ) - if "ExpressionAttributeValues" in native_input.keys() - else Option_None() - ), - ReturnValuesOnConditionCheckFailure=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure( - native_input["ReturnValuesOnConditionCheckFailure"] - ) - ) - if "ReturnValuesOnConditionCheckFailure" in native_input.keys() - else Option_None() - ), + Key=Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input["Key"].items() }), + UpdateExpression=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["UpdateExpression"].encode('utf-16-be'))]*2)])), + TableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)])), + ConditionExpression=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ConditionExpression"].encode('utf-16-be'))]*2)]))) if "ConditionExpression" in native_input.keys() else Option_None(), + ExpressionAttributeNames=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(value.encode('utf-16-be'))]*2)])) for (key, value) in native_input["ExpressionAttributeNames"].items() })) if "ExpressionAttributeNames" in native_input.keys() else Option_None(), + ExpressionAttributeValues=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input["ExpressionAttributeValues"].items() })) if "ExpressionAttributeValues" in native_input.keys() else Option_None(), + ReturnValuesOnConditionCheckFailure=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure(native_input["ReturnValuesOnConditionCheckFailure"])) if "ReturnValuesOnConditionCheckFailure" in native_input.keys() else Option_None(), ) - -def com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure(native_input): - # Convert ReturnValuesOnConditionCheckFailure - if native_input == "ALL_OLD": - return ReturnValuesOnConditionCheckFailure_ALL__OLD() - elif native_input == "NONE": - return ReturnValuesOnConditionCheckFailure_NONE() - else: - raise ValueError("No recognized enum value in enum type: " + native_input) - - def com_amazonaws_dynamodb_TransactWriteItemsOutput(native_input): return DafnyTransactWriteItemsOutput( - ConsumedCapacity=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConsumedCapacity( - list_element - ) - for list_element in native_input["ConsumedCapacity"] - ] - ) - ) - if "ConsumedCapacity" in native_input.keys() - else Option_None() - ), - ItemCollectionMetrics=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ItemCollectionMetrics( - list_element - ) - for list_element in value - ] - ) - for (key, value) in native_input[ - "ItemCollectionMetrics" - ].items() - } - ) - ) - if "ItemCollectionMetrics" in native_input.keys() - else Option_None() - ), + ConsumedCapacity=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConsumedCapacity(list_element) for list_element in native_input["ConsumedCapacity"]])) if "ConsumedCapacity" in native_input.keys() else Option_None(), + ItemCollectionMetrics=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ItemCollectionMetrics(list_element) for list_element in value]) for (key, value) in native_input["ItemCollectionMetrics"].items() })) if "ItemCollectionMetrics" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_UntagResourceInput(native_input): return DafnyUntagResourceInput( - ResourceArn=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["ResourceArn"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - TagKeys=Seq( - [ - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(list_element.encode("utf-16-be"))] * 2 - ) - ] - ) - ) - for list_element in native_input["TagKeys"] - ] - ), + ResourceArn=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ResourceArn"].encode('utf-16-be'))]*2)])), + TagKeys=Seq([Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(list_element.encode('utf-16-be'))]*2)])) for list_element in native_input["TagKeys"]]), ) - def com_amazonaws_dynamodb_UpdateContinuousBackupsInput(native_input): return DafnyUpdateContinuousBackupsInput( - TableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - PointInTimeRecoverySpecification=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_PointInTimeRecoverySpecification( - native_input["PointInTimeRecoverySpecification"] - ), + TableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)])), + PointInTimeRecoverySpecification=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_PointInTimeRecoverySpecification(native_input["PointInTimeRecoverySpecification"]), ) - def com_amazonaws_dynamodb_PointInTimeRecoverySpecification(native_input): return DafnyPointInTimeRecoverySpecification( PointInTimeRecoveryEnabled=native_input["PointInTimeRecoveryEnabled"], ) - def com_amazonaws_dynamodb_UpdateContinuousBackupsOutput(native_input): return DafnyUpdateContinuousBackupsOutput( - ContinuousBackupsDescription=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ContinuousBackupsDescription( - native_input["ContinuousBackupsDescription"] - ) - ) - if "ContinuousBackupsDescription" in native_input.keys() - else Option_None() - ), + ContinuousBackupsDescription=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ContinuousBackupsDescription(native_input["ContinuousBackupsDescription"])) if "ContinuousBackupsDescription" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_UpdateContributorInsightsInput(native_input): return DafnyUpdateContributorInsightsInput( - TableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - IndexName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["IndexName"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "IndexName" in native_input.keys() - else Option_None() - ), - ContributorInsightsAction=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ContributorInsightsAction( - native_input["ContributorInsightsAction"] - ), + TableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)])), + IndexName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["IndexName"].encode('utf-16-be'))]*2)]))) if "IndexName" in native_input.keys() else Option_None(), + ContributorInsightsAction=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ContributorInsightsAction(native_input["ContributorInsightsAction"]), ) - def com_amazonaws_dynamodb_ContributorInsightsAction(native_input): # Convert ContributorInsightsAction if native_input == "ENABLE": @@ -9872,712 +2445,125 @@ def com_amazonaws_dynamodb_ContributorInsightsAction(native_input): else: raise ValueError("No recognized enum value in enum type: " + native_input) - def com_amazonaws_dynamodb_UpdateContributorInsightsOutput(native_input): return DafnyUpdateContributorInsightsOutput( - TableName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "TableName" in native_input.keys() - else Option_None() - ), - IndexName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["IndexName"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "IndexName" in native_input.keys() - else Option_None() - ), - ContributorInsightsStatus=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ContributorInsightsStatus( - native_input["ContributorInsightsStatus"] - ) - ) - if "ContributorInsightsStatus" in native_input.keys() - else Option_None() - ), + TableName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)]))) if "TableName" in native_input.keys() else Option_None(), + IndexName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["IndexName"].encode('utf-16-be'))]*2)]))) if "IndexName" in native_input.keys() else Option_None(), + ContributorInsightsStatus=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ContributorInsightsStatus(native_input["ContributorInsightsStatus"])) if "ContributorInsightsStatus" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_UpdateGlobalTableInput(native_input): return DafnyUpdateGlobalTableInput( - GlobalTableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["GlobalTableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - ReplicaUpdates=Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaUpdate( - list_element - ) - for list_element in native_input["ReplicaUpdates"] - ] - ), + GlobalTableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["GlobalTableName"].encode('utf-16-be'))]*2)])), + ReplicaUpdates=Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaUpdate(list_element) for list_element in native_input["ReplicaUpdates"]]), ) - def com_amazonaws_dynamodb_ReplicaUpdate(native_input): return DafnyReplicaUpdate( - Create=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_CreateReplicaAction( - native_input["Create"] - ) - ) - if "Create" in native_input.keys() - else Option_None() - ), - Delete=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DeleteReplicaAction( - native_input["Delete"] - ) - ) - if "Delete" in native_input.keys() - else Option_None() - ), + Create=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_CreateReplicaAction(native_input["Create"])) if "Create" in native_input.keys() else Option_None(), + Delete=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DeleteReplicaAction(native_input["Delete"])) if "Delete" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_CreateReplicaAction(native_input): return DafnyCreateReplicaAction( - RegionName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["RegionName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), + RegionName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["RegionName"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_DeleteReplicaAction(native_input): return DafnyDeleteReplicaAction( - RegionName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["RegionName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), + RegionName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["RegionName"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_UpdateGlobalTableOutput(native_input): return DafnyUpdateGlobalTableOutput( - GlobalTableDescription=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_GlobalTableDescription( - native_input["GlobalTableDescription"] - ) - ) - if "GlobalTableDescription" in native_input.keys() - else Option_None() - ), + GlobalTableDescription=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_GlobalTableDescription(native_input["GlobalTableDescription"])) if "GlobalTableDescription" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_UpdateGlobalTableSettingsInput(native_input): return DafnyUpdateGlobalTableSettingsInput( - GlobalTableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["GlobalTableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - GlobalTableBillingMode=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BillingMode( - native_input["GlobalTableBillingMode"] - ) - ) - if "GlobalTableBillingMode" in native_input.keys() - else Option_None() - ), - GlobalTableProvisionedWriteCapacityUnits=( - Option_Some(native_input["GlobalTableProvisionedWriteCapacityUnits"]) - if "GlobalTableProvisionedWriteCapacityUnits" in native_input.keys() - else Option_None() - ), - GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingSettingsUpdate( - native_input[ - "GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate" - ] - ) - ) - if "GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate" - in native_input.keys() - else Option_None() - ), - GlobalTableGlobalSecondaryIndexSettingsUpdate=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_GlobalTableGlobalSecondaryIndexSettingsUpdate( - list_element - ) - for list_element in native_input[ - "GlobalTableGlobalSecondaryIndexSettingsUpdate" - ] - ] - ) - ) - if "GlobalTableGlobalSecondaryIndexSettingsUpdate" in native_input.keys() - else Option_None() - ), - ReplicaSettingsUpdate=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaSettingsUpdate( - list_element - ) - for list_element in native_input["ReplicaSettingsUpdate"] - ] - ) - ) - if "ReplicaSettingsUpdate" in native_input.keys() - else Option_None() - ), + GlobalTableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["GlobalTableName"].encode('utf-16-be'))]*2)])), + GlobalTableBillingMode=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BillingMode(native_input["GlobalTableBillingMode"])) if "GlobalTableBillingMode" in native_input.keys() else Option_None(), + GlobalTableProvisionedWriteCapacityUnits=Option_Some(native_input["GlobalTableProvisionedWriteCapacityUnits"]) if "GlobalTableProvisionedWriteCapacityUnits" in native_input.keys() else Option_None(), + GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingSettingsUpdate(native_input["GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate"])) if "GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate" in native_input.keys() else Option_None(), + GlobalTableGlobalSecondaryIndexSettingsUpdate=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_GlobalTableGlobalSecondaryIndexSettingsUpdate(list_element) for list_element in native_input["GlobalTableGlobalSecondaryIndexSettingsUpdate"]])) if "GlobalTableGlobalSecondaryIndexSettingsUpdate" in native_input.keys() else Option_None(), + ReplicaSettingsUpdate=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaSettingsUpdate(list_element) for list_element in native_input["ReplicaSettingsUpdate"]])) if "ReplicaSettingsUpdate" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_AutoScalingSettingsUpdate(native_input): return DafnyAutoScalingSettingsUpdate( - MinimumUnits=( - Option_Some(native_input["MinimumUnits"]) - if "MinimumUnits" in native_input.keys() - else Option_None() - ), - MaximumUnits=( - Option_Some(native_input["MaximumUnits"]) - if "MaximumUnits" in native_input.keys() - else Option_None() - ), - AutoScalingDisabled=( - Option_Some(native_input["AutoScalingDisabled"]) - if "AutoScalingDisabled" in native_input.keys() - else Option_None() - ), - AutoScalingRoleArn=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["AutoScalingRoleArn"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "AutoScalingRoleArn" in native_input.keys() - else Option_None() - ), - ScalingPolicyUpdate=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingPolicyUpdate( - native_input["ScalingPolicyUpdate"] - ) - ) - if "ScalingPolicyUpdate" in native_input.keys() - else Option_None() - ), + MinimumUnits=Option_Some(native_input["MinimumUnits"]) if "MinimumUnits" in native_input.keys() else Option_None(), + MaximumUnits=Option_Some(native_input["MaximumUnits"]) if "MaximumUnits" in native_input.keys() else Option_None(), + AutoScalingDisabled=Option_Some(native_input["AutoScalingDisabled"]) if "AutoScalingDisabled" in native_input.keys() else Option_None(), + AutoScalingRoleArn=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["AutoScalingRoleArn"].encode('utf-16-be'))]*2)]))) if "AutoScalingRoleArn" in native_input.keys() else Option_None(), + ScalingPolicyUpdate=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingPolicyUpdate(native_input["ScalingPolicyUpdate"])) if "ScalingPolicyUpdate" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_AutoScalingPolicyUpdate(native_input): return DafnyAutoScalingPolicyUpdate( - PolicyName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["PolicyName"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "PolicyName" in native_input.keys() - else Option_None() - ), - TargetTrackingScalingPolicyConfiguration=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingTargetTrackingScalingPolicyConfigurationUpdate( - native_input["TargetTrackingScalingPolicyConfiguration"] - ), - ) - - -def com_amazonaws_dynamodb_AutoScalingTargetTrackingScalingPolicyConfigurationUpdate( - native_input, -): + PolicyName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["PolicyName"].encode('utf-16-be'))]*2)]))) if "PolicyName" in native_input.keys() else Option_None(), + TargetTrackingScalingPolicyConfiguration=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingTargetTrackingScalingPolicyConfigurationUpdate(native_input["TargetTrackingScalingPolicyConfiguration"]), + ) + +def com_amazonaws_dynamodb_AutoScalingTargetTrackingScalingPolicyConfigurationUpdate(native_input): return DafnyAutoScalingTargetTrackingScalingPolicyConfigurationUpdate( - DisableScaleIn=( - Option_Some(native_input["DisableScaleIn"]) - if "DisableScaleIn" in native_input.keys() - else Option_None() - ), - ScaleInCooldown=( - Option_Some(native_input["ScaleInCooldown"]) - if "ScaleInCooldown" in native_input.keys() - else Option_None() - ), - ScaleOutCooldown=( - Option_Some(native_input["ScaleOutCooldown"]) - if "ScaleOutCooldown" in native_input.keys() - else Option_None() - ), + DisableScaleIn=Option_Some(native_input["DisableScaleIn"]) if "DisableScaleIn" in native_input.keys() else Option_None(), + ScaleInCooldown=Option_Some(native_input["ScaleInCooldown"]) if "ScaleInCooldown" in native_input.keys() else Option_None(), + ScaleOutCooldown=Option_Some(native_input["ScaleOutCooldown"]) if "ScaleOutCooldown" in native_input.keys() else Option_None(), TargetValue=native_input["TargetValue"], ) - def com_amazonaws_dynamodb_GlobalTableGlobalSecondaryIndexSettingsUpdate(native_input): return DafnyGlobalTableGlobalSecondaryIndexSettingsUpdate( - IndexName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["IndexName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - ProvisionedWriteCapacityUnits=( - Option_Some(native_input["ProvisionedWriteCapacityUnits"]) - if "ProvisionedWriteCapacityUnits" in native_input.keys() - else Option_None() - ), - ProvisionedWriteCapacityAutoScalingSettingsUpdate=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingSettingsUpdate( - native_input["ProvisionedWriteCapacityAutoScalingSettingsUpdate"] - ) - ) - if "ProvisionedWriteCapacityAutoScalingSettingsUpdate" - in native_input.keys() - else Option_None() - ), + IndexName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["IndexName"].encode('utf-16-be'))]*2)])), + ProvisionedWriteCapacityUnits=Option_Some(native_input["ProvisionedWriteCapacityUnits"]) if "ProvisionedWriteCapacityUnits" in native_input.keys() else Option_None(), + ProvisionedWriteCapacityAutoScalingSettingsUpdate=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingSettingsUpdate(native_input["ProvisionedWriteCapacityAutoScalingSettingsUpdate"])) if "ProvisionedWriteCapacityAutoScalingSettingsUpdate" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ReplicaSettingsUpdate(native_input): return DafnyReplicaSettingsUpdate( - RegionName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["RegionName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - ReplicaProvisionedReadCapacityUnits=( - Option_Some(native_input["ReplicaProvisionedReadCapacityUnits"]) - if "ReplicaProvisionedReadCapacityUnits" in native_input.keys() - else Option_None() - ), - ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingSettingsUpdate( - native_input[ - "ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate" - ] - ) - ) - if "ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate" - in native_input.keys() - else Option_None() - ), - ReplicaGlobalSecondaryIndexSettingsUpdate=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexSettingsUpdate( - list_element - ) - for list_element in native_input[ - "ReplicaGlobalSecondaryIndexSettingsUpdate" - ] - ] - ) - ) - if "ReplicaGlobalSecondaryIndexSettingsUpdate" in native_input.keys() - else Option_None() - ), - ReplicaTableClass=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableClass( - native_input["ReplicaTableClass"] - ) - ) - if "ReplicaTableClass" in native_input.keys() - else Option_None() - ), + RegionName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["RegionName"].encode('utf-16-be'))]*2)])), + ReplicaProvisionedReadCapacityUnits=Option_Some(native_input["ReplicaProvisionedReadCapacityUnits"]) if "ReplicaProvisionedReadCapacityUnits" in native_input.keys() else Option_None(), + ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingSettingsUpdate(native_input["ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate"])) if "ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate" in native_input.keys() else Option_None(), + ReplicaGlobalSecondaryIndexSettingsUpdate=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexSettingsUpdate(list_element) for list_element in native_input["ReplicaGlobalSecondaryIndexSettingsUpdate"]])) if "ReplicaGlobalSecondaryIndexSettingsUpdate" in native_input.keys() else Option_None(), + ReplicaTableClass=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableClass(native_input["ReplicaTableClass"])) if "ReplicaTableClass" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexSettingsUpdate(native_input): return DafnyReplicaGlobalSecondaryIndexSettingsUpdate( - IndexName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["IndexName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - ProvisionedReadCapacityUnits=( - Option_Some(native_input["ProvisionedReadCapacityUnits"]) - if "ProvisionedReadCapacityUnits" in native_input.keys() - else Option_None() - ), - ProvisionedReadCapacityAutoScalingSettingsUpdate=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingSettingsUpdate( - native_input["ProvisionedReadCapacityAutoScalingSettingsUpdate"] - ) - ) - if "ProvisionedReadCapacityAutoScalingSettingsUpdate" in native_input.keys() - else Option_None() - ), + IndexName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["IndexName"].encode('utf-16-be'))]*2)])), + ProvisionedReadCapacityUnits=Option_Some(native_input["ProvisionedReadCapacityUnits"]) if "ProvisionedReadCapacityUnits" in native_input.keys() else Option_None(), + ProvisionedReadCapacityAutoScalingSettingsUpdate=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingSettingsUpdate(native_input["ProvisionedReadCapacityAutoScalingSettingsUpdate"])) if "ProvisionedReadCapacityAutoScalingSettingsUpdate" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_UpdateGlobalTableSettingsOutput(native_input): return DafnyUpdateGlobalTableSettingsOutput( - GlobalTableName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["GlobalTableName"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "GlobalTableName" in native_input.keys() - else Option_None() - ), - ReplicaSettings=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaSettingsDescription( - list_element - ) - for list_element in native_input["ReplicaSettings"] - ] - ) - ) - if "ReplicaSettings" in native_input.keys() - else Option_None() - ), + GlobalTableName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["GlobalTableName"].encode('utf-16-be'))]*2)]))) if "GlobalTableName" in native_input.keys() else Option_None(), + ReplicaSettings=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaSettingsDescription(list_element) for list_element in native_input["ReplicaSettings"]])) if "ReplicaSettings" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_UpdateItemInput(native_input): return DafnyUpdateItemInput( - TableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - Key=Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip(*[iter(key.encode("utf-16-be"))] * 2) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in native_input["Key"].items() - } - ), - AttributeUpdates=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValueUpdate( - value - ) - for (key, value) in native_input["AttributeUpdates"].items() - } - ) - ) - if "AttributeUpdates" in native_input.keys() - else Option_None() - ), - Expected=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ExpectedAttributeValue( - value - ) - for (key, value) in native_input["Expected"].items() - } - ) - ) - if "Expected" in native_input.keys() - else Option_None() - ), - ConditionalOperator=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConditionalOperator( - native_input["ConditionalOperator"] - ) - ) - if "ConditionalOperator" in native_input.keys() - else Option_None() - ), - ReturnValues=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnValue( - native_input["ReturnValues"] - ) - ) - if "ReturnValues" in native_input.keys() - else Option_None() - ), - ReturnConsumedCapacity=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnConsumedCapacity( - native_input["ReturnConsumedCapacity"] - ) - ) - if "ReturnConsumedCapacity" in native_input.keys() - else Option_None() - ), - ReturnItemCollectionMetrics=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnItemCollectionMetrics( - native_input["ReturnItemCollectionMetrics"] - ) - ) - if "ReturnItemCollectionMetrics" in native_input.keys() - else Option_None() - ), - UpdateExpression=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["UpdateExpression"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "UpdateExpression" in native_input.keys() - else Option_None() - ), - ConditionExpression=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["ConditionExpression"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "ConditionExpression" in native_input.keys() - else Option_None() - ), - ExpressionAttributeNames=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(value.encode("utf-16-be"))] * 2 - ) - ] - ) - ) - for (key, value) in native_input[ - "ExpressionAttributeNames" - ].items() - } - ) - ) - if "ExpressionAttributeNames" in native_input.keys() - else Option_None() - ), - ExpressionAttributeValues=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in native_input[ - "ExpressionAttributeValues" - ].items() - } - ) - ) - if "ExpressionAttributeValues" in native_input.keys() - else Option_None() - ), + TableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)])), + Key=Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input["Key"].items() }), + AttributeUpdates=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValueUpdate(value) for (key, value) in native_input["AttributeUpdates"].items() })) if "AttributeUpdates" in native_input.keys() else Option_None(), + Expected=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ExpectedAttributeValue(value) for (key, value) in native_input["Expected"].items() })) if "Expected" in native_input.keys() else Option_None(), + ConditionalOperator=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConditionalOperator(native_input["ConditionalOperator"])) if "ConditionalOperator" in native_input.keys() else Option_None(), + ReturnValues=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnValue(native_input["ReturnValues"])) if "ReturnValues" in native_input.keys() else Option_None(), + ReturnConsumedCapacity=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnConsumedCapacity(native_input["ReturnConsumedCapacity"])) if "ReturnConsumedCapacity" in native_input.keys() else Option_None(), + ReturnItemCollectionMetrics=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnItemCollectionMetrics(native_input["ReturnItemCollectionMetrics"])) if "ReturnItemCollectionMetrics" in native_input.keys() else Option_None(), + UpdateExpression=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["UpdateExpression"].encode('utf-16-be'))]*2)]))) if "UpdateExpression" in native_input.keys() else Option_None(), + ConditionExpression=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["ConditionExpression"].encode('utf-16-be'))]*2)]))) if "ConditionExpression" in native_input.keys() else Option_None(), + ExpressionAttributeNames=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(value.encode('utf-16-be'))]*2)])) for (key, value) in native_input["ExpressionAttributeNames"].items() })) if "ExpressionAttributeNames" in native_input.keys() else Option_None(), + ExpressionAttributeValues=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input["ExpressionAttributeValues"].items() })) if "ExpressionAttributeValues" in native_input.keys() else Option_None(), + ReturnValuesOnConditionCheckFailure=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure(native_input["ReturnValuesOnConditionCheckFailure"])) if "ReturnValuesOnConditionCheckFailure" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_AttributeValueUpdate(native_input): return DafnyAttributeValueUpdate( - Value=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - native_input["Value"] - ) - ) - if "Value" in native_input.keys() - else Option_None() - ), - Action=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeAction( - native_input["Action"] - ) - ) - if "Action" in native_input.keys() - else Option_None() - ), + Value=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(native_input["Value"])) if "Value" in native_input.keys() else Option_None(), + Action=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeAction(native_input["Action"])) if "Action" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_AttributeAction(native_input): # Convert AttributeAction if native_input == "ADD": @@ -10589,691 +2575,165 @@ def com_amazonaws_dynamodb_AttributeAction(native_input): else: raise ValueError("No recognized enum value in enum type: " + native_input) - def com_amazonaws_dynamodb_UpdateItemOutput(native_input): return DafnyUpdateItemOutput( - Attributes=( - Option_Some( - Map( - { - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(key.encode("utf-16-be"))] * 2 - ) - ] - ) - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in native_input["Attributes"].items() - } - ) - ) - if "Attributes" in native_input.keys() - else Option_None() - ), - ConsumedCapacity=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConsumedCapacity( - native_input["ConsumedCapacity"] - ) - ) - if "ConsumedCapacity" in native_input.keys() - else Option_None() - ), - ItemCollectionMetrics=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ItemCollectionMetrics( - native_input["ItemCollectionMetrics"] - ) - ) - if "ItemCollectionMetrics" in native_input.keys() - else Option_None() - ), + Attributes=Option_Some(Map({Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(key.encode('utf-16-be'))]*2)])): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in native_input["Attributes"].items() })) if "Attributes" in native_input.keys() else Option_None(), + ConsumedCapacity=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConsumedCapacity(native_input["ConsumedCapacity"])) if "ConsumedCapacity" in native_input.keys() else Option_None(), + ItemCollectionMetrics=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ItemCollectionMetrics(native_input["ItemCollectionMetrics"])) if "ItemCollectionMetrics" in native_input.keys() else Option_None(), ) +def com_amazonaws_dynamodb_UpdateKinesisStreamingDestinationInput(native_input): + return DafnyUpdateKinesisStreamingDestinationInput( + TableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)])), + StreamArn=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["StreamArn"].encode('utf-16-be'))]*2)])), + UpdateKinesisStreamingConfiguration=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_UpdateKinesisStreamingConfiguration(native_input["UpdateKinesisStreamingConfiguration"])) if "UpdateKinesisStreamingConfiguration" in native_input.keys() else Option_None(), + ) + +def com_amazonaws_dynamodb_UpdateKinesisStreamingConfiguration(native_input): + return DafnyUpdateKinesisStreamingConfiguration( + ApproximateCreationDateTimePrecision=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ApproximateCreationDateTimePrecision(native_input["ApproximateCreationDateTimePrecision"])) if "ApproximateCreationDateTimePrecision" in native_input.keys() else Option_None(), + ) + +def com_amazonaws_dynamodb_UpdateKinesisStreamingDestinationOutput(native_input): + return DafnyUpdateKinesisStreamingDestinationOutput( + TableName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)]))) if "TableName" in native_input.keys() else Option_None(), + StreamArn=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["StreamArn"].encode('utf-16-be'))]*2)]))) if "StreamArn" in native_input.keys() else Option_None(), + DestinationStatus=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DestinationStatus(native_input["DestinationStatus"])) if "DestinationStatus" in native_input.keys() else Option_None(), + UpdateKinesisStreamingConfiguration=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_UpdateKinesisStreamingConfiguration(native_input["UpdateKinesisStreamingConfiguration"])) if "UpdateKinesisStreamingConfiguration" in native_input.keys() else Option_None(), + ) def com_amazonaws_dynamodb_UpdateTableInput(native_input): return DafnyUpdateTableInput( - AttributeDefinitions=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeDefinition( - list_element - ) - for list_element in native_input["AttributeDefinitions"] - ] - ) - ) - if "AttributeDefinitions" in native_input.keys() - else Option_None() - ), - TableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - BillingMode=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BillingMode( - native_input["BillingMode"] - ) - ) - if "BillingMode" in native_input.keys() - else Option_None() - ), - ProvisionedThroughput=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughput( - native_input["ProvisionedThroughput"] - ) - ) - if "ProvisionedThroughput" in native_input.keys() - else Option_None() - ), - GlobalSecondaryIndexUpdates=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_GlobalSecondaryIndexUpdate( - list_element - ) - for list_element in native_input["GlobalSecondaryIndexUpdates"] - ] - ) - ) - if "GlobalSecondaryIndexUpdates" in native_input.keys() - else Option_None() - ), - StreamSpecification=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_StreamSpecification( - native_input["StreamSpecification"] - ) - ) - if "StreamSpecification" in native_input.keys() - else Option_None() - ), - SSESpecification=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_SSESpecification( - native_input["SSESpecification"] - ) - ) - if "SSESpecification" in native_input.keys() - else Option_None() - ), - ReplicaUpdates=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicationGroupUpdate( - list_element - ) - for list_element in native_input["ReplicaUpdates"] - ] - ) - ) - if "ReplicaUpdates" in native_input.keys() - else Option_None() - ), - TableClass=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableClass( - native_input["TableClass"] - ) - ) - if "TableClass" in native_input.keys() - else Option_None() - ), + AttributeDefinitions=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AttributeDefinition(list_element) for list_element in native_input["AttributeDefinitions"]])) if "AttributeDefinitions" in native_input.keys() else Option_None(), + TableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)])), + BillingMode=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BillingMode(native_input["BillingMode"])) if "BillingMode" in native_input.keys() else Option_None(), + ProvisionedThroughput=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughput(native_input["ProvisionedThroughput"])) if "ProvisionedThroughput" in native_input.keys() else Option_None(), + GlobalSecondaryIndexUpdates=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_GlobalSecondaryIndexUpdate(list_element) for list_element in native_input["GlobalSecondaryIndexUpdates"]])) if "GlobalSecondaryIndexUpdates" in native_input.keys() else Option_None(), + StreamSpecification=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_StreamSpecification(native_input["StreamSpecification"])) if "StreamSpecification" in native_input.keys() else Option_None(), + SSESpecification=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_SSESpecification(native_input["SSESpecification"])) if "SSESpecification" in native_input.keys() else Option_None(), + ReplicaUpdates=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicationGroupUpdate(list_element) for list_element in native_input["ReplicaUpdates"]])) if "ReplicaUpdates" in native_input.keys() else Option_None(), + TableClass=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableClass(native_input["TableClass"])) if "TableClass" in native_input.keys() else Option_None(), + DeletionProtectionEnabled=Option_Some(native_input["DeletionProtectionEnabled"]) if "DeletionProtectionEnabled" in native_input.keys() else Option_None(), + OnDemandThroughput=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_OnDemandThroughput(native_input["OnDemandThroughput"])) if "OnDemandThroughput" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_GlobalSecondaryIndexUpdate(native_input): return DafnyGlobalSecondaryIndexUpdate( - Update=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_UpdateGlobalSecondaryIndexAction( - native_input["Update"] - ) - ) - if "Update" in native_input.keys() - else Option_None() - ), - Create=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_CreateGlobalSecondaryIndexAction( - native_input["Create"] - ) - ) - if "Create" in native_input.keys() - else Option_None() - ), - Delete=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DeleteGlobalSecondaryIndexAction( - native_input["Delete"] - ) - ) - if "Delete" in native_input.keys() - else Option_None() - ), + Update=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_UpdateGlobalSecondaryIndexAction(native_input["Update"])) if "Update" in native_input.keys() else Option_None(), + Create=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_CreateGlobalSecondaryIndexAction(native_input["Create"])) if "Create" in native_input.keys() else Option_None(), + Delete=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DeleteGlobalSecondaryIndexAction(native_input["Delete"])) if "Delete" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_UpdateGlobalSecondaryIndexAction(native_input): return DafnyUpdateGlobalSecondaryIndexAction( - IndexName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["IndexName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - ProvisionedThroughput=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughput( - native_input["ProvisionedThroughput"] - ), + IndexName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["IndexName"].encode('utf-16-be'))]*2)])), + ProvisionedThroughput=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughput(native_input["ProvisionedThroughput"])) if "ProvisionedThroughput" in native_input.keys() else Option_None(), + OnDemandThroughput=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_OnDemandThroughput(native_input["OnDemandThroughput"])) if "OnDemandThroughput" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_CreateGlobalSecondaryIndexAction(native_input): return DafnyCreateGlobalSecondaryIndexAction( - IndexName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["IndexName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - KeySchema=Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_KeySchemaElement( - list_element - ) - for list_element in native_input["KeySchema"] - ] - ), - Projection=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Projection( - native_input["Projection"] - ), - ProvisionedThroughput=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughput( - native_input["ProvisionedThroughput"] - ) - ) - if "ProvisionedThroughput" in native_input.keys() - else Option_None() - ), + IndexName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["IndexName"].encode('utf-16-be'))]*2)])), + KeySchema=Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_KeySchemaElement(list_element) for list_element in native_input["KeySchema"]]), + Projection=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_Projection(native_input["Projection"]), + ProvisionedThroughput=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughput(native_input["ProvisionedThroughput"])) if "ProvisionedThroughput" in native_input.keys() else Option_None(), + OnDemandThroughput=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_OnDemandThroughput(native_input["OnDemandThroughput"])) if "OnDemandThroughput" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_DeleteGlobalSecondaryIndexAction(native_input): return DafnyDeleteGlobalSecondaryIndexAction( - IndexName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["IndexName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), + IndexName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["IndexName"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_ReplicationGroupUpdate(native_input): return DafnyReplicationGroupUpdate( - Create=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_CreateReplicationGroupMemberAction( - native_input["Create"] - ) - ) - if "Create" in native_input.keys() - else Option_None() - ), - Update=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_UpdateReplicationGroupMemberAction( - native_input["Update"] - ) - ) - if "Update" in native_input.keys() - else Option_None() - ), - Delete=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DeleteReplicationGroupMemberAction( - native_input["Delete"] - ) - ) - if "Delete" in native_input.keys() - else Option_None() - ), + Create=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_CreateReplicationGroupMemberAction(native_input["Create"])) if "Create" in native_input.keys() else Option_None(), + Update=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_UpdateReplicationGroupMemberAction(native_input["Update"])) if "Update" in native_input.keys() else Option_None(), + Delete=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DeleteReplicationGroupMemberAction(native_input["Delete"])) if "Delete" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_CreateReplicationGroupMemberAction(native_input): return DafnyCreateReplicationGroupMemberAction( - RegionName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["RegionName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - KMSMasterKeyId=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["KMSMasterKeyId"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "KMSMasterKeyId" in native_input.keys() - else Option_None() - ), - ProvisionedThroughputOverride=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughputOverride( - native_input["ProvisionedThroughputOverride"] - ) - ) - if "ProvisionedThroughputOverride" in native_input.keys() - else Option_None() - ), - GlobalSecondaryIndexes=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndex( - list_element - ) - for list_element in native_input["GlobalSecondaryIndexes"] - ] - ) - ) - if "GlobalSecondaryIndexes" in native_input.keys() - else Option_None() - ), - TableClassOverride=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableClass( - native_input["TableClassOverride"] - ) - ) - if "TableClassOverride" in native_input.keys() - else Option_None() - ), + RegionName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["RegionName"].encode('utf-16-be'))]*2)])), + KMSMasterKeyId=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["KMSMasterKeyId"].encode('utf-16-be'))]*2)]))) if "KMSMasterKeyId" in native_input.keys() else Option_None(), + ProvisionedThroughputOverride=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughputOverride(native_input["ProvisionedThroughputOverride"])) if "ProvisionedThroughputOverride" in native_input.keys() else Option_None(), + OnDemandThroughputOverride=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_OnDemandThroughputOverride(native_input["OnDemandThroughputOverride"])) if "OnDemandThroughputOverride" in native_input.keys() else Option_None(), + GlobalSecondaryIndexes=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndex(list_element) for list_element in native_input["GlobalSecondaryIndexes"]])) if "GlobalSecondaryIndexes" in native_input.keys() else Option_None(), + TableClassOverride=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableClass(native_input["TableClassOverride"])) if "TableClassOverride" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_UpdateReplicationGroupMemberAction(native_input): return DafnyUpdateReplicationGroupMemberAction( - RegionName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["RegionName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - KMSMasterKeyId=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[ - iter( - native_input["KMSMasterKeyId"].encode( - "utf-16-be" - ) - ) - ] - * 2 - ) - ] - ) - ) - ) - if "KMSMasterKeyId" in native_input.keys() - else Option_None() - ), - ProvisionedThroughputOverride=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughputOverride( - native_input["ProvisionedThroughputOverride"] - ) - ) - if "ProvisionedThroughputOverride" in native_input.keys() - else Option_None() - ), - GlobalSecondaryIndexes=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndex( - list_element - ) - for list_element in native_input["GlobalSecondaryIndexes"] - ] - ) - ) - if "GlobalSecondaryIndexes" in native_input.keys() - else Option_None() - ), - TableClassOverride=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableClass( - native_input["TableClassOverride"] - ) - ) - if "TableClassOverride" in native_input.keys() - else Option_None() - ), + RegionName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["RegionName"].encode('utf-16-be'))]*2)])), + KMSMasterKeyId=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["KMSMasterKeyId"].encode('utf-16-be'))]*2)]))) if "KMSMasterKeyId" in native_input.keys() else Option_None(), + ProvisionedThroughputOverride=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughputOverride(native_input["ProvisionedThroughputOverride"])) if "ProvisionedThroughputOverride" in native_input.keys() else Option_None(), + OnDemandThroughputOverride=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_OnDemandThroughputOverride(native_input["OnDemandThroughputOverride"])) if "OnDemandThroughputOverride" in native_input.keys() else Option_None(), + GlobalSecondaryIndexes=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndex(list_element) for list_element in native_input["GlobalSecondaryIndexes"]])) if "GlobalSecondaryIndexes" in native_input.keys() else Option_None(), + TableClassOverride=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableClass(native_input["TableClassOverride"])) if "TableClassOverride" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_DeleteReplicationGroupMemberAction(native_input): return DafnyDeleteReplicationGroupMemberAction( - RegionName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["RegionName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), + RegionName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["RegionName"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndex(native_input): return DafnyReplicaGlobalSecondaryIndex( - IndexName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["IndexName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - ProvisionedThroughputOverride=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughputOverride( - native_input["ProvisionedThroughputOverride"] - ) - ) - if "ProvisionedThroughputOverride" in native_input.keys() - else Option_None() - ), + IndexName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["IndexName"].encode('utf-16-be'))]*2)])), + ProvisionedThroughputOverride=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughputOverride(native_input["ProvisionedThroughputOverride"])) if "ProvisionedThroughputOverride" in native_input.keys() else Option_None(), + OnDemandThroughputOverride=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_OnDemandThroughputOverride(native_input["OnDemandThroughputOverride"])) if "OnDemandThroughputOverride" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_UpdateTableOutput(native_input): return DafnyUpdateTableOutput( - TableDescription=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableDescription( - native_input["TableDescription"] - ) - ) - if "TableDescription" in native_input.keys() - else Option_None() - ), + TableDescription=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableDescription(native_input["TableDescription"])) if "TableDescription" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_UpdateTableReplicaAutoScalingInput(native_input): return DafnyUpdateTableReplicaAutoScalingInput( - GlobalSecondaryIndexUpdates=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_GlobalSecondaryIndexAutoScalingUpdate( - list_element - ) - for list_element in native_input["GlobalSecondaryIndexUpdates"] - ] - ) - ) - if "GlobalSecondaryIndexUpdates" in native_input.keys() - else Option_None() - ), - TableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - ProvisionedWriteCapacityAutoScalingUpdate=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingSettingsUpdate( - native_input["ProvisionedWriteCapacityAutoScalingUpdate"] - ) - ) - if "ProvisionedWriteCapacityAutoScalingUpdate" in native_input.keys() - else Option_None() - ), - ReplicaUpdates=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaAutoScalingUpdate( - list_element - ) - for list_element in native_input["ReplicaUpdates"] - ] - ) - ) - if "ReplicaUpdates" in native_input.keys() - else Option_None() - ), + GlobalSecondaryIndexUpdates=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_GlobalSecondaryIndexAutoScalingUpdate(list_element) for list_element in native_input["GlobalSecondaryIndexUpdates"]])) if "GlobalSecondaryIndexUpdates" in native_input.keys() else Option_None(), + TableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)])), + ProvisionedWriteCapacityAutoScalingUpdate=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingSettingsUpdate(native_input["ProvisionedWriteCapacityAutoScalingUpdate"])) if "ProvisionedWriteCapacityAutoScalingUpdate" in native_input.keys() else Option_None(), + ReplicaUpdates=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaAutoScalingUpdate(list_element) for list_element in native_input["ReplicaUpdates"]])) if "ReplicaUpdates" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_GlobalSecondaryIndexAutoScalingUpdate(native_input): return DafnyGlobalSecondaryIndexAutoScalingUpdate( - IndexName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["IndexName"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "IndexName" in native_input.keys() - else Option_None() - ), - ProvisionedWriteCapacityAutoScalingUpdate=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingSettingsUpdate( - native_input["ProvisionedWriteCapacityAutoScalingUpdate"] - ) - ) - if "ProvisionedWriteCapacityAutoScalingUpdate" in native_input.keys() - else Option_None() - ), + IndexName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["IndexName"].encode('utf-16-be'))]*2)]))) if "IndexName" in native_input.keys() else Option_None(), + ProvisionedWriteCapacityAutoScalingUpdate=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingSettingsUpdate(native_input["ProvisionedWriteCapacityAutoScalingUpdate"])) if "ProvisionedWriteCapacityAutoScalingUpdate" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ReplicaAutoScalingUpdate(native_input): return DafnyReplicaAutoScalingUpdate( - RegionName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["RegionName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - ReplicaGlobalSecondaryIndexUpdates=( - Option_Some( - Seq( - [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexAutoScalingUpdate( - list_element - ) - for list_element in native_input[ - "ReplicaGlobalSecondaryIndexUpdates" - ] - ] - ) - ) - if "ReplicaGlobalSecondaryIndexUpdates" in native_input.keys() - else Option_None() - ), - ReplicaProvisionedReadCapacityAutoScalingUpdate=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingSettingsUpdate( - native_input["ReplicaProvisionedReadCapacityAutoScalingUpdate"] - ) - ) - if "ReplicaProvisionedReadCapacityAutoScalingUpdate" in native_input.keys() - else Option_None() - ), + RegionName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["RegionName"].encode('utf-16-be'))]*2)])), + ReplicaGlobalSecondaryIndexUpdates=Option_Some(Seq([aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexAutoScalingUpdate(list_element) for list_element in native_input["ReplicaGlobalSecondaryIndexUpdates"]])) if "ReplicaGlobalSecondaryIndexUpdates" in native_input.keys() else Option_None(), + ReplicaProvisionedReadCapacityAutoScalingUpdate=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingSettingsUpdate(native_input["ReplicaProvisionedReadCapacityAutoScalingUpdate"])) if "ReplicaProvisionedReadCapacityAutoScalingUpdate" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexAutoScalingUpdate(native_input): return DafnyReplicaGlobalSecondaryIndexAutoScalingUpdate( - IndexName=( - Option_Some( - Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["IndexName"].encode("utf-16-be"))] - * 2 - ) - ] - ) - ) - ) - if "IndexName" in native_input.keys() - else Option_None() - ), - ProvisionedReadCapacityAutoScalingUpdate=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingSettingsUpdate( - native_input["ProvisionedReadCapacityAutoScalingUpdate"] - ) - ) - if "ProvisionedReadCapacityAutoScalingUpdate" in native_input.keys() - else Option_None() - ), + IndexName=Option_Some(Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["IndexName"].encode('utf-16-be'))]*2)]))) if "IndexName" in native_input.keys() else Option_None(), + ProvisionedReadCapacityAutoScalingUpdate=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_AutoScalingSettingsUpdate(native_input["ProvisionedReadCapacityAutoScalingUpdate"])) if "ProvisionedReadCapacityAutoScalingUpdate" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_UpdateTableReplicaAutoScalingOutput(native_input): return DafnyUpdateTableReplicaAutoScalingOutput( - TableAutoScalingDescription=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableAutoScalingDescription( - native_input["TableAutoScalingDescription"] - ) - ) - if "TableAutoScalingDescription" in native_input.keys() - else Option_None() - ), + TableAutoScalingDescription=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableAutoScalingDescription(native_input["TableAutoScalingDescription"])) if "TableAutoScalingDescription" in native_input.keys() else Option_None(), ) - def com_amazonaws_dynamodb_UpdateTimeToLiveInput(native_input): return DafnyUpdateTimeToLiveInput( - TableName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["TableName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), - TimeToLiveSpecification=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TimeToLiveSpecification( - native_input["TimeToLiveSpecification"] - ), + TableName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["TableName"].encode('utf-16-be'))]*2)])), + TimeToLiveSpecification=aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TimeToLiveSpecification(native_input["TimeToLiveSpecification"]), ) - def com_amazonaws_dynamodb_TimeToLiveSpecification(native_input): return DafnyTimeToLiveSpecification( Enabled=native_input["Enabled"], - AttributeName=Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip( - *[iter(native_input["AttributeName"].encode("utf-16-be"))] * 2 - ) - ] - ) - ), + AttributeName=Seq(''.join([chr(int.from_bytes(pair, 'big')) for pair in zip(*[iter(native_input["AttributeName"].encode('utf-16-be'))]*2)])), ) - def com_amazonaws_dynamodb_UpdateTimeToLiveOutput(native_input): return DafnyUpdateTimeToLiveOutput( - TimeToLiveSpecification=( - Option_Some( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TimeToLiveSpecification( - native_input["TimeToLiveSpecification"] - ) - ) - if "TimeToLiveSpecification" in native_input.keys() - else Option_None() - ), + TimeToLiveSpecification=Option_Some(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TimeToLiveSpecification(native_input["TimeToLiveSpecification"])) if "TimeToLiveSpecification" in native_input.keys() else Option_None(), ) diff --git a/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/dafny_to_aws_sdk.py b/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/dafny_to_aws_sdk.py index 1b7cfba94..375a3de15 100644 --- a/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/dafny_to_aws_sdk.py +++ b/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/dafny_to_aws_sdk.py @@ -3,6 +3,8 @@ # Do not modify this file. This file is machine generated, and any changes to it will be overwritten. from aws_cryptography_internal_dynamodb.internaldafny.generated.ComAmazonawsDynamodbTypes import ( + ApproximateCreationDateTimePrecision_MICROSECOND, + ApproximateCreationDateTimePrecision_MILLISECOND, AttributeAction_ADD, AttributeAction_DELETE, AttributeAction_PUT, @@ -68,11 +70,16 @@ DestinationStatus_DISABLING, DestinationStatus_ENABLE__FAILED, DestinationStatus_ENABLING, + DestinationStatus_UPDATING, ExportFormat_DYNAMODB__JSON, ExportFormat_ION, ExportStatus_COMPLETED, ExportStatus_FAILED, ExportStatus_IN__PROGRESS, + ExportType_FULL__EXPORT, + ExportType_INCREMENTAL__EXPORT, + ExportViewType_NEW__AND__OLD__IMAGES, + ExportViewType_NEW__IMAGE, GlobalTableStatus_ACTIVE, GlobalTableStatus_CREATING, GlobalTableStatus_DELETING, @@ -160,442 +167,304 @@ def com_amazonaws_dynamodb_BackupInUseException(dafny_input): output = {} if dafny_input.message.is_Some: - output["message"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.message.value - ).decode("utf-16-be") + output["message"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.message.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_BackupNotFoundException(dafny_input): output = {} if dafny_input.message.is_Some: - output["message"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.message.value - ).decode("utf-16-be") + output["message"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.message.value).decode('utf-16-be') return output +def com_amazonaws_dynamodb_AttributeValue(dafny_input): + # Convert AttributeValue + if isinstance(dafny_input, AttributeValue_S): + AttributeValue_union_value = {"S": b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.S).decode('utf-16-be')} + elif isinstance(dafny_input, AttributeValue_N): + AttributeValue_union_value = {"N": b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.N).decode('utf-16-be')} + elif isinstance(dafny_input, AttributeValue_B): + AttributeValue_union_value = {"B": bytes(dafny_input.B)} + elif isinstance(dafny_input, AttributeValue_SS): + AttributeValue_union_value = {"SS": [b''.join(ord(c).to_bytes(2, 'big') for c in list_element).decode('utf-16-be') for list_element in dafny_input.SS]} + elif isinstance(dafny_input, AttributeValue_NS): + AttributeValue_union_value = {"NS": [b''.join(ord(c).to_bytes(2, 'big') for c in list_element).decode('utf-16-be') for list_element in dafny_input.NS]} + elif isinstance(dafny_input, AttributeValue_BS): + AttributeValue_union_value = {"BS": [bytes(list_element) for list_element in dafny_input.BS]} + elif isinstance(dafny_input, AttributeValue_M): + AttributeValue_union_value = {"M": {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.M.items }} + elif isinstance(dafny_input, AttributeValue_L): + AttributeValue_union_value = {"L": [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(list_element) for list_element in dafny_input.L]} + elif isinstance(dafny_input, AttributeValue_NULL): + AttributeValue_union_value = {"NULL": dafny_input.NULL} + elif isinstance(dafny_input, AttributeValue_BOOL): + AttributeValue_union_value = {"BOOL": dafny_input.BOOL} + else: + raise ValueError("No recognized union value in union type: " + str(dafny_input)) + + return AttributeValue_union_value def com_amazonaws_dynamodb_ConditionalCheckFailedException(dafny_input): output = {} if dafny_input.message.is_Some: - output["message"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.message.value - ).decode("utf-16-be") + output["message"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.message.value).decode('utf-16-be') - return output + if dafny_input.Item.is_Some: + output["Item"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.Item.value.items } + return output def com_amazonaws_dynamodb_ContinuousBackupsUnavailableException(dafny_input): output = {} if dafny_input.message.is_Some: - output["message"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.message.value - ).decode("utf-16-be") + output["message"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.message.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_DuplicateItemException(dafny_input): output = {} if dafny_input.message.is_Some: - output["message"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.message.value - ).decode("utf-16-be") + output["message"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.message.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_ExportConflictException(dafny_input): output = {} if dafny_input.message.is_Some: - output["message"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.message.value - ).decode("utf-16-be") + output["message"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.message.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_ExportNotFoundException(dafny_input): output = {} if dafny_input.message.is_Some: - output["message"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.message.value - ).decode("utf-16-be") + output["message"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.message.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_GlobalTableAlreadyExistsException(dafny_input): output = {} if dafny_input.message.is_Some: - output["message"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.message.value - ).decode("utf-16-be") + output["message"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.message.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_GlobalTableNotFoundException(dafny_input): output = {} if dafny_input.message.is_Some: - output["message"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.message.value - ).decode("utf-16-be") + output["message"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.message.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_IdempotentParameterMismatchException(dafny_input): output = {} if dafny_input.Message.is_Some: - output["Message"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.Message.value - ).decode("utf-16-be") + output["Message"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.Message.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_ImportConflictException(dafny_input): output = {} if dafny_input.message.is_Some: - output["message"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.message.value - ).decode("utf-16-be") + output["message"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.message.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_ImportNotFoundException(dafny_input): output = {} if dafny_input.message.is_Some: - output["message"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.message.value - ).decode("utf-16-be") + output["message"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.message.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_IndexNotFoundException(dafny_input): output = {} if dafny_input.message.is_Some: - output["message"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.message.value - ).decode("utf-16-be") + output["message"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.message.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_InternalServerError(dafny_input): output = {} if dafny_input.message.is_Some: - output["message"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.message.value - ).decode("utf-16-be") + output["message"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.message.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_InvalidEndpointException(dafny_input): output = {} if dafny_input.Message.is_Some: - output["Message"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.Message.value - ).decode("utf-16-be") + output["Message"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.Message.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_InvalidExportTimeException(dafny_input): output = {} if dafny_input.message.is_Some: - output["message"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.message.value - ).decode("utf-16-be") + output["message"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.message.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_InvalidRestoreTimeException(dafny_input): output = {} if dafny_input.message.is_Some: - output["message"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.message.value - ).decode("utf-16-be") + output["message"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.message.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_ItemCollectionSizeLimitExceededException(dafny_input): output = {} if dafny_input.message.is_Some: - output["message"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.message.value - ).decode("utf-16-be") + output["message"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.message.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_LimitExceededException(dafny_input): output = {} if dafny_input.message.is_Some: - output["message"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.message.value - ).decode("utf-16-be") + output["message"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.message.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_PointInTimeRecoveryUnavailableException(dafny_input): output = {} if dafny_input.message.is_Some: - output["message"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.message.value - ).decode("utf-16-be") + output["message"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.message.value).decode('utf-16-be') return output +def com_amazonaws_dynamodb_PolicyNotFoundException(dafny_input): + output = {} + if dafny_input.message.is_Some: + output["message"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.message.value).decode('utf-16-be') + + return output def com_amazonaws_dynamodb_ProvisionedThroughputExceededException(dafny_input): output = {} if dafny_input.message.is_Some: - output["message"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.message.value - ).decode("utf-16-be") + output["message"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.message.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_ReplicaAlreadyExistsException(dafny_input): output = {} if dafny_input.message.is_Some: - output["message"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.message.value - ).decode("utf-16-be") + output["message"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.message.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_ReplicaNotFoundException(dafny_input): output = {} if dafny_input.message.is_Some: - output["message"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.message.value - ).decode("utf-16-be") + output["message"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.message.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_RequestLimitExceeded(dafny_input): output = {} if dafny_input.message.is_Some: - output["message"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.message.value - ).decode("utf-16-be") + output["message"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.message.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_ResourceInUseException(dafny_input): output = {} if dafny_input.message.is_Some: - output["message"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.message.value - ).decode("utf-16-be") + output["message"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.message.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_ResourceNotFoundException(dafny_input): output = {} if dafny_input.message.is_Some: - output["message"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.message.value - ).decode("utf-16-be") + output["message"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.message.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_TableAlreadyExistsException(dafny_input): output = {} if dafny_input.message.is_Some: - output["message"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.message.value - ).decode("utf-16-be") + output["message"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.message.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_TableInUseException(dafny_input): output = {} if dafny_input.message.is_Some: - output["message"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.message.value - ).decode("utf-16-be") + output["message"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.message.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_TableNotFoundException(dafny_input): output = {} if dafny_input.message.is_Some: - output["message"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.message.value - ).decode("utf-16-be") + output["message"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.message.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_CancellationReason(dafny_input): output = {} if dafny_input.Item.is_Some: - output["Item"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in dafny_input.Item.value.items - } + output["Item"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.Item.value.items } if dafny_input.Code.is_Some: - output["Code"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.Code.value - ).decode("utf-16-be") + output["Code"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.Code.value).decode('utf-16-be') if dafny_input.Message.is_Some: - output["Message"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.Message.value - ).decode("utf-16-be") + output["Message"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.Message.value).decode('utf-16-be') return output - -def com_amazonaws_dynamodb_AttributeValue(dafny_input): - # Convert AttributeValue - if isinstance(dafny_input, AttributeValue_S): - AttributeValue_union_value = { - "S": b"".join(ord(c).to_bytes(2, "big") for c in dafny_input.S).decode( - "utf-16-be" - ) - } - elif isinstance(dafny_input, AttributeValue_N): - AttributeValue_union_value = { - "N": b"".join(ord(c).to_bytes(2, "big") for c in dafny_input.N).decode( - "utf-16-be" - ) - } - elif isinstance(dafny_input, AttributeValue_B): - AttributeValue_union_value = {"B": bytes(dafny_input.B)} - elif isinstance(dafny_input, AttributeValue_SS): - AttributeValue_union_value = { - "SS": [ - b"".join(ord(c).to_bytes(2, "big") for c in list_element).decode( - "utf-16-be" - ) - for list_element in dafny_input.SS - ] - } - elif isinstance(dafny_input, AttributeValue_NS): - AttributeValue_union_value = { - "NS": [ - b"".join(ord(c).to_bytes(2, "big") for c in list_element).decode( - "utf-16-be" - ) - for list_element in dafny_input.NS - ] - } - elif isinstance(dafny_input, AttributeValue_BS): - AttributeValue_union_value = { - "BS": [bytes(list_element) for list_element in dafny_input.BS] - } - elif isinstance(dafny_input, AttributeValue_M): - AttributeValue_union_value = { - "M": { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in dafny_input.M.items - } - } - elif isinstance(dafny_input, AttributeValue_L): - AttributeValue_union_value = { - "L": [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - list_element - ) - for list_element in dafny_input.L - ] - } - elif isinstance(dafny_input, AttributeValue_NULL): - AttributeValue_union_value = {"NULL": dafny_input.NULL} - elif isinstance(dafny_input, AttributeValue_BOOL): - AttributeValue_union_value = {"BOOL": dafny_input.BOOL} - else: - raise ValueError("No recognized union value in union type: " + str(dafny_input)) - - return AttributeValue_union_value - - def com_amazonaws_dynamodb_TransactionCanceledException(dafny_input): output = {} if dafny_input.Message.is_Some: - output["Message"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.Message.value - ).decode("utf-16-be") + output["Message"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.Message.value).decode('utf-16-be') if dafny_input.CancellationReasons.is_Some: - output["CancellationReasons"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_CancellationReason( - list_element - ) - for list_element in dafny_input.CancellationReasons.value - ] + output["CancellationReasons"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_CancellationReason(list_element) for list_element in dafny_input.CancellationReasons.value] return output - def com_amazonaws_dynamodb_TransactionConflictException(dafny_input): output = {} if dafny_input.message.is_Some: - output["message"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.message.value - ).decode("utf-16-be") + output["message"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.message.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_TransactionInProgressException(dafny_input): output = {} if dafny_input.Message.is_Some: - output["Message"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.Message.value - ).decode("utf-16-be") + output["Message"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.Message.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_BatchStatementRequest(dafny_input): output = {} - output["Statement"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.Statement - ).decode("utf-16-be") + output["Statement"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.Statement).decode('utf-16-be') if dafny_input.Parameters.is_Some: - output["Parameters"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - list_element - ) - for list_element in dafny_input.Parameters.value - ] + output["Parameters"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(list_element) for list_element in dafny_input.Parameters.value] if dafny_input.ConsistentRead.is_Some: output["ConsistentRead"] = dafny_input.ConsistentRead.value + if dafny_input.ReturnValuesOnConditionCheckFailure.is_Some: + output["ReturnValuesOnConditionCheckFailure"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure(dafny_input.ReturnValuesOnConditionCheckFailure.value) + return output +def com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure(dafny_input): + # Convert ReturnValuesOnConditionCheckFailure + if isinstance(dafny_input, ReturnValuesOnConditionCheckFailure_ALL__OLD): + return "ALL_OLD" + + elif isinstance(dafny_input, ReturnValuesOnConditionCheckFailure_NONE): + return "NONE" + + else: + raise ValueError("No recognized enum value in enum type: " + dafny_input) def com_amazonaws_dynamodb_ReturnConsumedCapacity(dafny_input): # Convert ReturnConsumedCapacity @@ -611,77 +480,46 @@ def com_amazonaws_dynamodb_ReturnConsumedCapacity(dafny_input): else: raise ValueError("No recognized enum value in enum type: " + dafny_input) - def com_amazonaws_dynamodb_BatchExecuteStatementInput(dafny_input): output = {} - output["Statements"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BatchStatementRequest( - list_element - ) - for list_element in dafny_input.Statements - ] + output["Statements"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BatchStatementRequest(list_element) for list_element in dafny_input.Statements] if dafny_input.ReturnConsumedCapacity.is_Some: - output["ReturnConsumedCapacity"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnConsumedCapacity( - dafny_input.ReturnConsumedCapacity.value - ) - ) + output["ReturnConsumedCapacity"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnConsumedCapacity(dafny_input.ReturnConsumedCapacity.value) return output - def com_amazonaws_dynamodb_BatchStatementResponse(dafny_input): output = {} if dafny_input.Error.is_Some: - output["Error"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BatchStatementError( - dafny_input.Error.value - ) - ) + output["Error"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BatchStatementError(dafny_input.Error.value) if dafny_input.TableName.is_Some: - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName.value - ).decode("utf-16-be") + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName.value).decode('utf-16-be') if dafny_input.Item.is_Some: - output["Item"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in dafny_input.Item.value.items - } + output["Item"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.Item.value.items } return output - def com_amazonaws_dynamodb_BatchStatementError(dafny_input): output = {} if dafny_input.Code.is_Some: - output["Code"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BatchStatementErrorCodeEnum( - dafny_input.Code.value - ) - ) + output["Code"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BatchStatementErrorCodeEnum(dafny_input.Code.value) if dafny_input.Message.is_Some: - output["Message"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.Message.value - ).decode("utf-16-be") + output["Message"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.Message.value).decode('utf-16-be') - return output + if dafny_input.Item.is_Some: + output["Item"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.Item.value.items } + return output def com_amazonaws_dynamodb_BatchStatementErrorCodeEnum(dafny_input): # Convert BatchStatementErrorCodeEnum if isinstance(dafny_input, BatchStatementErrorCodeEnum_ConditionalCheckFailed): return "ConditionalCheckFailed" - elif isinstance( - dafny_input, BatchStatementErrorCodeEnum_ItemCollectionSizeLimitExceeded - ): + elif isinstance(dafny_input, BatchStatementErrorCodeEnum_ItemCollectionSizeLimitExceeded): return "ItemCollectionSizeLimitExceeded" elif isinstance(dafny_input, BatchStatementErrorCodeEnum_RequestLimitExceeded): @@ -690,9 +528,7 @@ def com_amazonaws_dynamodb_BatchStatementErrorCodeEnum(dafny_input): elif isinstance(dafny_input, BatchStatementErrorCodeEnum_ValidationError): return "ValidationError" - elif isinstance( - dafny_input, BatchStatementErrorCodeEnum_ProvisionedThroughputExceeded - ): + elif isinstance(dafny_input, BatchStatementErrorCodeEnum_ProvisionedThroughputExceeded): return "ProvisionedThroughputExceeded" elif isinstance(dafny_input, BatchStatementErrorCodeEnum_TransactionConflict): @@ -716,13 +552,10 @@ def com_amazonaws_dynamodb_BatchStatementErrorCodeEnum(dafny_input): else: raise ValueError("No recognized enum value in enum type: " + dafny_input) - def com_amazonaws_dynamodb_ConsumedCapacity(dafny_input): output = {} if dafny_input.TableName.is_Some: - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName.value - ).decode("utf-16-be") + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName.value).decode('utf-16-be') if dafny_input.CapacityUnits.is_Some: output["CapacityUnits"] = dafny_input.CapacityUnits.value @@ -734,35 +567,16 @@ def com_amazonaws_dynamodb_ConsumedCapacity(dafny_input): output["WriteCapacityUnits"] = dafny_input.WriteCapacityUnits.value if dafny_input.Table.is_Some: - output["Table"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Capacity( - dafny_input.Table.value - ) - ) + output["Table"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Capacity(dafny_input.Table.value) if dafny_input.LocalSecondaryIndexes.is_Some: - output["LocalSecondaryIndexes"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Capacity( - value - ) - for (key, value) in dafny_input.LocalSecondaryIndexes.value.items - } + output["LocalSecondaryIndexes"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Capacity(value) for (key, value) in dafny_input.LocalSecondaryIndexes.value.items } if dafny_input.GlobalSecondaryIndexes.is_Some: - output["GlobalSecondaryIndexes"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Capacity( - value - ) - for (key, value) in dafny_input.GlobalSecondaryIndexes.value.items - } + output["GlobalSecondaryIndexes"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Capacity(value) for (key, value) in dafny_input.GlobalSecondaryIndexes.value.items } return output - def com_amazonaws_dynamodb_Capacity(dafny_input): output = {} if dafny_input.ReadCapacityUnits.is_Some: @@ -776,172 +590,74 @@ def com_amazonaws_dynamodb_Capacity(dafny_input): return output - def com_amazonaws_dynamodb_BatchExecuteStatementOutput(dafny_input): output = {} if dafny_input.Responses.is_Some: - output["Responses"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BatchStatementResponse( - list_element - ) - for list_element in dafny_input.Responses.value - ] + output["Responses"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BatchStatementResponse(list_element) for list_element in dafny_input.Responses.value] if dafny_input.ConsumedCapacity.is_Some: - output["ConsumedCapacity"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConsumedCapacity( - list_element - ) - for list_element in dafny_input.ConsumedCapacity.value - ] + output["ConsumedCapacity"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConsumedCapacity(list_element) for list_element in dafny_input.ConsumedCapacity.value] return output - def com_amazonaws_dynamodb_KeysAndAttributes(dafny_input): output = {} - output["Keys"] = [ - { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in list_element.items - } - for list_element in dafny_input.Keys - ] + output["Keys"] = [{b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in list_element.items } for list_element in dafny_input.Keys] if dafny_input.AttributesToGet.is_Some: - output["AttributesToGet"] = [ - b"".join(ord(c).to_bytes(2, "big") for c in list_element).decode( - "utf-16-be" - ) - for list_element in dafny_input.AttributesToGet.value - ] + output["AttributesToGet"] = [b''.join(ord(c).to_bytes(2, 'big') for c in list_element).decode('utf-16-be') for list_element in dafny_input.AttributesToGet.value] if dafny_input.ConsistentRead.is_Some: output["ConsistentRead"] = dafny_input.ConsistentRead.value if dafny_input.ProjectionExpression.is_Some: - output["ProjectionExpression"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.ProjectionExpression.value - ).decode("utf-16-be") + output["ProjectionExpression"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ProjectionExpression.value).decode('utf-16-be') if dafny_input.ExpressionAttributeNames.is_Some: - output["ExpressionAttributeNames"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key) - .decode("utf-16-be"): b"".join(ord(c).to_bytes(2, "big") for c in value) - .decode("utf-16-be") - for (key, value) in dafny_input.ExpressionAttributeNames.value.items - } + output["ExpressionAttributeNames"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): b''.join(ord(c).to_bytes(2, 'big') for c in value).decode('utf-16-be') for (key, value) in dafny_input.ExpressionAttributeNames.value.items } return output - def com_amazonaws_dynamodb_BatchGetItemInput(dafny_input): output = {} - output["RequestItems"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_KeysAndAttributes( - value - ) - for (key, value) in dafny_input.RequestItems.items - } + output["RequestItems"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_KeysAndAttributes(value) for (key, value) in dafny_input.RequestItems.items } if dafny_input.ReturnConsumedCapacity.is_Some: - output["ReturnConsumedCapacity"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnConsumedCapacity( - dafny_input.ReturnConsumedCapacity.value - ) - ) + output["ReturnConsumedCapacity"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnConsumedCapacity(dafny_input.ReturnConsumedCapacity.value) return output - def com_amazonaws_dynamodb_BatchGetItemOutput(dafny_input): output = {} if dafny_input.Responses.is_Some: - output["Responses"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode("utf-16-be"): [ - { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in list_element.items - } - for list_element in value - ] - for (key, value) in dafny_input.Responses.value.items - } + output["Responses"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): [{b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in list_element.items } for list_element in value] for (key, value) in dafny_input.Responses.value.items } if dafny_input.UnprocessedKeys.is_Some: - output["UnprocessedKeys"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_KeysAndAttributes( - value - ) - for (key, value) in dafny_input.UnprocessedKeys.value.items - } + output["UnprocessedKeys"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_KeysAndAttributes(value) for (key, value) in dafny_input.UnprocessedKeys.value.items } if dafny_input.ConsumedCapacity.is_Some: - output["ConsumedCapacity"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConsumedCapacity( - list_element - ) - for list_element in dafny_input.ConsumedCapacity.value - ] + output["ConsumedCapacity"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConsumedCapacity(list_element) for list_element in dafny_input.ConsumedCapacity.value] return output - def com_amazonaws_dynamodb_WriteRequest(dafny_input): output = {} if dafny_input.PutRequest.is_Some: - output["PutRequest"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_PutRequest( - dafny_input.PutRequest.value - ) - ) + output["PutRequest"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_PutRequest(dafny_input.PutRequest.value) if dafny_input.DeleteRequest.is_Some: - output["DeleteRequest"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DeleteRequest( - dafny_input.DeleteRequest.value - ) - ) + output["DeleteRequest"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DeleteRequest(dafny_input.DeleteRequest.value) return output - def com_amazonaws_dynamodb_PutRequest(dafny_input): output = {} - output["Item"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in dafny_input.Item.items - } + output["Item"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.Item.items } return output - def com_amazonaws_dynamodb_DeleteRequest(dafny_input): output = {} - output["Key"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in dafny_input.Key.items - } + output["Key"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.Key.items } return output - def com_amazonaws_dynamodb_ReturnItemCollectionMetrics(dafny_input): # Convert ReturnItemCollectionMetrics if isinstance(dafny_input, ReturnItemCollectionMetrics_SIZE): @@ -953,133 +669,61 @@ def com_amazonaws_dynamodb_ReturnItemCollectionMetrics(dafny_input): else: raise ValueError("No recognized enum value in enum type: " + dafny_input) - def com_amazonaws_dynamodb_BatchWriteItemInput(dafny_input): output = {} - output["RequestItems"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode("utf-16-be"): [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_WriteRequest( - list_element - ) - for list_element in value - ] - for (key, value) in dafny_input.RequestItems.items - } + output["RequestItems"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_WriteRequest(list_element) for list_element in value] for (key, value) in dafny_input.RequestItems.items } if dafny_input.ReturnConsumedCapacity.is_Some: - output["ReturnConsumedCapacity"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnConsumedCapacity( - dafny_input.ReturnConsumedCapacity.value - ) - ) + output["ReturnConsumedCapacity"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnConsumedCapacity(dafny_input.ReturnConsumedCapacity.value) if dafny_input.ReturnItemCollectionMetrics.is_Some: - output["ReturnItemCollectionMetrics"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnItemCollectionMetrics( - dafny_input.ReturnItemCollectionMetrics.value - ) - ) + output["ReturnItemCollectionMetrics"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnItemCollectionMetrics(dafny_input.ReturnItemCollectionMetrics.value) return output - def com_amazonaws_dynamodb_ItemCollectionMetrics(dafny_input): output = {} if dafny_input.ItemCollectionKey.is_Some: - output["ItemCollectionKey"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in dafny_input.ItemCollectionKey.value.items - } + output["ItemCollectionKey"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.ItemCollectionKey.value.items } if dafny_input.SizeEstimateRangeGB.is_Some: - output["SizeEstimateRangeGB"] = [ - list_element for list_element in dafny_input.SizeEstimateRangeGB.value - ] + output["SizeEstimateRangeGB"] = [list_element for list_element in dafny_input.SizeEstimateRangeGB.value] return output - def com_amazonaws_dynamodb_BatchWriteItemOutput(dafny_input): output = {} if dafny_input.UnprocessedItems.is_Some: - output["UnprocessedItems"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode("utf-16-be"): [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_WriteRequest( - list_element - ) - for list_element in value - ] - for (key, value) in dafny_input.UnprocessedItems.value.items - } + output["UnprocessedItems"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_WriteRequest(list_element) for list_element in value] for (key, value) in dafny_input.UnprocessedItems.value.items } if dafny_input.ItemCollectionMetrics.is_Some: - output["ItemCollectionMetrics"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode("utf-16-be"): [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ItemCollectionMetrics( - list_element - ) - for list_element in value - ] - for (key, value) in dafny_input.ItemCollectionMetrics.value.items - } + output["ItemCollectionMetrics"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ItemCollectionMetrics(list_element) for list_element in value] for (key, value) in dafny_input.ItemCollectionMetrics.value.items } if dafny_input.ConsumedCapacity.is_Some: - output["ConsumedCapacity"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConsumedCapacity( - list_element - ) - for list_element in dafny_input.ConsumedCapacity.value - ] + output["ConsumedCapacity"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConsumedCapacity(list_element) for list_element in dafny_input.ConsumedCapacity.value] return output - def com_amazonaws_dynamodb_CreateBackupInput(dafny_input): output = {} - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName - ).decode("utf-16-be") - output["BackupName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.BackupName - ).decode("utf-16-be") + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName).decode('utf-16-be') + output["BackupName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.BackupName).decode('utf-16-be') return output - def com_amazonaws_dynamodb_BackupDetails(dafny_input): output = {} - output["BackupArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.BackupArn - ).decode("utf-16-be") - output["BackupName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.BackupName - ).decode("utf-16-be") + output["BackupArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.BackupArn).decode('utf-16-be') + output["BackupName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.BackupName).decode('utf-16-be') if dafny_input.BackupSizeBytes.is_Some: output["BackupSizeBytes"] = dafny_input.BackupSizeBytes.value - output["BackupStatus"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BackupStatus( - dafny_input.BackupStatus - ) - ) - output["BackupType"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BackupType( - dafny_input.BackupType - ) - ) - output["BackupCreationDateTime"] = datetime.fromisoformat( - dafny_input.BackupCreationDateTime.VerbatimString(False) - ) + output["BackupStatus"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BackupStatus(dafny_input.BackupStatus) + output["BackupType"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BackupType(dafny_input.BackupType) + output["BackupCreationDateTime"] = datetime.fromisoformat(dafny_input.BackupCreationDateTime.VerbatimString(False)) if dafny_input.BackupExpiryDateTime.is_Some: - output["BackupExpiryDateTime"] = datetime.fromisoformat( - dafny_input.BackupExpiryDateTime.value.VerbatimString(False) - ) + output["BackupExpiryDateTime"] = datetime.fromisoformat(dafny_input.BackupExpiryDateTime.value.VerbatimString(False)) return output - def com_amazonaws_dynamodb_BackupStatus(dafny_input): # Convert BackupStatus if isinstance(dafny_input, BackupStatus_CREATING): @@ -1094,7 +738,6 @@ def com_amazonaws_dynamodb_BackupStatus(dafny_input): else: raise ValueError("No recognized enum value in enum type: " + dafny_input) - def com_amazonaws_dynamodb_BackupType(dafny_input): # Convert BackupType if isinstance(dafny_input, BackupType_USER): @@ -1109,139 +752,79 @@ def com_amazonaws_dynamodb_BackupType(dafny_input): else: raise ValueError("No recognized enum value in enum type: " + dafny_input) - def com_amazonaws_dynamodb_CreateBackupOutput(dafny_input): output = {} if dafny_input.BackupDetails.is_Some: - output["BackupDetails"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BackupDetails( - dafny_input.BackupDetails.value - ) - ) + output["BackupDetails"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BackupDetails(dafny_input.BackupDetails.value) return output - def com_amazonaws_dynamodb_Replica(dafny_input): output = {} if dafny_input.RegionName.is_Some: - output["RegionName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.RegionName.value - ).decode("utf-16-be") + output["RegionName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.RegionName.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_CreateGlobalTableInput(dafny_input): output = {} - output["GlobalTableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.GlobalTableName - ).decode("utf-16-be") - output["ReplicationGroup"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Replica( - list_element - ) - for list_element in dafny_input.ReplicationGroup - ] + output["GlobalTableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.GlobalTableName).decode('utf-16-be') + output["ReplicationGroup"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Replica(list_element) for list_element in dafny_input.ReplicationGroup] return output - def com_amazonaws_dynamodb_GlobalTableDescription(dafny_input): output = {} if dafny_input.ReplicationGroup.is_Some: - output["ReplicationGroup"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaDescription( - list_element - ) - for list_element in dafny_input.ReplicationGroup.value - ] + output["ReplicationGroup"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaDescription(list_element) for list_element in dafny_input.ReplicationGroup.value] if dafny_input.GlobalTableArn.is_Some: - output["GlobalTableArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.GlobalTableArn.value - ).decode("utf-16-be") + output["GlobalTableArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.GlobalTableArn.value).decode('utf-16-be') if dafny_input.CreationDateTime.is_Some: - output["CreationDateTime"] = datetime.fromisoformat( - dafny_input.CreationDateTime.value.VerbatimString(False) - ) + output["CreationDateTime"] = datetime.fromisoformat(dafny_input.CreationDateTime.value.VerbatimString(False)) if dafny_input.GlobalTableStatus.is_Some: - output["GlobalTableStatus"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_GlobalTableStatus( - dafny_input.GlobalTableStatus.value - ) - ) + output["GlobalTableStatus"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_GlobalTableStatus(dafny_input.GlobalTableStatus.value) if dafny_input.GlobalTableName.is_Some: - output["GlobalTableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.GlobalTableName.value - ).decode("utf-16-be") + output["GlobalTableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.GlobalTableName.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_ReplicaDescription(dafny_input): output = {} if dafny_input.RegionName.is_Some: - output["RegionName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.RegionName.value - ).decode("utf-16-be") + output["RegionName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.RegionName.value).decode('utf-16-be') if dafny_input.ReplicaStatus.is_Some: - output["ReplicaStatus"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaStatus( - dafny_input.ReplicaStatus.value - ) - ) + output["ReplicaStatus"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaStatus(dafny_input.ReplicaStatus.value) if dafny_input.ReplicaStatusDescription.is_Some: - output["ReplicaStatusDescription"] = b"".join( - ord(c).to_bytes(2, "big") - for c in dafny_input.ReplicaStatusDescription.value - ).decode("utf-16-be") + output["ReplicaStatusDescription"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ReplicaStatusDescription.value).decode('utf-16-be') if dafny_input.ReplicaStatusPercentProgress.is_Some: - output["ReplicaStatusPercentProgress"] = b"".join( - ord(c).to_bytes(2, "big") - for c in dafny_input.ReplicaStatusPercentProgress.value - ).decode("utf-16-be") + output["ReplicaStatusPercentProgress"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ReplicaStatusPercentProgress.value).decode('utf-16-be') if dafny_input.KMSMasterKeyId.is_Some: - output["KMSMasterKeyId"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.KMSMasterKeyId.value - ).decode("utf-16-be") + output["KMSMasterKeyId"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.KMSMasterKeyId.value).decode('utf-16-be') if dafny_input.ProvisionedThroughputOverride.is_Some: - output["ProvisionedThroughputOverride"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProvisionedThroughputOverride( - dafny_input.ProvisionedThroughputOverride.value - ) - ) + output["ProvisionedThroughputOverride"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProvisionedThroughputOverride(dafny_input.ProvisionedThroughputOverride.value) + + if dafny_input.OnDemandThroughputOverride.is_Some: + output["OnDemandThroughputOverride"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_OnDemandThroughputOverride(dafny_input.OnDemandThroughputOverride.value) if dafny_input.GlobalSecondaryIndexes.is_Some: - output["GlobalSecondaryIndexes"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexDescription( - list_element - ) - for list_element in dafny_input.GlobalSecondaryIndexes.value - ] + output["GlobalSecondaryIndexes"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexDescription(list_element) for list_element in dafny_input.GlobalSecondaryIndexes.value] if dafny_input.ReplicaInaccessibleDateTime.is_Some: - output["ReplicaInaccessibleDateTime"] = datetime.fromisoformat( - dafny_input.ReplicaInaccessibleDateTime.value.VerbatimString(False) - ) + output["ReplicaInaccessibleDateTime"] = datetime.fromisoformat(dafny_input.ReplicaInaccessibleDateTime.value.VerbatimString(False)) if dafny_input.ReplicaTableClassSummary.is_Some: - output["ReplicaTableClassSummary"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableClassSummary( - dafny_input.ReplicaTableClassSummary.value - ) - ) + output["ReplicaTableClassSummary"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableClassSummary(dafny_input.ReplicaTableClassSummary.value) return output - def com_amazonaws_dynamodb_GlobalTableStatus(dafny_input): # Convert GlobalTableStatus if isinstance(dafny_input, GlobalTableStatus_CREATING): @@ -1259,7 +842,6 @@ def com_amazonaws_dynamodb_GlobalTableStatus(dafny_input): else: raise ValueError("No recognized enum value in enum type: " + dafny_input) - def com_amazonaws_dynamodb_ReplicaStatus(dafny_input): # Convert ReplicaStatus if isinstance(dafny_input, ReplicaStatus_CREATING): @@ -1286,7 +868,6 @@ def com_amazonaws_dynamodb_ReplicaStatus(dafny_input): else: raise ValueError("No recognized enum value in enum type: " + dafny_input) - def com_amazonaws_dynamodb_ProvisionedThroughputOverride(dafny_input): output = {} if dafny_input.ReadCapacityUnits.is_Some: @@ -1294,41 +875,36 @@ def com_amazonaws_dynamodb_ProvisionedThroughputOverride(dafny_input): return output +def com_amazonaws_dynamodb_OnDemandThroughputOverride(dafny_input): + output = {} + if dafny_input.MaxReadRequestUnits.is_Some: + output["MaxReadRequestUnits"] = dafny_input.MaxReadRequestUnits.value + + return output def com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexDescription(dafny_input): output = {} if dafny_input.IndexName.is_Some: - output["IndexName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.IndexName.value - ).decode("utf-16-be") + output["IndexName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.IndexName.value).decode('utf-16-be') if dafny_input.ProvisionedThroughputOverride.is_Some: - output["ProvisionedThroughputOverride"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProvisionedThroughputOverride( - dafny_input.ProvisionedThroughputOverride.value - ) - ) + output["ProvisionedThroughputOverride"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProvisionedThroughputOverride(dafny_input.ProvisionedThroughputOverride.value) - return output + if dafny_input.OnDemandThroughputOverride.is_Some: + output["OnDemandThroughputOverride"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_OnDemandThroughputOverride(dafny_input.OnDemandThroughputOverride.value) + return output def com_amazonaws_dynamodb_TableClassSummary(dafny_input): output = {} if dafny_input.TableClass.is_Some: - output["TableClass"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableClass( - dafny_input.TableClass.value - ) - ) + output["TableClass"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableClass(dafny_input.TableClass.value) if dafny_input.LastUpdateDateTime.is_Some: - output["LastUpdateDateTime"] = datetime.fromisoformat( - dafny_input.LastUpdateDateTime.value.VerbatimString(False) - ) + output["LastUpdateDateTime"] = datetime.fromisoformat(dafny_input.LastUpdateDateTime.value.VerbatimString(False)) return output - def com_amazonaws_dynamodb_TableClass(dafny_input): # Convert TableClass if isinstance(dafny_input, TableClass_STANDARD): @@ -1340,32 +916,19 @@ def com_amazonaws_dynamodb_TableClass(dafny_input): else: raise ValueError("No recognized enum value in enum type: " + dafny_input) - def com_amazonaws_dynamodb_CreateGlobalTableOutput(dafny_input): output = {} if dafny_input.GlobalTableDescription.is_Some: - output["GlobalTableDescription"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_GlobalTableDescription( - dafny_input.GlobalTableDescription.value - ) - ) + output["GlobalTableDescription"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_GlobalTableDescription(dafny_input.GlobalTableDescription.value) return output - def com_amazonaws_dynamodb_AttributeDefinition(dafny_input): output = {} - output["AttributeName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.AttributeName - ).decode("utf-16-be") - output["AttributeType"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ScalarAttributeType( - dafny_input.AttributeType - ) - ) + output["AttributeName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.AttributeName).decode('utf-16-be') + output["AttributeType"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ScalarAttributeType(dafny_input.AttributeType) return output - def com_amazonaws_dynamodb_ScalarAttributeType(dafny_input): # Convert ScalarAttributeType if isinstance(dafny_input, ScalarAttributeType_S): @@ -1380,20 +943,12 @@ def com_amazonaws_dynamodb_ScalarAttributeType(dafny_input): else: raise ValueError("No recognized enum value in enum type: " + dafny_input) - def com_amazonaws_dynamodb_KeySchemaElement(dafny_input): output = {} - output["AttributeName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.AttributeName - ).decode("utf-16-be") - output["KeyType"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_KeyType( - dafny_input.KeyType - ) - ) + output["AttributeName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.AttributeName).decode('utf-16-be') + output["KeyType"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_KeyType(dafny_input.KeyType) return output - def com_amazonaws_dynamodb_KeyType(dafny_input): # Convert KeyType if isinstance(dafny_input, KeyType_HASH): @@ -1405,46 +960,23 @@ def com_amazonaws_dynamodb_KeyType(dafny_input): else: raise ValueError("No recognized enum value in enum type: " + dafny_input) - def com_amazonaws_dynamodb_LocalSecondaryIndex(dafny_input): output = {} - output["IndexName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.IndexName - ).decode("utf-16-be") - output["KeySchema"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_KeySchemaElement( - list_element - ) - for list_element in dafny_input.KeySchema - ] - output["Projection"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Projection( - dafny_input.Projection - ) - ) + output["IndexName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.IndexName).decode('utf-16-be') + output["KeySchema"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_KeySchemaElement(list_element) for list_element in dafny_input.KeySchema] + output["Projection"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Projection(dafny_input.Projection) return output - def com_amazonaws_dynamodb_Projection(dafny_input): output = {} if dafny_input.ProjectionType.is_Some: - output["ProjectionType"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProjectionType( - dafny_input.ProjectionType.value - ) - ) + output["ProjectionType"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProjectionType(dafny_input.ProjectionType.value) if dafny_input.NonKeyAttributes.is_Some: - output["NonKeyAttributes"] = [ - b"".join(ord(c).to_bytes(2, "big") for c in list_element).decode( - "utf-16-be" - ) - for list_element in dafny_input.NonKeyAttributes.value - ] + output["NonKeyAttributes"] = [b''.join(ord(c).to_bytes(2, 'big') for c in list_element).decode('utf-16-be') for list_element in dafny_input.NonKeyAttributes.value] return output - def com_amazonaws_dynamodb_ProjectionType(dafny_input): # Convert ProjectionType if isinstance(dafny_input, ProjectionType_ALL): @@ -1459,32 +991,18 @@ def com_amazonaws_dynamodb_ProjectionType(dafny_input): else: raise ValueError("No recognized enum value in enum type: " + dafny_input) - def com_amazonaws_dynamodb_GlobalSecondaryIndex(dafny_input): output = {} - output["IndexName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.IndexName - ).decode("utf-16-be") - output["KeySchema"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_KeySchemaElement( - list_element - ) - for list_element in dafny_input.KeySchema - ] - output["Projection"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Projection( - dafny_input.Projection - ) - ) + output["IndexName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.IndexName).decode('utf-16-be') + output["KeySchema"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_KeySchemaElement(list_element) for list_element in dafny_input.KeySchema] + output["Projection"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Projection(dafny_input.Projection) if dafny_input.ProvisionedThroughput.is_Some: - output["ProvisionedThroughput"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProvisionedThroughput( - dafny_input.ProvisionedThroughput.value - ) - ) + output["ProvisionedThroughput"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProvisionedThroughput(dafny_input.ProvisionedThroughput.value) - return output + if dafny_input.OnDemandThroughput.is_Some: + output["OnDemandThroughput"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_OnDemandThroughput(dafny_input.OnDemandThroughput.value) + return output def com_amazonaws_dynamodb_ProvisionedThroughput(dafny_input): output = {} @@ -1492,6 +1010,15 @@ def com_amazonaws_dynamodb_ProvisionedThroughput(dafny_input): output["WriteCapacityUnits"] = dafny_input.WriteCapacityUnits return output +def com_amazonaws_dynamodb_OnDemandThroughput(dafny_input): + output = {} + if dafny_input.MaxReadRequestUnits.is_Some: + output["MaxReadRequestUnits"] = dafny_input.MaxReadRequestUnits.value + + if dafny_input.MaxWriteRequestUnits.is_Some: + output["MaxWriteRequestUnits"] = dafny_input.MaxWriteRequestUnits.value + + return output def com_amazonaws_dynamodb_BillingMode(dafny_input): # Convert BillingMode @@ -1504,20 +1031,14 @@ def com_amazonaws_dynamodb_BillingMode(dafny_input): else: raise ValueError("No recognized enum value in enum type: " + dafny_input) - def com_amazonaws_dynamodb_StreamSpecification(dafny_input): output = {} output["StreamEnabled"] = dafny_input.StreamEnabled if dafny_input.StreamViewType.is_Some: - output["StreamViewType"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_StreamViewType( - dafny_input.StreamViewType.value - ) - ) + output["StreamViewType"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_StreamViewType(dafny_input.StreamViewType.value) return output - def com_amazonaws_dynamodb_StreamViewType(dafny_input): # Convert StreamViewType if isinstance(dafny_input, StreamViewType_NEW__IMAGE): @@ -1535,27 +1056,19 @@ def com_amazonaws_dynamodb_StreamViewType(dafny_input): else: raise ValueError("No recognized enum value in enum type: " + dafny_input) - def com_amazonaws_dynamodb_SSESpecification(dafny_input): output = {} if dafny_input.Enabled.is_Some: output["Enabled"] = dafny_input.Enabled.value if dafny_input.SSEType.is_Some: - output["SSEType"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_SSEType( - dafny_input.SSEType.value - ) - ) + output["SSEType"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_SSEType(dafny_input.SSEType.value) if dafny_input.KMSMasterKeyId.is_Some: - output["KMSMasterKeyId"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.KMSMasterKeyId.value - ).decode("utf-16-be") + output["KMSMasterKeyId"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.KMSMasterKeyId.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_SSEType(dafny_input): # Convert SSEType if isinstance(dafny_input, SSEType_AES256): @@ -1567,138 +1080,71 @@ def com_amazonaws_dynamodb_SSEType(dafny_input): else: raise ValueError("No recognized enum value in enum type: " + dafny_input) - def com_amazonaws_dynamodb_Tag(dafny_input): output = {} - output["Key"] = b"".join(ord(c).to_bytes(2, "big") for c in dafny_input.Key).decode( - "utf-16-be" - ) - output["Value"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.Value - ).decode("utf-16-be") + output["Key"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.Key).decode('utf-16-be') + output["Value"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.Value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_CreateTableInput(dafny_input): output = {} - output["AttributeDefinitions"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeDefinition( - list_element - ) - for list_element in dafny_input.AttributeDefinitions - ] - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName - ).decode("utf-16-be") - output["KeySchema"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_KeySchemaElement( - list_element - ) - for list_element in dafny_input.KeySchema - ] + output["AttributeDefinitions"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeDefinition(list_element) for list_element in dafny_input.AttributeDefinitions] + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName).decode('utf-16-be') + output["KeySchema"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_KeySchemaElement(list_element) for list_element in dafny_input.KeySchema] if dafny_input.LocalSecondaryIndexes.is_Some: - output["LocalSecondaryIndexes"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_LocalSecondaryIndex( - list_element - ) - for list_element in dafny_input.LocalSecondaryIndexes.value - ] + output["LocalSecondaryIndexes"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_LocalSecondaryIndex(list_element) for list_element in dafny_input.LocalSecondaryIndexes.value] if dafny_input.GlobalSecondaryIndexes.is_Some: - output["GlobalSecondaryIndexes"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_GlobalSecondaryIndex( - list_element - ) - for list_element in dafny_input.GlobalSecondaryIndexes.value - ] + output["GlobalSecondaryIndexes"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_GlobalSecondaryIndex(list_element) for list_element in dafny_input.GlobalSecondaryIndexes.value] if dafny_input.BillingMode.is_Some: - output["BillingMode"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BillingMode( - dafny_input.BillingMode.value - ) - ) + output["BillingMode"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BillingMode(dafny_input.BillingMode.value) if dafny_input.ProvisionedThroughput.is_Some: - output["ProvisionedThroughput"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProvisionedThroughput( - dafny_input.ProvisionedThroughput.value - ) - ) + output["ProvisionedThroughput"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProvisionedThroughput(dafny_input.ProvisionedThroughput.value) if dafny_input.StreamSpecification.is_Some: - output["StreamSpecification"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_StreamSpecification( - dafny_input.StreamSpecification.value - ) - ) + output["StreamSpecification"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_StreamSpecification(dafny_input.StreamSpecification.value) if dafny_input.SSESpecification.is_Some: - output["SSESpecification"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_SSESpecification( - dafny_input.SSESpecification.value - ) - ) + output["SSESpecification"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_SSESpecification(dafny_input.SSESpecification.value) if dafny_input.Tags.is_Some: - output["Tags"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Tag( - list_element - ) - for list_element in dafny_input.Tags.value - ] + output["Tags"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Tag(list_element) for list_element in dafny_input.Tags.value] if dafny_input.TableClass.is_Some: - output["TableClass"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableClass( - dafny_input.TableClass.value - ) - ) + output["TableClass"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableClass(dafny_input.TableClass.value) - return output + if dafny_input.DeletionProtectionEnabled.is_Some: + output["DeletionProtectionEnabled"] = dafny_input.DeletionProtectionEnabled.value + if dafny_input.ResourcePolicy.is_Some: + output["ResourcePolicy"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ResourcePolicy.value).decode('utf-16-be') + + if dafny_input.OnDemandThroughput.is_Some: + output["OnDemandThroughput"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_OnDemandThroughput(dafny_input.OnDemandThroughput.value) + + return output def com_amazonaws_dynamodb_TableDescription(dafny_input): output = {} if dafny_input.AttributeDefinitions.is_Some: - output["AttributeDefinitions"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeDefinition( - list_element - ) - for list_element in dafny_input.AttributeDefinitions.value - ] + output["AttributeDefinitions"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeDefinition(list_element) for list_element in dafny_input.AttributeDefinitions.value] if dafny_input.TableName.is_Some: - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName.value - ).decode("utf-16-be") + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName.value).decode('utf-16-be') if dafny_input.KeySchema.is_Some: - output["KeySchema"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_KeySchemaElement( - list_element - ) - for list_element in dafny_input.KeySchema.value - ] + output["KeySchema"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_KeySchemaElement(list_element) for list_element in dafny_input.KeySchema.value] if dafny_input.TableStatus.is_Some: - output["TableStatus"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableStatus( - dafny_input.TableStatus.value - ) - ) + output["TableStatus"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableStatus(dafny_input.TableStatus.value) if dafny_input.CreationDateTime.is_Some: - output["CreationDateTime"] = datetime.fromisoformat( - dafny_input.CreationDateTime.value.VerbatimString(False) - ) + output["CreationDateTime"] = datetime.fromisoformat(dafny_input.CreationDateTime.value.VerbatimString(False)) if dafny_input.ProvisionedThroughput.is_Some: - output["ProvisionedThroughput"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProvisionedThroughputDescription( - dafny_input.ProvisionedThroughput.value - ) - ) + output["ProvisionedThroughput"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProvisionedThroughputDescription(dafny_input.ProvisionedThroughput.value) if dafny_input.TableSizeBytes.is_Some: output["TableSizeBytes"] = dafny_input.TableSizeBytes.value @@ -1707,98 +1153,54 @@ def com_amazonaws_dynamodb_TableDescription(dafny_input): output["ItemCount"] = dafny_input.ItemCount.value if dafny_input.TableArn.is_Some: - output["TableArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableArn.value - ).decode("utf-16-be") + output["TableArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableArn.value).decode('utf-16-be') if dafny_input.TableId.is_Some: - output["TableId"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableId.value - ).decode("utf-16-be") + output["TableId"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableId.value).decode('utf-16-be') if dafny_input.BillingModeSummary.is_Some: - output["BillingModeSummary"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BillingModeSummary( - dafny_input.BillingModeSummary.value - ) - ) + output["BillingModeSummary"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BillingModeSummary(dafny_input.BillingModeSummary.value) if dafny_input.LocalSecondaryIndexes.is_Some: - output["LocalSecondaryIndexes"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_LocalSecondaryIndexDescription( - list_element - ) - for list_element in dafny_input.LocalSecondaryIndexes.value - ] + output["LocalSecondaryIndexes"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_LocalSecondaryIndexDescription(list_element) for list_element in dafny_input.LocalSecondaryIndexes.value] if dafny_input.GlobalSecondaryIndexes.is_Some: - output["GlobalSecondaryIndexes"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_GlobalSecondaryIndexDescription( - list_element - ) - for list_element in dafny_input.GlobalSecondaryIndexes.value - ] + output["GlobalSecondaryIndexes"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_GlobalSecondaryIndexDescription(list_element) for list_element in dafny_input.GlobalSecondaryIndexes.value] if dafny_input.StreamSpecification.is_Some: - output["StreamSpecification"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_StreamSpecification( - dafny_input.StreamSpecification.value - ) - ) + output["StreamSpecification"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_StreamSpecification(dafny_input.StreamSpecification.value) if dafny_input.LatestStreamLabel.is_Some: - output["LatestStreamLabel"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.LatestStreamLabel.value - ).decode("utf-16-be") + output["LatestStreamLabel"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.LatestStreamLabel.value).decode('utf-16-be') if dafny_input.LatestStreamArn.is_Some: - output["LatestStreamArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.LatestStreamArn.value - ).decode("utf-16-be") + output["LatestStreamArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.LatestStreamArn.value).decode('utf-16-be') if dafny_input.GlobalTableVersion.is_Some: - output["GlobalTableVersion"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.GlobalTableVersion.value - ).decode("utf-16-be") + output["GlobalTableVersion"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.GlobalTableVersion.value).decode('utf-16-be') if dafny_input.Replicas.is_Some: - output["Replicas"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaDescription( - list_element - ) - for list_element in dafny_input.Replicas.value - ] + output["Replicas"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaDescription(list_element) for list_element in dafny_input.Replicas.value] if dafny_input.RestoreSummary.is_Some: - output["RestoreSummary"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_RestoreSummary( - dafny_input.RestoreSummary.value - ) - ) + output["RestoreSummary"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_RestoreSummary(dafny_input.RestoreSummary.value) if dafny_input.SSEDescription.is_Some: - output["SSEDescription"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_SSEDescription( - dafny_input.SSEDescription.value - ) - ) + output["SSEDescription"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_SSEDescription(dafny_input.SSEDescription.value) if dafny_input.ArchivalSummary.is_Some: - output["ArchivalSummary"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ArchivalSummary( - dafny_input.ArchivalSummary.value - ) - ) + output["ArchivalSummary"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ArchivalSummary(dafny_input.ArchivalSummary.value) if dafny_input.TableClassSummary.is_Some: - output["TableClassSummary"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableClassSummary( - dafny_input.TableClassSummary.value - ) - ) + output["TableClassSummary"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableClassSummary(dafny_input.TableClassSummary.value) - return output + if dafny_input.DeletionProtectionEnabled.is_Some: + output["DeletionProtectionEnabled"] = dafny_input.DeletionProtectionEnabled.value + + if dafny_input.OnDemandThroughput.is_Some: + output["OnDemandThroughput"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_OnDemandThroughput(dafny_input.OnDemandThroughput.value) + return output def com_amazonaws_dynamodb_TableStatus(dafny_input): # Convert TableStatus @@ -1826,18 +1228,13 @@ def com_amazonaws_dynamodb_TableStatus(dafny_input): else: raise ValueError("No recognized enum value in enum type: " + dafny_input) - def com_amazonaws_dynamodb_ProvisionedThroughputDescription(dafny_input): output = {} if dafny_input.LastIncreaseDateTime.is_Some: - output["LastIncreaseDateTime"] = datetime.fromisoformat( - dafny_input.LastIncreaseDateTime.value.VerbatimString(False) - ) + output["LastIncreaseDateTime"] = datetime.fromisoformat(dafny_input.LastIncreaseDateTime.value.VerbatimString(False)) if dafny_input.LastDecreaseDateTime.is_Some: - output["LastDecreaseDateTime"] = datetime.fromisoformat( - dafny_input.LastDecreaseDateTime.value.VerbatimString(False) - ) + output["LastDecreaseDateTime"] = datetime.fromisoformat(dafny_input.LastDecreaseDateTime.value.VerbatimString(False)) if dafny_input.NumberOfDecreasesToday.is_Some: output["NumberOfDecreasesToday"] = dafny_input.NumberOfDecreasesToday.value @@ -1850,45 +1247,26 @@ def com_amazonaws_dynamodb_ProvisionedThroughputDescription(dafny_input): return output - def com_amazonaws_dynamodb_BillingModeSummary(dafny_input): output = {} if dafny_input.BillingMode.is_Some: - output["BillingMode"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BillingMode( - dafny_input.BillingMode.value - ) - ) + output["BillingMode"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BillingMode(dafny_input.BillingMode.value) if dafny_input.LastUpdateToPayPerRequestDateTime.is_Some: - output["LastUpdateToPayPerRequestDateTime"] = datetime.fromisoformat( - dafny_input.LastUpdateToPayPerRequestDateTime.value.VerbatimString(False) - ) + output["LastUpdateToPayPerRequestDateTime"] = datetime.fromisoformat(dafny_input.LastUpdateToPayPerRequestDateTime.value.VerbatimString(False)) return output - def com_amazonaws_dynamodb_LocalSecondaryIndexDescription(dafny_input): output = {} if dafny_input.IndexName.is_Some: - output["IndexName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.IndexName.value - ).decode("utf-16-be") + output["IndexName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.IndexName.value).decode('utf-16-be') if dafny_input.KeySchema.is_Some: - output["KeySchema"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_KeySchemaElement( - list_element - ) - for list_element in dafny_input.KeySchema.value - ] + output["KeySchema"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_KeySchemaElement(list_element) for list_element in dafny_input.KeySchema.value] if dafny_input.Projection.is_Some: - output["Projection"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Projection( - dafny_input.Projection.value - ) - ) + output["Projection"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Projection(dafny_input.Projection.value) if dafny_input.IndexSizeBytes.is_Some: output["IndexSizeBytes"] = dafny_input.IndexSizeBytes.value @@ -1897,51 +1275,29 @@ def com_amazonaws_dynamodb_LocalSecondaryIndexDescription(dafny_input): output["ItemCount"] = dafny_input.ItemCount.value if dafny_input.IndexArn.is_Some: - output["IndexArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.IndexArn.value - ).decode("utf-16-be") + output["IndexArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.IndexArn.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_GlobalSecondaryIndexDescription(dafny_input): output = {} if dafny_input.IndexName.is_Some: - output["IndexName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.IndexName.value - ).decode("utf-16-be") + output["IndexName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.IndexName.value).decode('utf-16-be') if dafny_input.KeySchema.is_Some: - output["KeySchema"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_KeySchemaElement( - list_element - ) - for list_element in dafny_input.KeySchema.value - ] + output["KeySchema"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_KeySchemaElement(list_element) for list_element in dafny_input.KeySchema.value] if dafny_input.Projection.is_Some: - output["Projection"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Projection( - dafny_input.Projection.value - ) - ) + output["Projection"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Projection(dafny_input.Projection.value) if dafny_input.IndexStatus.is_Some: - output["IndexStatus"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_IndexStatus( - dafny_input.IndexStatus.value - ) - ) + output["IndexStatus"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_IndexStatus(dafny_input.IndexStatus.value) if dafny_input.Backfilling.is_Some: output["Backfilling"] = dafny_input.Backfilling.value if dafny_input.ProvisionedThroughput.is_Some: - output["ProvisionedThroughput"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProvisionedThroughputDescription( - dafny_input.ProvisionedThroughput.value - ) - ) + output["ProvisionedThroughput"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProvisionedThroughputDescription(dafny_input.ProvisionedThroughput.value) if dafny_input.IndexSizeBytes.is_Some: output["IndexSizeBytes"] = dafny_input.IndexSizeBytes.value @@ -1950,81 +1306,54 @@ def com_amazonaws_dynamodb_GlobalSecondaryIndexDescription(dafny_input): output["ItemCount"] = dafny_input.ItemCount.value if dafny_input.IndexArn.is_Some: - output["IndexArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.IndexArn.value - ).decode("utf-16-be") + output["IndexArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.IndexArn.value).decode('utf-16-be') - return output + if dafny_input.OnDemandThroughput.is_Some: + output["OnDemandThroughput"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_OnDemandThroughput(dafny_input.OnDemandThroughput.value) + return output def com_amazonaws_dynamodb_RestoreSummary(dafny_input): output = {} if dafny_input.SourceBackupArn.is_Some: - output["SourceBackupArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.SourceBackupArn.value - ).decode("utf-16-be") + output["SourceBackupArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.SourceBackupArn.value).decode('utf-16-be') if dafny_input.SourceTableArn.is_Some: - output["SourceTableArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.SourceTableArn.value - ).decode("utf-16-be") + output["SourceTableArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.SourceTableArn.value).decode('utf-16-be') - output["RestoreDateTime"] = datetime.fromisoformat( - dafny_input.RestoreDateTime.VerbatimString(False) - ) + output["RestoreDateTime"] = datetime.fromisoformat(dafny_input.RestoreDateTime.VerbatimString(False)) output["RestoreInProgress"] = dafny_input.RestoreInProgress return output - def com_amazonaws_dynamodb_SSEDescription(dafny_input): output = {} if dafny_input.Status.is_Some: - output["Status"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_SSEStatus( - dafny_input.Status.value - ) - ) + output["Status"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_SSEStatus(dafny_input.Status.value) if dafny_input.SSEType.is_Some: - output["SSEType"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_SSEType( - dafny_input.SSEType.value - ) - ) + output["SSEType"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_SSEType(dafny_input.SSEType.value) if dafny_input.KMSMasterKeyArn.is_Some: - output["KMSMasterKeyArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.KMSMasterKeyArn.value - ).decode("utf-16-be") + output["KMSMasterKeyArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.KMSMasterKeyArn.value).decode('utf-16-be') if dafny_input.InaccessibleEncryptionDateTime.is_Some: - output["InaccessibleEncryptionDateTime"] = datetime.fromisoformat( - dafny_input.InaccessibleEncryptionDateTime.value.VerbatimString(False) - ) + output["InaccessibleEncryptionDateTime"] = datetime.fromisoformat(dafny_input.InaccessibleEncryptionDateTime.value.VerbatimString(False)) return output - def com_amazonaws_dynamodb_ArchivalSummary(dafny_input): output = {} if dafny_input.ArchivalDateTime.is_Some: - output["ArchivalDateTime"] = datetime.fromisoformat( - dafny_input.ArchivalDateTime.value.VerbatimString(False) - ) + output["ArchivalDateTime"] = datetime.fromisoformat(dafny_input.ArchivalDateTime.value.VerbatimString(False)) if dafny_input.ArchivalReason.is_Some: - output["ArchivalReason"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.ArchivalReason.value - ).decode("utf-16-be") + output["ArchivalReason"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ArchivalReason.value).decode('utf-16-be') if dafny_input.ArchivalBackupArn.is_Some: - output["ArchivalBackupArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.ArchivalBackupArn.value - ).decode("utf-16-be") + output["ArchivalBackupArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ArchivalBackupArn.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_IndexStatus(dafny_input): # Convert IndexStatus if isinstance(dafny_input, IndexStatus_CREATING): @@ -2042,7 +1371,6 @@ def com_amazonaws_dynamodb_IndexStatus(dafny_input): else: raise ValueError("No recognized enum value in enum type: " + dafny_input) - def com_amazonaws_dynamodb_SSEStatus(dafny_input): # Convert SSEStatus if isinstance(dafny_input, SSEStatus_ENABLING): @@ -2063,212 +1391,116 @@ def com_amazonaws_dynamodb_SSEStatus(dafny_input): else: raise ValueError("No recognized enum value in enum type: " + dafny_input) - def com_amazonaws_dynamodb_CreateTableOutput(dafny_input): output = {} if dafny_input.TableDescription.is_Some: - output["TableDescription"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableDescription( - dafny_input.TableDescription.value - ) - ) + output["TableDescription"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableDescription(dafny_input.TableDescription.value) return output - def com_amazonaws_dynamodb_DeleteBackupInput(dafny_input): output = {} - output["BackupArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.BackupArn - ).decode("utf-16-be") + output["BackupArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.BackupArn).decode('utf-16-be') return output - def com_amazonaws_dynamodb_BackupDescription(dafny_input): output = {} if dafny_input.BackupDetails.is_Some: - output["BackupDetails"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BackupDetails( - dafny_input.BackupDetails.value - ) - ) + output["BackupDetails"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BackupDetails(dafny_input.BackupDetails.value) if dafny_input.SourceTableDetails.is_Some: - output["SourceTableDetails"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_SourceTableDetails( - dafny_input.SourceTableDetails.value - ) - ) + output["SourceTableDetails"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_SourceTableDetails(dafny_input.SourceTableDetails.value) if dafny_input.SourceTableFeatureDetails.is_Some: - output["SourceTableFeatureDetails"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_SourceTableFeatureDetails( - dafny_input.SourceTableFeatureDetails.value - ) - ) + output["SourceTableFeatureDetails"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_SourceTableFeatureDetails(dafny_input.SourceTableFeatureDetails.value) return output - def com_amazonaws_dynamodb_SourceTableDetails(dafny_input): output = {} - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName - ).decode("utf-16-be") - output["TableId"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableId - ).decode("utf-16-be") + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName).decode('utf-16-be') + output["TableId"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableId).decode('utf-16-be') if dafny_input.TableArn.is_Some: - output["TableArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableArn.value - ).decode("utf-16-be") + output["TableArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableArn.value).decode('utf-16-be') if dafny_input.TableSizeBytes.is_Some: output["TableSizeBytes"] = dafny_input.TableSizeBytes.value - output["KeySchema"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_KeySchemaElement( - list_element - ) - for list_element in dafny_input.KeySchema - ] - output["TableCreationDateTime"] = datetime.fromisoformat( - dafny_input.TableCreationDateTime.VerbatimString(False) - ) - output["ProvisionedThroughput"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProvisionedThroughput( - dafny_input.ProvisionedThroughput - ) - ) + output["KeySchema"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_KeySchemaElement(list_element) for list_element in dafny_input.KeySchema] + output["TableCreationDateTime"] = datetime.fromisoformat(dafny_input.TableCreationDateTime.VerbatimString(False)) + output["ProvisionedThroughput"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProvisionedThroughput(dafny_input.ProvisionedThroughput) + if dafny_input.OnDemandThroughput.is_Some: + output["OnDemandThroughput"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_OnDemandThroughput(dafny_input.OnDemandThroughput.value) + if dafny_input.ItemCount.is_Some: output["ItemCount"] = dafny_input.ItemCount.value if dafny_input.BillingMode.is_Some: - output["BillingMode"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BillingMode( - dafny_input.BillingMode.value - ) - ) + output["BillingMode"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BillingMode(dafny_input.BillingMode.value) return output - def com_amazonaws_dynamodb_SourceTableFeatureDetails(dafny_input): output = {} if dafny_input.LocalSecondaryIndexes.is_Some: - output["LocalSecondaryIndexes"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_LocalSecondaryIndexInfo( - list_element - ) - for list_element in dafny_input.LocalSecondaryIndexes.value - ] + output["LocalSecondaryIndexes"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_LocalSecondaryIndexInfo(list_element) for list_element in dafny_input.LocalSecondaryIndexes.value] if dafny_input.GlobalSecondaryIndexes.is_Some: - output["GlobalSecondaryIndexes"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_GlobalSecondaryIndexInfo( - list_element - ) - for list_element in dafny_input.GlobalSecondaryIndexes.value - ] + output["GlobalSecondaryIndexes"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_GlobalSecondaryIndexInfo(list_element) for list_element in dafny_input.GlobalSecondaryIndexes.value] if dafny_input.StreamDescription.is_Some: - output["StreamDescription"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_StreamSpecification( - dafny_input.StreamDescription.value - ) - ) + output["StreamDescription"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_StreamSpecification(dafny_input.StreamDescription.value) if dafny_input.TimeToLiveDescription.is_Some: - output["TimeToLiveDescription"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TimeToLiveDescription( - dafny_input.TimeToLiveDescription.value - ) - ) + output["TimeToLiveDescription"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TimeToLiveDescription(dafny_input.TimeToLiveDescription.value) if dafny_input.SSEDescription.is_Some: - output["SSEDescription"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_SSEDescription( - dafny_input.SSEDescription.value - ) - ) + output["SSEDescription"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_SSEDescription(dafny_input.SSEDescription.value) return output - def com_amazonaws_dynamodb_LocalSecondaryIndexInfo(dafny_input): output = {} if dafny_input.IndexName.is_Some: - output["IndexName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.IndexName.value - ).decode("utf-16-be") + output["IndexName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.IndexName.value).decode('utf-16-be') if dafny_input.KeySchema.is_Some: - output["KeySchema"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_KeySchemaElement( - list_element - ) - for list_element in dafny_input.KeySchema.value - ] + output["KeySchema"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_KeySchemaElement(list_element) for list_element in dafny_input.KeySchema.value] if dafny_input.Projection.is_Some: - output["Projection"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Projection( - dafny_input.Projection.value - ) - ) + output["Projection"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Projection(dafny_input.Projection.value) return output - def com_amazonaws_dynamodb_GlobalSecondaryIndexInfo(dafny_input): output = {} if dafny_input.IndexName.is_Some: - output["IndexName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.IndexName.value - ).decode("utf-16-be") + output["IndexName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.IndexName.value).decode('utf-16-be') if dafny_input.KeySchema.is_Some: - output["KeySchema"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_KeySchemaElement( - list_element - ) - for list_element in dafny_input.KeySchema.value - ] + output["KeySchema"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_KeySchemaElement(list_element) for list_element in dafny_input.KeySchema.value] if dafny_input.Projection.is_Some: - output["Projection"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Projection( - dafny_input.Projection.value - ) - ) + output["Projection"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Projection(dafny_input.Projection.value) if dafny_input.ProvisionedThroughput.is_Some: - output["ProvisionedThroughput"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProvisionedThroughput( - dafny_input.ProvisionedThroughput.value - ) - ) + output["ProvisionedThroughput"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProvisionedThroughput(dafny_input.ProvisionedThroughput.value) - return output + if dafny_input.OnDemandThroughput.is_Some: + output["OnDemandThroughput"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_OnDemandThroughput(dafny_input.OnDemandThroughput.value) + return output def com_amazonaws_dynamodb_TimeToLiveDescription(dafny_input): output = {} if dafny_input.TimeToLiveStatus.is_Some: - output["TimeToLiveStatus"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TimeToLiveStatus( - dafny_input.TimeToLiveStatus.value - ) - ) + output["TimeToLiveStatus"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TimeToLiveStatus(dafny_input.TimeToLiveStatus.value) if dafny_input.AttributeName.is_Some: - output["AttributeName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.AttributeName.value - ).decode("utf-16-be") + output["AttributeName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.AttributeName.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_TimeToLiveStatus(dafny_input): # Convert TimeToLiveStatus if isinstance(dafny_input, TimeToLiveStatus_ENABLING): @@ -2286,49 +1518,29 @@ def com_amazonaws_dynamodb_TimeToLiveStatus(dafny_input): else: raise ValueError("No recognized enum value in enum type: " + dafny_input) - def com_amazonaws_dynamodb_DeleteBackupOutput(dafny_input): output = {} if dafny_input.BackupDescription.is_Some: - output["BackupDescription"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BackupDescription( - dafny_input.BackupDescription.value - ) - ) + output["BackupDescription"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BackupDescription(dafny_input.BackupDescription.value) return output - def com_amazonaws_dynamodb_ExpectedAttributeValue(dafny_input): output = {} if dafny_input.Value.is_Some: - output["Value"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - dafny_input.Value.value - ) - ) + output["Value"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(dafny_input.Value.value) if dafny_input.Exists.is_Some: output["Exists"] = dafny_input.Exists.value if dafny_input.ComparisonOperator.is_Some: - output["ComparisonOperator"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ComparisonOperator( - dafny_input.ComparisonOperator.value - ) - ) + output["ComparisonOperator"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ComparisonOperator(dafny_input.ComparisonOperator.value) if dafny_input.AttributeValueList.is_Some: - output["AttributeValueList"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - list_element - ) - for list_element in dafny_input.AttributeValueList.value - ] + output["AttributeValueList"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(list_element) for list_element in dafny_input.AttributeValueList.value] return output - def com_amazonaws_dynamodb_ComparisonOperator(dafny_input): # Convert ComparisonOperator if isinstance(dafny_input, ComparisonOperator_EQ): @@ -2373,7 +1585,6 @@ def com_amazonaws_dynamodb_ComparisonOperator(dafny_input): else: raise ValueError("No recognized enum value in enum type: " + dafny_input) - def com_amazonaws_dynamodb_ConditionalOperator(dafny_input): # Convert ConditionalOperator if isinstance(dafny_input, ConditionalOperator_AND): @@ -2385,7 +1596,6 @@ def com_amazonaws_dynamodb_ConditionalOperator(dafny_input): else: raise ValueError("No recognized enum value in enum type: " + dafny_input) - def com_amazonaws_dynamodb_ReturnValue(dafny_input): # Convert ReturnValue if isinstance(dafny_input, ReturnValue_NONE): @@ -2406,178 +1616,104 @@ def com_amazonaws_dynamodb_ReturnValue(dafny_input): else: raise ValueError("No recognized enum value in enum type: " + dafny_input) - def com_amazonaws_dynamodb_DeleteItemInput(dafny_input): output = {} - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName - ).decode("utf-16-be") - output["Key"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in dafny_input.Key.items - } + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName).decode('utf-16-be') + output["Key"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.Key.items } if dafny_input.Expected.is_Some: - output["Expected"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ExpectedAttributeValue( - value - ) - for (key, value) in dafny_input.Expected.value.items - } + output["Expected"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ExpectedAttributeValue(value) for (key, value) in dafny_input.Expected.value.items } if dafny_input.ConditionalOperator.is_Some: - output["ConditionalOperator"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConditionalOperator( - dafny_input.ConditionalOperator.value - ) - ) + output["ConditionalOperator"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConditionalOperator(dafny_input.ConditionalOperator.value) if dafny_input.ReturnValues.is_Some: - output["ReturnValues"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnValue( - dafny_input.ReturnValues.value - ) - ) + output["ReturnValues"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnValue(dafny_input.ReturnValues.value) if dafny_input.ReturnConsumedCapacity.is_Some: - output["ReturnConsumedCapacity"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnConsumedCapacity( - dafny_input.ReturnConsumedCapacity.value - ) - ) + output["ReturnConsumedCapacity"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnConsumedCapacity(dafny_input.ReturnConsumedCapacity.value) if dafny_input.ReturnItemCollectionMetrics.is_Some: - output["ReturnItemCollectionMetrics"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnItemCollectionMetrics( - dafny_input.ReturnItemCollectionMetrics.value - ) - ) + output["ReturnItemCollectionMetrics"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnItemCollectionMetrics(dafny_input.ReturnItemCollectionMetrics.value) if dafny_input.ConditionExpression.is_Some: - output["ConditionExpression"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.ConditionExpression.value - ).decode("utf-16-be") + output["ConditionExpression"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ConditionExpression.value).decode('utf-16-be') if dafny_input.ExpressionAttributeNames.is_Some: - output["ExpressionAttributeNames"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key) - .decode("utf-16-be"): b"".join(ord(c).to_bytes(2, "big") for c in value) - .decode("utf-16-be") - for (key, value) in dafny_input.ExpressionAttributeNames.value.items - } + output["ExpressionAttributeNames"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): b''.join(ord(c).to_bytes(2, 'big') for c in value).decode('utf-16-be') for (key, value) in dafny_input.ExpressionAttributeNames.value.items } if dafny_input.ExpressionAttributeValues.is_Some: - output["ExpressionAttributeValues"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in dafny_input.ExpressionAttributeValues.value.items - } + output["ExpressionAttributeValues"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.ExpressionAttributeValues.value.items } - return output + if dafny_input.ReturnValuesOnConditionCheckFailure.is_Some: + output["ReturnValuesOnConditionCheckFailure"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure(dafny_input.ReturnValuesOnConditionCheckFailure.value) + return output def com_amazonaws_dynamodb_DeleteItemOutput(dafny_input): output = {} if dafny_input.Attributes.is_Some: - output["Attributes"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in dafny_input.Attributes.value.items - } + output["Attributes"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.Attributes.value.items } if dafny_input.ConsumedCapacity.is_Some: - output["ConsumedCapacity"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConsumedCapacity( - dafny_input.ConsumedCapacity.value - ) - ) + output["ConsumedCapacity"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConsumedCapacity(dafny_input.ConsumedCapacity.value) if dafny_input.ItemCollectionMetrics.is_Some: - output["ItemCollectionMetrics"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ItemCollectionMetrics( - dafny_input.ItemCollectionMetrics.value - ) - ) + output["ItemCollectionMetrics"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ItemCollectionMetrics(dafny_input.ItemCollectionMetrics.value) return output +def com_amazonaws_dynamodb_DeleteResourcePolicyInput(dafny_input): + output = {} + output["ResourceArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ResourceArn).decode('utf-16-be') + if dafny_input.ExpectedRevisionId.is_Some: + output["ExpectedRevisionId"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ExpectedRevisionId.value).decode('utf-16-be') -def com_amazonaws_dynamodb_DeleteTableInput(dafny_input): + return output + +def com_amazonaws_dynamodb_DeleteResourcePolicyOutput(dafny_input): output = {} - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName - ).decode("utf-16-be") + if dafny_input.RevisionId.is_Some: + output["RevisionId"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.RevisionId.value).decode('utf-16-be') + return output +def com_amazonaws_dynamodb_DeleteTableInput(dafny_input): + output = {} + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName).decode('utf-16-be') + return output def com_amazonaws_dynamodb_DeleteTableOutput(dafny_input): output = {} if dafny_input.TableDescription.is_Some: - output["TableDescription"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableDescription( - dafny_input.TableDescription.value - ) - ) + output["TableDescription"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableDescription(dafny_input.TableDescription.value) return output - def com_amazonaws_dynamodb_DescribeBackupInput(dafny_input): output = {} - output["BackupArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.BackupArn - ).decode("utf-16-be") + output["BackupArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.BackupArn).decode('utf-16-be') return output - def com_amazonaws_dynamodb_DescribeBackupOutput(dafny_input): output = {} if dafny_input.BackupDescription.is_Some: - output["BackupDescription"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BackupDescription( - dafny_input.BackupDescription.value - ) - ) + output["BackupDescription"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BackupDescription(dafny_input.BackupDescription.value) return output - def com_amazonaws_dynamodb_DescribeContinuousBackupsInput(dafny_input): output = {} - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName - ).decode("utf-16-be") + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName).decode('utf-16-be') return output - def com_amazonaws_dynamodb_ContinuousBackupsDescription(dafny_input): output = {} - output["ContinuousBackupsStatus"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ContinuousBackupsStatus( - dafny_input.ContinuousBackupsStatus - ) - ) + output["ContinuousBackupsStatus"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ContinuousBackupsStatus(dafny_input.ContinuousBackupsStatus) if dafny_input.PointInTimeRecoveryDescription.is_Some: - output["PointInTimeRecoveryDescription"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_PointInTimeRecoveryDescription( - dafny_input.PointInTimeRecoveryDescription.value - ) - ) + output["PointInTimeRecoveryDescription"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_PointInTimeRecoveryDescription(dafny_input.PointInTimeRecoveryDescription.value) return output - def com_amazonaws_dynamodb_ContinuousBackupsStatus(dafny_input): # Convert ContinuousBackupsStatus if isinstance(dafny_input, ContinuousBackupsStatus_ENABLED): @@ -2589,29 +1725,19 @@ def com_amazonaws_dynamodb_ContinuousBackupsStatus(dafny_input): else: raise ValueError("No recognized enum value in enum type: " + dafny_input) - def com_amazonaws_dynamodb_PointInTimeRecoveryDescription(dafny_input): output = {} if dafny_input.PointInTimeRecoveryStatus.is_Some: - output["PointInTimeRecoveryStatus"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_PointInTimeRecoveryStatus( - dafny_input.PointInTimeRecoveryStatus.value - ) - ) + output["PointInTimeRecoveryStatus"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_PointInTimeRecoveryStatus(dafny_input.PointInTimeRecoveryStatus.value) if dafny_input.EarliestRestorableDateTime.is_Some: - output["EarliestRestorableDateTime"] = datetime.fromisoformat( - dafny_input.EarliestRestorableDateTime.value.VerbatimString(False) - ) + output["EarliestRestorableDateTime"] = datetime.fromisoformat(dafny_input.EarliestRestorableDateTime.value.VerbatimString(False)) if dafny_input.LatestRestorableDateTime.is_Some: - output["LatestRestorableDateTime"] = datetime.fromisoformat( - dafny_input.LatestRestorableDateTime.value.VerbatimString(False) - ) + output["LatestRestorableDateTime"] = datetime.fromisoformat(dafny_input.LatestRestorableDateTime.value.VerbatimString(False)) return output - def com_amazonaws_dynamodb_PointInTimeRecoveryStatus(dafny_input): # Convert PointInTimeRecoveryStatus if isinstance(dafny_input, PointInTimeRecoveryStatus_ENABLED): @@ -2623,32 +1749,21 @@ def com_amazonaws_dynamodb_PointInTimeRecoveryStatus(dafny_input): else: raise ValueError("No recognized enum value in enum type: " + dafny_input) - def com_amazonaws_dynamodb_DescribeContinuousBackupsOutput(dafny_input): output = {} if dafny_input.ContinuousBackupsDescription.is_Some: - output["ContinuousBackupsDescription"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ContinuousBackupsDescription( - dafny_input.ContinuousBackupsDescription.value - ) - ) + output["ContinuousBackupsDescription"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ContinuousBackupsDescription(dafny_input.ContinuousBackupsDescription.value) return output - def com_amazonaws_dynamodb_DescribeContributorInsightsInput(dafny_input): output = {} - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName - ).decode("utf-16-be") + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName).decode('utf-16-be') if dafny_input.IndexName.is_Some: - output["IndexName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.IndexName.value - ).decode("utf-16-be") + output["IndexName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.IndexName.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_ContributorInsightsStatus(dafny_input): # Convert ContributorInsightsStatus if isinstance(dafny_input, ContributorInsightsStatus_ENABLING): @@ -2669,189 +1784,110 @@ def com_amazonaws_dynamodb_ContributorInsightsStatus(dafny_input): else: raise ValueError("No recognized enum value in enum type: " + dafny_input) - def com_amazonaws_dynamodb_FailureException(dafny_input): output = {} if dafny_input.ExceptionName.is_Some: - output["ExceptionName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.ExceptionName.value - ).decode("utf-16-be") + output["ExceptionName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ExceptionName.value).decode('utf-16-be') if dafny_input.ExceptionDescription.is_Some: - output["ExceptionDescription"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.ExceptionDescription.value - ).decode("utf-16-be") + output["ExceptionDescription"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ExceptionDescription.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_DescribeContributorInsightsOutput(dafny_input): output = {} if dafny_input.TableName.is_Some: - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName.value - ).decode("utf-16-be") + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName.value).decode('utf-16-be') if dafny_input.IndexName.is_Some: - output["IndexName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.IndexName.value - ).decode("utf-16-be") + output["IndexName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.IndexName.value).decode('utf-16-be') if dafny_input.ContributorInsightsRuleList.is_Some: - output["ContributorInsightsRuleList"] = [ - b"".join(ord(c).to_bytes(2, "big") for c in list_element).decode( - "utf-16-be" - ) - for list_element in dafny_input.ContributorInsightsRuleList.value - ] + output["ContributorInsightsRuleList"] = [b''.join(ord(c).to_bytes(2, 'big') for c in list_element).decode('utf-16-be') for list_element in dafny_input.ContributorInsightsRuleList.value] if dafny_input.ContributorInsightsStatus.is_Some: - output["ContributorInsightsStatus"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ContributorInsightsStatus( - dafny_input.ContributorInsightsStatus.value - ) - ) + output["ContributorInsightsStatus"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ContributorInsightsStatus(dafny_input.ContributorInsightsStatus.value) if dafny_input.LastUpdateDateTime.is_Some: - output["LastUpdateDateTime"] = datetime.fromisoformat( - dafny_input.LastUpdateDateTime.value.VerbatimString(False) - ) + output["LastUpdateDateTime"] = datetime.fromisoformat(dafny_input.LastUpdateDateTime.value.VerbatimString(False)) if dafny_input.FailureException.is_Some: - output["FailureException"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_FailureException( - dafny_input.FailureException.value - ) - ) + output["FailureException"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_FailureException(dafny_input.FailureException.value) return output - def com_amazonaws_dynamodb_DescribeEndpointsRequest(dafny_input): output = {} return output - def com_amazonaws_dynamodb_Endpoint(dafny_input): output = {} - output["Address"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.Address - ).decode("utf-16-be") + output["Address"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.Address).decode('utf-16-be') output["CachePeriodInMinutes"] = dafny_input.CachePeriodInMinutes return output - def com_amazonaws_dynamodb_DescribeEndpointsResponse(dafny_input): output = {} - output["Endpoints"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Endpoint( - list_element - ) - for list_element in dafny_input.Endpoints - ] + output["Endpoints"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Endpoint(list_element) for list_element in dafny_input.Endpoints] return output - def com_amazonaws_dynamodb_DescribeExportInput(dafny_input): output = {} - output["ExportArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.ExportArn - ).decode("utf-16-be") + output["ExportArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ExportArn).decode('utf-16-be') return output - def com_amazonaws_dynamodb_ExportDescription(dafny_input): output = {} if dafny_input.ExportArn.is_Some: - output["ExportArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.ExportArn.value - ).decode("utf-16-be") + output["ExportArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ExportArn.value).decode('utf-16-be') if dafny_input.ExportStatus.is_Some: - output["ExportStatus"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ExportStatus( - dafny_input.ExportStatus.value - ) - ) + output["ExportStatus"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ExportStatus(dafny_input.ExportStatus.value) if dafny_input.StartTime.is_Some: - output["StartTime"] = datetime.fromisoformat( - dafny_input.StartTime.value.VerbatimString(False) - ) + output["StartTime"] = datetime.fromisoformat(dafny_input.StartTime.value.VerbatimString(False)) if dafny_input.EndTime.is_Some: - output["EndTime"] = datetime.fromisoformat( - dafny_input.EndTime.value.VerbatimString(False) - ) + output["EndTime"] = datetime.fromisoformat(dafny_input.EndTime.value.VerbatimString(False)) if dafny_input.ExportManifest.is_Some: - output["ExportManifest"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.ExportManifest.value - ).decode("utf-16-be") + output["ExportManifest"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ExportManifest.value).decode('utf-16-be') if dafny_input.TableArn.is_Some: - output["TableArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableArn.value - ).decode("utf-16-be") + output["TableArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableArn.value).decode('utf-16-be') if dafny_input.TableId.is_Some: - output["TableId"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableId.value - ).decode("utf-16-be") + output["TableId"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableId.value).decode('utf-16-be') if dafny_input.ExportTime.is_Some: - output["ExportTime"] = datetime.fromisoformat( - dafny_input.ExportTime.value.VerbatimString(False) - ) + output["ExportTime"] = datetime.fromisoformat(dafny_input.ExportTime.value.VerbatimString(False)) if dafny_input.ClientToken.is_Some: - output["ClientToken"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.ClientToken.value - ).decode("utf-16-be") + output["ClientToken"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ClientToken.value).decode('utf-16-be') if dafny_input.S3Bucket.is_Some: - output["S3Bucket"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.S3Bucket.value - ).decode("utf-16-be") + output["S3Bucket"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.S3Bucket.value).decode('utf-16-be') if dafny_input.S3BucketOwner.is_Some: - output["S3BucketOwner"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.S3BucketOwner.value - ).decode("utf-16-be") + output["S3BucketOwner"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.S3BucketOwner.value).decode('utf-16-be') if dafny_input.S3Prefix.is_Some: - output["S3Prefix"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.S3Prefix.value - ).decode("utf-16-be") + output["S3Prefix"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.S3Prefix.value).decode('utf-16-be') if dafny_input.S3SseAlgorithm.is_Some: - output["S3SseAlgorithm"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_S3SseAlgorithm( - dafny_input.S3SseAlgorithm.value - ) - ) + output["S3SseAlgorithm"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_S3SseAlgorithm(dafny_input.S3SseAlgorithm.value) if dafny_input.S3SseKmsKeyId.is_Some: - output["S3SseKmsKeyId"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.S3SseKmsKeyId.value - ).decode("utf-16-be") + output["S3SseKmsKeyId"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.S3SseKmsKeyId.value).decode('utf-16-be') if dafny_input.FailureCode.is_Some: - output["FailureCode"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.FailureCode.value - ).decode("utf-16-be") + output["FailureCode"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.FailureCode.value).decode('utf-16-be') if dafny_input.FailureMessage.is_Some: - output["FailureMessage"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.FailureMessage.value - ).decode("utf-16-be") + output["FailureMessage"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.FailureMessage.value).decode('utf-16-be') if dafny_input.ExportFormat.is_Some: - output["ExportFormat"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ExportFormat( - dafny_input.ExportFormat.value - ) - ) + output["ExportFormat"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ExportFormat(dafny_input.ExportFormat.value) if dafny_input.BilledSizeBytes.is_Some: output["BilledSizeBytes"] = dafny_input.BilledSizeBytes.value @@ -2859,8 +1895,13 @@ def com_amazonaws_dynamodb_ExportDescription(dafny_input): if dafny_input.ItemCount.is_Some: output["ItemCount"] = dafny_input.ItemCount.value - return output + if dafny_input.ExportType.is_Some: + output["ExportType"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ExportType(dafny_input.ExportType.value) + + if dafny_input.IncrementalExportSpecification.is_Some: + output["IncrementalExportSpecification"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_IncrementalExportSpecification(dafny_input.IncrementalExportSpecification.value) + return output def com_amazonaws_dynamodb_ExportStatus(dafny_input): # Convert ExportStatus @@ -2876,7 +1917,6 @@ def com_amazonaws_dynamodb_ExportStatus(dafny_input): else: raise ValueError("No recognized enum value in enum type: " + dafny_input) - def com_amazonaws_dynamodb_S3SseAlgorithm(dafny_input): # Convert S3SseAlgorithm if isinstance(dafny_input, S3SseAlgorithm_AES256): @@ -2888,7 +1928,6 @@ def com_amazonaws_dynamodb_S3SseAlgorithm(dafny_input): else: raise ValueError("No recognized enum value in enum type: " + dafny_input) - def com_amazonaws_dynamodb_ExportFormat(dafny_input): # Convert ExportFormat if isinstance(dafny_input, ExportFormat_DYNAMODB__JSON): @@ -2900,108 +1939,94 @@ def com_amazonaws_dynamodb_ExportFormat(dafny_input): else: raise ValueError("No recognized enum value in enum type: " + dafny_input) +def com_amazonaws_dynamodb_ExportType(dafny_input): + # Convert ExportType + if isinstance(dafny_input, ExportType_FULL__EXPORT): + return "FULL_EXPORT" + + elif isinstance(dafny_input, ExportType_INCREMENTAL__EXPORT): + return "INCREMENTAL_EXPORT" + + else: + raise ValueError("No recognized enum value in enum type: " + dafny_input) + +def com_amazonaws_dynamodb_IncrementalExportSpecification(dafny_input): + output = {} + if dafny_input.ExportFromTime.is_Some: + output["ExportFromTime"] = datetime.fromisoformat(dafny_input.ExportFromTime.value.VerbatimString(False)) + + if dafny_input.ExportToTime.is_Some: + output["ExportToTime"] = datetime.fromisoformat(dafny_input.ExportToTime.value.VerbatimString(False)) + + if dafny_input.ExportViewType.is_Some: + output["ExportViewType"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ExportViewType(dafny_input.ExportViewType.value) + + return output + +def com_amazonaws_dynamodb_ExportViewType(dafny_input): + # Convert ExportViewType + if isinstance(dafny_input, ExportViewType_NEW__IMAGE): + return "NEW_IMAGE" + + elif isinstance(dafny_input, ExportViewType_NEW__AND__OLD__IMAGES): + return "NEW_AND_OLD_IMAGES" + + else: + raise ValueError("No recognized enum value in enum type: " + dafny_input) def com_amazonaws_dynamodb_DescribeExportOutput(dafny_input): output = {} if dafny_input.ExportDescription.is_Some: - output["ExportDescription"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ExportDescription( - dafny_input.ExportDescription.value - ) - ) + output["ExportDescription"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ExportDescription(dafny_input.ExportDescription.value) return output - def com_amazonaws_dynamodb_DescribeGlobalTableInput(dafny_input): output = {} - output["GlobalTableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.GlobalTableName - ).decode("utf-16-be") + output["GlobalTableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.GlobalTableName).decode('utf-16-be') return output - def com_amazonaws_dynamodb_DescribeGlobalTableOutput(dafny_input): output = {} if dafny_input.GlobalTableDescription.is_Some: - output["GlobalTableDescription"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_GlobalTableDescription( - dafny_input.GlobalTableDescription.value - ) - ) + output["GlobalTableDescription"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_GlobalTableDescription(dafny_input.GlobalTableDescription.value) return output - def com_amazonaws_dynamodb_DescribeGlobalTableSettingsInput(dafny_input): output = {} - output["GlobalTableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.GlobalTableName - ).decode("utf-16-be") + output["GlobalTableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.GlobalTableName).decode('utf-16-be') return output - def com_amazonaws_dynamodb_ReplicaSettingsDescription(dafny_input): output = {} - output["RegionName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.RegionName - ).decode("utf-16-be") + output["RegionName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.RegionName).decode('utf-16-be') if dafny_input.ReplicaStatus.is_Some: - output["ReplicaStatus"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaStatus( - dafny_input.ReplicaStatus.value - ) - ) + output["ReplicaStatus"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaStatus(dafny_input.ReplicaStatus.value) if dafny_input.ReplicaBillingModeSummary.is_Some: - output["ReplicaBillingModeSummary"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BillingModeSummary( - dafny_input.ReplicaBillingModeSummary.value - ) - ) + output["ReplicaBillingModeSummary"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BillingModeSummary(dafny_input.ReplicaBillingModeSummary.value) if dafny_input.ReplicaProvisionedReadCapacityUnits.is_Some: - output["ReplicaProvisionedReadCapacityUnits"] = ( - dafny_input.ReplicaProvisionedReadCapacityUnits.value - ) + output["ReplicaProvisionedReadCapacityUnits"] = dafny_input.ReplicaProvisionedReadCapacityUnits.value if dafny_input.ReplicaProvisionedReadCapacityAutoScalingSettings.is_Some: - output["ReplicaProvisionedReadCapacityAutoScalingSettings"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingSettingsDescription( - dafny_input.ReplicaProvisionedReadCapacityAutoScalingSettings.value - ) - ) + output["ReplicaProvisionedReadCapacityAutoScalingSettings"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingSettingsDescription(dafny_input.ReplicaProvisionedReadCapacityAutoScalingSettings.value) if dafny_input.ReplicaProvisionedWriteCapacityUnits.is_Some: - output["ReplicaProvisionedWriteCapacityUnits"] = ( - dafny_input.ReplicaProvisionedWriteCapacityUnits.value - ) + output["ReplicaProvisionedWriteCapacityUnits"] = dafny_input.ReplicaProvisionedWriteCapacityUnits.value if dafny_input.ReplicaProvisionedWriteCapacityAutoScalingSettings.is_Some: - output["ReplicaProvisionedWriteCapacityAutoScalingSettings"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingSettingsDescription( - dafny_input.ReplicaProvisionedWriteCapacityAutoScalingSettings.value - ) - ) + output["ReplicaProvisionedWriteCapacityAutoScalingSettings"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingSettingsDescription(dafny_input.ReplicaProvisionedWriteCapacityAutoScalingSettings.value) if dafny_input.ReplicaGlobalSecondaryIndexSettings.is_Some: - output["ReplicaGlobalSecondaryIndexSettings"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexSettingsDescription( - list_element - ) - for list_element in dafny_input.ReplicaGlobalSecondaryIndexSettings.value - ] + output["ReplicaGlobalSecondaryIndexSettings"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexSettingsDescription(list_element) for list_element in dafny_input.ReplicaGlobalSecondaryIndexSettings.value] if dafny_input.ReplicaTableClassSummary.is_Some: - output["ReplicaTableClassSummary"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableClassSummary( - dafny_input.ReplicaTableClassSummary.value - ) - ) + output["ReplicaTableClassSummary"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableClassSummary(dafny_input.ReplicaTableClassSummary.value) return output - def com_amazonaws_dynamodb_AutoScalingSettingsDescription(dafny_input): output = {} if dafny_input.MinimumUnits.is_Some: @@ -3014,80 +2039,44 @@ def com_amazonaws_dynamodb_AutoScalingSettingsDescription(dafny_input): output["AutoScalingDisabled"] = dafny_input.AutoScalingDisabled.value if dafny_input.AutoScalingRoleArn.is_Some: - output["AutoScalingRoleArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.AutoScalingRoleArn.value - ).decode("utf-16-be") + output["AutoScalingRoleArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.AutoScalingRoleArn.value).decode('utf-16-be') if dafny_input.ScalingPolicies.is_Some: - output["ScalingPolicies"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingPolicyDescription( - list_element - ) - for list_element in dafny_input.ScalingPolicies.value - ] + output["ScalingPolicies"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingPolicyDescription(list_element) for list_element in dafny_input.ScalingPolicies.value] return output - def com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexSettingsDescription(dafny_input): output = {} - output["IndexName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.IndexName - ).decode("utf-16-be") + output["IndexName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.IndexName).decode('utf-16-be') if dafny_input.IndexStatus.is_Some: - output["IndexStatus"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_IndexStatus( - dafny_input.IndexStatus.value - ) - ) + output["IndexStatus"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_IndexStatus(dafny_input.IndexStatus.value) if dafny_input.ProvisionedReadCapacityUnits.is_Some: - output["ProvisionedReadCapacityUnits"] = ( - dafny_input.ProvisionedReadCapacityUnits.value - ) + output["ProvisionedReadCapacityUnits"] = dafny_input.ProvisionedReadCapacityUnits.value if dafny_input.ProvisionedReadCapacityAutoScalingSettings.is_Some: - output["ProvisionedReadCapacityAutoScalingSettings"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingSettingsDescription( - dafny_input.ProvisionedReadCapacityAutoScalingSettings.value - ) - ) + output["ProvisionedReadCapacityAutoScalingSettings"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingSettingsDescription(dafny_input.ProvisionedReadCapacityAutoScalingSettings.value) if dafny_input.ProvisionedWriteCapacityUnits.is_Some: - output["ProvisionedWriteCapacityUnits"] = ( - dafny_input.ProvisionedWriteCapacityUnits.value - ) + output["ProvisionedWriteCapacityUnits"] = dafny_input.ProvisionedWriteCapacityUnits.value if dafny_input.ProvisionedWriteCapacityAutoScalingSettings.is_Some: - output["ProvisionedWriteCapacityAutoScalingSettings"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingSettingsDescription( - dafny_input.ProvisionedWriteCapacityAutoScalingSettings.value - ) - ) + output["ProvisionedWriteCapacityAutoScalingSettings"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingSettingsDescription(dafny_input.ProvisionedWriteCapacityAutoScalingSettings.value) return output - def com_amazonaws_dynamodb_AutoScalingPolicyDescription(dafny_input): output = {} if dafny_input.PolicyName.is_Some: - output["PolicyName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.PolicyName.value - ).decode("utf-16-be") + output["PolicyName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.PolicyName.value).decode('utf-16-be') if dafny_input.TargetTrackingScalingPolicyConfiguration.is_Some: - output["TargetTrackingScalingPolicyConfiguration"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingTargetTrackingScalingPolicyConfigurationDescription( - dafny_input.TargetTrackingScalingPolicyConfiguration.value - ) - ) + output["TargetTrackingScalingPolicyConfiguration"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingTargetTrackingScalingPolicyConfigurationDescription(dafny_input.TargetTrackingScalingPolicyConfiguration.value) return output - -def com_amazonaws_dynamodb_AutoScalingTargetTrackingScalingPolicyConfigurationDescription( - dafny_input, -): +def com_amazonaws_dynamodb_AutoScalingTargetTrackingScalingPolicyConfigurationDescription(dafny_input): output = {} if dafny_input.DisableScaleIn.is_Some: output["DisableScaleIn"] = dafny_input.DisableScaleIn.value @@ -3101,114 +2090,64 @@ def com_amazonaws_dynamodb_AutoScalingTargetTrackingScalingPolicyConfigurationDe output["TargetValue"] = dafny_input.TargetValue return output - def com_amazonaws_dynamodb_DescribeGlobalTableSettingsOutput(dafny_input): output = {} if dafny_input.GlobalTableName.is_Some: - output["GlobalTableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.GlobalTableName.value - ).decode("utf-16-be") + output["GlobalTableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.GlobalTableName.value).decode('utf-16-be') if dafny_input.ReplicaSettings.is_Some: - output["ReplicaSettings"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaSettingsDescription( - list_element - ) - for list_element in dafny_input.ReplicaSettings.value - ] + output["ReplicaSettings"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaSettingsDescription(list_element) for list_element in dafny_input.ReplicaSettings.value] return output - def com_amazonaws_dynamodb_DescribeImportInput(dafny_input): output = {} - output["ImportArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.ImportArn - ).decode("utf-16-be") + output["ImportArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ImportArn).decode('utf-16-be') return output - def com_amazonaws_dynamodb_ImportTableDescription(dafny_input): output = {} if dafny_input.ImportArn.is_Some: - output["ImportArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.ImportArn.value - ).decode("utf-16-be") + output["ImportArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ImportArn.value).decode('utf-16-be') if dafny_input.ImportStatus.is_Some: - output["ImportStatus"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ImportStatus( - dafny_input.ImportStatus.value - ) - ) + output["ImportStatus"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ImportStatus(dafny_input.ImportStatus.value) if dafny_input.TableArn.is_Some: - output["TableArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableArn.value - ).decode("utf-16-be") + output["TableArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableArn.value).decode('utf-16-be') if dafny_input.TableId.is_Some: - output["TableId"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableId.value - ).decode("utf-16-be") + output["TableId"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableId.value).decode('utf-16-be') if dafny_input.ClientToken.is_Some: - output["ClientToken"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.ClientToken.value - ).decode("utf-16-be") + output["ClientToken"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ClientToken.value).decode('utf-16-be') if dafny_input.S3BucketSource.is_Some: - output["S3BucketSource"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_S3BucketSource( - dafny_input.S3BucketSource.value - ) - ) + output["S3BucketSource"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_S3BucketSource(dafny_input.S3BucketSource.value) if dafny_input.ErrorCount.is_Some: output["ErrorCount"] = dafny_input.ErrorCount.value if dafny_input.CloudWatchLogGroupArn.is_Some: - output["CloudWatchLogGroupArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.CloudWatchLogGroupArn.value - ).decode("utf-16-be") + output["CloudWatchLogGroupArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.CloudWatchLogGroupArn.value).decode('utf-16-be') if dafny_input.InputFormat.is_Some: - output["InputFormat"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_InputFormat( - dafny_input.InputFormat.value - ) - ) + output["InputFormat"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_InputFormat(dafny_input.InputFormat.value) if dafny_input.InputFormatOptions.is_Some: - output["InputFormatOptions"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_InputFormatOptions( - dafny_input.InputFormatOptions.value - ) - ) + output["InputFormatOptions"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_InputFormatOptions(dafny_input.InputFormatOptions.value) if dafny_input.InputCompressionType.is_Some: - output["InputCompressionType"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_InputCompressionType( - dafny_input.InputCompressionType.value - ) - ) + output["InputCompressionType"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_InputCompressionType(dafny_input.InputCompressionType.value) if dafny_input.TableCreationParameters.is_Some: - output["TableCreationParameters"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableCreationParameters( - dafny_input.TableCreationParameters.value - ) - ) + output["TableCreationParameters"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableCreationParameters(dafny_input.TableCreationParameters.value) if dafny_input.StartTime.is_Some: - output["StartTime"] = datetime.fromisoformat( - dafny_input.StartTime.value.VerbatimString(False) - ) + output["StartTime"] = datetime.fromisoformat(dafny_input.StartTime.value.VerbatimString(False)) if dafny_input.EndTime.is_Some: - output["EndTime"] = datetime.fromisoformat( - dafny_input.EndTime.value.VerbatimString(False) - ) + output["EndTime"] = datetime.fromisoformat(dafny_input.EndTime.value.VerbatimString(False)) if dafny_input.ProcessedSizeBytes.is_Some: output["ProcessedSizeBytes"] = dafny_input.ProcessedSizeBytes.value @@ -3220,18 +2159,13 @@ def com_amazonaws_dynamodb_ImportTableDescription(dafny_input): output["ImportedItemCount"] = dafny_input.ImportedItemCount.value if dafny_input.FailureCode.is_Some: - output["FailureCode"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.FailureCode.value - ).decode("utf-16-be") + output["FailureCode"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.FailureCode.value).decode('utf-16-be') if dafny_input.FailureMessage.is_Some: - output["FailureMessage"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.FailureMessage.value - ).decode("utf-16-be") + output["FailureMessage"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.FailureMessage.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_ImportStatus(dafny_input): # Convert ImportStatus if isinstance(dafny_input, ImportStatus_IN__PROGRESS): @@ -3252,25 +2186,17 @@ def com_amazonaws_dynamodb_ImportStatus(dafny_input): else: raise ValueError("No recognized enum value in enum type: " + dafny_input) - def com_amazonaws_dynamodb_S3BucketSource(dafny_input): output = {} if dafny_input.S3BucketOwner.is_Some: - output["S3BucketOwner"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.S3BucketOwner.value - ).decode("utf-16-be") + output["S3BucketOwner"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.S3BucketOwner.value).decode('utf-16-be') - output["S3Bucket"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.S3Bucket - ).decode("utf-16-be") + output["S3Bucket"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.S3Bucket).decode('utf-16-be') if dafny_input.S3KeyPrefix.is_Some: - output["S3KeyPrefix"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.S3KeyPrefix.value - ).decode("utf-16-be") + output["S3KeyPrefix"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.S3KeyPrefix.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_InputFormat(dafny_input): # Convert InputFormat if isinstance(dafny_input, InputFormat_DYNAMODB__JSON): @@ -3285,19 +2211,13 @@ def com_amazonaws_dynamodb_InputFormat(dafny_input): else: raise ValueError("No recognized enum value in enum type: " + dafny_input) - def com_amazonaws_dynamodb_InputFormatOptions(dafny_input): output = {} if dafny_input.Csv.is_Some: - output["Csv"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_CsvOptions( - dafny_input.Csv.value - ) - ) + output["Csv"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_CsvOptions(dafny_input.Csv.value) return output - def com_amazonaws_dynamodb_InputCompressionType(dafny_input): # Convert InputCompressionType if isinstance(dafny_input, InputCompressionType_GZIP): @@ -3312,114 +2232,63 @@ def com_amazonaws_dynamodb_InputCompressionType(dafny_input): else: raise ValueError("No recognized enum value in enum type: " + dafny_input) - def com_amazonaws_dynamodb_TableCreationParameters(dafny_input): output = {} - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName - ).decode("utf-16-be") - output["AttributeDefinitions"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeDefinition( - list_element - ) - for list_element in dafny_input.AttributeDefinitions - ] - output["KeySchema"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_KeySchemaElement( - list_element - ) - for list_element in dafny_input.KeySchema - ] + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName).decode('utf-16-be') + output["AttributeDefinitions"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeDefinition(list_element) for list_element in dafny_input.AttributeDefinitions] + output["KeySchema"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_KeySchemaElement(list_element) for list_element in dafny_input.KeySchema] if dafny_input.BillingMode.is_Some: - output["BillingMode"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BillingMode( - dafny_input.BillingMode.value - ) - ) + output["BillingMode"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BillingMode(dafny_input.BillingMode.value) if dafny_input.ProvisionedThroughput.is_Some: - output["ProvisionedThroughput"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProvisionedThroughput( - dafny_input.ProvisionedThroughput.value - ) - ) + output["ProvisionedThroughput"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProvisionedThroughput(dafny_input.ProvisionedThroughput.value) + + if dafny_input.OnDemandThroughput.is_Some: + output["OnDemandThroughput"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_OnDemandThroughput(dafny_input.OnDemandThroughput.value) if dafny_input.SSESpecification.is_Some: - output["SSESpecification"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_SSESpecification( - dafny_input.SSESpecification.value - ) - ) + output["SSESpecification"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_SSESpecification(dafny_input.SSESpecification.value) if dafny_input.GlobalSecondaryIndexes.is_Some: - output["GlobalSecondaryIndexes"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_GlobalSecondaryIndex( - list_element - ) - for list_element in dafny_input.GlobalSecondaryIndexes.value - ] + output["GlobalSecondaryIndexes"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_GlobalSecondaryIndex(list_element) for list_element in dafny_input.GlobalSecondaryIndexes.value] return output - def com_amazonaws_dynamodb_CsvOptions(dafny_input): output = {} if dafny_input.Delimiter.is_Some: - output["Delimiter"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.Delimiter.value - ).decode("utf-16-be") + output["Delimiter"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.Delimiter.value).decode('utf-16-be') if dafny_input.HeaderList.is_Some: - output["HeaderList"] = [ - b"".join(ord(c).to_bytes(2, "big") for c in list_element).decode( - "utf-16-be" - ) - for list_element in dafny_input.HeaderList.value - ] + output["HeaderList"] = [b''.join(ord(c).to_bytes(2, 'big') for c in list_element).decode('utf-16-be') for list_element in dafny_input.HeaderList.value] return output - def com_amazonaws_dynamodb_DescribeImportOutput(dafny_input): output = {} - output["ImportTableDescription"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ImportTableDescription( - dafny_input.ImportTableDescription - ) - ) + output["ImportTableDescription"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ImportTableDescription(dafny_input.ImportTableDescription) return output - def com_amazonaws_dynamodb_DescribeKinesisStreamingDestinationInput(dafny_input): output = {} - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName - ).decode("utf-16-be") + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName).decode('utf-16-be') return output - def com_amazonaws_dynamodb_KinesisDataStreamDestination(dafny_input): output = {} if dafny_input.StreamArn.is_Some: - output["StreamArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.StreamArn.value - ).decode("utf-16-be") + output["StreamArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.StreamArn.value).decode('utf-16-be') if dafny_input.DestinationStatus.is_Some: - output["DestinationStatus"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DestinationStatus( - dafny_input.DestinationStatus.value - ) - ) + output["DestinationStatus"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DestinationStatus(dafny_input.DestinationStatus.value) if dafny_input.DestinationStatusDescription.is_Some: - output["DestinationStatusDescription"] = b"".join( - ord(c).to_bytes(2, "big") - for c in dafny_input.DestinationStatusDescription.value - ).decode("utf-16-be") + output["DestinationStatusDescription"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.DestinationStatusDescription.value).decode('utf-16-be') - return output + if dafny_input.ApproximateCreationDateTimePrecision.is_Some: + output["ApproximateCreationDateTimePrecision"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ApproximateCreationDateTimePrecision(dafny_input.ApproximateCreationDateTimePrecision.value) + return output def com_amazonaws_dynamodb_DestinationStatus(dafny_input): # Convert DestinationStatus @@ -3438,610 +2307,379 @@ def com_amazonaws_dynamodb_DestinationStatus(dafny_input): elif isinstance(dafny_input, DestinationStatus_ENABLE__FAILED): return "ENABLE_FAILED" + elif isinstance(dafny_input, DestinationStatus_UPDATING): + return "UPDATING" + else: raise ValueError("No recognized enum value in enum type: " + dafny_input) +def com_amazonaws_dynamodb_ApproximateCreationDateTimePrecision(dafny_input): + # Convert ApproximateCreationDateTimePrecision + if isinstance(dafny_input, ApproximateCreationDateTimePrecision_MILLISECOND): + return "MILLISECOND" + + elif isinstance(dafny_input, ApproximateCreationDateTimePrecision_MICROSECOND): + return "MICROSECOND" + + else: + raise ValueError("No recognized enum value in enum type: " + dafny_input) def com_amazonaws_dynamodb_DescribeKinesisStreamingDestinationOutput(dafny_input): output = {} if dafny_input.TableName.is_Some: - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName.value - ).decode("utf-16-be") + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName.value).decode('utf-16-be') if dafny_input.KinesisDataStreamDestinations.is_Some: - output["KinesisDataStreamDestinations"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_KinesisDataStreamDestination( - list_element - ) - for list_element in dafny_input.KinesisDataStreamDestinations.value - ] + output["KinesisDataStreamDestinations"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_KinesisDataStreamDestination(list_element) for list_element in dafny_input.KinesisDataStreamDestinations.value] return output - def com_amazonaws_dynamodb_DescribeLimitsInput(dafny_input): output = {} return output - def com_amazonaws_dynamodb_DescribeLimitsOutput(dafny_input): output = {} if dafny_input.AccountMaxReadCapacityUnits.is_Some: - output["AccountMaxReadCapacityUnits"] = ( - dafny_input.AccountMaxReadCapacityUnits.value - ) + output["AccountMaxReadCapacityUnits"] = dafny_input.AccountMaxReadCapacityUnits.value if dafny_input.AccountMaxWriteCapacityUnits.is_Some: - output["AccountMaxWriteCapacityUnits"] = ( - dafny_input.AccountMaxWriteCapacityUnits.value - ) + output["AccountMaxWriteCapacityUnits"] = dafny_input.AccountMaxWriteCapacityUnits.value if dafny_input.TableMaxReadCapacityUnits.is_Some: - output["TableMaxReadCapacityUnits"] = ( - dafny_input.TableMaxReadCapacityUnits.value - ) + output["TableMaxReadCapacityUnits"] = dafny_input.TableMaxReadCapacityUnits.value if dafny_input.TableMaxWriteCapacityUnits.is_Some: - output["TableMaxWriteCapacityUnits"] = ( - dafny_input.TableMaxWriteCapacityUnits.value - ) + output["TableMaxWriteCapacityUnits"] = dafny_input.TableMaxWriteCapacityUnits.value return output - def com_amazonaws_dynamodb_DescribeTableInput(dafny_input): output = {} - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName - ).decode("utf-16-be") + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName).decode('utf-16-be') return output - def com_amazonaws_dynamodb_DescribeTableOutput(dafny_input): output = {} if dafny_input.Table.is_Some: - output["Table"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableDescription( - dafny_input.Table.value - ) - ) + output["Table"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableDescription(dafny_input.Table.value) return output - def com_amazonaws_dynamodb_DescribeTableReplicaAutoScalingInput(dafny_input): output = {} - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName - ).decode("utf-16-be") + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName).decode('utf-16-be') return output - def com_amazonaws_dynamodb_TableAutoScalingDescription(dafny_input): output = {} if dafny_input.TableName.is_Some: - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName.value - ).decode("utf-16-be") + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName.value).decode('utf-16-be') if dafny_input.TableStatus.is_Some: - output["TableStatus"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableStatus( - dafny_input.TableStatus.value - ) - ) + output["TableStatus"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableStatus(dafny_input.TableStatus.value) if dafny_input.Replicas.is_Some: - output["Replicas"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaAutoScalingDescription( - list_element - ) - for list_element in dafny_input.Replicas.value - ] + output["Replicas"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaAutoScalingDescription(list_element) for list_element in dafny_input.Replicas.value] return output - def com_amazonaws_dynamodb_ReplicaAutoScalingDescription(dafny_input): output = {} if dafny_input.RegionName.is_Some: - output["RegionName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.RegionName.value - ).decode("utf-16-be") + output["RegionName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.RegionName.value).decode('utf-16-be') if dafny_input.GlobalSecondaryIndexes.is_Some: - output["GlobalSecondaryIndexes"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexAutoScalingDescription( - list_element - ) - for list_element in dafny_input.GlobalSecondaryIndexes.value - ] + output["GlobalSecondaryIndexes"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexAutoScalingDescription(list_element) for list_element in dafny_input.GlobalSecondaryIndexes.value] if dafny_input.ReplicaProvisionedReadCapacityAutoScalingSettings.is_Some: - output["ReplicaProvisionedReadCapacityAutoScalingSettings"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingSettingsDescription( - dafny_input.ReplicaProvisionedReadCapacityAutoScalingSettings.value - ) - ) + output["ReplicaProvisionedReadCapacityAutoScalingSettings"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingSettingsDescription(dafny_input.ReplicaProvisionedReadCapacityAutoScalingSettings.value) if dafny_input.ReplicaProvisionedWriteCapacityAutoScalingSettings.is_Some: - output["ReplicaProvisionedWriteCapacityAutoScalingSettings"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingSettingsDescription( - dafny_input.ReplicaProvisionedWriteCapacityAutoScalingSettings.value - ) - ) + output["ReplicaProvisionedWriteCapacityAutoScalingSettings"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingSettingsDescription(dafny_input.ReplicaProvisionedWriteCapacityAutoScalingSettings.value) if dafny_input.ReplicaStatus.is_Some: - output["ReplicaStatus"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaStatus( - dafny_input.ReplicaStatus.value - ) - ) + output["ReplicaStatus"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaStatus(dafny_input.ReplicaStatus.value) return output - -def com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexAutoScalingDescription( - dafny_input, -): +def com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexAutoScalingDescription(dafny_input): output = {} if dafny_input.IndexName.is_Some: - output["IndexName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.IndexName.value - ).decode("utf-16-be") + output["IndexName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.IndexName.value).decode('utf-16-be') if dafny_input.IndexStatus.is_Some: - output["IndexStatus"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_IndexStatus( - dafny_input.IndexStatus.value - ) - ) + output["IndexStatus"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_IndexStatus(dafny_input.IndexStatus.value) if dafny_input.ProvisionedReadCapacityAutoScalingSettings.is_Some: - output["ProvisionedReadCapacityAutoScalingSettings"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingSettingsDescription( - dafny_input.ProvisionedReadCapacityAutoScalingSettings.value - ) - ) + output["ProvisionedReadCapacityAutoScalingSettings"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingSettingsDescription(dafny_input.ProvisionedReadCapacityAutoScalingSettings.value) if dafny_input.ProvisionedWriteCapacityAutoScalingSettings.is_Some: - output["ProvisionedWriteCapacityAutoScalingSettings"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingSettingsDescription( - dafny_input.ProvisionedWriteCapacityAutoScalingSettings.value - ) - ) + output["ProvisionedWriteCapacityAutoScalingSettings"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingSettingsDescription(dafny_input.ProvisionedWriteCapacityAutoScalingSettings.value) return output - def com_amazonaws_dynamodb_DescribeTableReplicaAutoScalingOutput(dafny_input): output = {} if dafny_input.TableAutoScalingDescription.is_Some: - output["TableAutoScalingDescription"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableAutoScalingDescription( - dafny_input.TableAutoScalingDescription.value - ) - ) + output["TableAutoScalingDescription"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableAutoScalingDescription(dafny_input.TableAutoScalingDescription.value) return output - def com_amazonaws_dynamodb_DescribeTimeToLiveInput(dafny_input): output = {} - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName - ).decode("utf-16-be") + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName).decode('utf-16-be') return output - def com_amazonaws_dynamodb_DescribeTimeToLiveOutput(dafny_input): output = {} if dafny_input.TimeToLiveDescription.is_Some: - output["TimeToLiveDescription"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TimeToLiveDescription( - dafny_input.TimeToLiveDescription.value - ) - ) + output["TimeToLiveDescription"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TimeToLiveDescription(dafny_input.TimeToLiveDescription.value) return output +def com_amazonaws_dynamodb_EnableKinesisStreamingConfiguration(dafny_input): + output = {} + if dafny_input.ApproximateCreationDateTimePrecision.is_Some: + output["ApproximateCreationDateTimePrecision"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ApproximateCreationDateTimePrecision(dafny_input.ApproximateCreationDateTimePrecision.value) + + return output def com_amazonaws_dynamodb_DisableKinesisStreamingDestinationInput(dafny_input): output = {} - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName - ).decode("utf-16-be") - output["StreamArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.StreamArn - ).decode("utf-16-be") - return output + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName).decode('utf-16-be') + output["StreamArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.StreamArn).decode('utf-16-be') + if dafny_input.EnableKinesisStreamingConfiguration.is_Some: + output["EnableKinesisStreamingConfiguration"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_EnableKinesisStreamingConfiguration(dafny_input.EnableKinesisStreamingConfiguration.value) + return output def com_amazonaws_dynamodb_DisableKinesisStreamingDestinationOutput(dafny_input): output = {} if dafny_input.TableName.is_Some: - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName.value - ).decode("utf-16-be") + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName.value).decode('utf-16-be') if dafny_input.StreamArn.is_Some: - output["StreamArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.StreamArn.value - ).decode("utf-16-be") + output["StreamArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.StreamArn.value).decode('utf-16-be') if dafny_input.DestinationStatus.is_Some: - output["DestinationStatus"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DestinationStatus( - dafny_input.DestinationStatus.value - ) - ) + output["DestinationStatus"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DestinationStatus(dafny_input.DestinationStatus.value) - return output + if dafny_input.EnableKinesisStreamingConfiguration.is_Some: + output["EnableKinesisStreamingConfiguration"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_EnableKinesisStreamingConfiguration(dafny_input.EnableKinesisStreamingConfiguration.value) + return output def com_amazonaws_dynamodb_EnableKinesisStreamingDestinationInput(dafny_input): output = {} - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName - ).decode("utf-16-be") - output["StreamArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.StreamArn - ).decode("utf-16-be") - return output + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName).decode('utf-16-be') + output["StreamArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.StreamArn).decode('utf-16-be') + if dafny_input.EnableKinesisStreamingConfiguration.is_Some: + output["EnableKinesisStreamingConfiguration"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_EnableKinesisStreamingConfiguration(dafny_input.EnableKinesisStreamingConfiguration.value) + return output def com_amazonaws_dynamodb_EnableKinesisStreamingDestinationOutput(dafny_input): output = {} if dafny_input.TableName.is_Some: - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName.value - ).decode("utf-16-be") + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName.value).decode('utf-16-be') if dafny_input.StreamArn.is_Some: - output["StreamArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.StreamArn.value - ).decode("utf-16-be") + output["StreamArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.StreamArn.value).decode('utf-16-be') if dafny_input.DestinationStatus.is_Some: - output["DestinationStatus"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DestinationStatus( - dafny_input.DestinationStatus.value - ) - ) + output["DestinationStatus"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DestinationStatus(dafny_input.DestinationStatus.value) - return output + if dafny_input.EnableKinesisStreamingConfiguration.is_Some: + output["EnableKinesisStreamingConfiguration"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_EnableKinesisStreamingConfiguration(dafny_input.EnableKinesisStreamingConfiguration.value) + return output def com_amazonaws_dynamodb_ExecuteStatementInput(dafny_input): output = {} - output["Statement"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.Statement - ).decode("utf-16-be") + output["Statement"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.Statement).decode('utf-16-be') if dafny_input.Parameters.is_Some: - output["Parameters"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - list_element - ) - for list_element in dafny_input.Parameters.value - ] + output["Parameters"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(list_element) for list_element in dafny_input.Parameters.value] if dafny_input.ConsistentRead.is_Some: output["ConsistentRead"] = dafny_input.ConsistentRead.value if dafny_input.NextToken.is_Some: - output["NextToken"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.NextToken.value - ).decode("utf-16-be") + output["NextToken"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.NextToken.value).decode('utf-16-be') if dafny_input.ReturnConsumedCapacity.is_Some: - output["ReturnConsumedCapacity"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnConsumedCapacity( - dafny_input.ReturnConsumedCapacity.value - ) - ) + output["ReturnConsumedCapacity"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnConsumedCapacity(dafny_input.ReturnConsumedCapacity.value) if dafny_input.Limit.is_Some: output["Limit"] = dafny_input.Limit.value - return output + if dafny_input.ReturnValuesOnConditionCheckFailure.is_Some: + output["ReturnValuesOnConditionCheckFailure"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure(dafny_input.ReturnValuesOnConditionCheckFailure.value) + return output def com_amazonaws_dynamodb_ExecuteStatementOutput(dafny_input): output = {} if dafny_input.Items.is_Some: - output["Items"] = [ - { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in list_element.items - } - for list_element in dafny_input.Items.value - ] + output["Items"] = [{b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in list_element.items } for list_element in dafny_input.Items.value] if dafny_input.NextToken.is_Some: - output["NextToken"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.NextToken.value - ).decode("utf-16-be") + output["NextToken"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.NextToken.value).decode('utf-16-be') if dafny_input.ConsumedCapacity.is_Some: - output["ConsumedCapacity"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConsumedCapacity( - dafny_input.ConsumedCapacity.value - ) - ) + output["ConsumedCapacity"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConsumedCapacity(dafny_input.ConsumedCapacity.value) if dafny_input.LastEvaluatedKey.is_Some: - output["LastEvaluatedKey"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in dafny_input.LastEvaluatedKey.value.items - } + output["LastEvaluatedKey"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.LastEvaluatedKey.value.items } return output - def com_amazonaws_dynamodb_ParameterizedStatement(dafny_input): output = {} - output["Statement"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.Statement - ).decode("utf-16-be") + output["Statement"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.Statement).decode('utf-16-be') if dafny_input.Parameters.is_Some: - output["Parameters"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - list_element - ) - for list_element in dafny_input.Parameters.value - ] + output["Parameters"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(list_element) for list_element in dafny_input.Parameters.value] - return output + if dafny_input.ReturnValuesOnConditionCheckFailure.is_Some: + output["ReturnValuesOnConditionCheckFailure"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure(dafny_input.ReturnValuesOnConditionCheckFailure.value) + return output def com_amazonaws_dynamodb_ExecuteTransactionInput(dafny_input): output = {} - output["TransactStatements"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ParameterizedStatement( - list_element - ) - for list_element in dafny_input.TransactStatements - ] + output["TransactStatements"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ParameterizedStatement(list_element) for list_element in dafny_input.TransactStatements] if dafny_input.ClientRequestToken.is_Some: - output["ClientRequestToken"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.ClientRequestToken.value - ).decode("utf-16-be") + output["ClientRequestToken"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ClientRequestToken.value).decode('utf-16-be') if dafny_input.ReturnConsumedCapacity.is_Some: - output["ReturnConsumedCapacity"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnConsumedCapacity( - dafny_input.ReturnConsumedCapacity.value - ) - ) + output["ReturnConsumedCapacity"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnConsumedCapacity(dafny_input.ReturnConsumedCapacity.value) return output - def com_amazonaws_dynamodb_ItemResponse(dafny_input): output = {} if dafny_input.Item.is_Some: - output["Item"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in dafny_input.Item.value.items - } + output["Item"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.Item.value.items } return output - def com_amazonaws_dynamodb_ExecuteTransactionOutput(dafny_input): output = {} if dafny_input.Responses.is_Some: - output["Responses"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ItemResponse( - list_element - ) - for list_element in dafny_input.Responses.value - ] + output["Responses"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ItemResponse(list_element) for list_element in dafny_input.Responses.value] if dafny_input.ConsumedCapacity.is_Some: - output["ConsumedCapacity"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConsumedCapacity( - list_element - ) - for list_element in dafny_input.ConsumedCapacity.value - ] + output["ConsumedCapacity"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConsumedCapacity(list_element) for list_element in dafny_input.ConsumedCapacity.value] return output - def com_amazonaws_dynamodb_ExportTableToPointInTimeInput(dafny_input): output = {} - output["TableArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableArn - ).decode("utf-16-be") + output["TableArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableArn).decode('utf-16-be') if dafny_input.ExportTime.is_Some: - output["ExportTime"] = datetime.fromisoformat( - dafny_input.ExportTime.value.VerbatimString(False) - ) + output["ExportTime"] = datetime.fromisoformat(dafny_input.ExportTime.value.VerbatimString(False)) if dafny_input.ClientToken.is_Some: - output["ClientToken"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.ClientToken.value - ).decode("utf-16-be") + output["ClientToken"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ClientToken.value).decode('utf-16-be') - output["S3Bucket"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.S3Bucket - ).decode("utf-16-be") + output["S3Bucket"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.S3Bucket).decode('utf-16-be') if dafny_input.S3BucketOwner.is_Some: - output["S3BucketOwner"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.S3BucketOwner.value - ).decode("utf-16-be") + output["S3BucketOwner"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.S3BucketOwner.value).decode('utf-16-be') if dafny_input.S3Prefix.is_Some: - output["S3Prefix"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.S3Prefix.value - ).decode("utf-16-be") + output["S3Prefix"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.S3Prefix.value).decode('utf-16-be') if dafny_input.S3SseAlgorithm.is_Some: - output["S3SseAlgorithm"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_S3SseAlgorithm( - dafny_input.S3SseAlgorithm.value - ) - ) + output["S3SseAlgorithm"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_S3SseAlgorithm(dafny_input.S3SseAlgorithm.value) if dafny_input.S3SseKmsKeyId.is_Some: - output["S3SseKmsKeyId"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.S3SseKmsKeyId.value - ).decode("utf-16-be") + output["S3SseKmsKeyId"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.S3SseKmsKeyId.value).decode('utf-16-be') if dafny_input.ExportFormat.is_Some: - output["ExportFormat"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ExportFormat( - dafny_input.ExportFormat.value - ) - ) + output["ExportFormat"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ExportFormat(dafny_input.ExportFormat.value) - return output + if dafny_input.ExportType.is_Some: + output["ExportType"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ExportType(dafny_input.ExportType.value) + + if dafny_input.IncrementalExportSpecification.is_Some: + output["IncrementalExportSpecification"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_IncrementalExportSpecification(dafny_input.IncrementalExportSpecification.value) + return output def com_amazonaws_dynamodb_ExportTableToPointInTimeOutput(dafny_input): output = {} if dafny_input.ExportDescription.is_Some: - output["ExportDescription"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ExportDescription( - dafny_input.ExportDescription.value - ) - ) + output["ExportDescription"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ExportDescription(dafny_input.ExportDescription.value) return output - def com_amazonaws_dynamodb_GetItemInput(dafny_input): output = {} - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName - ).decode("utf-16-be") - output["Key"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in dafny_input.Key.items - } + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName).decode('utf-16-be') + output["Key"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.Key.items } if dafny_input.AttributesToGet.is_Some: - output["AttributesToGet"] = [ - b"".join(ord(c).to_bytes(2, "big") for c in list_element).decode( - "utf-16-be" - ) - for list_element in dafny_input.AttributesToGet.value - ] + output["AttributesToGet"] = [b''.join(ord(c).to_bytes(2, 'big') for c in list_element).decode('utf-16-be') for list_element in dafny_input.AttributesToGet.value] if dafny_input.ConsistentRead.is_Some: output["ConsistentRead"] = dafny_input.ConsistentRead.value if dafny_input.ReturnConsumedCapacity.is_Some: - output["ReturnConsumedCapacity"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnConsumedCapacity( - dafny_input.ReturnConsumedCapacity.value - ) - ) + output["ReturnConsumedCapacity"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnConsumedCapacity(dafny_input.ReturnConsumedCapacity.value) if dafny_input.ProjectionExpression.is_Some: - output["ProjectionExpression"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.ProjectionExpression.value - ).decode("utf-16-be") + output["ProjectionExpression"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ProjectionExpression.value).decode('utf-16-be') if dafny_input.ExpressionAttributeNames.is_Some: - output["ExpressionAttributeNames"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key) - .decode("utf-16-be"): b"".join(ord(c).to_bytes(2, "big") for c in value) - .decode("utf-16-be") - for (key, value) in dafny_input.ExpressionAttributeNames.value.items - } + output["ExpressionAttributeNames"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): b''.join(ord(c).to_bytes(2, 'big') for c in value).decode('utf-16-be') for (key, value) in dafny_input.ExpressionAttributeNames.value.items } return output - def com_amazonaws_dynamodb_GetItemOutput(dafny_input): output = {} if dafny_input.Item.is_Some: - output["Item"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in dafny_input.Item.value.items - } + output["Item"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.Item.value.items } if dafny_input.ConsumedCapacity.is_Some: - output["ConsumedCapacity"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConsumedCapacity( - dafny_input.ConsumedCapacity.value - ) - ) + output["ConsumedCapacity"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConsumedCapacity(dafny_input.ConsumedCapacity.value) + + return output +def com_amazonaws_dynamodb_GetResourcePolicyInput(dafny_input): + output = {} + output["ResourceArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ResourceArn).decode('utf-16-be') return output +def com_amazonaws_dynamodb_GetResourcePolicyOutput(dafny_input): + output = {} + if dafny_input.Policy.is_Some: + output["Policy"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.Policy.value).decode('utf-16-be') + + if dafny_input.RevisionId.is_Some: + output["RevisionId"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.RevisionId.value).decode('utf-16-be') + + return output def com_amazonaws_dynamodb_ImportTableInput(dafny_input): output = {} if dafny_input.ClientToken.is_Some: - output["ClientToken"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.ClientToken.value - ).decode("utf-16-be") - - output["S3BucketSource"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_S3BucketSource( - dafny_input.S3BucketSource - ) - ) - output["InputFormat"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_InputFormat( - dafny_input.InputFormat - ) - ) + output["ClientToken"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ClientToken.value).decode('utf-16-be') + + output["S3BucketSource"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_S3BucketSource(dafny_input.S3BucketSource) + output["InputFormat"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_InputFormat(dafny_input.InputFormat) if dafny_input.InputFormatOptions.is_Some: - output["InputFormatOptions"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_InputFormatOptions( - dafny_input.InputFormatOptions.value - ) - ) + output["InputFormatOptions"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_InputFormatOptions(dafny_input.InputFormatOptions.value) if dafny_input.InputCompressionType.is_Some: - output["InputCompressionType"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_InputCompressionType( - dafny_input.InputCompressionType.value - ) - ) + output["InputCompressionType"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_InputCompressionType(dafny_input.InputCompressionType.value) - output["TableCreationParameters"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableCreationParameters( - dafny_input.TableCreationParameters - ) - ) + output["TableCreationParameters"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableCreationParameters(dafny_input.TableCreationParameters) return output - def com_amazonaws_dynamodb_ImportTableOutput(dafny_input): output = {} - output["ImportTableDescription"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ImportTableDescription( - dafny_input.ImportTableDescription - ) - ) + output["ImportTableDescription"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ImportTableDescription(dafny_input.ImportTableDescription) return output - def com_amazonaws_dynamodb_BackupTypeFilter(dafny_input): # Convert BackupTypeFilter if isinstance(dafny_input, BackupTypeFilter_USER): @@ -4059,538 +2697,330 @@ def com_amazonaws_dynamodb_BackupTypeFilter(dafny_input): else: raise ValueError("No recognized enum value in enum type: " + dafny_input) - def com_amazonaws_dynamodb_ListBackupsInput(dafny_input): output = {} if dafny_input.TableName.is_Some: - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName.value - ).decode("utf-16-be") + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName.value).decode('utf-16-be') if dafny_input.Limit.is_Some: output["Limit"] = dafny_input.Limit.value if dafny_input.TimeRangeLowerBound.is_Some: - output["TimeRangeLowerBound"] = datetime.fromisoformat( - dafny_input.TimeRangeLowerBound.value.VerbatimString(False) - ) + output["TimeRangeLowerBound"] = datetime.fromisoformat(dafny_input.TimeRangeLowerBound.value.VerbatimString(False)) if dafny_input.TimeRangeUpperBound.is_Some: - output["TimeRangeUpperBound"] = datetime.fromisoformat( - dafny_input.TimeRangeUpperBound.value.VerbatimString(False) - ) + output["TimeRangeUpperBound"] = datetime.fromisoformat(dafny_input.TimeRangeUpperBound.value.VerbatimString(False)) if dafny_input.ExclusiveStartBackupArn.is_Some: - output["ExclusiveStartBackupArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.ExclusiveStartBackupArn.value - ).decode("utf-16-be") + output["ExclusiveStartBackupArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ExclusiveStartBackupArn.value).decode('utf-16-be') if dafny_input.BackupType.is_Some: - output["BackupType"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BackupTypeFilter( - dafny_input.BackupType.value - ) - ) + output["BackupType"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BackupTypeFilter(dafny_input.BackupType.value) return output - def com_amazonaws_dynamodb_BackupSummary(dafny_input): output = {} if dafny_input.TableName.is_Some: - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName.value - ).decode("utf-16-be") + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName.value).decode('utf-16-be') if dafny_input.TableId.is_Some: - output["TableId"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableId.value - ).decode("utf-16-be") + output["TableId"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableId.value).decode('utf-16-be') if dafny_input.TableArn.is_Some: - output["TableArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableArn.value - ).decode("utf-16-be") + output["TableArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableArn.value).decode('utf-16-be') if dafny_input.BackupArn.is_Some: - output["BackupArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.BackupArn.value - ).decode("utf-16-be") + output["BackupArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.BackupArn.value).decode('utf-16-be') if dafny_input.BackupName.is_Some: - output["BackupName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.BackupName.value - ).decode("utf-16-be") + output["BackupName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.BackupName.value).decode('utf-16-be') if dafny_input.BackupCreationDateTime.is_Some: - output["BackupCreationDateTime"] = datetime.fromisoformat( - dafny_input.BackupCreationDateTime.value.VerbatimString(False) - ) + output["BackupCreationDateTime"] = datetime.fromisoformat(dafny_input.BackupCreationDateTime.value.VerbatimString(False)) if dafny_input.BackupExpiryDateTime.is_Some: - output["BackupExpiryDateTime"] = datetime.fromisoformat( - dafny_input.BackupExpiryDateTime.value.VerbatimString(False) - ) + output["BackupExpiryDateTime"] = datetime.fromisoformat(dafny_input.BackupExpiryDateTime.value.VerbatimString(False)) if dafny_input.BackupStatus.is_Some: - output["BackupStatus"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BackupStatus( - dafny_input.BackupStatus.value - ) - ) + output["BackupStatus"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BackupStatus(dafny_input.BackupStatus.value) if dafny_input.BackupType.is_Some: - output["BackupType"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BackupType( - dafny_input.BackupType.value - ) - ) + output["BackupType"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BackupType(dafny_input.BackupType.value) if dafny_input.BackupSizeBytes.is_Some: output["BackupSizeBytes"] = dafny_input.BackupSizeBytes.value return output - def com_amazonaws_dynamodb_ListBackupsOutput(dafny_input): output = {} if dafny_input.BackupSummaries.is_Some: - output["BackupSummaries"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BackupSummary( - list_element - ) - for list_element in dafny_input.BackupSummaries.value - ] + output["BackupSummaries"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BackupSummary(list_element) for list_element in dafny_input.BackupSummaries.value] if dafny_input.LastEvaluatedBackupArn.is_Some: - output["LastEvaluatedBackupArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.LastEvaluatedBackupArn.value - ).decode("utf-16-be") + output["LastEvaluatedBackupArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.LastEvaluatedBackupArn.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_ListContributorInsightsInput(dafny_input): output = {} if dafny_input.TableName.is_Some: - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName.value - ).decode("utf-16-be") + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName.value).decode('utf-16-be') if dafny_input.NextToken.is_Some: - output["NextToken"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.NextToken.value - ).decode("utf-16-be") + output["NextToken"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.NextToken.value).decode('utf-16-be') if dafny_input.MaxResults.is_Some: output["MaxResults"] = dafny_input.MaxResults.value return output - def com_amazonaws_dynamodb_ContributorInsightsSummary(dafny_input): output = {} if dafny_input.TableName.is_Some: - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName.value - ).decode("utf-16-be") + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName.value).decode('utf-16-be') if dafny_input.IndexName.is_Some: - output["IndexName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.IndexName.value - ).decode("utf-16-be") + output["IndexName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.IndexName.value).decode('utf-16-be') if dafny_input.ContributorInsightsStatus.is_Some: - output["ContributorInsightsStatus"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ContributorInsightsStatus( - dafny_input.ContributorInsightsStatus.value - ) - ) + output["ContributorInsightsStatus"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ContributorInsightsStatus(dafny_input.ContributorInsightsStatus.value) return output - def com_amazonaws_dynamodb_ListContributorInsightsOutput(dafny_input): output = {} if dafny_input.ContributorInsightsSummaries.is_Some: - output["ContributorInsightsSummaries"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ContributorInsightsSummary( - list_element - ) - for list_element in dafny_input.ContributorInsightsSummaries.value - ] + output["ContributorInsightsSummaries"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ContributorInsightsSummary(list_element) for list_element in dafny_input.ContributorInsightsSummaries.value] if dafny_input.NextToken.is_Some: - output["NextToken"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.NextToken.value - ).decode("utf-16-be") + output["NextToken"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.NextToken.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_ListExportsInput(dafny_input): output = {} if dafny_input.TableArn.is_Some: - output["TableArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableArn.value - ).decode("utf-16-be") + output["TableArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableArn.value).decode('utf-16-be') if dafny_input.MaxResults.is_Some: output["MaxResults"] = dafny_input.MaxResults.value if dafny_input.NextToken.is_Some: - output["NextToken"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.NextToken.value - ).decode("utf-16-be") + output["NextToken"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.NextToken.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_ExportSummary(dafny_input): output = {} if dafny_input.ExportArn.is_Some: - output["ExportArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.ExportArn.value - ).decode("utf-16-be") + output["ExportArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ExportArn.value).decode('utf-16-be') if dafny_input.ExportStatus.is_Some: - output["ExportStatus"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ExportStatus( - dafny_input.ExportStatus.value - ) - ) + output["ExportStatus"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ExportStatus(dafny_input.ExportStatus.value) - return output + if dafny_input.ExportType.is_Some: + output["ExportType"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ExportType(dafny_input.ExportType.value) + return output def com_amazonaws_dynamodb_ListExportsOutput(dafny_input): output = {} if dafny_input.ExportSummaries.is_Some: - output["ExportSummaries"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ExportSummary( - list_element - ) - for list_element in dafny_input.ExportSummaries.value - ] + output["ExportSummaries"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ExportSummary(list_element) for list_element in dafny_input.ExportSummaries.value] if dafny_input.NextToken.is_Some: - output["NextToken"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.NextToken.value - ).decode("utf-16-be") + output["NextToken"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.NextToken.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_ListGlobalTablesInput(dafny_input): output = {} if dafny_input.ExclusiveStartGlobalTableName.is_Some: - output["ExclusiveStartGlobalTableName"] = b"".join( - ord(c).to_bytes(2, "big") - for c in dafny_input.ExclusiveStartGlobalTableName.value - ).decode("utf-16-be") + output["ExclusiveStartGlobalTableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ExclusiveStartGlobalTableName.value).decode('utf-16-be') if dafny_input.Limit.is_Some: output["Limit"] = dafny_input.Limit.value if dafny_input.RegionName.is_Some: - output["RegionName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.RegionName.value - ).decode("utf-16-be") + output["RegionName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.RegionName.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_GlobalTable(dafny_input): output = {} if dafny_input.GlobalTableName.is_Some: - output["GlobalTableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.GlobalTableName.value - ).decode("utf-16-be") + output["GlobalTableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.GlobalTableName.value).decode('utf-16-be') if dafny_input.ReplicationGroup.is_Some: - output["ReplicationGroup"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Replica( - list_element - ) - for list_element in dafny_input.ReplicationGroup.value - ] + output["ReplicationGroup"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Replica(list_element) for list_element in dafny_input.ReplicationGroup.value] return output - def com_amazonaws_dynamodb_ListGlobalTablesOutput(dafny_input): output = {} if dafny_input.GlobalTables.is_Some: - output["GlobalTables"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_GlobalTable( - list_element - ) - for list_element in dafny_input.GlobalTables.value - ] + output["GlobalTables"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_GlobalTable(list_element) for list_element in dafny_input.GlobalTables.value] if dafny_input.LastEvaluatedGlobalTableName.is_Some: - output["LastEvaluatedGlobalTableName"] = b"".join( - ord(c).to_bytes(2, "big") - for c in dafny_input.LastEvaluatedGlobalTableName.value - ).decode("utf-16-be") + output["LastEvaluatedGlobalTableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.LastEvaluatedGlobalTableName.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_ListImportsInput(dafny_input): output = {} if dafny_input.TableArn.is_Some: - output["TableArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableArn.value - ).decode("utf-16-be") + output["TableArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableArn.value).decode('utf-16-be') if dafny_input.PageSize.is_Some: output["PageSize"] = dafny_input.PageSize.value if dafny_input.NextToken.is_Some: - output["NextToken"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.NextToken.value - ).decode("utf-16-be") + output["NextToken"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.NextToken.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_ImportSummary(dafny_input): output = {} if dafny_input.ImportArn.is_Some: - output["ImportArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.ImportArn.value - ).decode("utf-16-be") + output["ImportArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ImportArn.value).decode('utf-16-be') if dafny_input.ImportStatus.is_Some: - output["ImportStatus"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ImportStatus( - dafny_input.ImportStatus.value - ) - ) + output["ImportStatus"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ImportStatus(dafny_input.ImportStatus.value) if dafny_input.TableArn.is_Some: - output["TableArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableArn.value - ).decode("utf-16-be") + output["TableArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableArn.value).decode('utf-16-be') if dafny_input.S3BucketSource.is_Some: - output["S3BucketSource"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_S3BucketSource( - dafny_input.S3BucketSource.value - ) - ) + output["S3BucketSource"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_S3BucketSource(dafny_input.S3BucketSource.value) if dafny_input.CloudWatchLogGroupArn.is_Some: - output["CloudWatchLogGroupArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.CloudWatchLogGroupArn.value - ).decode("utf-16-be") + output["CloudWatchLogGroupArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.CloudWatchLogGroupArn.value).decode('utf-16-be') if dafny_input.InputFormat.is_Some: - output["InputFormat"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_InputFormat( - dafny_input.InputFormat.value - ) - ) + output["InputFormat"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_InputFormat(dafny_input.InputFormat.value) if dafny_input.StartTime.is_Some: - output["StartTime"] = datetime.fromisoformat( - dafny_input.StartTime.value.VerbatimString(False) - ) + output["StartTime"] = datetime.fromisoformat(dafny_input.StartTime.value.VerbatimString(False)) if dafny_input.EndTime.is_Some: - output["EndTime"] = datetime.fromisoformat( - dafny_input.EndTime.value.VerbatimString(False) - ) + output["EndTime"] = datetime.fromisoformat(dafny_input.EndTime.value.VerbatimString(False)) return output - def com_amazonaws_dynamodb_ListImportsOutput(dafny_input): output = {} if dafny_input.ImportSummaryList.is_Some: - output["ImportSummaryList"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ImportSummary( - list_element - ) - for list_element in dafny_input.ImportSummaryList.value - ] + output["ImportSummaryList"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ImportSummary(list_element) for list_element in dafny_input.ImportSummaryList.value] if dafny_input.NextToken.is_Some: - output["NextToken"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.NextToken.value - ).decode("utf-16-be") + output["NextToken"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.NextToken.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_ListTablesInput(dafny_input): output = {} if dafny_input.ExclusiveStartTableName.is_Some: - output["ExclusiveStartTableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.ExclusiveStartTableName.value - ).decode("utf-16-be") + output["ExclusiveStartTableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ExclusiveStartTableName.value).decode('utf-16-be') if dafny_input.Limit.is_Some: output["Limit"] = dafny_input.Limit.value return output - def com_amazonaws_dynamodb_ListTablesOutput(dafny_input): output = {} if dafny_input.TableNames.is_Some: - output["TableNames"] = [ - b"".join(ord(c).to_bytes(2, "big") for c in list_element).decode( - "utf-16-be" - ) - for list_element in dafny_input.TableNames.value - ] + output["TableNames"] = [b''.join(ord(c).to_bytes(2, 'big') for c in list_element).decode('utf-16-be') for list_element in dafny_input.TableNames.value] if dafny_input.LastEvaluatedTableName.is_Some: - output["LastEvaluatedTableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.LastEvaluatedTableName.value - ).decode("utf-16-be") + output["LastEvaluatedTableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.LastEvaluatedTableName.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_ListTagsOfResourceInput(dafny_input): output = {} - output["ResourceArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.ResourceArn - ).decode("utf-16-be") + output["ResourceArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ResourceArn).decode('utf-16-be') if dafny_input.NextToken.is_Some: - output["NextToken"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.NextToken.value - ).decode("utf-16-be") + output["NextToken"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.NextToken.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_ListTagsOfResourceOutput(dafny_input): output = {} if dafny_input.Tags.is_Some: - output["Tags"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Tag( - list_element - ) - for list_element in dafny_input.Tags.value - ] + output["Tags"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Tag(list_element) for list_element in dafny_input.Tags.value] if dafny_input.NextToken.is_Some: - output["NextToken"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.NextToken.value - ).decode("utf-16-be") + output["NextToken"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.NextToken.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_PutItemInput(dafny_input): output = {} - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName - ).decode("utf-16-be") - output["Item"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in dafny_input.Item.items - } + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName).decode('utf-16-be') + output["Item"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.Item.items } if dafny_input.Expected.is_Some: - output["Expected"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ExpectedAttributeValue( - value - ) - for (key, value) in dafny_input.Expected.value.items - } + output["Expected"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ExpectedAttributeValue(value) for (key, value) in dafny_input.Expected.value.items } if dafny_input.ReturnValues.is_Some: - output["ReturnValues"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnValue( - dafny_input.ReturnValues.value - ) - ) + output["ReturnValues"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnValue(dafny_input.ReturnValues.value) if dafny_input.ReturnConsumedCapacity.is_Some: - output["ReturnConsumedCapacity"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnConsumedCapacity( - dafny_input.ReturnConsumedCapacity.value - ) - ) + output["ReturnConsumedCapacity"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnConsumedCapacity(dafny_input.ReturnConsumedCapacity.value) if dafny_input.ReturnItemCollectionMetrics.is_Some: - output["ReturnItemCollectionMetrics"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnItemCollectionMetrics( - dafny_input.ReturnItemCollectionMetrics.value - ) - ) + output["ReturnItemCollectionMetrics"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnItemCollectionMetrics(dafny_input.ReturnItemCollectionMetrics.value) if dafny_input.ConditionalOperator.is_Some: - output["ConditionalOperator"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConditionalOperator( - dafny_input.ConditionalOperator.value - ) - ) + output["ConditionalOperator"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConditionalOperator(dafny_input.ConditionalOperator.value) if dafny_input.ConditionExpression.is_Some: - output["ConditionExpression"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.ConditionExpression.value - ).decode("utf-16-be") + output["ConditionExpression"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ConditionExpression.value).decode('utf-16-be') if dafny_input.ExpressionAttributeNames.is_Some: - output["ExpressionAttributeNames"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key) - .decode("utf-16-be"): b"".join(ord(c).to_bytes(2, "big") for c in value) - .decode("utf-16-be") - for (key, value) in dafny_input.ExpressionAttributeNames.value.items - } + output["ExpressionAttributeNames"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): b''.join(ord(c).to_bytes(2, 'big') for c in value).decode('utf-16-be') for (key, value) in dafny_input.ExpressionAttributeNames.value.items } if dafny_input.ExpressionAttributeValues.is_Some: - output["ExpressionAttributeValues"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in dafny_input.ExpressionAttributeValues.value.items - } + output["ExpressionAttributeValues"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.ExpressionAttributeValues.value.items } - return output + if dafny_input.ReturnValuesOnConditionCheckFailure.is_Some: + output["ReturnValuesOnConditionCheckFailure"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure(dafny_input.ReturnValuesOnConditionCheckFailure.value) + return output def com_amazonaws_dynamodb_PutItemOutput(dafny_input): output = {} if dafny_input.Attributes.is_Some: - output["Attributes"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in dafny_input.Attributes.value.items - } + output["Attributes"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.Attributes.value.items } if dafny_input.ConsumedCapacity.is_Some: - output["ConsumedCapacity"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConsumedCapacity( - dafny_input.ConsumedCapacity.value - ) - ) + output["ConsumedCapacity"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConsumedCapacity(dafny_input.ConsumedCapacity.value) if dafny_input.ItemCollectionMetrics.is_Some: - output["ItemCollectionMetrics"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ItemCollectionMetrics( - dafny_input.ItemCollectionMetrics.value - ) - ) + output["ItemCollectionMetrics"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ItemCollectionMetrics(dafny_input.ItemCollectionMetrics.value) + + return output + +def com_amazonaws_dynamodb_PutResourcePolicyInput(dafny_input): + output = {} + output["ResourceArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ResourceArn).decode('utf-16-be') + output["Policy"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.Policy).decode('utf-16-be') + if dafny_input.ExpectedRevisionId.is_Some: + output["ExpectedRevisionId"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ExpectedRevisionId.value).decode('utf-16-be') + + if dafny_input.ConfirmRemoveSelfResourceAccess.is_Some: + output["ConfirmRemoveSelfResourceAccess"] = dafny_input.ConfirmRemoveSelfResourceAccess.value return output +def com_amazonaws_dynamodb_PutResourcePolicyOutput(dafny_input): + output = {} + if dafny_input.RevisionId.is_Some: + output["RevisionId"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.RevisionId.value).decode('utf-16-be') + + return output def com_amazonaws_dynamodb_Select(dafny_input): # Convert Select @@ -4609,49 +3039,25 @@ def com_amazonaws_dynamodb_Select(dafny_input): else: raise ValueError("No recognized enum value in enum type: " + dafny_input) - def com_amazonaws_dynamodb_Condition(dafny_input): output = {} if dafny_input.AttributeValueList.is_Some: - output["AttributeValueList"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - list_element - ) - for list_element in dafny_input.AttributeValueList.value - ] + output["AttributeValueList"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(list_element) for list_element in dafny_input.AttributeValueList.value] - output["ComparisonOperator"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ComparisonOperator( - dafny_input.ComparisonOperator - ) - ) + output["ComparisonOperator"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ComparisonOperator(dafny_input.ComparisonOperator) return output - def com_amazonaws_dynamodb_QueryInput(dafny_input): output = {} - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName - ).decode("utf-16-be") + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName).decode('utf-16-be') if dafny_input.IndexName.is_Some: - output["IndexName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.IndexName.value - ).decode("utf-16-be") + output["IndexName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.IndexName.value).decode('utf-16-be') if dafny_input.Select.is_Some: - output["Select"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Select( - dafny_input.Select.value - ) - ) + output["Select"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Select(dafny_input.Select.value) if dafny_input.AttributesToGet.is_Some: - output["AttributesToGet"] = [ - b"".join(ord(c).to_bytes(2, "big") for c in list_element).decode( - "utf-16-be" - ) - for list_element in dafny_input.AttributesToGet.value - ] + output["AttributesToGet"] = [b''.join(ord(c).to_bytes(2, 'big') for c in list_element).decode('utf-16-be') for list_element in dafny_input.AttributesToGet.value] if dafny_input.Limit.is_Some: output["Limit"] = dafny_input.Limit.value @@ -4660,102 +3066,44 @@ def com_amazonaws_dynamodb_QueryInput(dafny_input): output["ConsistentRead"] = dafny_input.ConsistentRead.value if dafny_input.KeyConditions.is_Some: - output["KeyConditions"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Condition( - value - ) - for (key, value) in dafny_input.KeyConditions.value.items - } + output["KeyConditions"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Condition(value) for (key, value) in dafny_input.KeyConditions.value.items } if dafny_input.QueryFilter.is_Some: - output["QueryFilter"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Condition( - value - ) - for (key, value) in dafny_input.QueryFilter.value.items - } + output["QueryFilter"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Condition(value) for (key, value) in dafny_input.QueryFilter.value.items } if dafny_input.ConditionalOperator.is_Some: - output["ConditionalOperator"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConditionalOperator( - dafny_input.ConditionalOperator.value - ) - ) + output["ConditionalOperator"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConditionalOperator(dafny_input.ConditionalOperator.value) if dafny_input.ScanIndexForward.is_Some: output["ScanIndexForward"] = dafny_input.ScanIndexForward.value if dafny_input.ExclusiveStartKey.is_Some: - output["ExclusiveStartKey"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in dafny_input.ExclusiveStartKey.value.items - } + output["ExclusiveStartKey"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.ExclusiveStartKey.value.items } if dafny_input.ReturnConsumedCapacity.is_Some: - output["ReturnConsumedCapacity"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnConsumedCapacity( - dafny_input.ReturnConsumedCapacity.value - ) - ) + output["ReturnConsumedCapacity"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnConsumedCapacity(dafny_input.ReturnConsumedCapacity.value) if dafny_input.ProjectionExpression.is_Some: - output["ProjectionExpression"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.ProjectionExpression.value - ).decode("utf-16-be") + output["ProjectionExpression"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ProjectionExpression.value).decode('utf-16-be') if dafny_input.FilterExpression.is_Some: - output["FilterExpression"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.FilterExpression.value - ).decode("utf-16-be") + output["FilterExpression"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.FilterExpression.value).decode('utf-16-be') if dafny_input.KeyConditionExpression.is_Some: - output["KeyConditionExpression"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.KeyConditionExpression.value - ).decode("utf-16-be") + output["KeyConditionExpression"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.KeyConditionExpression.value).decode('utf-16-be') if dafny_input.ExpressionAttributeNames.is_Some: - output["ExpressionAttributeNames"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key) - .decode("utf-16-be"): b"".join(ord(c).to_bytes(2, "big") for c in value) - .decode("utf-16-be") - for (key, value) in dafny_input.ExpressionAttributeNames.value.items - } + output["ExpressionAttributeNames"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): b''.join(ord(c).to_bytes(2, 'big') for c in value).decode('utf-16-be') for (key, value) in dafny_input.ExpressionAttributeNames.value.items } if dafny_input.ExpressionAttributeValues.is_Some: - output["ExpressionAttributeValues"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in dafny_input.ExpressionAttributeValues.value.items - } + output["ExpressionAttributeValues"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.ExpressionAttributeValues.value.items } return output - def com_amazonaws_dynamodb_QueryOutput(dafny_input): output = {} if dafny_input.Items.is_Some: - output["Items"] = [ - { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in list_element.items - } - for list_element in dafny_input.Items.value - ] + output["Items"] = [{b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in list_element.items } for list_element in dafny_input.Items.value] if dafny_input.Count.is_Some: output["Count"] = dafny_input.Count.value @@ -4764,221 +3112,112 @@ def com_amazonaws_dynamodb_QueryOutput(dafny_input): output["ScannedCount"] = dafny_input.ScannedCount.value if dafny_input.LastEvaluatedKey.is_Some: - output["LastEvaluatedKey"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in dafny_input.LastEvaluatedKey.value.items - } + output["LastEvaluatedKey"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.LastEvaluatedKey.value.items } if dafny_input.ConsumedCapacity.is_Some: - output["ConsumedCapacity"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConsumedCapacity( - dafny_input.ConsumedCapacity.value - ) - ) + output["ConsumedCapacity"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConsumedCapacity(dafny_input.ConsumedCapacity.value) return output - def com_amazonaws_dynamodb_RestoreTableFromBackupInput(dafny_input): output = {} - output["TargetTableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TargetTableName - ).decode("utf-16-be") - output["BackupArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.BackupArn - ).decode("utf-16-be") + output["TargetTableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TargetTableName).decode('utf-16-be') + output["BackupArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.BackupArn).decode('utf-16-be') if dafny_input.BillingModeOverride.is_Some: - output["BillingModeOverride"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BillingMode( - dafny_input.BillingModeOverride.value - ) - ) + output["BillingModeOverride"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BillingMode(dafny_input.BillingModeOverride.value) if dafny_input.GlobalSecondaryIndexOverride.is_Some: - output["GlobalSecondaryIndexOverride"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_GlobalSecondaryIndex( - list_element - ) - for list_element in dafny_input.GlobalSecondaryIndexOverride.value - ] + output["GlobalSecondaryIndexOverride"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_GlobalSecondaryIndex(list_element) for list_element in dafny_input.GlobalSecondaryIndexOverride.value] if dafny_input.LocalSecondaryIndexOverride.is_Some: - output["LocalSecondaryIndexOverride"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_LocalSecondaryIndex( - list_element - ) - for list_element in dafny_input.LocalSecondaryIndexOverride.value - ] + output["LocalSecondaryIndexOverride"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_LocalSecondaryIndex(list_element) for list_element in dafny_input.LocalSecondaryIndexOverride.value] if dafny_input.ProvisionedThroughputOverride.is_Some: - output["ProvisionedThroughputOverride"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProvisionedThroughput( - dafny_input.ProvisionedThroughputOverride.value - ) - ) + output["ProvisionedThroughputOverride"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProvisionedThroughput(dafny_input.ProvisionedThroughputOverride.value) + + if dafny_input.OnDemandThroughputOverride.is_Some: + output["OnDemandThroughputOverride"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_OnDemandThroughput(dafny_input.OnDemandThroughputOverride.value) if dafny_input.SSESpecificationOverride.is_Some: - output["SSESpecificationOverride"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_SSESpecification( - dafny_input.SSESpecificationOverride.value - ) - ) + output["SSESpecificationOverride"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_SSESpecification(dafny_input.SSESpecificationOverride.value) return output - def com_amazonaws_dynamodb_RestoreTableFromBackupOutput(dafny_input): output = {} if dafny_input.TableDescription.is_Some: - output["TableDescription"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableDescription( - dafny_input.TableDescription.value - ) - ) + output["TableDescription"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableDescription(dafny_input.TableDescription.value) return output - def com_amazonaws_dynamodb_RestoreTableToPointInTimeInput(dafny_input): output = {} if dafny_input.SourceTableArn.is_Some: - output["SourceTableArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.SourceTableArn.value - ).decode("utf-16-be") + output["SourceTableArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.SourceTableArn.value).decode('utf-16-be') if dafny_input.SourceTableName.is_Some: - output["SourceTableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.SourceTableName.value - ).decode("utf-16-be") + output["SourceTableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.SourceTableName.value).decode('utf-16-be') - output["TargetTableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TargetTableName - ).decode("utf-16-be") + output["TargetTableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TargetTableName).decode('utf-16-be') if dafny_input.UseLatestRestorableTime.is_Some: output["UseLatestRestorableTime"] = dafny_input.UseLatestRestorableTime.value if dafny_input.RestoreDateTime.is_Some: - output["RestoreDateTime"] = datetime.fromisoformat( - dafny_input.RestoreDateTime.value.VerbatimString(False) - ) + output["RestoreDateTime"] = datetime.fromisoformat(dafny_input.RestoreDateTime.value.VerbatimString(False)) if dafny_input.BillingModeOverride.is_Some: - output["BillingModeOverride"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BillingMode( - dafny_input.BillingModeOverride.value - ) - ) + output["BillingModeOverride"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BillingMode(dafny_input.BillingModeOverride.value) if dafny_input.GlobalSecondaryIndexOverride.is_Some: - output["GlobalSecondaryIndexOverride"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_GlobalSecondaryIndex( - list_element - ) - for list_element in dafny_input.GlobalSecondaryIndexOverride.value - ] + output["GlobalSecondaryIndexOverride"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_GlobalSecondaryIndex(list_element) for list_element in dafny_input.GlobalSecondaryIndexOverride.value] if dafny_input.LocalSecondaryIndexOverride.is_Some: - output["LocalSecondaryIndexOverride"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_LocalSecondaryIndex( - list_element - ) - for list_element in dafny_input.LocalSecondaryIndexOverride.value - ] + output["LocalSecondaryIndexOverride"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_LocalSecondaryIndex(list_element) for list_element in dafny_input.LocalSecondaryIndexOverride.value] if dafny_input.ProvisionedThroughputOverride.is_Some: - output["ProvisionedThroughputOverride"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProvisionedThroughput( - dafny_input.ProvisionedThroughputOverride.value - ) - ) + output["ProvisionedThroughputOverride"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProvisionedThroughput(dafny_input.ProvisionedThroughputOverride.value) + + if dafny_input.OnDemandThroughputOverride.is_Some: + output["OnDemandThroughputOverride"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_OnDemandThroughput(dafny_input.OnDemandThroughputOverride.value) if dafny_input.SSESpecificationOverride.is_Some: - output["SSESpecificationOverride"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_SSESpecification( - dafny_input.SSESpecificationOverride.value - ) - ) + output["SSESpecificationOverride"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_SSESpecification(dafny_input.SSESpecificationOverride.value) return output - def com_amazonaws_dynamodb_RestoreTableToPointInTimeOutput(dafny_input): output = {} if dafny_input.TableDescription.is_Some: - output["TableDescription"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableDescription( - dafny_input.TableDescription.value - ) - ) + output["TableDescription"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableDescription(dafny_input.TableDescription.value) return output - def com_amazonaws_dynamodb_ScanInput(dafny_input): output = {} - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName - ).decode("utf-16-be") + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName).decode('utf-16-be') if dafny_input.IndexName.is_Some: - output["IndexName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.IndexName.value - ).decode("utf-16-be") + output["IndexName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.IndexName.value).decode('utf-16-be') if dafny_input.AttributesToGet.is_Some: - output["AttributesToGet"] = [ - b"".join(ord(c).to_bytes(2, "big") for c in list_element).decode( - "utf-16-be" - ) - for list_element in dafny_input.AttributesToGet.value - ] + output["AttributesToGet"] = [b''.join(ord(c).to_bytes(2, 'big') for c in list_element).decode('utf-16-be') for list_element in dafny_input.AttributesToGet.value] if dafny_input.Limit.is_Some: output["Limit"] = dafny_input.Limit.value if dafny_input.Select.is_Some: - output["Select"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Select( - dafny_input.Select.value - ) - ) + output["Select"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Select(dafny_input.Select.value) if dafny_input.ScanFilter.is_Some: - output["ScanFilter"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Condition( - value - ) - for (key, value) in dafny_input.ScanFilter.value.items - } + output["ScanFilter"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Condition(value) for (key, value) in dafny_input.ScanFilter.value.items } if dafny_input.ConditionalOperator.is_Some: - output["ConditionalOperator"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConditionalOperator( - dafny_input.ConditionalOperator.value - ) - ) + output["ConditionalOperator"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConditionalOperator(dafny_input.ConditionalOperator.value) if dafny_input.ExclusiveStartKey.is_Some: - output["ExclusiveStartKey"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in dafny_input.ExclusiveStartKey.value.items - } + output["ExclusiveStartKey"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.ExclusiveStartKey.value.items } if dafny_input.ReturnConsumedCapacity.is_Some: - output["ReturnConsumedCapacity"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnConsumedCapacity( - dafny_input.ReturnConsumedCapacity.value - ) - ) + output["ReturnConsumedCapacity"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnConsumedCapacity(dafny_input.ReturnConsumedCapacity.value) if dafny_input.TotalSegments.is_Some: output["TotalSegments"] = dafny_input.TotalSegments.value @@ -4987,53 +3226,26 @@ def com_amazonaws_dynamodb_ScanInput(dafny_input): output["Segment"] = dafny_input.Segment.value if dafny_input.ProjectionExpression.is_Some: - output["ProjectionExpression"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.ProjectionExpression.value - ).decode("utf-16-be") + output["ProjectionExpression"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ProjectionExpression.value).decode('utf-16-be') if dafny_input.FilterExpression.is_Some: - output["FilterExpression"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.FilterExpression.value - ).decode("utf-16-be") + output["FilterExpression"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.FilterExpression.value).decode('utf-16-be') if dafny_input.ExpressionAttributeNames.is_Some: - output["ExpressionAttributeNames"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key) - .decode("utf-16-be"): b"".join(ord(c).to_bytes(2, "big") for c in value) - .decode("utf-16-be") - for (key, value) in dafny_input.ExpressionAttributeNames.value.items - } + output["ExpressionAttributeNames"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): b''.join(ord(c).to_bytes(2, 'big') for c in value).decode('utf-16-be') for (key, value) in dafny_input.ExpressionAttributeNames.value.items } if dafny_input.ExpressionAttributeValues.is_Some: - output["ExpressionAttributeValues"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in dafny_input.ExpressionAttributeValues.value.items - } + output["ExpressionAttributeValues"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.ExpressionAttributeValues.value.items } if dafny_input.ConsistentRead.is_Some: output["ConsistentRead"] = dafny_input.ConsistentRead.value return output - def com_amazonaws_dynamodb_ScanOutput(dafny_input): output = {} if dafny_input.Items.is_Some: - output["Items"] = [ - { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in list_element.items - } - for list_element in dafny_input.Items.value - ] + output["Items"] = [{b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in list_element.items } for list_element in dafny_input.Items.value] if dafny_input.Count.is_Some: output["Count"] = dafny_input.Count.value @@ -5042,444 +3254,189 @@ def com_amazonaws_dynamodb_ScanOutput(dafny_input): output["ScannedCount"] = dafny_input.ScannedCount.value if dafny_input.LastEvaluatedKey.is_Some: - output["LastEvaluatedKey"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in dafny_input.LastEvaluatedKey.value.items - } + output["LastEvaluatedKey"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.LastEvaluatedKey.value.items } if dafny_input.ConsumedCapacity.is_Some: - output["ConsumedCapacity"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConsumedCapacity( - dafny_input.ConsumedCapacity.value - ) - ) + output["ConsumedCapacity"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConsumedCapacity(dafny_input.ConsumedCapacity.value) return output - def com_amazonaws_dynamodb_TagResourceInput(dafny_input): output = {} - output["ResourceArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.ResourceArn - ).decode("utf-16-be") - output["Tags"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Tag( - list_element - ) - for list_element in dafny_input.Tags - ] + output["ResourceArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ResourceArn).decode('utf-16-be') + output["Tags"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Tag(list_element) for list_element in dafny_input.Tags] return output - def com_amazonaws_dynamodb_TransactGetItem(dafny_input): output = {} - output["Get"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Get( - dafny_input.Get - ) - ) + output["Get"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Get(dafny_input.Get) return output - def com_amazonaws_dynamodb_Get(dafny_input): output = {} - output["Key"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in dafny_input.Key.items - } - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName - ).decode("utf-16-be") + output["Key"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.Key.items } + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName).decode('utf-16-be') if dafny_input.ProjectionExpression.is_Some: - output["ProjectionExpression"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.ProjectionExpression.value - ).decode("utf-16-be") + output["ProjectionExpression"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ProjectionExpression.value).decode('utf-16-be') if dafny_input.ExpressionAttributeNames.is_Some: - output["ExpressionAttributeNames"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key) - .decode("utf-16-be"): b"".join(ord(c).to_bytes(2, "big") for c in value) - .decode("utf-16-be") - for (key, value) in dafny_input.ExpressionAttributeNames.value.items - } + output["ExpressionAttributeNames"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): b''.join(ord(c).to_bytes(2, 'big') for c in value).decode('utf-16-be') for (key, value) in dafny_input.ExpressionAttributeNames.value.items } return output - def com_amazonaws_dynamodb_TransactGetItemsInput(dafny_input): output = {} - output["TransactItems"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TransactGetItem( - list_element - ) - for list_element in dafny_input.TransactItems - ] + output["TransactItems"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TransactGetItem(list_element) for list_element in dafny_input.TransactItems] if dafny_input.ReturnConsumedCapacity.is_Some: - output["ReturnConsumedCapacity"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnConsumedCapacity( - dafny_input.ReturnConsumedCapacity.value - ) - ) + output["ReturnConsumedCapacity"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnConsumedCapacity(dafny_input.ReturnConsumedCapacity.value) return output - def com_amazonaws_dynamodb_TransactGetItemsOutput(dafny_input): output = {} if dafny_input.ConsumedCapacity.is_Some: - output["ConsumedCapacity"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConsumedCapacity( - list_element - ) - for list_element in dafny_input.ConsumedCapacity.value - ] + output["ConsumedCapacity"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConsumedCapacity(list_element) for list_element in dafny_input.ConsumedCapacity.value] if dafny_input.Responses.is_Some: - output["Responses"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ItemResponse( - list_element - ) - for list_element in dafny_input.Responses.value - ] + output["Responses"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ItemResponse(list_element) for list_element in dafny_input.Responses.value] return output - def com_amazonaws_dynamodb_TransactWriteItem(dafny_input): output = {} if dafny_input.ConditionCheck.is_Some: - output["ConditionCheck"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConditionCheck( - dafny_input.ConditionCheck.value - ) - ) + output["ConditionCheck"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConditionCheck(dafny_input.ConditionCheck.value) if dafny_input.Put.is_Some: - output["Put"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Put( - dafny_input.Put.value - ) - ) + output["Put"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Put(dafny_input.Put.value) if dafny_input.Delete.is_Some: - output["Delete"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Delete( - dafny_input.Delete.value - ) - ) + output["Delete"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Delete(dafny_input.Delete.value) if dafny_input.Update.is_Some: - output["Update"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Update( - dafny_input.Update.value - ) - ) + output["Update"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Update(dafny_input.Update.value) return output - def com_amazonaws_dynamodb_ConditionCheck(dafny_input): output = {} - output["Key"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in dafny_input.Key.items - } - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName - ).decode("utf-16-be") - output["ConditionExpression"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.ConditionExpression - ).decode("utf-16-be") + output["Key"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.Key.items } + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName).decode('utf-16-be') + output["ConditionExpression"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ConditionExpression).decode('utf-16-be') if dafny_input.ExpressionAttributeNames.is_Some: - output["ExpressionAttributeNames"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key) - .decode("utf-16-be"): b"".join(ord(c).to_bytes(2, "big") for c in value) - .decode("utf-16-be") - for (key, value) in dafny_input.ExpressionAttributeNames.value.items - } + output["ExpressionAttributeNames"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): b''.join(ord(c).to_bytes(2, 'big') for c in value).decode('utf-16-be') for (key, value) in dafny_input.ExpressionAttributeNames.value.items } if dafny_input.ExpressionAttributeValues.is_Some: - output["ExpressionAttributeValues"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in dafny_input.ExpressionAttributeValues.value.items - } + output["ExpressionAttributeValues"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.ExpressionAttributeValues.value.items } if dafny_input.ReturnValuesOnConditionCheckFailure.is_Some: - output["ReturnValuesOnConditionCheckFailure"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure( - dafny_input.ReturnValuesOnConditionCheckFailure.value - ) - ) + output["ReturnValuesOnConditionCheckFailure"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure(dafny_input.ReturnValuesOnConditionCheckFailure.value) return output - def com_amazonaws_dynamodb_Put(dafny_input): output = {} - output["Item"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in dafny_input.Item.items - } - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName - ).decode("utf-16-be") + output["Item"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.Item.items } + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName).decode('utf-16-be') if dafny_input.ConditionExpression.is_Some: - output["ConditionExpression"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.ConditionExpression.value - ).decode("utf-16-be") + output["ConditionExpression"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ConditionExpression.value).decode('utf-16-be') if dafny_input.ExpressionAttributeNames.is_Some: - output["ExpressionAttributeNames"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key) - .decode("utf-16-be"): b"".join(ord(c).to_bytes(2, "big") for c in value) - .decode("utf-16-be") - for (key, value) in dafny_input.ExpressionAttributeNames.value.items - } + output["ExpressionAttributeNames"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): b''.join(ord(c).to_bytes(2, 'big') for c in value).decode('utf-16-be') for (key, value) in dafny_input.ExpressionAttributeNames.value.items } if dafny_input.ExpressionAttributeValues.is_Some: - output["ExpressionAttributeValues"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in dafny_input.ExpressionAttributeValues.value.items - } + output["ExpressionAttributeValues"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.ExpressionAttributeValues.value.items } if dafny_input.ReturnValuesOnConditionCheckFailure.is_Some: - output["ReturnValuesOnConditionCheckFailure"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure( - dafny_input.ReturnValuesOnConditionCheckFailure.value - ) - ) + output["ReturnValuesOnConditionCheckFailure"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure(dafny_input.ReturnValuesOnConditionCheckFailure.value) return output - def com_amazonaws_dynamodb_Delete(dafny_input): output = {} - output["Key"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in dafny_input.Key.items - } - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName - ).decode("utf-16-be") + output["Key"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.Key.items } + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName).decode('utf-16-be') if dafny_input.ConditionExpression.is_Some: - output["ConditionExpression"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.ConditionExpression.value - ).decode("utf-16-be") + output["ConditionExpression"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ConditionExpression.value).decode('utf-16-be') if dafny_input.ExpressionAttributeNames.is_Some: - output["ExpressionAttributeNames"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key) - .decode("utf-16-be"): b"".join(ord(c).to_bytes(2, "big") for c in value) - .decode("utf-16-be") - for (key, value) in dafny_input.ExpressionAttributeNames.value.items - } + output["ExpressionAttributeNames"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): b''.join(ord(c).to_bytes(2, 'big') for c in value).decode('utf-16-be') for (key, value) in dafny_input.ExpressionAttributeNames.value.items } if dafny_input.ExpressionAttributeValues.is_Some: - output["ExpressionAttributeValues"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in dafny_input.ExpressionAttributeValues.value.items - } + output["ExpressionAttributeValues"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.ExpressionAttributeValues.value.items } if dafny_input.ReturnValuesOnConditionCheckFailure.is_Some: - output["ReturnValuesOnConditionCheckFailure"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure( - dafny_input.ReturnValuesOnConditionCheckFailure.value - ) - ) + output["ReturnValuesOnConditionCheckFailure"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure(dafny_input.ReturnValuesOnConditionCheckFailure.value) return output - def com_amazonaws_dynamodb_Update(dafny_input): output = {} - output["Key"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in dafny_input.Key.items - } - output["UpdateExpression"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.UpdateExpression - ).decode("utf-16-be") - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName - ).decode("utf-16-be") + output["Key"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.Key.items } + output["UpdateExpression"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.UpdateExpression).decode('utf-16-be') + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName).decode('utf-16-be') if dafny_input.ConditionExpression.is_Some: - output["ConditionExpression"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.ConditionExpression.value - ).decode("utf-16-be") + output["ConditionExpression"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ConditionExpression.value).decode('utf-16-be') if dafny_input.ExpressionAttributeNames.is_Some: - output["ExpressionAttributeNames"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key) - .decode("utf-16-be"): b"".join(ord(c).to_bytes(2, "big") for c in value) - .decode("utf-16-be") - for (key, value) in dafny_input.ExpressionAttributeNames.value.items - } + output["ExpressionAttributeNames"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): b''.join(ord(c).to_bytes(2, 'big') for c in value).decode('utf-16-be') for (key, value) in dafny_input.ExpressionAttributeNames.value.items } if dafny_input.ExpressionAttributeValues.is_Some: - output["ExpressionAttributeValues"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in dafny_input.ExpressionAttributeValues.value.items - } + output["ExpressionAttributeValues"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.ExpressionAttributeValues.value.items } if dafny_input.ReturnValuesOnConditionCheckFailure.is_Some: - output["ReturnValuesOnConditionCheckFailure"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure( - dafny_input.ReturnValuesOnConditionCheckFailure.value - ) - ) + output["ReturnValuesOnConditionCheckFailure"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure(dafny_input.ReturnValuesOnConditionCheckFailure.value) return output - -def com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure(dafny_input): - # Convert ReturnValuesOnConditionCheckFailure - if isinstance(dafny_input, ReturnValuesOnConditionCheckFailure_ALL__OLD): - return "ALL_OLD" - - elif isinstance(dafny_input, ReturnValuesOnConditionCheckFailure_NONE): - return "NONE" - - else: - raise ValueError("No recognized enum value in enum type: " + dafny_input) - - def com_amazonaws_dynamodb_TransactWriteItemsInput(dafny_input): output = {} - output["TransactItems"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TransactWriteItem( - list_element - ) - for list_element in dafny_input.TransactItems - ] + output["TransactItems"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TransactWriteItem(list_element) for list_element in dafny_input.TransactItems] if dafny_input.ReturnConsumedCapacity.is_Some: - output["ReturnConsumedCapacity"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnConsumedCapacity( - dafny_input.ReturnConsumedCapacity.value - ) - ) + output["ReturnConsumedCapacity"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnConsumedCapacity(dafny_input.ReturnConsumedCapacity.value) if dafny_input.ReturnItemCollectionMetrics.is_Some: - output["ReturnItemCollectionMetrics"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnItemCollectionMetrics( - dafny_input.ReturnItemCollectionMetrics.value - ) - ) + output["ReturnItemCollectionMetrics"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnItemCollectionMetrics(dafny_input.ReturnItemCollectionMetrics.value) if dafny_input.ClientRequestToken.is_Some: - output["ClientRequestToken"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.ClientRequestToken.value - ).decode("utf-16-be") + output["ClientRequestToken"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ClientRequestToken.value).decode('utf-16-be') return output - def com_amazonaws_dynamodb_TransactWriteItemsOutput(dafny_input): output = {} if dafny_input.ConsumedCapacity.is_Some: - output["ConsumedCapacity"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConsumedCapacity( - list_element - ) - for list_element in dafny_input.ConsumedCapacity.value - ] + output["ConsumedCapacity"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConsumedCapacity(list_element) for list_element in dafny_input.ConsumedCapacity.value] if dafny_input.ItemCollectionMetrics.is_Some: - output["ItemCollectionMetrics"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode("utf-16-be"): [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ItemCollectionMetrics( - list_element - ) - for list_element in value - ] - for (key, value) in dafny_input.ItemCollectionMetrics.value.items - } + output["ItemCollectionMetrics"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ItemCollectionMetrics(list_element) for list_element in value] for (key, value) in dafny_input.ItemCollectionMetrics.value.items } return output - def com_amazonaws_dynamodb_UntagResourceInput(dafny_input): output = {} - output["ResourceArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.ResourceArn - ).decode("utf-16-be") - output["TagKeys"] = [ - b"".join(ord(c).to_bytes(2, "big") for c in list_element).decode("utf-16-be") - for list_element in dafny_input.TagKeys - ] + output["ResourceArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ResourceArn).decode('utf-16-be') + output["TagKeys"] = [b''.join(ord(c).to_bytes(2, 'big') for c in list_element).decode('utf-16-be') for list_element in dafny_input.TagKeys] return output - def com_amazonaws_dynamodb_PointInTimeRecoverySpecification(dafny_input): output = {} output["PointInTimeRecoveryEnabled"] = dafny_input.PointInTimeRecoveryEnabled return output - def com_amazonaws_dynamodb_UpdateContinuousBackupsInput(dafny_input): output = {} - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName - ).decode("utf-16-be") - output["PointInTimeRecoverySpecification"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_PointInTimeRecoverySpecification( - dafny_input.PointInTimeRecoverySpecification - ) - ) + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName).decode('utf-16-be') + output["PointInTimeRecoverySpecification"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_PointInTimeRecoverySpecification(dafny_input.PointInTimeRecoverySpecification) return output - def com_amazonaws_dynamodb_UpdateContinuousBackupsOutput(dafny_input): output = {} if dafny_input.ContinuousBackupsDescription.is_Some: - output["ContinuousBackupsDescription"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ContinuousBackupsDescription( - dafny_input.ContinuousBackupsDescription.value - ) - ) + output["ContinuousBackupsDescription"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ContinuousBackupsDescription(dafny_input.ContinuousBackupsDescription.value) return output - def com_amazonaws_dynamodb_ContributorInsightsAction(dafny_input): # Convert ContributorInsightsAction if isinstance(dafny_input, ContributorInsightsAction_ENABLE): @@ -5491,108 +3448,61 @@ def com_amazonaws_dynamodb_ContributorInsightsAction(dafny_input): else: raise ValueError("No recognized enum value in enum type: " + dafny_input) - def com_amazonaws_dynamodb_UpdateContributorInsightsInput(dafny_input): output = {} - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName - ).decode("utf-16-be") + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName).decode('utf-16-be') if dafny_input.IndexName.is_Some: - output["IndexName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.IndexName.value - ).decode("utf-16-be") + output["IndexName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.IndexName.value).decode('utf-16-be') - output["ContributorInsightsAction"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ContributorInsightsAction( - dafny_input.ContributorInsightsAction - ) - ) + output["ContributorInsightsAction"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ContributorInsightsAction(dafny_input.ContributorInsightsAction) return output - def com_amazonaws_dynamodb_UpdateContributorInsightsOutput(dafny_input): output = {} if dafny_input.TableName.is_Some: - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName.value - ).decode("utf-16-be") + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName.value).decode('utf-16-be') if dafny_input.IndexName.is_Some: - output["IndexName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.IndexName.value - ).decode("utf-16-be") + output["IndexName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.IndexName.value).decode('utf-16-be') if dafny_input.ContributorInsightsStatus.is_Some: - output["ContributorInsightsStatus"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ContributorInsightsStatus( - dafny_input.ContributorInsightsStatus.value - ) - ) + output["ContributorInsightsStatus"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ContributorInsightsStatus(dafny_input.ContributorInsightsStatus.value) return output - def com_amazonaws_dynamodb_ReplicaUpdate(dafny_input): output = {} if dafny_input.Create.is_Some: - output["Create"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_CreateReplicaAction( - dafny_input.Create.value - ) - ) + output["Create"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_CreateReplicaAction(dafny_input.Create.value) if dafny_input.Delete.is_Some: - output["Delete"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DeleteReplicaAction( - dafny_input.Delete.value - ) - ) + output["Delete"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DeleteReplicaAction(dafny_input.Delete.value) return output - def com_amazonaws_dynamodb_CreateReplicaAction(dafny_input): output = {} - output["RegionName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.RegionName - ).decode("utf-16-be") + output["RegionName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.RegionName).decode('utf-16-be') return output - def com_amazonaws_dynamodb_DeleteReplicaAction(dafny_input): output = {} - output["RegionName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.RegionName - ).decode("utf-16-be") + output["RegionName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.RegionName).decode('utf-16-be') return output - def com_amazonaws_dynamodb_UpdateGlobalTableInput(dafny_input): output = {} - output["GlobalTableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.GlobalTableName - ).decode("utf-16-be") - output["ReplicaUpdates"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaUpdate( - list_element - ) - for list_element in dafny_input.ReplicaUpdates - ] + output["GlobalTableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.GlobalTableName).decode('utf-16-be') + output["ReplicaUpdates"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaUpdate(list_element) for list_element in dafny_input.ReplicaUpdates] return output - def com_amazonaws_dynamodb_UpdateGlobalTableOutput(dafny_input): output = {} if dafny_input.GlobalTableDescription.is_Some: - output["GlobalTableDescription"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_GlobalTableDescription( - dafny_input.GlobalTableDescription.value - ) - ) + output["GlobalTableDescription"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_GlobalTableDescription(dafny_input.GlobalTableDescription.value) return output - def com_amazonaws_dynamodb_AutoScalingSettingsUpdate(dafny_input): output = {} if dafny_input.MinimumUnits.is_Some: @@ -5605,38 +3515,22 @@ def com_amazonaws_dynamodb_AutoScalingSettingsUpdate(dafny_input): output["AutoScalingDisabled"] = dafny_input.AutoScalingDisabled.value if dafny_input.AutoScalingRoleArn.is_Some: - output["AutoScalingRoleArn"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.AutoScalingRoleArn.value - ).decode("utf-16-be") + output["AutoScalingRoleArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.AutoScalingRoleArn.value).decode('utf-16-be') if dafny_input.ScalingPolicyUpdate.is_Some: - output["ScalingPolicyUpdate"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingPolicyUpdate( - dafny_input.ScalingPolicyUpdate.value - ) - ) + output["ScalingPolicyUpdate"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingPolicyUpdate(dafny_input.ScalingPolicyUpdate.value) return output - def com_amazonaws_dynamodb_AutoScalingPolicyUpdate(dafny_input): output = {} if dafny_input.PolicyName.is_Some: - output["PolicyName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.PolicyName.value - ).decode("utf-16-be") + output["PolicyName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.PolicyName.value).decode('utf-16-be') - output["TargetTrackingScalingPolicyConfiguration"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingTargetTrackingScalingPolicyConfigurationUpdate( - dafny_input.TargetTrackingScalingPolicyConfiguration - ) - ) + output["TargetTrackingScalingPolicyConfiguration"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingTargetTrackingScalingPolicyConfigurationUpdate(dafny_input.TargetTrackingScalingPolicyConfiguration) return output - -def com_amazonaws_dynamodb_AutoScalingTargetTrackingScalingPolicyConfigurationUpdate( - dafny_input, -): +def com_amazonaws_dynamodb_AutoScalingTargetTrackingScalingPolicyConfigurationUpdate(dafny_input): output = {} if dafny_input.DisableScaleIn.is_Some: output["DisableScaleIn"] = dafny_input.DisableScaleIn.value @@ -5650,162 +3544,85 @@ def com_amazonaws_dynamodb_AutoScalingTargetTrackingScalingPolicyConfigurationUp output["TargetValue"] = dafny_input.TargetValue return output - def com_amazonaws_dynamodb_GlobalTableGlobalSecondaryIndexSettingsUpdate(dafny_input): output = {} - output["IndexName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.IndexName - ).decode("utf-16-be") + output["IndexName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.IndexName).decode('utf-16-be') if dafny_input.ProvisionedWriteCapacityUnits.is_Some: - output["ProvisionedWriteCapacityUnits"] = ( - dafny_input.ProvisionedWriteCapacityUnits.value - ) + output["ProvisionedWriteCapacityUnits"] = dafny_input.ProvisionedWriteCapacityUnits.value if dafny_input.ProvisionedWriteCapacityAutoScalingSettingsUpdate.is_Some: - output["ProvisionedWriteCapacityAutoScalingSettingsUpdate"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingSettingsUpdate( - dafny_input.ProvisionedWriteCapacityAutoScalingSettingsUpdate.value - ) - ) + output["ProvisionedWriteCapacityAutoScalingSettingsUpdate"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingSettingsUpdate(dafny_input.ProvisionedWriteCapacityAutoScalingSettingsUpdate.value) return output - def com_amazonaws_dynamodb_ReplicaSettingsUpdate(dafny_input): output = {} - output["RegionName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.RegionName - ).decode("utf-16-be") + output["RegionName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.RegionName).decode('utf-16-be') if dafny_input.ReplicaProvisionedReadCapacityUnits.is_Some: - output["ReplicaProvisionedReadCapacityUnits"] = ( - dafny_input.ReplicaProvisionedReadCapacityUnits.value - ) + output["ReplicaProvisionedReadCapacityUnits"] = dafny_input.ReplicaProvisionedReadCapacityUnits.value if dafny_input.ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate.is_Some: - output["ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingSettingsUpdate( - dafny_input.ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate.value - ) - ) + output["ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingSettingsUpdate(dafny_input.ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate.value) if dafny_input.ReplicaGlobalSecondaryIndexSettingsUpdate.is_Some: - output["ReplicaGlobalSecondaryIndexSettingsUpdate"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexSettingsUpdate( - list_element - ) - for list_element in dafny_input.ReplicaGlobalSecondaryIndexSettingsUpdate.value - ] + output["ReplicaGlobalSecondaryIndexSettingsUpdate"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexSettingsUpdate(list_element) for list_element in dafny_input.ReplicaGlobalSecondaryIndexSettingsUpdate.value] if dafny_input.ReplicaTableClass.is_Some: - output["ReplicaTableClass"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableClass( - dafny_input.ReplicaTableClass.value - ) - ) + output["ReplicaTableClass"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableClass(dafny_input.ReplicaTableClass.value) return output - def com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexSettingsUpdate(dafny_input): output = {} - output["IndexName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.IndexName - ).decode("utf-16-be") + output["IndexName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.IndexName).decode('utf-16-be') if dafny_input.ProvisionedReadCapacityUnits.is_Some: - output["ProvisionedReadCapacityUnits"] = ( - dafny_input.ProvisionedReadCapacityUnits.value - ) + output["ProvisionedReadCapacityUnits"] = dafny_input.ProvisionedReadCapacityUnits.value if dafny_input.ProvisionedReadCapacityAutoScalingSettingsUpdate.is_Some: - output["ProvisionedReadCapacityAutoScalingSettingsUpdate"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingSettingsUpdate( - dafny_input.ProvisionedReadCapacityAutoScalingSettingsUpdate.value - ) - ) + output["ProvisionedReadCapacityAutoScalingSettingsUpdate"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingSettingsUpdate(dafny_input.ProvisionedReadCapacityAutoScalingSettingsUpdate.value) return output - def com_amazonaws_dynamodb_UpdateGlobalTableSettingsInput(dafny_input): output = {} - output["GlobalTableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.GlobalTableName - ).decode("utf-16-be") + output["GlobalTableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.GlobalTableName).decode('utf-16-be') if dafny_input.GlobalTableBillingMode.is_Some: - output["GlobalTableBillingMode"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BillingMode( - dafny_input.GlobalTableBillingMode.value - ) - ) + output["GlobalTableBillingMode"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BillingMode(dafny_input.GlobalTableBillingMode.value) if dafny_input.GlobalTableProvisionedWriteCapacityUnits.is_Some: - output["GlobalTableProvisionedWriteCapacityUnits"] = ( - dafny_input.GlobalTableProvisionedWriteCapacityUnits.value - ) + output["GlobalTableProvisionedWriteCapacityUnits"] = dafny_input.GlobalTableProvisionedWriteCapacityUnits.value if dafny_input.GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate.is_Some: - output["GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingSettingsUpdate( - dafny_input.GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate.value - ) - ) + output["GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingSettingsUpdate(dafny_input.GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate.value) if dafny_input.GlobalTableGlobalSecondaryIndexSettingsUpdate.is_Some: - output["GlobalTableGlobalSecondaryIndexSettingsUpdate"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_GlobalTableGlobalSecondaryIndexSettingsUpdate( - list_element - ) - for list_element in dafny_input.GlobalTableGlobalSecondaryIndexSettingsUpdate.value - ] + output["GlobalTableGlobalSecondaryIndexSettingsUpdate"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_GlobalTableGlobalSecondaryIndexSettingsUpdate(list_element) for list_element in dafny_input.GlobalTableGlobalSecondaryIndexSettingsUpdate.value] if dafny_input.ReplicaSettingsUpdate.is_Some: - output["ReplicaSettingsUpdate"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaSettingsUpdate( - list_element - ) - for list_element in dafny_input.ReplicaSettingsUpdate.value - ] + output["ReplicaSettingsUpdate"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaSettingsUpdate(list_element) for list_element in dafny_input.ReplicaSettingsUpdate.value] return output - def com_amazonaws_dynamodb_UpdateGlobalTableSettingsOutput(dafny_input): output = {} if dafny_input.GlobalTableName.is_Some: - output["GlobalTableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.GlobalTableName.value - ).decode("utf-16-be") + output["GlobalTableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.GlobalTableName.value).decode('utf-16-be') if dafny_input.ReplicaSettings.is_Some: - output["ReplicaSettings"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaSettingsDescription( - list_element - ) - for list_element in dafny_input.ReplicaSettings.value - ] + output["ReplicaSettings"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaSettingsDescription(list_element) for list_element in dafny_input.ReplicaSettings.value] return output - def com_amazonaws_dynamodb_AttributeValueUpdate(dafny_input): output = {} if dafny_input.Value.is_Some: - output["Value"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - dafny_input.Value.value - ) - ) + output["Value"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(dafny_input.Value.value) if dafny_input.Action.is_Some: - output["Action"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeAction( - dafny_input.Action.value - ) - ) + output["Action"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeAction(dafny_input.Action.value) return output - def com_amazonaws_dynamodb_AttributeAction(dafny_input): # Convert AttributeAction if isinstance(dafny_input, AttributeAction_ADD): @@ -5820,528 +3637,310 @@ def com_amazonaws_dynamodb_AttributeAction(dafny_input): else: raise ValueError("No recognized enum value in enum type: " + dafny_input) - def com_amazonaws_dynamodb_UpdateItemInput(dafny_input): output = {} - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName - ).decode("utf-16-be") - output["Key"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in dafny_input.Key.items - } + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName).decode('utf-16-be') + output["Key"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.Key.items } if dafny_input.AttributeUpdates.is_Some: - output["AttributeUpdates"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValueUpdate( - value - ) - for (key, value) in dafny_input.AttributeUpdates.value.items - } + output["AttributeUpdates"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValueUpdate(value) for (key, value) in dafny_input.AttributeUpdates.value.items } if dafny_input.Expected.is_Some: - output["Expected"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ExpectedAttributeValue( - value - ) - for (key, value) in dafny_input.Expected.value.items - } + output["Expected"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ExpectedAttributeValue(value) for (key, value) in dafny_input.Expected.value.items } if dafny_input.ConditionalOperator.is_Some: - output["ConditionalOperator"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConditionalOperator( - dafny_input.ConditionalOperator.value - ) - ) + output["ConditionalOperator"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConditionalOperator(dafny_input.ConditionalOperator.value) if dafny_input.ReturnValues.is_Some: - output["ReturnValues"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnValue( - dafny_input.ReturnValues.value - ) - ) + output["ReturnValues"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnValue(dafny_input.ReturnValues.value) if dafny_input.ReturnConsumedCapacity.is_Some: - output["ReturnConsumedCapacity"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnConsumedCapacity( - dafny_input.ReturnConsumedCapacity.value - ) - ) + output["ReturnConsumedCapacity"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnConsumedCapacity(dafny_input.ReturnConsumedCapacity.value) if dafny_input.ReturnItemCollectionMetrics.is_Some: - output["ReturnItemCollectionMetrics"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnItemCollectionMetrics( - dafny_input.ReturnItemCollectionMetrics.value - ) - ) + output["ReturnItemCollectionMetrics"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnItemCollectionMetrics(dafny_input.ReturnItemCollectionMetrics.value) if dafny_input.UpdateExpression.is_Some: - output["UpdateExpression"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.UpdateExpression.value - ).decode("utf-16-be") + output["UpdateExpression"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.UpdateExpression.value).decode('utf-16-be') if dafny_input.ConditionExpression.is_Some: - output["ConditionExpression"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.ConditionExpression.value - ).decode("utf-16-be") + output["ConditionExpression"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.ConditionExpression.value).decode('utf-16-be') if dafny_input.ExpressionAttributeNames.is_Some: - output["ExpressionAttributeNames"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key) - .decode("utf-16-be"): b"".join(ord(c).to_bytes(2, "big") for c in value) - .decode("utf-16-be") - for (key, value) in dafny_input.ExpressionAttributeNames.value.items - } + output["ExpressionAttributeNames"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): b''.join(ord(c).to_bytes(2, 'big') for c in value).decode('utf-16-be') for (key, value) in dafny_input.ExpressionAttributeNames.value.items } if dafny_input.ExpressionAttributeValues.is_Some: - output["ExpressionAttributeValues"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in dafny_input.ExpressionAttributeValues.value.items - } + output["ExpressionAttributeValues"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.ExpressionAttributeValues.value.items } - return output + if dafny_input.ReturnValuesOnConditionCheckFailure.is_Some: + output["ReturnValuesOnConditionCheckFailure"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure(dafny_input.ReturnValuesOnConditionCheckFailure.value) + return output def com_amazonaws_dynamodb_UpdateItemOutput(dafny_input): output = {} if dafny_input.Attributes.is_Some: - output["Attributes"] = { - b"".join(ord(c).to_bytes(2, "big") for c in key).decode( - "utf-16-be" - ): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue( - value - ) - for (key, value) in dafny_input.Attributes.value.items - } + output["Attributes"] = {b''.join(ord(c).to_bytes(2, 'big') for c in key).decode('utf-16-be'): aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeValue(value) for (key, value) in dafny_input.Attributes.value.items } if dafny_input.ConsumedCapacity.is_Some: - output["ConsumedCapacity"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConsumedCapacity( - dafny_input.ConsumedCapacity.value - ) - ) + output["ConsumedCapacity"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ConsumedCapacity(dafny_input.ConsumedCapacity.value) if dafny_input.ItemCollectionMetrics.is_Some: - output["ItemCollectionMetrics"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ItemCollectionMetrics( - dafny_input.ItemCollectionMetrics.value - ) - ) + output["ItemCollectionMetrics"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ItemCollectionMetrics(dafny_input.ItemCollectionMetrics.value) + + return output + +def com_amazonaws_dynamodb_UpdateKinesisStreamingConfiguration(dafny_input): + output = {} + if dafny_input.ApproximateCreationDateTimePrecision.is_Some: + output["ApproximateCreationDateTimePrecision"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ApproximateCreationDateTimePrecision(dafny_input.ApproximateCreationDateTimePrecision.value) return output +def com_amazonaws_dynamodb_UpdateKinesisStreamingDestinationInput(dafny_input): + output = {} + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName).decode('utf-16-be') + output["StreamArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.StreamArn).decode('utf-16-be') + if dafny_input.UpdateKinesisStreamingConfiguration.is_Some: + output["UpdateKinesisStreamingConfiguration"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_UpdateKinesisStreamingConfiguration(dafny_input.UpdateKinesisStreamingConfiguration.value) + + return output + +def com_amazonaws_dynamodb_UpdateKinesisStreamingDestinationOutput(dafny_input): + output = {} + if dafny_input.TableName.is_Some: + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName.value).decode('utf-16-be') + + if dafny_input.StreamArn.is_Some: + output["StreamArn"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.StreamArn.value).decode('utf-16-be') + + if dafny_input.DestinationStatus.is_Some: + output["DestinationStatus"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DestinationStatus(dafny_input.DestinationStatus.value) + + if dafny_input.UpdateKinesisStreamingConfiguration.is_Some: + output["UpdateKinesisStreamingConfiguration"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_UpdateKinesisStreamingConfiguration(dafny_input.UpdateKinesisStreamingConfiguration.value) + + return output def com_amazonaws_dynamodb_GlobalSecondaryIndexUpdate(dafny_input): output = {} if dafny_input.Update.is_Some: - output["Update"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_UpdateGlobalSecondaryIndexAction( - dafny_input.Update.value - ) - ) + output["Update"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_UpdateGlobalSecondaryIndexAction(dafny_input.Update.value) if dafny_input.Create.is_Some: - output["Create"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_CreateGlobalSecondaryIndexAction( - dafny_input.Create.value - ) - ) + output["Create"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_CreateGlobalSecondaryIndexAction(dafny_input.Create.value) if dafny_input.Delete.is_Some: - output["Delete"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DeleteGlobalSecondaryIndexAction( - dafny_input.Delete.value - ) - ) + output["Delete"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DeleteGlobalSecondaryIndexAction(dafny_input.Delete.value) return output - def com_amazonaws_dynamodb_UpdateGlobalSecondaryIndexAction(dafny_input): output = {} - output["IndexName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.IndexName - ).decode("utf-16-be") - output["ProvisionedThroughput"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProvisionedThroughput( - dafny_input.ProvisionedThroughput - ) - ) - return output + output["IndexName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.IndexName).decode('utf-16-be') + if dafny_input.ProvisionedThroughput.is_Some: + output["ProvisionedThroughput"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProvisionedThroughput(dafny_input.ProvisionedThroughput.value) + if dafny_input.OnDemandThroughput.is_Some: + output["OnDemandThroughput"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_OnDemandThroughput(dafny_input.OnDemandThroughput.value) + + return output def com_amazonaws_dynamodb_CreateGlobalSecondaryIndexAction(dafny_input): output = {} - output["IndexName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.IndexName - ).decode("utf-16-be") - output["KeySchema"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_KeySchemaElement( - list_element - ) - for list_element in dafny_input.KeySchema - ] - output["Projection"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Projection( - dafny_input.Projection - ) - ) + output["IndexName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.IndexName).decode('utf-16-be') + output["KeySchema"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_KeySchemaElement(list_element) for list_element in dafny_input.KeySchema] + output["Projection"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_Projection(dafny_input.Projection) if dafny_input.ProvisionedThroughput.is_Some: - output["ProvisionedThroughput"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProvisionedThroughput( - dafny_input.ProvisionedThroughput.value - ) - ) + output["ProvisionedThroughput"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProvisionedThroughput(dafny_input.ProvisionedThroughput.value) - return output + if dafny_input.OnDemandThroughput.is_Some: + output["OnDemandThroughput"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_OnDemandThroughput(dafny_input.OnDemandThroughput.value) + return output def com_amazonaws_dynamodb_DeleteGlobalSecondaryIndexAction(dafny_input): output = {} - output["IndexName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.IndexName - ).decode("utf-16-be") + output["IndexName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.IndexName).decode('utf-16-be') return output - def com_amazonaws_dynamodb_ReplicationGroupUpdate(dafny_input): output = {} if dafny_input.Create.is_Some: - output["Create"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_CreateReplicationGroupMemberAction( - dafny_input.Create.value - ) - ) + output["Create"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_CreateReplicationGroupMemberAction(dafny_input.Create.value) if dafny_input.Update.is_Some: - output["Update"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_UpdateReplicationGroupMemberAction( - dafny_input.Update.value - ) - ) + output["Update"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_UpdateReplicationGroupMemberAction(dafny_input.Update.value) if dafny_input.Delete.is_Some: - output["Delete"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DeleteReplicationGroupMemberAction( - dafny_input.Delete.value - ) - ) + output["Delete"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DeleteReplicationGroupMemberAction(dafny_input.Delete.value) return output - def com_amazonaws_dynamodb_CreateReplicationGroupMemberAction(dafny_input): output = {} - output["RegionName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.RegionName - ).decode("utf-16-be") + output["RegionName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.RegionName).decode('utf-16-be') if dafny_input.KMSMasterKeyId.is_Some: - output["KMSMasterKeyId"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.KMSMasterKeyId.value - ).decode("utf-16-be") + output["KMSMasterKeyId"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.KMSMasterKeyId.value).decode('utf-16-be') if dafny_input.ProvisionedThroughputOverride.is_Some: - output["ProvisionedThroughputOverride"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProvisionedThroughputOverride( - dafny_input.ProvisionedThroughputOverride.value - ) - ) + output["ProvisionedThroughputOverride"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProvisionedThroughputOverride(dafny_input.ProvisionedThroughputOverride.value) + + if dafny_input.OnDemandThroughputOverride.is_Some: + output["OnDemandThroughputOverride"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_OnDemandThroughputOverride(dafny_input.OnDemandThroughputOverride.value) if dafny_input.GlobalSecondaryIndexes.is_Some: - output["GlobalSecondaryIndexes"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndex( - list_element - ) - for list_element in dafny_input.GlobalSecondaryIndexes.value - ] + output["GlobalSecondaryIndexes"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndex(list_element) for list_element in dafny_input.GlobalSecondaryIndexes.value] if dafny_input.TableClassOverride.is_Some: - output["TableClassOverride"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableClass( - dafny_input.TableClassOverride.value - ) - ) + output["TableClassOverride"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableClass(dafny_input.TableClassOverride.value) return output - def com_amazonaws_dynamodb_UpdateReplicationGroupMemberAction(dafny_input): output = {} - output["RegionName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.RegionName - ).decode("utf-16-be") + output["RegionName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.RegionName).decode('utf-16-be') if dafny_input.KMSMasterKeyId.is_Some: - output["KMSMasterKeyId"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.KMSMasterKeyId.value - ).decode("utf-16-be") + output["KMSMasterKeyId"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.KMSMasterKeyId.value).decode('utf-16-be') if dafny_input.ProvisionedThroughputOverride.is_Some: - output["ProvisionedThroughputOverride"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProvisionedThroughputOverride( - dafny_input.ProvisionedThroughputOverride.value - ) - ) + output["ProvisionedThroughputOverride"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProvisionedThroughputOverride(dafny_input.ProvisionedThroughputOverride.value) + + if dafny_input.OnDemandThroughputOverride.is_Some: + output["OnDemandThroughputOverride"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_OnDemandThroughputOverride(dafny_input.OnDemandThroughputOverride.value) if dafny_input.GlobalSecondaryIndexes.is_Some: - output["GlobalSecondaryIndexes"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndex( - list_element - ) - for list_element in dafny_input.GlobalSecondaryIndexes.value - ] + output["GlobalSecondaryIndexes"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndex(list_element) for list_element in dafny_input.GlobalSecondaryIndexes.value] if dafny_input.TableClassOverride.is_Some: - output["TableClassOverride"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableClass( - dafny_input.TableClassOverride.value - ) - ) + output["TableClassOverride"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableClass(dafny_input.TableClassOverride.value) return output - def com_amazonaws_dynamodb_DeleteReplicationGroupMemberAction(dafny_input): output = {} - output["RegionName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.RegionName - ).decode("utf-16-be") + output["RegionName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.RegionName).decode('utf-16-be') return output - def com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndex(dafny_input): output = {} - output["IndexName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.IndexName - ).decode("utf-16-be") + output["IndexName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.IndexName).decode('utf-16-be') if dafny_input.ProvisionedThroughputOverride.is_Some: - output["ProvisionedThroughputOverride"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProvisionedThroughputOverride( - dafny_input.ProvisionedThroughputOverride.value - ) - ) + output["ProvisionedThroughputOverride"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProvisionedThroughputOverride(dafny_input.ProvisionedThroughputOverride.value) - return output + if dafny_input.OnDemandThroughputOverride.is_Some: + output["OnDemandThroughputOverride"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_OnDemandThroughputOverride(dafny_input.OnDemandThroughputOverride.value) + return output def com_amazonaws_dynamodb_UpdateTableInput(dafny_input): output = {} if dafny_input.AttributeDefinitions.is_Some: - output["AttributeDefinitions"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeDefinition( - list_element - ) - for list_element in dafny_input.AttributeDefinitions.value - ] - - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName - ).decode("utf-16-be") + output["AttributeDefinitions"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AttributeDefinition(list_element) for list_element in dafny_input.AttributeDefinitions.value] + + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName).decode('utf-16-be') if dafny_input.BillingMode.is_Some: - output["BillingMode"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BillingMode( - dafny_input.BillingMode.value - ) - ) + output["BillingMode"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BillingMode(dafny_input.BillingMode.value) if dafny_input.ProvisionedThroughput.is_Some: - output["ProvisionedThroughput"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProvisionedThroughput( - dafny_input.ProvisionedThroughput.value - ) - ) + output["ProvisionedThroughput"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ProvisionedThroughput(dafny_input.ProvisionedThroughput.value) if dafny_input.GlobalSecondaryIndexUpdates.is_Some: - output["GlobalSecondaryIndexUpdates"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_GlobalSecondaryIndexUpdate( - list_element - ) - for list_element in dafny_input.GlobalSecondaryIndexUpdates.value - ] + output["GlobalSecondaryIndexUpdates"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_GlobalSecondaryIndexUpdate(list_element) for list_element in dafny_input.GlobalSecondaryIndexUpdates.value] if dafny_input.StreamSpecification.is_Some: - output["StreamSpecification"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_StreamSpecification( - dafny_input.StreamSpecification.value - ) - ) + output["StreamSpecification"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_StreamSpecification(dafny_input.StreamSpecification.value) if dafny_input.SSESpecification.is_Some: - output["SSESpecification"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_SSESpecification( - dafny_input.SSESpecification.value - ) - ) + output["SSESpecification"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_SSESpecification(dafny_input.SSESpecification.value) if dafny_input.ReplicaUpdates.is_Some: - output["ReplicaUpdates"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicationGroupUpdate( - list_element - ) - for list_element in dafny_input.ReplicaUpdates.value - ] + output["ReplicaUpdates"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicationGroupUpdate(list_element) for list_element in dafny_input.ReplicaUpdates.value] if dafny_input.TableClass.is_Some: - output["TableClass"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableClass( - dafny_input.TableClass.value - ) - ) + output["TableClass"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableClass(dafny_input.TableClass.value) - return output + if dafny_input.DeletionProtectionEnabled.is_Some: + output["DeletionProtectionEnabled"] = dafny_input.DeletionProtectionEnabled.value + if dafny_input.OnDemandThroughput.is_Some: + output["OnDemandThroughput"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_OnDemandThroughput(dafny_input.OnDemandThroughput.value) + + return output def com_amazonaws_dynamodb_UpdateTableOutput(dafny_input): output = {} if dafny_input.TableDescription.is_Some: - output["TableDescription"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableDescription( - dafny_input.TableDescription.value - ) - ) + output["TableDescription"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableDescription(dafny_input.TableDescription.value) return output - def com_amazonaws_dynamodb_GlobalSecondaryIndexAutoScalingUpdate(dafny_input): output = {} if dafny_input.IndexName.is_Some: - output["IndexName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.IndexName.value - ).decode("utf-16-be") + output["IndexName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.IndexName.value).decode('utf-16-be') if dafny_input.ProvisionedWriteCapacityAutoScalingUpdate.is_Some: - output["ProvisionedWriteCapacityAutoScalingUpdate"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingSettingsUpdate( - dafny_input.ProvisionedWriteCapacityAutoScalingUpdate.value - ) - ) + output["ProvisionedWriteCapacityAutoScalingUpdate"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingSettingsUpdate(dafny_input.ProvisionedWriteCapacityAutoScalingUpdate.value) return output - def com_amazonaws_dynamodb_ReplicaAutoScalingUpdate(dafny_input): output = {} - output["RegionName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.RegionName - ).decode("utf-16-be") + output["RegionName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.RegionName).decode('utf-16-be') if dafny_input.ReplicaGlobalSecondaryIndexUpdates.is_Some: - output["ReplicaGlobalSecondaryIndexUpdates"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexAutoScalingUpdate( - list_element - ) - for list_element in dafny_input.ReplicaGlobalSecondaryIndexUpdates.value - ] + output["ReplicaGlobalSecondaryIndexUpdates"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexAutoScalingUpdate(list_element) for list_element in dafny_input.ReplicaGlobalSecondaryIndexUpdates.value] if dafny_input.ReplicaProvisionedReadCapacityAutoScalingUpdate.is_Some: - output["ReplicaProvisionedReadCapacityAutoScalingUpdate"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingSettingsUpdate( - dafny_input.ReplicaProvisionedReadCapacityAutoScalingUpdate.value - ) - ) + output["ReplicaProvisionedReadCapacityAutoScalingUpdate"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingSettingsUpdate(dafny_input.ReplicaProvisionedReadCapacityAutoScalingUpdate.value) return output - def com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexAutoScalingUpdate(dafny_input): output = {} if dafny_input.IndexName.is_Some: - output["IndexName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.IndexName.value - ).decode("utf-16-be") + output["IndexName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.IndexName.value).decode('utf-16-be') if dafny_input.ProvisionedReadCapacityAutoScalingUpdate.is_Some: - output["ProvisionedReadCapacityAutoScalingUpdate"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingSettingsUpdate( - dafny_input.ProvisionedReadCapacityAutoScalingUpdate.value - ) - ) + output["ProvisionedReadCapacityAutoScalingUpdate"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingSettingsUpdate(dafny_input.ProvisionedReadCapacityAutoScalingUpdate.value) return output - def com_amazonaws_dynamodb_UpdateTableReplicaAutoScalingInput(dafny_input): output = {} if dafny_input.GlobalSecondaryIndexUpdates.is_Some: - output["GlobalSecondaryIndexUpdates"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_GlobalSecondaryIndexAutoScalingUpdate( - list_element - ) - for list_element in dafny_input.GlobalSecondaryIndexUpdates.value - ] - - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName - ).decode("utf-16-be") + output["GlobalSecondaryIndexUpdates"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_GlobalSecondaryIndexAutoScalingUpdate(list_element) for list_element in dafny_input.GlobalSecondaryIndexUpdates.value] + + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName).decode('utf-16-be') if dafny_input.ProvisionedWriteCapacityAutoScalingUpdate.is_Some: - output["ProvisionedWriteCapacityAutoScalingUpdate"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingSettingsUpdate( - dafny_input.ProvisionedWriteCapacityAutoScalingUpdate.value - ) - ) + output["ProvisionedWriteCapacityAutoScalingUpdate"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_AutoScalingSettingsUpdate(dafny_input.ProvisionedWriteCapacityAutoScalingUpdate.value) if dafny_input.ReplicaUpdates.is_Some: - output["ReplicaUpdates"] = [ - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaAutoScalingUpdate( - list_element - ) - for list_element in dafny_input.ReplicaUpdates.value - ] + output["ReplicaUpdates"] = [aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ReplicaAutoScalingUpdate(list_element) for list_element in dafny_input.ReplicaUpdates.value] return output - def com_amazonaws_dynamodb_UpdateTableReplicaAutoScalingOutput(dafny_input): output = {} if dafny_input.TableAutoScalingDescription.is_Some: - output["TableAutoScalingDescription"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableAutoScalingDescription( - dafny_input.TableAutoScalingDescription.value - ) - ) + output["TableAutoScalingDescription"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TableAutoScalingDescription(dafny_input.TableAutoScalingDescription.value) return output - def com_amazonaws_dynamodb_TimeToLiveSpecification(dafny_input): output = {} output["Enabled"] = dafny_input.Enabled - output["AttributeName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.AttributeName - ).decode("utf-16-be") + output["AttributeName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.AttributeName).decode('utf-16-be') return output - def com_amazonaws_dynamodb_UpdateTimeToLiveInput(dafny_input): output = {} - output["TableName"] = b"".join( - ord(c).to_bytes(2, "big") for c in dafny_input.TableName - ).decode("utf-16-be") - output["TimeToLiveSpecification"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TimeToLiveSpecification( - dafny_input.TimeToLiveSpecification - ) - ) + output["TableName"] = b''.join(ord(c).to_bytes(2, 'big') for c in dafny_input.TableName).decode('utf-16-be') + output["TimeToLiveSpecification"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TimeToLiveSpecification(dafny_input.TimeToLiveSpecification) return output - def com_amazonaws_dynamodb_UpdateTimeToLiveOutput(dafny_input): output = {} if dafny_input.TimeToLiveSpecification.is_Some: - output["TimeToLiveSpecification"] = ( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TimeToLiveSpecification( - dafny_input.TimeToLiveSpecification.value - ) - ) + output["TimeToLiveSpecification"] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TimeToLiveSpecification(dafny_input.TimeToLiveSpecification.value) return output 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 34f1f7253..ff8dcf1dc 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 @@ -20,6 +20,8 @@ DeleteBackupOutput_DeleteBackupOutput as DafnyDeleteBackupOutput, DeleteItemInput_DeleteItemInput as DafnyDeleteItemInput, DeleteItemOutput_DeleteItemOutput as DafnyDeleteItemOutput, + DeleteResourcePolicyInput_DeleteResourcePolicyInput as DafnyDeleteResourcePolicyInput, + DeleteResourcePolicyOutput_DeleteResourcePolicyOutput as DafnyDeleteResourcePolicyOutput, DeleteTableInput_DeleteTableInput as DafnyDeleteTableInput, DeleteTableOutput_DeleteTableOutput as DafnyDeleteTableOutput, DescribeBackupInput_DescribeBackupInput as DafnyDescribeBackupInput, @@ -60,6 +62,8 @@ ExportTableToPointInTimeOutput_ExportTableToPointInTimeOutput as DafnyExportTableToPointInTimeOutput, GetItemInput_GetItemInput as DafnyGetItemInput, GetItemOutput_GetItemOutput as DafnyGetItemOutput, + GetResourcePolicyInput_GetResourcePolicyInput as DafnyGetResourcePolicyInput, + GetResourcePolicyOutput_GetResourcePolicyOutput as DafnyGetResourcePolicyOutput, ImportTableInput_ImportTableInput as DafnyImportTableInput, ImportTableOutput_ImportTableOutput as DafnyImportTableOutput, ListBackupsInput_ListBackupsInput as DafnyListBackupsInput, @@ -78,6 +82,8 @@ ListTagsOfResourceOutput_ListTagsOfResourceOutput as DafnyListTagsOfResourceOutput, PutItemInput_PutItemInput as DafnyPutItemInput, PutItemOutput_PutItemOutput as DafnyPutItemOutput, + PutResourcePolicyInput_PutResourcePolicyInput as DafnyPutResourcePolicyInput, + PutResourcePolicyOutput_PutResourcePolicyOutput as DafnyPutResourcePolicyOutput, QueryInput_QueryInput as DafnyQueryInput, QueryOutput_QueryOutput as DafnyQueryOutput, RestoreTableFromBackupInput_RestoreTableFromBackupInput as DafnyRestoreTableFromBackupInput, @@ -102,6 +108,8 @@ UpdateGlobalTableSettingsOutput_UpdateGlobalTableSettingsOutput as DafnyUpdateGlobalTableSettingsOutput, UpdateItemInput_UpdateItemInput as DafnyUpdateItemInput, UpdateItemOutput_UpdateItemOutput as DafnyUpdateItemOutput, + UpdateKinesisStreamingDestinationInput_UpdateKinesisStreamingDestinationInput as DafnyUpdateKinesisStreamingDestinationInput, + UpdateKinesisStreamingDestinationOutput_UpdateKinesisStreamingDestinationOutput as DafnyUpdateKinesisStreamingDestinationOutput, UpdateTableInput_UpdateTableInput as DafnyUpdateTableInput, UpdateTableOutput_UpdateTableOutput as DafnyUpdateTableOutput, UpdateTableReplicaAutoScalingInput_UpdateTableReplicaAutoScalingInput as DafnyUpdateTableReplicaAutoScalingInput, @@ -120,879 +128,525 @@ from botocore.exceptions import ClientError import aws_cryptography_internal_dynamodb.internaldafny.generated.ComAmazonawsDynamodbTypes - def _sdk_error_to_dafny_error(e: ClientError): - """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 - ) - - elif e.response["Error"]["Code"] == "BackupNotFoundException": - return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BackupNotFoundException( - e.response - ) - - elif e.response["Error"]["Code"] == "ConditionalCheckFailedException": - return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConditionalCheckFailedException( - e.response - ) - - elif e.response["Error"]["Code"] == "ContinuousBackupsUnavailableException": - return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ContinuousBackupsUnavailableException( - e.response - ) - - elif e.response["Error"]["Code"] == "DuplicateItemException": - return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DuplicateItemException( - e.response - ) - - elif e.response["Error"]["Code"] == "ExportConflictException": - return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ExportConflictException( - e.response - ) - - elif e.response["Error"]["Code"] == "ExportNotFoundException": - return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ExportNotFoundException( - e.response - ) - - elif e.response["Error"]["Code"] == "GlobalTableAlreadyExistsException": - return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_GlobalTableAlreadyExistsException( - e.response - ) - - elif e.response["Error"]["Code"] == "GlobalTableNotFoundException": - return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_GlobalTableNotFoundException( - e.response - ) - - elif e.response["Error"]["Code"] == "IdempotentParameterMismatchException": - return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_IdempotentParameterMismatchException( - e.response - ) - - elif e.response["Error"]["Code"] == "ImportConflictException": - return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ImportConflictException( - e.response - ) - - elif e.response["Error"]["Code"] == "ImportNotFoundException": - return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ImportNotFoundException( - e.response - ) - - elif e.response["Error"]["Code"] == "IndexNotFoundException": - return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_IndexNotFoundException( - e.response - ) - - elif e.response["Error"]["Code"] == "InternalServerError": - return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_InternalServerError( - e.response - ) - - elif e.response["Error"]["Code"] == "InvalidEndpointException": - return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_InvalidEndpointException( - e.response - ) - - elif e.response["Error"]["Code"] == "InvalidExportTimeException": - return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_InvalidExportTimeException( - e.response - ) - - elif e.response["Error"]["Code"] == "InvalidRestoreTimeException": - return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_InvalidRestoreTimeException( - e.response - ) - - elif e.response["Error"]["Code"] == "ItemCollectionSizeLimitExceededException": - return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ItemCollectionSizeLimitExceededException( - e.response - ) - - elif e.response["Error"]["Code"] == "LimitExceededException": - return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_LimitExceededException( - e.response - ) - - elif e.response["Error"]["Code"] == "PointInTimeRecoveryUnavailableException": - return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_PointInTimeRecoveryUnavailableException( - e.response - ) - - elif e.response["Error"]["Code"] == "ProvisionedThroughputExceededException": - return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughputExceededException( - e.response - ) - - elif e.response["Error"]["Code"] == "ReplicaAlreadyExistsException": - return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaAlreadyExistsException( - e.response - ) - - elif e.response["Error"]["Code"] == "ReplicaNotFoundException": - return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaNotFoundException( - e.response - ) - - elif e.response["Error"]["Code"] == "RequestLimitExceeded": - return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_RequestLimitExceeded( - e.response - ) - - elif e.response["Error"]["Code"] == "ResourceInUseException": - return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ResourceInUseException( - e.response - ) - - elif e.response["Error"]["Code"] == "ResourceNotFoundException": - return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ResourceNotFoundException( - e.response - ) - - elif e.response["Error"]["Code"] == "TableAlreadyExistsException": - return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableAlreadyExistsException( - e.response - ) - - elif e.response["Error"]["Code"] == "TableInUseException": - return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableInUseException( - e.response - ) - - elif e.response["Error"]["Code"] == "TableNotFoundException": - return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableNotFoundException( - e.response - ) - - elif e.response["Error"]["Code"] == "TransactionCanceledException": - return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TransactionCanceledException( - e.response - ) - - elif e.response["Error"]["Code"] == "TransactionConflictException": - return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TransactionConflictException( - e.response - ) - - elif e.response["Error"]["Code"] == "TransactionInProgressException": - return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TransactionInProgressException( - e.response - ) - - return aws_cryptography_internal_dynamodb.internaldafny.generated.ComAmazonawsDynamodbTypes.Error_Opaque( - obj=e, - alt__text=_dafny.Seq( - "".join( - [ - chr(int.from_bytes(pair, "big")) - for pair in zip(*[iter(repr(e).encode("utf-16-be"))] * 2) - ] + """ + 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) + + elif e.response['Error']['Code'] == 'BackupNotFoundException': + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BackupNotFoundException(e.response) + + elif e.response['Error']['Code'] == 'ConditionalCheckFailedException': + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ConditionalCheckFailedException(e.response) + + elif e.response['Error']['Code'] == 'ContinuousBackupsUnavailableException': + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ContinuousBackupsUnavailableException(e.response) + + elif e.response['Error']['Code'] == 'DuplicateItemException': + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DuplicateItemException(e.response) + + elif e.response['Error']['Code'] == 'ExportConflictException': + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ExportConflictException(e.response) + + elif e.response['Error']['Code'] == 'ExportNotFoundException': + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ExportNotFoundException(e.response) + + elif e.response['Error']['Code'] == 'GlobalTableAlreadyExistsException': + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_GlobalTableAlreadyExistsException(e.response) + + elif e.response['Error']['Code'] == 'GlobalTableNotFoundException': + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_GlobalTableNotFoundException(e.response) + + elif e.response['Error']['Code'] == 'IdempotentParameterMismatchException': + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_IdempotentParameterMismatchException(e.response) + + elif e.response['Error']['Code'] == 'ImportConflictException': + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ImportConflictException(e.response) + + elif e.response['Error']['Code'] == 'ImportNotFoundException': + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ImportNotFoundException(e.response) + + elif e.response['Error']['Code'] == 'IndexNotFoundException': + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_IndexNotFoundException(e.response) + + elif e.response['Error']['Code'] == 'InternalServerError': + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_InternalServerError(e.response) + + elif e.response['Error']['Code'] == 'InvalidEndpointException': + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_InvalidEndpointException(e.response) + + elif e.response['Error']['Code'] == 'InvalidExportTimeException': + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_InvalidExportTimeException(e.response) + + elif e.response['Error']['Code'] == 'InvalidRestoreTimeException': + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_InvalidRestoreTimeException(e.response) + + elif e.response['Error']['Code'] == 'ItemCollectionSizeLimitExceededException': + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ItemCollectionSizeLimitExceededException(e.response) + + elif e.response['Error']['Code'] == 'LimitExceededException': + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_LimitExceededException(e.response) + + elif e.response['Error']['Code'] == 'PointInTimeRecoveryUnavailableException': + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_PointInTimeRecoveryUnavailableException(e.response) + + elif e.response['Error']['Code'] == 'PolicyNotFoundException': + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_PolicyNotFoundException(e.response) + + elif e.response['Error']['Code'] == 'ProvisionedThroughputExceededException': + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ProvisionedThroughputExceededException(e.response) + + elif e.response['Error']['Code'] == 'ReplicaAlreadyExistsException': + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaAlreadyExistsException(e.response) + + elif e.response['Error']['Code'] == 'ReplicaNotFoundException': + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ReplicaNotFoundException(e.response) + + elif e.response['Error']['Code'] == 'RequestLimitExceeded': + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_RequestLimitExceeded(e.response) + + elif e.response['Error']['Code'] == 'ResourceInUseException': + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ResourceInUseException(e.response) + + elif e.response['Error']['Code'] == 'ResourceNotFoundException': + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ResourceNotFoundException(e.response) + + elif e.response['Error']['Code'] == 'TableAlreadyExistsException': + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableAlreadyExistsException(e.response) + + elif e.response['Error']['Code'] == 'TableInUseException': + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableInUseException(e.response) + + elif e.response['Error']['Code'] == 'TableNotFoundException': + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TableNotFoundException(e.response) + + elif e.response['Error']['Code'] == 'TransactionCanceledException': + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TransactionCanceledException(e.response) + + elif e.response['Error']['Code'] == 'TransactionConflictException': + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TransactionConflictException(e.response) + + elif e.response['Error']['Code'] == 'TransactionInProgressException': + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TransactionInProgressException(e.response) + + return aws_cryptography_internal_dynamodb.internaldafny.generated.ComAmazonawsDynamodbTypes.Error_Opaque(obj=e, alt__text= _dafny.Seq( + "".join( + [ + chr(int.from_bytes(pair, "big")) + for pair in zip( + *[iter(repr(e).encode("utf-16-be"))] * 2 + ) + ] + ) ) - ), ) - class DynamoDBClientShim: def __init__(self, _impl, _region): self._impl = _impl self._region = _region - def BatchExecuteStatement( - self, input: DafnyBatchExecuteStatementInput - ) -> DafnyBatchExecuteStatementOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BatchExecuteStatementInput( - input - ) + def BatchExecuteStatement(self, input: DafnyBatchExecuteStatementInput) -> DafnyBatchExecuteStatementOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BatchExecuteStatementInput(input) try: boto_response_dict = self._impl.batch_execute_statement(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BatchExecuteStatementOutput( - boto_response_dict - ) - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BatchExecuteStatementOutput(boto_response_dict)) def BatchGetItem(self, input: DafnyBatchGetItemInput) -> DafnyBatchGetItemOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BatchGetItemInput( - input - ) + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BatchGetItemInput(input) try: boto_response_dict = self._impl.batch_get_item(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BatchGetItemOutput( - boto_response_dict - ) - ) - - def BatchWriteItem( - self, input: DafnyBatchWriteItemInput - ) -> DafnyBatchWriteItemOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BatchWriteItemInput( - input - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BatchGetItemOutput(boto_response_dict)) + + def BatchWriteItem(self, input: DafnyBatchWriteItemInput) -> DafnyBatchWriteItemOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_BatchWriteItemInput(input) try: boto_response_dict = self._impl.batch_write_item(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BatchWriteItemOutput( - boto_response_dict - ) - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BatchWriteItemOutput(boto_response_dict)) def CreateBackup(self, input: DafnyCreateBackupInput) -> DafnyCreateBackupOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_CreateBackupInput( - input - ) + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_CreateBackupInput(input) try: boto_response_dict = self._impl.create_backup(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_CreateBackupOutput( - boto_response_dict - ) - ) - - def CreateGlobalTable( - self, input: DafnyCreateGlobalTableInput - ) -> DafnyCreateGlobalTableOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_CreateGlobalTableInput( - input - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_CreateBackupOutput(boto_response_dict)) + + def CreateGlobalTable(self, input: DafnyCreateGlobalTableInput) -> DafnyCreateGlobalTableOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_CreateGlobalTableInput(input) try: boto_response_dict = self._impl.create_global_table(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_CreateGlobalTableOutput( - boto_response_dict - ) - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_CreateGlobalTableOutput(boto_response_dict)) def CreateTable(self, input: DafnyCreateTableInput) -> DafnyCreateTableOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_CreateTableInput( - input - ) + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_CreateTableInput(input) try: boto_response_dict = self._impl.create_table(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_CreateTableOutput( - boto_response_dict - ) - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_CreateTableOutput(boto_response_dict)) def DeleteBackup(self, input: DafnyDeleteBackupInput) -> DafnyDeleteBackupOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DeleteBackupInput( - input - ) + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DeleteBackupInput(input) try: boto_response_dict = self._impl.delete_backup(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DeleteBackupOutput( - boto_response_dict - ) - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DeleteBackupOutput(boto_response_dict)) def DeleteItem(self, input: DafnyDeleteItemInput) -> DafnyDeleteItemOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DeleteItemInput( - input - ) + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DeleteItemInput(input) try: boto_response_dict = self._impl.delete_item(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DeleteItemOutput( - boto_response_dict - ) - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DeleteItemOutput(boto_response_dict)) + + def DeleteResourcePolicy(self, input: DafnyDeleteResourcePolicyInput) -> DafnyDeleteResourcePolicyOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DeleteResourcePolicyInput(input) + try: + boto_response_dict = self._impl.delete_resource_policy(**boto_request_dict) + except ClientError as e: + return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) + + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DeleteResourcePolicyOutput(boto_response_dict)) def DeleteTable(self, input: DafnyDeleteTableInput) -> DafnyDeleteTableOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DeleteTableInput( - input - ) + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DeleteTableInput(input) try: boto_response_dict = self._impl.delete_table(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DeleteTableOutput( - boto_response_dict - ) - ) - - def DescribeBackup( - self, input: DafnyDescribeBackupInput - ) -> DafnyDescribeBackupOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DescribeBackupInput( - input - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DeleteTableOutput(boto_response_dict)) + + def DescribeBackup(self, input: DafnyDescribeBackupInput) -> DafnyDescribeBackupOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DescribeBackupInput(input) try: boto_response_dict = self._impl.describe_backup(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DescribeBackupOutput( - boto_response_dict - ) - ) - - def DescribeContinuousBackups( - self, input: DafnyDescribeContinuousBackupsInput - ) -> DafnyDescribeContinuousBackupsOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DescribeContinuousBackupsInput( - input - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DescribeBackupOutput(boto_response_dict)) + + def DescribeContinuousBackups(self, input: DafnyDescribeContinuousBackupsInput) -> DafnyDescribeContinuousBackupsOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DescribeContinuousBackupsInput(input) try: - boto_response_dict = self._impl.describe_continuous_backups( - **boto_request_dict - ) + boto_response_dict = self._impl.describe_continuous_backups(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DescribeContinuousBackupsOutput( - boto_response_dict - ) - ) - - def DescribeContributorInsights( - self, input: DafnyDescribeContributorInsightsInput - ) -> DafnyDescribeContributorInsightsOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DescribeContributorInsightsInput( - input - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DescribeContinuousBackupsOutput(boto_response_dict)) + + def DescribeContributorInsights(self, input: DafnyDescribeContributorInsightsInput) -> DafnyDescribeContributorInsightsOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DescribeContributorInsightsInput(input) try: - boto_response_dict = self._impl.describe_contributor_insights( - **boto_request_dict - ) + boto_response_dict = self._impl.describe_contributor_insights(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DescribeContributorInsightsOutput( - boto_response_dict - ) - ) - - def DescribeEndpoints( - self, input: DafnyDescribeEndpointsRequest - ) -> DafnyDescribeEndpointsResponse: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DescribeEndpointsRequest( - input - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DescribeContributorInsightsOutput(boto_response_dict)) + + def DescribeEndpoints(self, input: DafnyDescribeEndpointsRequest) -> DafnyDescribeEndpointsResponse: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DescribeEndpointsRequest(input) try: boto_response_dict = self._impl.describe_endpoints(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DescribeEndpointsResponse( - boto_response_dict - ) - ) - - def DescribeExport( - self, input: DafnyDescribeExportInput - ) -> DafnyDescribeExportOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DescribeExportInput( - input - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DescribeEndpointsResponse(boto_response_dict)) + + def DescribeExport(self, input: DafnyDescribeExportInput) -> DafnyDescribeExportOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DescribeExportInput(input) try: boto_response_dict = self._impl.describe_export(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DescribeExportOutput( - boto_response_dict - ) - ) - - def DescribeGlobalTable( - self, input: DafnyDescribeGlobalTableInput - ) -> DafnyDescribeGlobalTableOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DescribeGlobalTableInput( - input - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DescribeExportOutput(boto_response_dict)) + + def DescribeGlobalTable(self, input: DafnyDescribeGlobalTableInput) -> DafnyDescribeGlobalTableOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DescribeGlobalTableInput(input) try: boto_response_dict = self._impl.describe_global_table(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DescribeGlobalTableOutput( - boto_response_dict - ) - ) - - def DescribeGlobalTableSettings( - self, input: DafnyDescribeGlobalTableSettingsInput - ) -> DafnyDescribeGlobalTableSettingsOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DescribeGlobalTableSettingsInput( - input - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DescribeGlobalTableOutput(boto_response_dict)) + + def DescribeGlobalTableSettings(self, input: DafnyDescribeGlobalTableSettingsInput) -> DafnyDescribeGlobalTableSettingsOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DescribeGlobalTableSettingsInput(input) try: - boto_response_dict = self._impl.describe_global_table_settings( - **boto_request_dict - ) + boto_response_dict = self._impl.describe_global_table_settings(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DescribeGlobalTableSettingsOutput( - boto_response_dict - ) - ) - - def DescribeImport( - self, input: DafnyDescribeImportInput - ) -> DafnyDescribeImportOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DescribeImportInput( - input - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DescribeGlobalTableSettingsOutput(boto_response_dict)) + + def DescribeImport(self, input: DafnyDescribeImportInput) -> DafnyDescribeImportOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DescribeImportInput(input) try: boto_response_dict = self._impl.describe_import(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DescribeImportOutput( - boto_response_dict - ) - ) - - def DescribeKinesisStreamingDestination( - self, input: DafnyDescribeKinesisStreamingDestinationInput - ) -> DafnyDescribeKinesisStreamingDestinationOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DescribeKinesisStreamingDestinationInput( - input - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DescribeImportOutput(boto_response_dict)) + + def DescribeKinesisStreamingDestination(self, input: DafnyDescribeKinesisStreamingDestinationInput) -> DafnyDescribeKinesisStreamingDestinationOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DescribeKinesisStreamingDestinationInput(input) try: - boto_response_dict = self._impl.describe_kinesis_streaming_destination( - **boto_request_dict - ) + boto_response_dict = self._impl.describe_kinesis_streaming_destination(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DescribeKinesisStreamingDestinationOutput( - boto_response_dict - ) - ) - - def DescribeLimits( - self, input: DafnyDescribeLimitsInput - ) -> DafnyDescribeLimitsOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DescribeLimitsInput( - input - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DescribeKinesisStreamingDestinationOutput(boto_response_dict)) + + def DescribeLimits(self, input: DafnyDescribeLimitsInput) -> DafnyDescribeLimitsOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DescribeLimitsInput(input) try: boto_response_dict = self._impl.describe_limits(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DescribeLimitsOutput( - boto_response_dict - ) - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DescribeLimitsOutput(boto_response_dict)) def DescribeTable(self, input: DafnyDescribeTableInput) -> DafnyDescribeTableOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DescribeTableInput( - input - ) + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DescribeTableInput(input) try: boto_response_dict = self._impl.describe_table(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DescribeTableOutput( - boto_response_dict - ) - ) - - def DescribeTableReplicaAutoScaling( - self, input: DafnyDescribeTableReplicaAutoScalingInput - ) -> DafnyDescribeTableReplicaAutoScalingOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DescribeTableReplicaAutoScalingInput( - input - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DescribeTableOutput(boto_response_dict)) + + def DescribeTableReplicaAutoScaling(self, input: DafnyDescribeTableReplicaAutoScalingInput) -> DafnyDescribeTableReplicaAutoScalingOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DescribeTableReplicaAutoScalingInput(input) try: - boto_response_dict = self._impl.describe_table_replica_auto_scaling( - **boto_request_dict - ) + boto_response_dict = self._impl.describe_table_replica_auto_scaling(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DescribeTableReplicaAutoScalingOutput( - boto_response_dict - ) - ) - - def DescribeTimeToLive( - self, input: DafnyDescribeTimeToLiveInput - ) -> DafnyDescribeTimeToLiveOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DescribeTimeToLiveInput( - input - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DescribeTableReplicaAutoScalingOutput(boto_response_dict)) + + def DescribeTimeToLive(self, input: DafnyDescribeTimeToLiveInput) -> DafnyDescribeTimeToLiveOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DescribeTimeToLiveInput(input) try: boto_response_dict = self._impl.describe_time_to_live(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DescribeTimeToLiveOutput( - boto_response_dict - ) - ) - - def DisableKinesisStreamingDestination( - self, input: DafnyDisableKinesisStreamingDestinationInput - ) -> DafnyDisableKinesisStreamingDestinationOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DisableKinesisStreamingDestinationInput( - input - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DescribeTimeToLiveOutput(boto_response_dict)) + + def DisableKinesisStreamingDestination(self, input: DafnyDisableKinesisStreamingDestinationInput) -> DafnyDisableKinesisStreamingDestinationOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_DisableKinesisStreamingDestinationInput(input) try: - boto_response_dict = self._impl.disable_kinesis_streaming_destination( - **boto_request_dict - ) + boto_response_dict = self._impl.disable_kinesis_streaming_destination(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DisableKinesisStreamingDestinationOutput( - boto_response_dict - ) - ) - - def EnableKinesisStreamingDestination( - self, input: DafnyEnableKinesisStreamingDestinationInput - ) -> DafnyEnableKinesisStreamingDestinationOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_EnableKinesisStreamingDestinationInput( - input - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_DisableKinesisStreamingDestinationOutput(boto_response_dict)) + + def EnableKinesisStreamingDestination(self, input: DafnyEnableKinesisStreamingDestinationInput) -> DafnyEnableKinesisStreamingDestinationOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_EnableKinesisStreamingDestinationInput(input) try: - boto_response_dict = self._impl.enable_kinesis_streaming_destination( - **boto_request_dict - ) + boto_response_dict = self._impl.enable_kinesis_streaming_destination(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_EnableKinesisStreamingDestinationOutput( - boto_response_dict - ) - ) - - def ExecuteStatement( - self, input: DafnyExecuteStatementInput - ) -> DafnyExecuteStatementOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ExecuteStatementInput( - input - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_EnableKinesisStreamingDestinationOutput(boto_response_dict)) + + def ExecuteStatement(self, input: DafnyExecuteStatementInput) -> DafnyExecuteStatementOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ExecuteStatementInput(input) try: boto_response_dict = self._impl.execute_statement(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ExecuteStatementOutput( - boto_response_dict - ) - ) - - def ExecuteTransaction( - self, input: DafnyExecuteTransactionInput - ) -> DafnyExecuteTransactionOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ExecuteTransactionInput( - input - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ExecuteStatementOutput(boto_response_dict)) + + def ExecuteTransaction(self, input: DafnyExecuteTransactionInput) -> DafnyExecuteTransactionOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ExecuteTransactionInput(input) try: boto_response_dict = self._impl.execute_transaction(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ExecuteTransactionOutput( - boto_response_dict - ) - ) - - def ExportTableToPointInTime( - self, input: DafnyExportTableToPointInTimeInput - ) -> DafnyExportTableToPointInTimeOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ExportTableToPointInTimeInput( - input - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ExecuteTransactionOutput(boto_response_dict)) + + def ExportTableToPointInTime(self, input: DafnyExportTableToPointInTimeInput) -> DafnyExportTableToPointInTimeOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ExportTableToPointInTimeInput(input) try: - boto_response_dict = self._impl.export_table_to_point_in_time( - **boto_request_dict - ) + boto_response_dict = self._impl.export_table_to_point_in_time(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ExportTableToPointInTimeOutput( - boto_response_dict - ) - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ExportTableToPointInTimeOutput(boto_response_dict)) def GetItem(self, input: DafnyGetItemInput) -> DafnyGetItemOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_GetItemInput( - input - ) + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_GetItemInput(input) try: boto_response_dict = self._impl.get_item(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_GetItemOutput( - boto_response_dict - ) - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_GetItemOutput(boto_response_dict)) + + def GetResourcePolicy(self, input: DafnyGetResourcePolicyInput) -> DafnyGetResourcePolicyOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_GetResourcePolicyInput(input) + try: + boto_response_dict = self._impl.get_resource_policy(**boto_request_dict) + except ClientError as e: + return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) + + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_GetResourcePolicyOutput(boto_response_dict)) def ImportTable(self, input: DafnyImportTableInput) -> DafnyImportTableOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ImportTableInput( - input - ) + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ImportTableInput(input) try: boto_response_dict = self._impl.import_table(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ImportTableOutput( - boto_response_dict - ) - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ImportTableOutput(boto_response_dict)) def ListBackups(self, input: DafnyListBackupsInput) -> DafnyListBackupsOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ListBackupsInput( - input - ) + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ListBackupsInput(input) try: boto_response_dict = self._impl.list_backups(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ListBackupsOutput( - boto_response_dict - ) - ) - - def ListContributorInsights( - self, input: DafnyListContributorInsightsInput - ) -> DafnyListContributorInsightsOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ListContributorInsightsInput( - input - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ListBackupsOutput(boto_response_dict)) + + def ListContributorInsights(self, input: DafnyListContributorInsightsInput) -> DafnyListContributorInsightsOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ListContributorInsightsInput(input) try: - boto_response_dict = self._impl.list_contributor_insights( - **boto_request_dict - ) + boto_response_dict = self._impl.list_contributor_insights(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ListContributorInsightsOutput( - boto_response_dict - ) - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ListContributorInsightsOutput(boto_response_dict)) def ListExports(self, input: DafnyListExportsInput) -> DafnyListExportsOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ListExportsInput( - input - ) + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ListExportsInput(input) try: boto_response_dict = self._impl.list_exports(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ListExportsOutput( - boto_response_dict - ) - ) - - def ListGlobalTables( - self, input: DafnyListGlobalTablesInput - ) -> DafnyListGlobalTablesOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ListGlobalTablesInput( - input - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ListExportsOutput(boto_response_dict)) + + def ListGlobalTables(self, input: DafnyListGlobalTablesInput) -> DafnyListGlobalTablesOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ListGlobalTablesInput(input) try: boto_response_dict = self._impl.list_global_tables(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ListGlobalTablesOutput( - boto_response_dict - ) - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ListGlobalTablesOutput(boto_response_dict)) def ListImports(self, input: DafnyListImportsInput) -> DafnyListImportsOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ListImportsInput( - input - ) + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ListImportsInput(input) try: boto_response_dict = self._impl.list_imports(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ListImportsOutput( - boto_response_dict - ) - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ListImportsOutput(boto_response_dict)) def ListTables(self, input: DafnyListTablesInput) -> DafnyListTablesOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ListTablesInput( - input - ) + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ListTablesInput(input) try: boto_response_dict = self._impl.list_tables(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ListTablesOutput( - boto_response_dict - ) - ) - - def ListTagsOfResource( - self, input: DafnyListTagsOfResourceInput - ) -> DafnyListTagsOfResourceOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ListTagsOfResourceInput( - input - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ListTablesOutput(boto_response_dict)) + + def ListTagsOfResource(self, input: DafnyListTagsOfResourceInput) -> DafnyListTagsOfResourceOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ListTagsOfResourceInput(input) try: boto_response_dict = self._impl.list_tags_of_resource(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ListTagsOfResourceOutput( - boto_response_dict - ) - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ListTagsOfResourceOutput(boto_response_dict)) def PutItem(self, input: DafnyPutItemInput) -> DafnyPutItemOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_PutItemInput( - input - ) + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_PutItemInput(input) try: boto_response_dict = self._impl.put_item(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_PutItemOutput( - boto_response_dict - ) - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_PutItemOutput(boto_response_dict)) + + def PutResourcePolicy(self, input: DafnyPutResourcePolicyInput) -> DafnyPutResourcePolicyOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_PutResourcePolicyInput(input) + try: + boto_response_dict = self._impl.put_resource_policy(**boto_request_dict) + except ClientError as e: + return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) + + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_PutResourcePolicyOutput(boto_response_dict)) def Query(self, input: DafnyQueryInput) -> DafnyQueryOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_QueryInput( - input - ) + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_QueryInput(input) try: boto_response_dict = self._impl.query(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_QueryOutput( - boto_response_dict - ) - ) - - def RestoreTableFromBackup( - self, input: DafnyRestoreTableFromBackupInput - ) -> DafnyRestoreTableFromBackupOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_RestoreTableFromBackupInput( - input - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_QueryOutput(boto_response_dict)) + + def RestoreTableFromBackup(self, input: DafnyRestoreTableFromBackupInput) -> DafnyRestoreTableFromBackupOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_RestoreTableFromBackupInput(input) try: - boto_response_dict = self._impl.restore_table_from_backup( - **boto_request_dict - ) + boto_response_dict = self._impl.restore_table_from_backup(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_RestoreTableFromBackupOutput( - boto_response_dict - ) - ) - - def RestoreTableToPointInTime( - self, input: DafnyRestoreTableToPointInTimeInput - ) -> DafnyRestoreTableToPointInTimeOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_RestoreTableToPointInTimeInput( - input - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_RestoreTableFromBackupOutput(boto_response_dict)) + + def RestoreTableToPointInTime(self, input: DafnyRestoreTableToPointInTimeInput) -> DafnyRestoreTableToPointInTimeOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_RestoreTableToPointInTimeInput(input) try: - boto_response_dict = self._impl.restore_table_to_point_in_time( - **boto_request_dict - ) + boto_response_dict = self._impl.restore_table_to_point_in_time(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_RestoreTableToPointInTimeOutput( - boto_response_dict - ) - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_RestoreTableToPointInTimeOutput(boto_response_dict)) def Scan(self, input: DafnyScanInput) -> DafnyScanOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ScanInput( - input - ) + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_ScanInput(input) try: boto_response_dict = self._impl.scan(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ScanOutput( - boto_response_dict - ) - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_ScanOutput(boto_response_dict)) def TagResource(self, input: DafnyTagResourceInput) -> None: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TagResourceInput( - input - ) + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TagResourceInput(input) try: boto_response_dict = self._impl.tag_resource(**boto_request_dict) except ClientError as e: @@ -1000,44 +654,26 @@ def TagResource(self, input: DafnyTagResourceInput) -> None: return Wrappers.Result_Success(None) - def TransactGetItems( - self, input: DafnyTransactGetItemsInput - ) -> DafnyTransactGetItemsOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TransactGetItemsInput( - input - ) + def TransactGetItems(self, input: DafnyTransactGetItemsInput) -> DafnyTransactGetItemsOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TransactGetItemsInput(input) try: boto_response_dict = self._impl.transact_get_items(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TransactGetItemsOutput( - boto_response_dict - ) - ) - - def TransactWriteItems( - self, input: DafnyTransactWriteItemsInput - ) -> DafnyTransactWriteItemsOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TransactWriteItemsInput( - input - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TransactGetItemsOutput(boto_response_dict)) + + def TransactWriteItems(self, input: DafnyTransactWriteItemsInput) -> DafnyTransactWriteItemsOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_TransactWriteItemsInput(input) try: boto_response_dict = self._impl.transact_write_items(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TransactWriteItemsOutput( - boto_response_dict - ) - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_TransactWriteItemsOutput(boto_response_dict)) def UntagResource(self, input: DafnyUntagResourceInput) -> None: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_UntagResourceInput( - input - ) + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_UntagResourceInput(input) try: boto_response_dict = self._impl.untag_resource(**boto_request_dict) except ClientError as e: @@ -1045,142 +681,83 @@ def UntagResource(self, input: DafnyUntagResourceInput) -> None: return Wrappers.Result_Success(None) - def UpdateContinuousBackups( - self, input: DafnyUpdateContinuousBackupsInput - ) -> DafnyUpdateContinuousBackupsOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_UpdateContinuousBackupsInput( - input - ) + def UpdateContinuousBackups(self, input: DafnyUpdateContinuousBackupsInput) -> DafnyUpdateContinuousBackupsOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_UpdateContinuousBackupsInput(input) try: - boto_response_dict = self._impl.update_continuous_backups( - **boto_request_dict - ) + boto_response_dict = self._impl.update_continuous_backups(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_UpdateContinuousBackupsOutput( - boto_response_dict - ) - ) - - def UpdateContributorInsights( - self, input: DafnyUpdateContributorInsightsInput - ) -> DafnyUpdateContributorInsightsOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_UpdateContributorInsightsInput( - input - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_UpdateContinuousBackupsOutput(boto_response_dict)) + + def UpdateContributorInsights(self, input: DafnyUpdateContributorInsightsInput) -> DafnyUpdateContributorInsightsOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_UpdateContributorInsightsInput(input) try: - boto_response_dict = self._impl.update_contributor_insights( - **boto_request_dict - ) + boto_response_dict = self._impl.update_contributor_insights(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_UpdateContributorInsightsOutput( - boto_response_dict - ) - ) - - def UpdateGlobalTable( - self, input: DafnyUpdateGlobalTableInput - ) -> DafnyUpdateGlobalTableOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_UpdateGlobalTableInput( - input - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_UpdateContributorInsightsOutput(boto_response_dict)) + + def UpdateGlobalTable(self, input: DafnyUpdateGlobalTableInput) -> DafnyUpdateGlobalTableOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_UpdateGlobalTableInput(input) try: boto_response_dict = self._impl.update_global_table(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_UpdateGlobalTableOutput( - boto_response_dict - ) - ) - - def UpdateGlobalTableSettings( - self, input: DafnyUpdateGlobalTableSettingsInput - ) -> DafnyUpdateGlobalTableSettingsOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_UpdateGlobalTableSettingsInput( - input - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_UpdateGlobalTableOutput(boto_response_dict)) + + def UpdateGlobalTableSettings(self, input: DafnyUpdateGlobalTableSettingsInput) -> DafnyUpdateGlobalTableSettingsOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_UpdateGlobalTableSettingsInput(input) try: - boto_response_dict = self._impl.update_global_table_settings( - **boto_request_dict - ) + boto_response_dict = self._impl.update_global_table_settings(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_UpdateGlobalTableSettingsOutput( - boto_response_dict - ) - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_UpdateGlobalTableSettingsOutput(boto_response_dict)) def UpdateItem(self, input: DafnyUpdateItemInput) -> DafnyUpdateItemOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_UpdateItemInput( - input - ) + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_UpdateItemInput(input) try: boto_response_dict = self._impl.update_item(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_UpdateItemOutput( - boto_response_dict - ) - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_UpdateItemOutput(boto_response_dict)) + + def UpdateKinesisStreamingDestination(self, input: DafnyUpdateKinesisStreamingDestinationInput) -> DafnyUpdateKinesisStreamingDestinationOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_UpdateKinesisStreamingDestinationInput(input) + try: + boto_response_dict = self._impl.update_kinesis_streaming_destination(**boto_request_dict) + except ClientError as e: + return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) + + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_UpdateKinesisStreamingDestinationOutput(boto_response_dict)) def UpdateTable(self, input: DafnyUpdateTableInput) -> DafnyUpdateTableOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_UpdateTableInput( - input - ) + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_UpdateTableInput(input) try: boto_response_dict = self._impl.update_table(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_UpdateTableOutput( - boto_response_dict - ) - ) - - def UpdateTableReplicaAutoScaling( - self, input: DafnyUpdateTableReplicaAutoScalingInput - ) -> DafnyUpdateTableReplicaAutoScalingOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_UpdateTableReplicaAutoScalingInput( - input - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_UpdateTableOutput(boto_response_dict)) + + def UpdateTableReplicaAutoScaling(self, input: DafnyUpdateTableReplicaAutoScalingInput) -> DafnyUpdateTableReplicaAutoScalingOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_UpdateTableReplicaAutoScalingInput(input) try: - boto_response_dict = self._impl.update_table_replica_auto_scaling( - **boto_request_dict - ) + boto_response_dict = self._impl.update_table_replica_auto_scaling(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_UpdateTableReplicaAutoScalingOutput( - boto_response_dict - ) - ) - - def UpdateTimeToLive( - self, input: DafnyUpdateTimeToLiveInput - ) -> DafnyUpdateTimeToLiveOutput: - boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_UpdateTimeToLiveInput( - input - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_UpdateTableReplicaAutoScalingOutput(boto_response_dict)) + + def UpdateTimeToLive(self, input: DafnyUpdateTimeToLiveInput) -> DafnyUpdateTimeToLiveOutput: + boto_request_dict = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.dafny_to_aws_sdk.com_amazonaws_dynamodb_UpdateTimeToLiveInput(input) try: boto_response_dict = self._impl.update_time_to_live(**boto_request_dict) except ClientError as e: return Wrappers.Result_Failure(_sdk_error_to_dafny_error(e)) - return Wrappers.Result_Success( - aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_UpdateTimeToLiveOutput( - boto_response_dict - ) - ) + return Wrappers.Result_Success(aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_UpdateTimeToLiveOutput(boto_response_dict)) diff --git a/ComAmazonawsKms/project.properties b/ComAmazonawsKms/project.properties index 02e193a7d..f5e8cdf0b 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.8.0 -dafnyRuntimeJavaVersion=4.8.0 +dafnyVersion=4.8.1 +dafnyRuntimeJavaVersion=4.8.1 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 17f4d6fd5..ccf35f9a1 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.8.0.0" +dafny_version = "4.8.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 710d07681..45c157e6f 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.8.0.0" +dafny_version = "4.8.1.0" [options_by_module.Wrappers] legacy-module-names = false python-module-name = "smithy_dafny_standard_library.internaldafny.generated" diff --git a/TestVectorsAwsCryptographicMaterialProviders/project.properties b/TestVectorsAwsCryptographicMaterialProviders/project.properties index 02e193a7d..f5e8cdf0b 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.8.0 -dafnyRuntimeJavaVersion=4.8.0 +dafnyVersion=4.8.1 +dafnyRuntimeJavaVersion=4.8.1 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 b59cf4040..9834541b5 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.8.0.0" +dafny_version = "4.8.1.0" [options_by_module.MplManifestOptions] legacy-module-names = false python-module-name = "aws_cryptography_materialproviders_test_vectors.internaldafny.generated" diff --git a/TestVectorsAwsCryptographicMaterialProviders/runtimes/python/test/internaldafny/generated/dafny_test-py.dtr b/TestVectorsAwsCryptographicMaterialProviders/runtimes/python/test/internaldafny/generated/dafny_test-py.dtr index daf2aeba5..8f383e665 100644 --- a/TestVectorsAwsCryptographicMaterialProviders/runtimes/python/test/internaldafny/generated/dafny_test-py.dtr +++ b/TestVectorsAwsCryptographicMaterialProviders/runtimes/python/test/internaldafny/generated/dafny_test-py.dtr @@ -1,4 +1,4 @@ file_format_version = "1.0" -dafny_version = "4.8.0.0" +dafny_version = "4.8.1.0" [options_by_module.TestWrappedMaterialProvidersMain] legacy-module-names = false