11# This file was automatically generated. DO NOT EDIT.
22# If you have any remark or suggestion do not hesitate to open an issue.
33
4- from typing import Any , Dict
4+ from typing import Any
55from dateutil import parser
66
77from scaleway_core .profile import ProfileDefaults
1111)
1212from .types import (
1313 DataKeyAlgorithmSymmetricEncryption ,
14+ KeyAlgorithmAsymmetricEncryption ,
15+ KeyAlgorithmAsymmetricSigning ,
1416 KeyAlgorithmSymmetricEncryption ,
1517 KeyOrigin ,
1618 KeyState ,
@@ -43,7 +45,7 @@ def unmarshal_KeyRotationPolicy(data: Any) -> KeyRotationPolicy:
4345 "Unmarshalling the type 'KeyRotationPolicy' failed as data isn't a dictionary."
4446 )
4547
46- args : Dict [str , Any ] = {}
48+ args : dict [str , Any ] = {}
4749
4850 field = data .get ("rotation_period" , None )
4951 if field is not None :
@@ -68,7 +70,7 @@ def unmarshal_KeyUsage(data: Any) -> KeyUsage:
6870 "Unmarshalling the type 'KeyUsage' failed as data isn't a dictionary."
6971 )
7072
71- args : Dict [str , Any ] = {}
73+ args : dict [str , Any ] = {}
7274
7375 field = data .get ("symmetric_encryption" , None )
7476 if field is not None :
@@ -82,13 +84,17 @@ def unmarshal_KeyUsage(data: Any) -> KeyUsage:
8284 if field is not None :
8385 args ["asymmetric_encryption" ] = field
8486 else :
85- args ["asymmetric_encryption" ] = None
87+ args ["asymmetric_encryption" ] = (
88+ KeyAlgorithmAsymmetricEncryption .UNKNOWN_ASYMMETRIC_ENCRYPTION
89+ )
8690
8791 field = data .get ("asymmetric_signing" , None )
8892 if field is not None :
8993 args ["asymmetric_signing" ] = field
9094 else :
91- args ["asymmetric_signing" ] = None
95+ args ["asymmetric_signing" ] = (
96+ KeyAlgorithmAsymmetricSigning .UNKNOWN_ASYMMETRIC_SIGNING
97+ )
9298
9399 return KeyUsage (** args )
94100
@@ -99,7 +105,7 @@ def unmarshal_Key(data: Any) -> Key:
99105 "Unmarshalling the type 'Key' failed as data isn't a dictionary."
100106 )
101107
102- args : Dict [str , Any ] = {}
108+ args : dict [str , Any ] = {}
103109
104110 field = data .get ("id" , None )
105111 if field is not None :
@@ -214,7 +220,7 @@ def unmarshal_DataKey(data: Any) -> DataKey:
214220 "Unmarshalling the type 'DataKey' failed as data isn't a dictionary."
215221 )
216222
217- args : Dict [str , Any ] = {}
223+ args : dict [str , Any ] = {}
218224
219225 field = data .get ("key_id" , None )
220226 if field is not None :
@@ -257,7 +263,7 @@ def unmarshal_DecryptResponse(data: Any) -> DecryptResponse:
257263 "Unmarshalling the type 'DecryptResponse' failed as data isn't a dictionary."
258264 )
259265
260- args : Dict [str , Any ] = {}
266+ args : dict [str , Any ] = {}
261267
262268 field = data .get ("key_id" , None )
263269 if field is not None :
@@ -286,7 +292,7 @@ def unmarshal_EncryptResponse(data: Any) -> EncryptResponse:
286292 "Unmarshalling the type 'EncryptResponse' failed as data isn't a dictionary."
287293 )
288294
289- args : Dict [str , Any ] = {}
295+ args : dict [str , Any ] = {}
290296
291297 field = data .get ("key_id" , None )
292298 if field is not None :
@@ -311,7 +317,7 @@ def unmarshal_ListAlgorithmsResponseAlgorithm(
311317 "Unmarshalling the type 'ListAlgorithmsResponseAlgorithm' failed as data isn't a dictionary."
312318 )
313319
314- args : Dict [str , Any ] = {}
320+ args : dict [str , Any ] = {}
315321
316322 field = data .get ("usage" , None )
317323 if field is not None :
@@ -340,7 +346,7 @@ def unmarshal_ListAlgorithmsResponse(data: Any) -> ListAlgorithmsResponse:
340346 "Unmarshalling the type 'ListAlgorithmsResponse' failed as data isn't a dictionary."
341347 )
342348
343- args : Dict [str , Any ] = {}
349+ args : dict [str , Any ] = {}
344350
345351 field = data .get ("algorithms" , None )
346352 if field is not None :
@@ -361,7 +367,7 @@ def unmarshal_ListKeysResponse(data: Any) -> ListKeysResponse:
361367 "Unmarshalling the type 'ListKeysResponse' failed as data isn't a dictionary."
362368 )
363369
364- args : Dict [str , Any ] = {}
370+ args : dict [str , Any ] = {}
365371
366372 field = data .get ("keys" , None )
367373 if field is not None :
@@ -384,7 +390,7 @@ def unmarshal_PublicKey(data: Any) -> PublicKey:
384390 "Unmarshalling the type 'PublicKey' failed as data isn't a dictionary."
385391 )
386392
387- args : Dict [str , Any ] = {}
393+ args : dict [str , Any ] = {}
388394
389395 field = data .get ("pem" , None )
390396 if field is not None :
@@ -401,7 +407,7 @@ def unmarshal_SignResponse(data: Any) -> SignResponse:
401407 "Unmarshalling the type 'SignResponse' failed as data isn't a dictionary."
402408 )
403409
404- args : Dict [str , Any ] = {}
410+ args : dict [str , Any ] = {}
405411
406412 field = data .get ("key_id" , None )
407413 if field is not None :
@@ -424,7 +430,7 @@ def unmarshal_VerifyResponse(data: Any) -> VerifyResponse:
424430 "Unmarshalling the type 'VerifyResponse' failed as data isn't a dictionary."
425431 )
426432
427- args : Dict [str , Any ] = {}
433+ args : dict [str , Any ] = {}
428434
429435 field = data .get ("key_id" , None )
430436 if field is not None :
@@ -444,8 +450,8 @@ def unmarshal_VerifyResponse(data: Any) -> VerifyResponse:
444450def marshal_KeyRotationPolicy (
445451 request : KeyRotationPolicy ,
446452 defaults : ProfileDefaults ,
447- ) -> Dict [str , Any ]:
448- output : Dict [str , Any ] = {}
453+ ) -> dict [str , Any ]:
454+ output : dict [str , Any ] = {}
449455
450456 if request .rotation_period is not None :
451457 output ["rotation_period" ] = request .rotation_period
@@ -459,8 +465,8 @@ def marshal_KeyRotationPolicy(
459465def marshal_KeyUsage (
460466 request : KeyUsage ,
461467 defaults : ProfileDefaults ,
462- ) -> Dict [str , Any ]:
463- output : Dict [str , Any ] = {}
468+ ) -> dict [str , Any ]:
469+ output : dict [str , Any ] = {}
464470 output .update (
465471 resolve_one_of (
466472 [
@@ -489,8 +495,8 @@ def marshal_KeyUsage(
489495def marshal_CreateKeyRequest (
490496 request : CreateKeyRequest ,
491497 defaults : ProfileDefaults ,
492- ) -> Dict [str , Any ]:
493- output : Dict [str , Any ] = {}
498+ ) -> dict [str , Any ]:
499+ output : dict [str , Any ] = {}
494500
495501 if request .unprotected is not None :
496502 output ["unprotected" ] = request .unprotected
@@ -526,8 +532,8 @@ def marshal_CreateKeyRequest(
526532def marshal_DecryptRequest (
527533 request : DecryptRequest ,
528534 defaults : ProfileDefaults ,
529- ) -> Dict [str , Any ]:
530- output : Dict [str , Any ] = {}
535+ ) -> dict [str , Any ]:
536+ output : dict [str , Any ] = {}
531537
532538 if request .ciphertext is not None :
533539 output ["ciphertext" ] = request .ciphertext
@@ -541,8 +547,8 @@ def marshal_DecryptRequest(
541547def marshal_EncryptRequest (
542548 request : EncryptRequest ,
543549 defaults : ProfileDefaults ,
544- ) -> Dict [str , Any ]:
545- output : Dict [str , Any ] = {}
550+ ) -> dict [str , Any ]:
551+ output : dict [str , Any ] = {}
546552
547553 if request .plaintext is not None :
548554 output ["plaintext" ] = request .plaintext
@@ -556,8 +562,8 @@ def marshal_EncryptRequest(
556562def marshal_GenerateDataKeyRequest (
557563 request : GenerateDataKeyRequest ,
558564 defaults : ProfileDefaults ,
559- ) -> Dict [str , Any ]:
560- output : Dict [str , Any ] = {}
565+ ) -> dict [str , Any ]:
566+ output : dict [str , Any ] = {}
561567
562568 if request .without_plaintext is not None :
563569 output ["without_plaintext" ] = request .without_plaintext
@@ -571,8 +577,8 @@ def marshal_GenerateDataKeyRequest(
571577def marshal_ImportKeyMaterialRequest (
572578 request : ImportKeyMaterialRequest ,
573579 defaults : ProfileDefaults ,
574- ) -> Dict [str , Any ]:
575- output : Dict [str , Any ] = {}
580+ ) -> dict [str , Any ]:
581+ output : dict [str , Any ] = {}
576582
577583 if request .key_material is not None :
578584 output ["key_material" ] = request .key_material
@@ -586,8 +592,8 @@ def marshal_ImportKeyMaterialRequest(
586592def marshal_SignRequest (
587593 request : SignRequest ,
588594 defaults : ProfileDefaults ,
589- ) -> Dict [str , Any ]:
590- output : Dict [str , Any ] = {}
595+ ) -> dict [str , Any ]:
596+ output : dict [str , Any ] = {}
591597
592598 if request .digest is not None :
593599 output ["digest" ] = request .digest
@@ -598,8 +604,8 @@ def marshal_SignRequest(
598604def marshal_UpdateKeyRequest (
599605 request : UpdateKeyRequest ,
600606 defaults : ProfileDefaults ,
601- ) -> Dict [str , Any ]:
602- output : Dict [str , Any ] = {}
607+ ) -> dict [str , Any ]:
608+ output : dict [str , Any ] = {}
603609
604610 if request .name is not None :
605611 output ["name" ] = request .name
@@ -621,8 +627,8 @@ def marshal_UpdateKeyRequest(
621627def marshal_VerifyRequest (
622628 request : VerifyRequest ,
623629 defaults : ProfileDefaults ,
624- ) -> Dict [str , Any ]:
625- output : Dict [str , Any ] = {}
630+ ) -> dict [str , Any ]:
631+ output : dict [str , Any ] = {}
626632
627633 if request .digest is not None :
628634 output ["digest" ] = request .digest
0 commit comments