Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e69af8c

Browse files
committedApr 30, 2024
Add polymorph file after merge
1 parent eabe8b2 commit e69af8c

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed
 

‎DynamoDbEncryption/runtimes/net/Generated/DynamoDbEncryption/TypeConversion.cs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ public static AWS.Cryptography.DbEncryptionSDK.DynamoDb.GetEncryptedDataKeyDescr
185185
}
186186
public static software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types._IGetEncryptedDataKeyDescriptionInput ToDafny_N3_aws__N12_cryptography__N15_dbEncryptionSdk__N8_dynamoDb__S35_GetEncryptedDataKeyDescriptionInput(AWS.Cryptography.DbEncryptionSDK.DynamoDb.GetEncryptedDataKeyDescriptionInput value)
187187
{
188+
value.Validate();
188189

189190
return new software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.GetEncryptedDataKeyDescriptionInput(ToDafny_N3_aws__N12_cryptography__N15_dbEncryptionSdk__N8_dynamoDb__S35_GetEncryptedDataKeyDescriptionInput__M5_input(value.Input));
190191
}
@@ -194,6 +195,7 @@ public static AWS.Cryptography.DbEncryptionSDK.DynamoDb.GetEncryptedDataKeyDescr
194195
}
195196
public static software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types._IGetEncryptedDataKeyDescriptionOutput ToDafny_N3_aws__N12_cryptography__N15_dbEncryptionSdk__N8_dynamoDb__S36_GetEncryptedDataKeyDescriptionOutput(AWS.Cryptography.DbEncryptionSDK.DynamoDb.GetEncryptedDataKeyDescriptionOutput value)
196197
{
198+
value.Validate();
197199

198200
return new software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.GetEncryptedDataKeyDescriptionOutput(ToDafny_N3_aws__N12_cryptography__N15_dbEncryptionSdk__N8_dynamoDb__S36_GetEncryptedDataKeyDescriptionOutput__M33_EncryptedDataKeyDescriptionOutput(value.EncryptedDataKeyDescriptionOutput));
199201
}
@@ -214,7 +216,7 @@ public static AWS.Cryptography.DbEncryptionSDK.DynamoDb.GetEncryptedDataKeyDescr
214216
}
215217
public static software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types._IGetEncryptedDataKeyDescriptionUnion ToDafny_N3_aws__N12_cryptography__N15_dbEncryptionSdk__N8_dynamoDb__S35_GetEncryptedDataKeyDescriptionUnion(AWS.Cryptography.DbEncryptionSDK.DynamoDb.GetEncryptedDataKeyDescriptionUnion value)
216218
{
217-
if (value.IsSetHeader())
219+
value.Validate(); if (value.IsSetHeader())
218220
{
219221
return software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.GetEncryptedDataKeyDescriptionUnion.create_header(ToDafny_N3_aws__N12_cryptography__N15_dbEncryptionSdk__N8_dynamoDb__S35_GetEncryptedDataKeyDescriptionUnion__M6_header(value.Header));
220222
}
@@ -643,7 +645,12 @@ public static System.IO.MemoryStream FromDafny_N6_smithy__N3_api__S4_Blob(Dafny.
643645
}
644646
public static Dafny.ISequence<byte> ToDafny_N6_smithy__N3_api__S4_Blob(System.IO.MemoryStream value)
645647
{
648+
if (value.ToArray().Length == 0 && value.Length > 0)
649+
{
650+
throw new System.ArgumentException("Fatal Error: MemoryStream instance not backed by an array!");
651+
}
646652
return Dafny.Sequence<byte>.FromArray(value.ToArray());
653+
647654
}
648655
public static System.Collections.Generic.Dictionary<string, Amazon.DynamoDBv2.Model.AttributeValue> FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_AttributeMap(Dafny.IMap<Dafny.ISequence<char>, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> value)
649656
{
@@ -1093,6 +1100,7 @@ public static AWS.Cryptography.DbEncryptionSDK.DynamoDb.EncryptedDataKeyDescript
10931100
}
10941101
public static software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types._IEncryptedDataKeyDescription ToDafny_N3_aws__N12_cryptography__N15_dbEncryptionSdk__N8_dynamoDb__S27_EncryptedDataKeyDescription(AWS.Cryptography.DbEncryptionSDK.DynamoDb.EncryptedDataKeyDescription value)
10951102
{
1103+
value.Validate();
10961104
string var_keyProviderInfo = value.IsSetKeyProviderInfo() ? value.KeyProviderInfo : (string)null;
10971105
string var_branchKeyId = value.IsSetBranchKeyId() ? value.BranchKeyId : (string)null;
10981106
string var_branchKeyVersion = value.IsSetBranchKeyVersion() ? value.BranchKeyVersion : (string)null;
@@ -1559,9 +1567,9 @@ public static System.Exception FromDafny_CommonError(software.amazon.cryptograph
15591567
{
15601568
switch (value)
15611569
{
1562-
case software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.Error_ComAmazonawsDynamodb dafnyVal:
1563-
return Com.Amazonaws.Dynamodb.TypeConversion.FromDafny_CommonError(
1564-
dafnyVal._ComAmazonawsDynamodb
1570+
case software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.Error_AwsCryptographyDbEncryptionSdkStructuredEncryption dafnyVal:
1571+
return AWS.Cryptography.DbEncryptionSDK.StructuredEncryption.TypeConversion.FromDafny_CommonError(
1572+
dafnyVal._AwsCryptographyDbEncryptionSdkStructuredEncryption
15651573
);
15661574
case software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.Error_AwsCryptographyMaterialProviders dafnyVal:
15671575
return AWS.Cryptography.MaterialProviders.TypeConversion.FromDafny_CommonError(

‎DynamoDbEncryption/runtimes/net/Generated/DynamoDbEncryptionTransforms/TypeConversion.cs

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6624,13 +6624,9 @@ public static System.Exception FromDafny_CommonError(software.amazon.cryptograph
66246624
{
66256625
switch (value)
66266626
{
6627-
case software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.Error_ComAmazonawsDynamodb dafnyVal:
6628-
return Com.Amazonaws.Dynamodb.TypeConversion.FromDafny_CommonError(
6629-
dafnyVal._ComAmazonawsDynamodb
6630-
);
6631-
case software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.Error_AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor dafnyVal:
6632-
return AWS.Cryptography.DbEncryptionSDK.DynamoDb.ItemEncryptor.TypeConversion.FromDafny_CommonError(
6633-
dafnyVal._AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor
6627+
case software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.Error_AwsCryptographyDbEncryptionSdkDynamoDb dafnyVal:
6628+
return AWS.Cryptography.DbEncryptionSDK.DynamoDb.TypeConversion.FromDafny_CommonError(
6629+
dafnyVal._AwsCryptographyDbEncryptionSdkDynamoDb
66346630
);
66356631
case software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.Error_AwsCryptographyDbEncryptionSdkDynamoDbItemEncryptor dafnyVal:
66366632
return AWS.Cryptography.DbEncryptionSDK.DynamoDb.ItemEncryptor.TypeConversion.FromDafny_CommonError(
@@ -6640,10 +6636,6 @@ public static System.Exception FromDafny_CommonError(software.amazon.cryptograph
66406636
return AWS.Cryptography.DbEncryptionSDK.StructuredEncryption.TypeConversion.FromDafny_CommonError(
66416637
dafnyVal._AwsCryptographyDbEncryptionSdkStructuredEncryption
66426638
);
6643-
case software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.Error_AwsCryptographyDbEncryptionSdkDynamoDb dafnyVal:
6644-
return AWS.Cryptography.DbEncryptionSDK.DynamoDb.TypeConversion.FromDafny_CommonError(
6645-
dafnyVal._AwsCryptographyDbEncryptionSdkDynamoDb
6646-
);
66476639
case software.amazon.cryptography.dbencryptionsdk.dynamodb.transforms.internaldafny.types.Error_AwsCryptographyMaterialProviders dafnyVal:
66486640
return AWS.Cryptography.MaterialProviders.TypeConversion.FromDafny_CommonError(
66496641
dafnyVal._AwsCryptographyMaterialProviders

0 commit comments

Comments
 (0)
Please sign in to comment.