27
27
import software .amazon .cryptography .dbencryptionsdk .dynamodb .internaldafny .types .DynamoDbEncryptionConfig ;
28
28
import software .amazon .cryptography .dbencryptionsdk .dynamodb .internaldafny .types .DynamoDbTableEncryptionConfig ;
29
29
import software .amazon .cryptography .dbencryptionsdk .dynamodb .internaldafny .types .DynamoDbTablesEncryptionConfig ;
30
+ import software .amazon .cryptography .dbencryptionsdk .dynamodb .internaldafny .types .EncryptedDataKeyDescriptionOutput ;
30
31
import software .amazon .cryptography .dbencryptionsdk .dynamodb .internaldafny .types .EncryptedPart ;
31
32
import software .amazon .cryptography .dbencryptionsdk .dynamodb .internaldafny .types .Error ;
32
33
import software .amazon .cryptography .dbencryptionsdk .dynamodb .internaldafny .types .Error_DynamoDbEncryptionException ;
33
34
import software .amazon .cryptography .dbencryptionsdk .dynamodb .internaldafny .types .GetBranchKeyIdFromDdbKeyInput ;
34
35
import software .amazon .cryptography .dbencryptionsdk .dynamodb .internaldafny .types .GetBranchKeyIdFromDdbKeyOutput ;
36
+ import software .amazon .cryptography .dbencryptionsdk .dynamodb .internaldafny .types .GetEncryptedDataKeyDescriptionInput ;
37
+ import software .amazon .cryptography .dbencryptionsdk .dynamodb .internaldafny .types .GetEncryptedDataKeyDescriptionOutput ;
38
+ import software .amazon .cryptography .dbencryptionsdk .dynamodb .internaldafny .types .GetEncryptedDataKeyDescriptionUnion ;
35
39
import software .amazon .cryptography .dbencryptionsdk .dynamodb .internaldafny .types .GetPrefix ;
36
40
import software .amazon .cryptography .dbencryptionsdk .dynamodb .internaldafny .types .GetSegment ;
37
41
import software .amazon .cryptography .dbencryptionsdk .dynamodb .internaldafny .types .GetSegments ;
@@ -238,6 +242,25 @@ public static DynamoDbTablesEncryptionConfig DynamoDbTablesEncryptionConfig(
238
242
return new DynamoDbTablesEncryptionConfig (tableEncryptionConfigs );
239
243
}
240
244
245
+ public static EncryptedDataKeyDescriptionOutput EncryptedDataKeyDescriptionOutput (
246
+ software .amazon .cryptography .dbencryptionsdk .dynamodb .model .EncryptedDataKeyDescriptionOutput nativeValue ) {
247
+ DafnySequence <? extends Character > keyProviderId ;
248
+ keyProviderId = software .amazon .smithy .dafny .conversion .ToDafny .Simple .CharacterSequence (nativeValue .keyProviderId ());
249
+ Option <DafnySequence <? extends Character >> keyProviderInfo ;
250
+ keyProviderInfo = Objects .nonNull (nativeValue .keyProviderInfo ()) ?
251
+ Option .create_Some (software .amazon .smithy .dafny .conversion .ToDafny .Simple .CharacterSequence (nativeValue .keyProviderInfo ()))
252
+ : Option .create_None ();
253
+ Option <DafnySequence <? extends Character >> branchKeyId ;
254
+ branchKeyId = Objects .nonNull (nativeValue .branchKeyId ()) ?
255
+ Option .create_Some (software .amazon .smithy .dafny .conversion .ToDafny .Simple .CharacterSequence (nativeValue .branchKeyId ()))
256
+ : Option .create_None ();
257
+ Option <DafnySequence <? extends Character >> branchKeyVersion ;
258
+ branchKeyVersion = Objects .nonNull (nativeValue .branchKeyVersion ()) ?
259
+ Option .create_Some (software .amazon .smithy .dafny .conversion .ToDafny .Simple .CharacterSequence (nativeValue .branchKeyVersion ()))
260
+ : Option .create_None ();
261
+ return new EncryptedDataKeyDescriptionOutput (keyProviderId , keyProviderInfo , branchKeyId , branchKeyVersion );
262
+ }
263
+
241
264
public static EncryptedPart EncryptedPart (
242
265
software .amazon .cryptography .dbencryptionsdk .dynamodb .model .EncryptedPart nativeValue ) {
243
266
DafnySequence <? extends Character > name ;
@@ -261,6 +284,20 @@ public static GetBranchKeyIdFromDdbKeyOutput GetBranchKeyIdFromDdbKeyOutput(
261
284
return new GetBranchKeyIdFromDdbKeyOutput (branchKeyId );
262
285
}
263
286
287
+ public static GetEncryptedDataKeyDescriptionInput GetEncryptedDataKeyDescriptionInput (
288
+ software .amazon .cryptography .dbencryptionsdk .dynamodb .model .GetEncryptedDataKeyDescriptionInput nativeValue ) {
289
+ GetEncryptedDataKeyDescriptionUnion input ;
290
+ input = ToDafny .GetEncryptedDataKeyDescriptionUnion (nativeValue .input ());
291
+ return new GetEncryptedDataKeyDescriptionInput (input );
292
+ }
293
+
294
+ public static GetEncryptedDataKeyDescriptionOutput GetEncryptedDataKeyDescriptionOutput (
295
+ software .amazon .cryptography .dbencryptionsdk .dynamodb .model .GetEncryptedDataKeyDescriptionOutput nativeValue ) {
296
+ DafnySequence <? extends EncryptedDataKeyDescriptionOutput > encryptedDataKeyDescriptionOutput ;
297
+ encryptedDataKeyDescriptionOutput = ToDafny .EncryptedDataKeyDescriptionList (nativeValue .EncryptedDataKeyDescriptionOutput ());
298
+ return new GetEncryptedDataKeyDescriptionOutput (encryptedDataKeyDescriptionOutput );
299
+ }
300
+
264
301
public static GetPrefix GetPrefix (
265
302
software .amazon .cryptography .dbencryptionsdk .dynamodb .model .GetPrefix nativeValue ) {
266
303
Integer length ;
@@ -506,6 +543,17 @@ public static BeaconStyle BeaconStyle(
506
543
throw new IllegalArgumentException ("Cannot convert " + nativeValue + " to software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.BeaconStyle." );
507
544
}
508
545
546
+ public static GetEncryptedDataKeyDescriptionUnion GetEncryptedDataKeyDescriptionUnion (
547
+ software .amazon .cryptography .dbencryptionsdk .dynamodb .model .GetEncryptedDataKeyDescriptionUnion nativeValue ) {
548
+ if (Objects .nonNull (nativeValue .header ())) {
549
+ return GetEncryptedDataKeyDescriptionUnion .create_header (software .amazon .smithy .dafny .conversion .ToDafny .Simple .ByteSequence (nativeValue .header ()));
550
+ }
551
+ if (Objects .nonNull (nativeValue .plaintextItem ())) {
552
+ return GetEncryptedDataKeyDescriptionUnion .create_plaintextItem (software .amazon .cryptography .services .dynamodb .internaldafny .ToDafny .AttributeMap (nativeValue .plaintextItem ()));
553
+ }
554
+ throw new IllegalArgumentException ("Cannot convert " + nativeValue + " to software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.GetEncryptedDataKeyDescriptionUnion." );
555
+ }
556
+
509
557
public static VirtualTransform VirtualTransform (
510
558
software .amazon .cryptography .dbencryptionsdk .dynamodb .model .VirtualTransform nativeValue ) {
511
559
if (Objects .nonNull (nativeValue .upper ())) {
@@ -567,6 +615,14 @@ public static DafnySequence<? extends ConstructorPart> ConstructorPartList(
567
615
ConstructorPart ._typeDescriptor ());
568
616
}
569
617
618
+ public static DafnySequence <? extends EncryptedDataKeyDescriptionOutput > EncryptedDataKeyDescriptionList (
619
+ List <software .amazon .cryptography .dbencryptionsdk .dynamodb .model .EncryptedDataKeyDescriptionOutput > nativeValue ) {
620
+ return software .amazon .smithy .dafny .conversion .ToDafny .Aggregate .GenericToSequence (
621
+ nativeValue ,
622
+ software .amazon .cryptography .dbencryptionsdk .dynamodb .ToDafny ::EncryptedDataKeyDescriptionOutput ,
623
+ EncryptedDataKeyDescriptionOutput ._typeDescriptor ());
624
+ }
625
+
570
626
public static DafnySequence <? extends EncryptedPart > EncryptedPartsList (
571
627
List <software .amazon .cryptography .dbencryptionsdk .dynamodb .model .EncryptedPart > nativeValue ) {
572
628
return software .amazon .smithy .dafny .conversion .ToDafny .Aggregate .GenericToSequence (
0 commit comments