@@ -185,6 +185,7 @@ public static AWS.Cryptography.DbEncryptionSDK.DynamoDb.GetEncryptedDataKeyDescr
185
185
}
186
186
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 )
187
187
{
188
+ value . Validate ( ) ;
188
189
189
190
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 ) ) ;
190
191
}
@@ -194,6 +195,7 @@ public static AWS.Cryptography.DbEncryptionSDK.DynamoDb.GetEncryptedDataKeyDescr
194
195
}
195
196
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 )
196
197
{
198
+ value . Validate ( ) ;
197
199
198
200
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 ) ) ;
199
201
}
@@ -214,7 +216,7 @@ public static AWS.Cryptography.DbEncryptionSDK.DynamoDb.GetEncryptedDataKeyDescr
214
216
}
215
217
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 )
216
218
{
217
- if ( value . IsSetHeader ( ) )
219
+ value . Validate ( ) ; if ( value . IsSetHeader ( ) )
218
220
{
219
221
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 ) ) ;
220
222
}
@@ -643,7 +645,12 @@ public static System.IO.MemoryStream FromDafny_N6_smithy__N3_api__S4_Blob(Dafny.
643
645
}
644
646
public static Dafny . ISequence < byte > ToDafny_N6_smithy__N3_api__S4_Blob ( System . IO . MemoryStream value )
645
647
{
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
+ }
646
652
return Dafny . Sequence < byte > . FromArray ( value . ToArray ( ) ) ;
653
+
647
654
}
648
655
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 )
649
656
{
@@ -1093,6 +1100,7 @@ public static AWS.Cryptography.DbEncryptionSDK.DynamoDb.EncryptedDataKeyDescript
1093
1100
}
1094
1101
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 )
1095
1102
{
1103
+ value . Validate ( ) ;
1096
1104
string var_keyProviderInfo = value . IsSetKeyProviderInfo ( ) ? value . KeyProviderInfo : ( string ) null ;
1097
1105
string var_branchKeyId = value . IsSetBranchKeyId ( ) ? value . BranchKeyId : ( string ) null ;
1098
1106
string var_branchKeyVersion = value . IsSetBranchKeyVersion ( ) ? value . BranchKeyVersion : ( string ) null ;
@@ -1559,9 +1567,9 @@ public static System.Exception FromDafny_CommonError(software.amazon.cryptograph
1559
1567
{
1560
1568
switch ( value )
1561
1569
{
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
1565
1573
) ;
1566
1574
case software . amazon . cryptography . dbencryptionsdk . dynamodb . internaldafny . types . Error_AwsCryptographyMaterialProviders dafnyVal :
1567
1575
return AWS . Cryptography . MaterialProviders . TypeConversion . FromDafny_CommonError (
0 commit comments