6
6
import Wrappers_Compile .Option ;
7
7
import dafny .DafnyMap ;
8
8
import dafny .DafnySequence ;
9
+ import dafny .TypeDescriptor ;
9
10
import java .lang .Boolean ;
10
11
import java .lang .Character ;
11
12
import java .lang .IllegalArgumentException ;
@@ -129,31 +130,45 @@ public static BeaconVersion BeaconVersion(
129
130
(Objects .nonNull (nativeValue .compoundBeacons ()) &&
130
131
nativeValue .compoundBeacons ().size () > 0 )
131
132
? Option .create_Some (
133
+ DafnySequence ._typeDescriptor (CompoundBeacon ._typeDescriptor ()),
132
134
ToDafny .CompoundBeaconList (nativeValue .compoundBeacons ())
133
135
)
134
- : Option .create_None ();
136
+ : Option .create_None (
137
+ DafnySequence ._typeDescriptor (CompoundBeacon ._typeDescriptor ())
138
+ );
135
139
Option <DafnySequence <? extends VirtualField >> virtualFields ;
136
140
virtualFields =
137
141
(Objects .nonNull (nativeValue .virtualFields ()) &&
138
142
nativeValue .virtualFields ().size () > 0 )
139
143
? Option .create_Some (
144
+ DafnySequence ._typeDescriptor (VirtualField ._typeDescriptor ()),
140
145
ToDafny .VirtualFieldList (nativeValue .virtualFields ())
141
146
)
142
- : Option .create_None ();
147
+ : Option .create_None (
148
+ DafnySequence ._typeDescriptor (VirtualField ._typeDescriptor ())
149
+ );
143
150
Option <DafnySequence <? extends EncryptedPart >> encryptedParts ;
144
151
encryptedParts =
145
152
(Objects .nonNull (nativeValue .encryptedParts ()) &&
146
153
nativeValue .encryptedParts ().size () > 0 )
147
154
? Option .create_Some (
155
+ DafnySequence ._typeDescriptor (EncryptedPart ._typeDescriptor ()),
148
156
ToDafny .EncryptedPartsList (nativeValue .encryptedParts ())
149
157
)
150
- : Option .create_None ();
158
+ : Option .create_None (
159
+ DafnySequence ._typeDescriptor (EncryptedPart ._typeDescriptor ())
160
+ );
151
161
Option <DafnySequence <? extends SignedPart >> signedParts ;
152
162
signedParts =
153
163
(Objects .nonNull (nativeValue .signedParts ()) &&
154
164
nativeValue .signedParts ().size () > 0 )
155
- ? Option .create_Some (ToDafny .SignedPartsList (nativeValue .signedParts ()))
156
- : Option .create_None ();
165
+ ? Option .create_Some (
166
+ DafnySequence ._typeDescriptor (SignedPart ._typeDescriptor ()),
167
+ ToDafny .SignedPartsList (nativeValue .signedParts ())
168
+ )
169
+ : Option .create_None (
170
+ DafnySequence ._typeDescriptor (SignedPart ._typeDescriptor ())
171
+ );
157
172
return new BeaconVersion (
158
173
version ,
159
174
keyStore ,
@@ -184,22 +199,33 @@ public static CompoundBeacon CompoundBeacon(
184
199
(Objects .nonNull (nativeValue .encrypted ()) &&
185
200
nativeValue .encrypted ().size () > 0 )
186
201
? Option .create_Some (
202
+ DafnySequence ._typeDescriptor (EncryptedPart ._typeDescriptor ()),
187
203
ToDafny .EncryptedPartsList (nativeValue .encrypted ())
188
204
)
189
- : Option .create_None ();
205
+ : Option .create_None (
206
+ DafnySequence ._typeDescriptor (EncryptedPart ._typeDescriptor ())
207
+ );
190
208
Option <DafnySequence <? extends SignedPart >> signed ;
191
209
signed =
192
210
(Objects .nonNull (nativeValue .signed ()) && nativeValue .signed ().size () > 0 )
193
- ? Option .create_Some (ToDafny .SignedPartsList (nativeValue .signed ()))
194
- : Option .create_None ();
211
+ ? Option .create_Some (
212
+ DafnySequence ._typeDescriptor (SignedPart ._typeDescriptor ()),
213
+ ToDafny .SignedPartsList (nativeValue .signed ())
214
+ )
215
+ : Option .create_None (
216
+ DafnySequence ._typeDescriptor (SignedPart ._typeDescriptor ())
217
+ );
195
218
Option <DafnySequence <? extends Constructor >> constructors ;
196
219
constructors =
197
220
(Objects .nonNull (nativeValue .constructors ()) &&
198
221
nativeValue .constructors ().size () > 0 )
199
222
? Option .create_Some (
223
+ DafnySequence ._typeDescriptor (Constructor ._typeDescriptor ()),
200
224
ToDafny .ConstructorList (nativeValue .constructors ())
201
225
)
202
- : Option .create_None ();
226
+ : Option .create_None (
227
+ DafnySequence ._typeDescriptor (Constructor ._typeDescriptor ())
228
+ );
203
229
return new CompoundBeacon (name , split , encrypted , signed , constructors );
204
230
}
205
231
@@ -273,16 +299,22 @@ public static DynamoDbTableEncryptionConfig DynamoDbTableEncryptionConfig(
273
299
sortKeyName =
274
300
Objects .nonNull (nativeValue .sortKeyName ())
275
301
? Option .create_Some (
302
+ DafnySequence ._typeDescriptor (TypeDescriptor .CHAR ),
276
303
software .amazon .smithy .dafny .conversion .ToDafny .Simple .CharacterSequence (
277
304
nativeValue .sortKeyName ()
278
305
)
279
306
)
280
- : Option .create_None ();
307
+ : Option .create_None (
308
+ DafnySequence ._typeDescriptor (TypeDescriptor .CHAR )
309
+ );
281
310
Option <SearchConfig > search ;
282
311
search =
283
312
Objects .nonNull (nativeValue .search ())
284
- ? Option .create_Some (ToDafny .SearchConfig (nativeValue .search ()))
285
- : Option .create_None ();
313
+ ? Option .create_Some (
314
+ SearchConfig ._typeDescriptor (),
315
+ ToDafny .SearchConfig (nativeValue .search ())
316
+ )
317
+ : Option .create_None (SearchConfig ._typeDescriptor ());
286
318
DafnyMap <
287
319
? extends DafnySequence <? extends Character >,
288
320
? extends CryptoAction
@@ -296,61 +328,78 @@ public static DynamoDbTableEncryptionConfig DynamoDbTableEncryptionConfig(
296
328
(Objects .nonNull (nativeValue .allowedUnsignedAttributes ()) &&
297
329
nativeValue .allowedUnsignedAttributes ().size () > 0 )
298
330
? Option .create_Some (
331
+ DafnySequence ._typeDescriptor (
332
+ DafnySequence ._typeDescriptor (TypeDescriptor .CHAR )
333
+ ),
299
334
software .amazon .cryptography .services .dynamodb .internaldafny .ToDafny .AttributeNameList (
300
335
nativeValue .allowedUnsignedAttributes ()
301
336
)
302
337
)
303
- : Option .create_None ();
338
+ : Option .create_None (
339
+ DafnySequence ._typeDescriptor (
340
+ DafnySequence ._typeDescriptor (TypeDescriptor .CHAR )
341
+ )
342
+ );
304
343
Option <DafnySequence <? extends Character >> allowedUnsignedAttributePrefix ;
305
344
allowedUnsignedAttributePrefix =
306
345
Objects .nonNull (nativeValue .allowedUnsignedAttributePrefix ())
307
346
? Option .create_Some (
347
+ DafnySequence ._typeDescriptor (TypeDescriptor .CHAR ),
308
348
software .amazon .smithy .dafny .conversion .ToDafny .Simple .CharacterSequence (
309
349
nativeValue .allowedUnsignedAttributePrefix ()
310
350
)
311
351
)
312
- : Option .create_None ();
352
+ : Option .create_None (
353
+ DafnySequence ._typeDescriptor (TypeDescriptor .CHAR )
354
+ );
313
355
Option <DBEAlgorithmSuiteId > algorithmSuiteId ;
314
356
algorithmSuiteId =
315
357
Objects .nonNull (nativeValue .algorithmSuiteId ())
316
358
? Option .create_Some (
359
+ DBEAlgorithmSuiteId ._typeDescriptor (),
317
360
software .amazon .cryptography .materialproviders .ToDafny .DBEAlgorithmSuiteId (
318
361
nativeValue .algorithmSuiteId ()
319
362
)
320
363
)
321
- : Option .create_None ();
364
+ : Option .create_None (DBEAlgorithmSuiteId . _typeDescriptor () );
322
365
Option <IKeyring > keyring ;
323
366
keyring =
324
367
Objects .nonNull (nativeValue .keyring ())
325
368
? Option .create_Some (
369
+ TypeDescriptor .reference (IKeyring .class ),
326
370
software .amazon .cryptography .materialproviders .ToDafny .Keyring (
327
371
nativeValue .keyring ()
328
372
)
329
373
)
330
- : Option .create_None ();
374
+ : Option .create_None (TypeDescriptor . reference ( IKeyring . class ) );
331
375
Option <ICryptographicMaterialsManager > cmm ;
332
376
cmm =
333
377
Objects .nonNull (nativeValue .cmm ())
334
378
? Option .create_Some (
379
+ TypeDescriptor .reference (ICryptographicMaterialsManager .class ),
335
380
software .amazon .cryptography .materialproviders .ToDafny .CryptographicMaterialsManager (
336
381
nativeValue .cmm ()
337
382
)
338
383
)
339
- : Option .create_None ();
384
+ : Option .create_None (
385
+ TypeDescriptor .reference (ICryptographicMaterialsManager .class )
386
+ );
340
387
Option <LegacyOverride > legacyOverride ;
341
388
legacyOverride =
342
389
Objects .nonNull (nativeValue .legacyOverride ())
343
390
? Option .create_Some (
391
+ LegacyOverride ._typeDescriptor (),
344
392
ToDafny .LegacyOverride (nativeValue .legacyOverride ())
345
393
)
346
- : Option .create_None ();
394
+ : Option .create_None (LegacyOverride . _typeDescriptor () );
347
395
Option <PlaintextOverride > plaintextOverride ;
348
396
plaintextOverride =
349
397
Objects .nonNull (nativeValue .plaintextOverride ())
350
398
? Option .create_Some (
399
+ PlaintextOverride ._typeDescriptor (),
351
400
ToDafny .PlaintextOverride (nativeValue .plaintextOverride ())
352
401
)
353
- : Option .create_None ();
402
+ : Option .create_None (PlaintextOverride . _typeDescriptor () );
354
403
return new DynamoDbTableEncryptionConfig (
355
404
logicalTableName ,
356
405
partitionKeyName ,
@@ -393,29 +442,38 @@ public static EncryptedDataKeyDescription EncryptedDataKeyDescription(
393
442
keyProviderInfo =
394
443
Objects .nonNull (nativeValue .keyProviderInfo ())
395
444
? Option .create_Some (
445
+ DafnySequence ._typeDescriptor (TypeDescriptor .CHAR ),
396
446
software .amazon .smithy .dafny .conversion .ToDafny .Simple .CharacterSequence (
397
447
nativeValue .keyProviderInfo ()
398
448
)
399
449
)
400
- : Option .create_None ();
450
+ : Option .create_None (
451
+ DafnySequence ._typeDescriptor (TypeDescriptor .CHAR )
452
+ );
401
453
Option <DafnySequence <? extends Character >> branchKeyId ;
402
454
branchKeyId =
403
455
Objects .nonNull (nativeValue .branchKeyId ())
404
456
? Option .create_Some (
457
+ DafnySequence ._typeDescriptor (TypeDescriptor .CHAR ),
405
458
software .amazon .smithy .dafny .conversion .ToDafny .Simple .CharacterSequence (
406
459
nativeValue .branchKeyId ()
407
460
)
408
461
)
409
- : Option .create_None ();
462
+ : Option .create_None (
463
+ DafnySequence ._typeDescriptor (TypeDescriptor .CHAR )
464
+ );
410
465
Option <DafnySequence <? extends Character >> branchKeyVersion ;
411
466
branchKeyVersion =
412
467
Objects .nonNull (nativeValue .branchKeyVersion ())
413
468
? Option .create_Some (
469
+ DafnySequence ._typeDescriptor (TypeDescriptor .CHAR ),
414
470
software .amazon .smithy .dafny .conversion .ToDafny .Simple .CharacterSequence (
415
471
nativeValue .branchKeyVersion ()
416
472
)
417
473
)
418
- : Option .create_None ();
474
+ : Option .create_None (
475
+ DafnySequence ._typeDescriptor (TypeDescriptor .CHAR )
476
+ );
419
477
return new EncryptedDataKeyDescription (
420
478
keyProviderId ,
421
479
keyProviderInfo ,
@@ -570,11 +628,12 @@ public static LegacyOverride LegacyOverride(
570
628
defaultAttributeFlag =
571
629
Objects .nonNull (nativeValue .defaultAttributeFlag ())
572
630
? Option .create_Some (
631
+ CryptoAction ._typeDescriptor (),
573
632
software .amazon .cryptography .dbencryptionsdk .structuredencryption .ToDafny .CryptoAction (
574
633
nativeValue .defaultAttributeFlag ()
575
634
)
576
635
)
577
- : Option .create_None ();
636
+ : Option .create_None (CryptoAction . _typeDescriptor () );
578
637
return new LegacyOverride (
579
638
policy ,
580
639
encryptor ,
@@ -603,11 +662,12 @@ public static MultiKeyStore MultiKeyStore(
603
662
cache =
604
663
Objects .nonNull (nativeValue .cache ())
605
664
? Option .create_Some (
665
+ CacheType ._typeDescriptor (),
606
666
software .amazon .cryptography .materialproviders .ToDafny .CacheType (
607
667
nativeValue .cache ()
608
668
)
609
669
)
610
- : Option .create_None ();
670
+ : Option .create_None (CacheType . _typeDescriptor () );
611
671
return new MultiKeyStore (keyFieldName , cacheTTL , cache );
612
672
}
613
673
@@ -666,11 +726,14 @@ public static SignedPart SignedPart(
666
726
loc =
667
727
Objects .nonNull (nativeValue .loc ())
668
728
? Option .create_Some (
729
+ DafnySequence ._typeDescriptor (TypeDescriptor .CHAR ),
669
730
software .amazon .smithy .dafny .conversion .ToDafny .Simple .CharacterSequence (
670
731
nativeValue .loc ()
671
732
)
672
733
)
673
- : Option .create_None ();
734
+ : Option .create_None (
735
+ DafnySequence ._typeDescriptor (TypeDescriptor .CHAR )
736
+ );
674
737
return new SignedPart (name , prefix , loc );
675
738
}
676
739
@@ -701,16 +764,22 @@ public static StandardBeacon StandardBeacon(
701
764
loc =
702
765
Objects .nonNull (nativeValue .loc ())
703
766
? Option .create_Some (
767
+ DafnySequence ._typeDescriptor (TypeDescriptor .CHAR ),
704
768
software .amazon .smithy .dafny .conversion .ToDafny .Simple .CharacterSequence (
705
769
nativeValue .loc ()
706
770
)
707
771
)
708
- : Option .create_None ();
772
+ : Option .create_None (
773
+ DafnySequence ._typeDescriptor (TypeDescriptor .CHAR )
774
+ );
709
775
Option <BeaconStyle > style ;
710
776
style =
711
777
Objects .nonNull (nativeValue .style ())
712
- ? Option .create_Some (ToDafny .BeaconStyle (nativeValue .style ()))
713
- : Option .create_None ();
778
+ ? Option .create_Some (
779
+ BeaconStyle ._typeDescriptor (),
780
+ ToDafny .BeaconStyle (nativeValue .style ())
781
+ )
782
+ : Option .create_None (BeaconStyle ._typeDescriptor ());
714
783
return new StandardBeacon (name , length , loc , style );
715
784
}
716
785
@@ -744,8 +813,13 @@ public static VirtualPart VirtualPart(
744
813
Option <DafnySequence <? extends VirtualTransform >> trans ;
745
814
trans =
746
815
(Objects .nonNull (nativeValue .trans ()) && nativeValue .trans ().size () > 0 )
747
- ? Option .create_Some (ToDafny .VirtualTransformList (nativeValue .trans ()))
748
- : Option .create_None ();
816
+ ? Option .create_Some (
817
+ DafnySequence ._typeDescriptor (VirtualTransform ._typeDescriptor ()),
818
+ ToDafny .VirtualTransformList (nativeValue .trans ())
819
+ )
820
+ : Option .create_None (
821
+ DafnySequence ._typeDescriptor (VirtualTransform ._typeDescriptor ())
822
+ );
749
823
return new VirtualPart (loc , trans );
750
824
}
751
825
0 commit comments