affinidi_tdk_wallets_client 1.19.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of affinidi_tdk_wallets_client might be problematic. Click here for more details.
- affinidi_tdk_wallets_client/__init__.py +63 -0
- affinidi_tdk_wallets_client/api/__init__.py +7 -0
- affinidi_tdk_wallets_client/api/default_api.py +202 -0
- affinidi_tdk_wallets_client/api/revocation_api.py +351 -0
- affinidi_tdk_wallets_client/api/wallet_api.py +1094 -0
- affinidi_tdk_wallets_client/api_client.py +760 -0
- affinidi_tdk_wallets_client/api_response.py +25 -0
- affinidi_tdk_wallets_client/configuration.py +464 -0
- affinidi_tdk_wallets_client/exceptions.py +167 -0
- affinidi_tdk_wallets_client/models/__init__.py +44 -0
- affinidi_tdk_wallets_client/models/create_wallet_input.py +142 -0
- affinidi_tdk_wallets_client/models/create_wallet_response.py +76 -0
- affinidi_tdk_wallets_client/models/did_key_input_params.py +86 -0
- affinidi_tdk_wallets_client/models/did_web_input_params.py +92 -0
- affinidi_tdk_wallets_client/models/entity_not_found_error.py +109 -0
- affinidi_tdk_wallets_client/models/get_revocation_credential_status_ok.py +72 -0
- affinidi_tdk_wallets_client/models/get_revocation_list_credential_result_dto.py +72 -0
- affinidi_tdk_wallets_client/models/invalid_did_parameter_error.py +109 -0
- affinidi_tdk_wallets_client/models/invalid_parameter_error.py +109 -0
- affinidi_tdk_wallets_client/models/key_not_found_error.py +109 -0
- affinidi_tdk_wallets_client/models/not_found_error.py +109 -0
- affinidi_tdk_wallets_client/models/operation_forbidden_error.py +109 -0
- affinidi_tdk_wallets_client/models/revoke_credential_input.py +79 -0
- affinidi_tdk_wallets_client/models/service_error_response.py +86 -0
- affinidi_tdk_wallets_client/models/service_error_response_details_inner.py +78 -0
- affinidi_tdk_wallets_client/models/sign_credential400_response.py +142 -0
- affinidi_tdk_wallets_client/models/sign_credential_input_dto.py +92 -0
- affinidi_tdk_wallets_client/models/sign_credential_input_dto_unsigned_credential_params.py +89 -0
- affinidi_tdk_wallets_client/models/sign_credential_result_dto.py +76 -0
- affinidi_tdk_wallets_client/models/sign_credential_result_dto_signed_credential.py +148 -0
- affinidi_tdk_wallets_client/models/sign_jwt_token.py +74 -0
- affinidi_tdk_wallets_client/models/sign_jwt_token_ok.py +72 -0
- affinidi_tdk_wallets_client/models/signing_failed_error.py +109 -0
- affinidi_tdk_wallets_client/models/update_wallet_input.py +74 -0
- affinidi_tdk_wallets_client/models/wallet_dto.py +96 -0
- affinidi_tdk_wallets_client/models/wallet_dto_keys_inner.py +74 -0
- affinidi_tdk_wallets_client/models/wallets_list_dto.py +80 -0
- affinidi_tdk_wallets_client/py.typed +0 -0
- affinidi_tdk_wallets_client/rest.py +328 -0
- affinidi_tdk_wallets_client-1.19.0.dist-info/METADATA +188 -0
- affinidi_tdk_wallets_client-1.19.0.dist-info/RECORD +42 -0
- affinidi_tdk_wallets_client-1.19.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
CloudWalletEssentials
|
|
5
|
+
|
|
6
|
+
Cloud Wallet For Enterprise Structure
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Contact: info@affinidi.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
from inspect import getfullargspec
|
|
18
|
+
import json
|
|
19
|
+
import pprint
|
|
20
|
+
import re # noqa: F401
|
|
21
|
+
|
|
22
|
+
from typing import Any, Dict, List, Optional
|
|
23
|
+
from pydantic import BaseModel, Field, StrictStr, ValidationError, validator
|
|
24
|
+
from typing import Union, Any, List, TYPE_CHECKING
|
|
25
|
+
from pydantic import StrictStr, Field
|
|
26
|
+
|
|
27
|
+
SIGNCREDENTIALRESULTDTOSIGNEDCREDENTIAL_ONE_OF_SCHEMAS = ["object", "str"]
|
|
28
|
+
|
|
29
|
+
class SignCredentialResultDtoSignedCredential(BaseModel):
|
|
30
|
+
"""
|
|
31
|
+
SignCredentialResultDtoSignedCredential
|
|
32
|
+
"""
|
|
33
|
+
# data type: object
|
|
34
|
+
oneof_schema_1_validator: Optional[Dict[str, Any]] = None
|
|
35
|
+
# data type: str
|
|
36
|
+
oneof_schema_2_validator: Optional[StrictStr] = None
|
|
37
|
+
if TYPE_CHECKING:
|
|
38
|
+
actual_instance: Union[object, str]
|
|
39
|
+
else:
|
|
40
|
+
actual_instance: Any
|
|
41
|
+
one_of_schemas: List[str] = Field(SIGNCREDENTIALRESULTDTOSIGNEDCREDENTIAL_ONE_OF_SCHEMAS, const=True)
|
|
42
|
+
|
|
43
|
+
class Config:
|
|
44
|
+
validate_assignment = True
|
|
45
|
+
|
|
46
|
+
def __init__(self, *args, **kwargs) -> None:
|
|
47
|
+
if args:
|
|
48
|
+
if len(args) > 1:
|
|
49
|
+
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
|
50
|
+
if kwargs:
|
|
51
|
+
raise ValueError("If a position argument is used, keyword arguments cannot be used.")
|
|
52
|
+
super().__init__(actual_instance=args[0])
|
|
53
|
+
else:
|
|
54
|
+
super().__init__(**kwargs)
|
|
55
|
+
|
|
56
|
+
@validator('actual_instance')
|
|
57
|
+
def actual_instance_must_validate_oneof(cls, v):
|
|
58
|
+
instance = SignCredentialResultDtoSignedCredential.construct()
|
|
59
|
+
error_messages = []
|
|
60
|
+
match = 0
|
|
61
|
+
# validate data type: object
|
|
62
|
+
try:
|
|
63
|
+
instance.oneof_schema_1_validator = v
|
|
64
|
+
match += 1
|
|
65
|
+
except (ValidationError, ValueError) as e:
|
|
66
|
+
error_messages.append(str(e))
|
|
67
|
+
# validate data type: str
|
|
68
|
+
try:
|
|
69
|
+
instance.oneof_schema_2_validator = v
|
|
70
|
+
match += 1
|
|
71
|
+
except (ValidationError, ValueError) as e:
|
|
72
|
+
error_messages.append(str(e))
|
|
73
|
+
if match > 1:
|
|
74
|
+
# more than 1 match
|
|
75
|
+
raise ValueError("Multiple matches found when setting `actual_instance` in SignCredentialResultDtoSignedCredential with oneOf schemas: object, str. Details: " + ", ".join(error_messages))
|
|
76
|
+
elif match == 0:
|
|
77
|
+
# no match
|
|
78
|
+
raise ValueError("No match found when setting `actual_instance` in SignCredentialResultDtoSignedCredential with oneOf schemas: object, str. Details: " + ", ".join(error_messages))
|
|
79
|
+
else:
|
|
80
|
+
return v
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_dict(cls, obj: dict) -> SignCredentialResultDtoSignedCredential:
|
|
84
|
+
return cls.from_json(json.dumps(obj))
|
|
85
|
+
|
|
86
|
+
@classmethod
|
|
87
|
+
def from_json(cls, json_str: str) -> SignCredentialResultDtoSignedCredential:
|
|
88
|
+
"""Returns the object represented by the json string"""
|
|
89
|
+
instance = SignCredentialResultDtoSignedCredential.construct()
|
|
90
|
+
error_messages = []
|
|
91
|
+
match = 0
|
|
92
|
+
|
|
93
|
+
# deserialize data into object
|
|
94
|
+
try:
|
|
95
|
+
# validation
|
|
96
|
+
instance.oneof_schema_1_validator = json.loads(json_str)
|
|
97
|
+
# assign value to actual_instance
|
|
98
|
+
instance.actual_instance = instance.oneof_schema_1_validator
|
|
99
|
+
match += 1
|
|
100
|
+
except (ValidationError, ValueError) as e:
|
|
101
|
+
error_messages.append(str(e))
|
|
102
|
+
# deserialize data into str
|
|
103
|
+
try:
|
|
104
|
+
# validation
|
|
105
|
+
instance.oneof_schema_2_validator = json.loads(json_str)
|
|
106
|
+
# assign value to actual_instance
|
|
107
|
+
instance.actual_instance = instance.oneof_schema_2_validator
|
|
108
|
+
match += 1
|
|
109
|
+
except (ValidationError, ValueError) as e:
|
|
110
|
+
error_messages.append(str(e))
|
|
111
|
+
|
|
112
|
+
if match > 1:
|
|
113
|
+
# more than 1 match
|
|
114
|
+
raise ValueError("Multiple matches found when deserializing the JSON string into SignCredentialResultDtoSignedCredential with oneOf schemas: object, str. Details: " + ", ".join(error_messages))
|
|
115
|
+
elif match == 0:
|
|
116
|
+
# no match
|
|
117
|
+
raise ValueError("No match found when deserializing the JSON string into SignCredentialResultDtoSignedCredential with oneOf schemas: object, str. Details: " + ", ".join(error_messages))
|
|
118
|
+
else:
|
|
119
|
+
return instance
|
|
120
|
+
|
|
121
|
+
def to_json(self) -> str:
|
|
122
|
+
"""Returns the JSON representation of the actual instance"""
|
|
123
|
+
if self.actual_instance is None:
|
|
124
|
+
return "null"
|
|
125
|
+
|
|
126
|
+
to_json = getattr(self.actual_instance, "to_json", None)
|
|
127
|
+
if callable(to_json):
|
|
128
|
+
return self.actual_instance.to_json()
|
|
129
|
+
else:
|
|
130
|
+
return json.dumps(self.actual_instance)
|
|
131
|
+
|
|
132
|
+
def to_dict(self) -> dict:
|
|
133
|
+
"""Returns the dict representation of the actual instance"""
|
|
134
|
+
if self.actual_instance is None:
|
|
135
|
+
return None
|
|
136
|
+
|
|
137
|
+
to_dict = getattr(self.actual_instance, "to_dict", None)
|
|
138
|
+
if callable(to_dict):
|
|
139
|
+
return self.actual_instance.to_dict()
|
|
140
|
+
else:
|
|
141
|
+
# primitive type
|
|
142
|
+
return self.actual_instance
|
|
143
|
+
|
|
144
|
+
def to_str(self) -> str:
|
|
145
|
+
"""Returns the string representation of the actual instance"""
|
|
146
|
+
return pprint.pformat(self.dict())
|
|
147
|
+
|
|
148
|
+
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
CloudWalletEssentials
|
|
5
|
+
|
|
6
|
+
Cloud Wallet For Enterprise Structure
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Contact: info@affinidi.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
from typing import Any, Dict
|
|
23
|
+
from pydantic import BaseModel, Field
|
|
24
|
+
|
|
25
|
+
class SignJwtToken(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
DTO contains parts of JWT to be signed # noqa: E501
|
|
28
|
+
"""
|
|
29
|
+
header: Dict[str, Any] = Field(...)
|
|
30
|
+
payload: Dict[str, Any] = Field(...)
|
|
31
|
+
__properties = ["header", "payload"]
|
|
32
|
+
|
|
33
|
+
class Config:
|
|
34
|
+
"""Pydantic configuration"""
|
|
35
|
+
allow_population_by_field_name = True
|
|
36
|
+
validate_assignment = True
|
|
37
|
+
|
|
38
|
+
def to_str(self) -> str:
|
|
39
|
+
"""Returns the string representation of the model using alias"""
|
|
40
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
41
|
+
|
|
42
|
+
def to_json(self) -> str:
|
|
43
|
+
"""Returns the JSON representation of the model using alias"""
|
|
44
|
+
return json.dumps(self.to_dict())
|
|
45
|
+
|
|
46
|
+
@classmethod
|
|
47
|
+
def from_json(cls, json_str: str) -> SignJwtToken:
|
|
48
|
+
"""Create an instance of SignJwtToken from a JSON string"""
|
|
49
|
+
return cls.from_dict(json.loads(json_str))
|
|
50
|
+
|
|
51
|
+
def to_dict(self):
|
|
52
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
53
|
+
_dict = self.dict(by_alias=True,
|
|
54
|
+
exclude={
|
|
55
|
+
},
|
|
56
|
+
exclude_none=True)
|
|
57
|
+
return _dict
|
|
58
|
+
|
|
59
|
+
@classmethod
|
|
60
|
+
def from_dict(cls, obj: dict) -> SignJwtToken:
|
|
61
|
+
"""Create an instance of SignJwtToken from a dict"""
|
|
62
|
+
if obj is None:
|
|
63
|
+
return None
|
|
64
|
+
|
|
65
|
+
if not isinstance(obj, dict):
|
|
66
|
+
return SignJwtToken.parse_obj(obj)
|
|
67
|
+
|
|
68
|
+
_obj = SignJwtToken.parse_obj({
|
|
69
|
+
"header": obj.get("header"),
|
|
70
|
+
"payload": obj.get("payload")
|
|
71
|
+
})
|
|
72
|
+
return _obj
|
|
73
|
+
|
|
74
|
+
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
CloudWalletEssentials
|
|
5
|
+
|
|
6
|
+
Cloud Wallet For Enterprise Structure
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Contact: info@affinidi.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
from typing import Optional
|
|
23
|
+
from pydantic import BaseModel, Field, StrictStr
|
|
24
|
+
|
|
25
|
+
class SignJwtTokenOK(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
SignJwtTokenOK
|
|
28
|
+
"""
|
|
29
|
+
signed_jwt: Optional[StrictStr] = Field(None, alias="signedJwt")
|
|
30
|
+
__properties = ["signedJwt"]
|
|
31
|
+
|
|
32
|
+
class Config:
|
|
33
|
+
"""Pydantic configuration"""
|
|
34
|
+
allow_population_by_field_name = True
|
|
35
|
+
validate_assignment = True
|
|
36
|
+
|
|
37
|
+
def to_str(self) -> str:
|
|
38
|
+
"""Returns the string representation of the model using alias"""
|
|
39
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
40
|
+
|
|
41
|
+
def to_json(self) -> str:
|
|
42
|
+
"""Returns the JSON representation of the model using alias"""
|
|
43
|
+
return json.dumps(self.to_dict())
|
|
44
|
+
|
|
45
|
+
@classmethod
|
|
46
|
+
def from_json(cls, json_str: str) -> SignJwtTokenOK:
|
|
47
|
+
"""Create an instance of SignJwtTokenOK from a JSON string"""
|
|
48
|
+
return cls.from_dict(json.loads(json_str))
|
|
49
|
+
|
|
50
|
+
def to_dict(self):
|
|
51
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
52
|
+
_dict = self.dict(by_alias=True,
|
|
53
|
+
exclude={
|
|
54
|
+
},
|
|
55
|
+
exclude_none=True)
|
|
56
|
+
return _dict
|
|
57
|
+
|
|
58
|
+
@classmethod
|
|
59
|
+
def from_dict(cls, obj: dict) -> SignJwtTokenOK:
|
|
60
|
+
"""Create an instance of SignJwtTokenOK from a dict"""
|
|
61
|
+
if obj is None:
|
|
62
|
+
return None
|
|
63
|
+
|
|
64
|
+
if not isinstance(obj, dict):
|
|
65
|
+
return SignJwtTokenOK.parse_obj(obj)
|
|
66
|
+
|
|
67
|
+
_obj = SignJwtTokenOK.parse_obj({
|
|
68
|
+
"signed_jwt": obj.get("signedJwt")
|
|
69
|
+
})
|
|
70
|
+
return _obj
|
|
71
|
+
|
|
72
|
+
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
CloudWalletEssentials
|
|
5
|
+
|
|
6
|
+
Cloud Wallet For Enterprise Structure
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Contact: info@affinidi.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
from typing import List, Optional, Union
|
|
23
|
+
from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr, conlist, validator
|
|
24
|
+
from affinidi_tdk_wallets_client.models.service_error_response_details_inner import ServiceErrorResponseDetailsInner
|
|
25
|
+
|
|
26
|
+
class SigningFailedError(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
SigningFailedError
|
|
29
|
+
"""
|
|
30
|
+
name: StrictStr = Field(...)
|
|
31
|
+
message: StrictStr = Field(...)
|
|
32
|
+
http_status_code: Union[StrictFloat, StrictInt] = Field(..., alias="httpStatusCode")
|
|
33
|
+
trace_id: StrictStr = Field(..., alias="traceId")
|
|
34
|
+
details: Optional[conlist(ServiceErrorResponseDetailsInner)] = None
|
|
35
|
+
__properties = ["name", "message", "httpStatusCode", "traceId", "details"]
|
|
36
|
+
|
|
37
|
+
@validator('name')
|
|
38
|
+
def name_validate_enum(cls, value):
|
|
39
|
+
"""Validates the enum"""
|
|
40
|
+
if value not in ('SigningFailedError'):
|
|
41
|
+
raise ValueError("must be one of enum values ('SigningFailedError')")
|
|
42
|
+
return value
|
|
43
|
+
|
|
44
|
+
@validator('message')
|
|
45
|
+
def message_validate_enum(cls, value):
|
|
46
|
+
"""Validates the enum"""
|
|
47
|
+
if value not in ('Signing failed.'):
|
|
48
|
+
raise ValueError("must be one of enum values ('Signing failed.')")
|
|
49
|
+
return value
|
|
50
|
+
|
|
51
|
+
@validator('http_status_code')
|
|
52
|
+
def http_status_code_validate_enum(cls, value):
|
|
53
|
+
"""Validates the enum"""
|
|
54
|
+
if value not in (400):
|
|
55
|
+
raise ValueError("must be one of enum values (400)")
|
|
56
|
+
return value
|
|
57
|
+
|
|
58
|
+
class Config:
|
|
59
|
+
"""Pydantic configuration"""
|
|
60
|
+
allow_population_by_field_name = True
|
|
61
|
+
validate_assignment = True
|
|
62
|
+
|
|
63
|
+
def to_str(self) -> str:
|
|
64
|
+
"""Returns the string representation of the model using alias"""
|
|
65
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
66
|
+
|
|
67
|
+
def to_json(self) -> str:
|
|
68
|
+
"""Returns the JSON representation of the model using alias"""
|
|
69
|
+
return json.dumps(self.to_dict())
|
|
70
|
+
|
|
71
|
+
@classmethod
|
|
72
|
+
def from_json(cls, json_str: str) -> SigningFailedError:
|
|
73
|
+
"""Create an instance of SigningFailedError from a JSON string"""
|
|
74
|
+
return cls.from_dict(json.loads(json_str))
|
|
75
|
+
|
|
76
|
+
def to_dict(self):
|
|
77
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
78
|
+
_dict = self.dict(by_alias=True,
|
|
79
|
+
exclude={
|
|
80
|
+
},
|
|
81
|
+
exclude_none=True)
|
|
82
|
+
# override the default output from pydantic by calling `to_dict()` of each item in details (list)
|
|
83
|
+
_items = []
|
|
84
|
+
if self.details:
|
|
85
|
+
for _item in self.details:
|
|
86
|
+
if _item:
|
|
87
|
+
_items.append(_item.to_dict())
|
|
88
|
+
_dict['details'] = _items
|
|
89
|
+
return _dict
|
|
90
|
+
|
|
91
|
+
@classmethod
|
|
92
|
+
def from_dict(cls, obj: dict) -> SigningFailedError:
|
|
93
|
+
"""Create an instance of SigningFailedError from a dict"""
|
|
94
|
+
if obj is None:
|
|
95
|
+
return None
|
|
96
|
+
|
|
97
|
+
if not isinstance(obj, dict):
|
|
98
|
+
return SigningFailedError.parse_obj(obj)
|
|
99
|
+
|
|
100
|
+
_obj = SigningFailedError.parse_obj({
|
|
101
|
+
"name": obj.get("name"),
|
|
102
|
+
"message": obj.get("message"),
|
|
103
|
+
"http_status_code": obj.get("httpStatusCode"),
|
|
104
|
+
"trace_id": obj.get("traceId"),
|
|
105
|
+
"details": [ServiceErrorResponseDetailsInner.from_dict(_item) for _item in obj.get("details")] if obj.get("details") is not None else None
|
|
106
|
+
})
|
|
107
|
+
return _obj
|
|
108
|
+
|
|
109
|
+
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
CloudWalletEssentials
|
|
5
|
+
|
|
6
|
+
Cloud Wallet For Enterprise Structure
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Contact: info@affinidi.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
from typing import Optional
|
|
23
|
+
from pydantic import BaseModel, Field, StrictStr
|
|
24
|
+
|
|
25
|
+
class UpdateWalletInput(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Update wallet input params # noqa: E501
|
|
28
|
+
"""
|
|
29
|
+
name: Optional[StrictStr] = Field(None, description="The name of the wallet")
|
|
30
|
+
description: Optional[StrictStr] = Field(None, description="The description of the wallet")
|
|
31
|
+
__properties = ["name", "description"]
|
|
32
|
+
|
|
33
|
+
class Config:
|
|
34
|
+
"""Pydantic configuration"""
|
|
35
|
+
allow_population_by_field_name = True
|
|
36
|
+
validate_assignment = True
|
|
37
|
+
|
|
38
|
+
def to_str(self) -> str:
|
|
39
|
+
"""Returns the string representation of the model using alias"""
|
|
40
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
41
|
+
|
|
42
|
+
def to_json(self) -> str:
|
|
43
|
+
"""Returns the JSON representation of the model using alias"""
|
|
44
|
+
return json.dumps(self.to_dict())
|
|
45
|
+
|
|
46
|
+
@classmethod
|
|
47
|
+
def from_json(cls, json_str: str) -> UpdateWalletInput:
|
|
48
|
+
"""Create an instance of UpdateWalletInput from a JSON string"""
|
|
49
|
+
return cls.from_dict(json.loads(json_str))
|
|
50
|
+
|
|
51
|
+
def to_dict(self):
|
|
52
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
53
|
+
_dict = self.dict(by_alias=True,
|
|
54
|
+
exclude={
|
|
55
|
+
},
|
|
56
|
+
exclude_none=True)
|
|
57
|
+
return _dict
|
|
58
|
+
|
|
59
|
+
@classmethod
|
|
60
|
+
def from_dict(cls, obj: dict) -> UpdateWalletInput:
|
|
61
|
+
"""Create an instance of UpdateWalletInput from a dict"""
|
|
62
|
+
if obj is None:
|
|
63
|
+
return None
|
|
64
|
+
|
|
65
|
+
if not isinstance(obj, dict):
|
|
66
|
+
return UpdateWalletInput.parse_obj(obj)
|
|
67
|
+
|
|
68
|
+
_obj = UpdateWalletInput.parse_obj({
|
|
69
|
+
"name": obj.get("name"),
|
|
70
|
+
"description": obj.get("description")
|
|
71
|
+
})
|
|
72
|
+
return _obj
|
|
73
|
+
|
|
74
|
+
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
CloudWalletEssentials
|
|
5
|
+
|
|
6
|
+
Cloud Wallet For Enterprise Structure
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Contact: info@affinidi.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
from typing import Any, Dict, List, Optional
|
|
23
|
+
from pydantic import BaseModel, Field, StrictStr, conlist
|
|
24
|
+
from affinidi_tdk_wallets_client.models.wallet_dto_keys_inner import WalletDtoKeysInner
|
|
25
|
+
|
|
26
|
+
class WalletDto(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
wallet dto # noqa: E501
|
|
29
|
+
"""
|
|
30
|
+
id: Optional[StrictStr] = Field(None, description="id of the wallet in uuidV4 format")
|
|
31
|
+
did: Optional[StrictStr] = Field(None, description="did of the wallet")
|
|
32
|
+
name: Optional[StrictStr] = Field(None, description="The name of the wallet")
|
|
33
|
+
description: Optional[StrictStr] = Field(None, description="The description of the wallet")
|
|
34
|
+
did_document: Optional[Dict[str, Any]] = Field(None, alias="didDocument", description="did document of the wallet")
|
|
35
|
+
ari: Optional[StrictStr] = Field(None, description="ARI of the wallet")
|
|
36
|
+
keys: Optional[conlist(WalletDtoKeysInner)] = None
|
|
37
|
+
created_at: Optional[StrictStr] = Field(None, alias="createdAt")
|
|
38
|
+
modified_at: Optional[StrictStr] = Field(None, alias="modifiedAt")
|
|
39
|
+
__properties = ["id", "did", "name", "description", "didDocument", "ari", "keys", "createdAt", "modifiedAt"]
|
|
40
|
+
|
|
41
|
+
class Config:
|
|
42
|
+
"""Pydantic configuration"""
|
|
43
|
+
allow_population_by_field_name = True
|
|
44
|
+
validate_assignment = True
|
|
45
|
+
|
|
46
|
+
def to_str(self) -> str:
|
|
47
|
+
"""Returns the string representation of the model using alias"""
|
|
48
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
49
|
+
|
|
50
|
+
def to_json(self) -> str:
|
|
51
|
+
"""Returns the JSON representation of the model using alias"""
|
|
52
|
+
return json.dumps(self.to_dict())
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_json(cls, json_str: str) -> WalletDto:
|
|
56
|
+
"""Create an instance of WalletDto from a JSON string"""
|
|
57
|
+
return cls.from_dict(json.loads(json_str))
|
|
58
|
+
|
|
59
|
+
def to_dict(self):
|
|
60
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
61
|
+
_dict = self.dict(by_alias=True,
|
|
62
|
+
exclude={
|
|
63
|
+
},
|
|
64
|
+
exclude_none=True)
|
|
65
|
+
# override the default output from pydantic by calling `to_dict()` of each item in keys (list)
|
|
66
|
+
_items = []
|
|
67
|
+
if self.keys:
|
|
68
|
+
for _item in self.keys:
|
|
69
|
+
if _item:
|
|
70
|
+
_items.append(_item.to_dict())
|
|
71
|
+
_dict['keys'] = _items
|
|
72
|
+
return _dict
|
|
73
|
+
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_dict(cls, obj: dict) -> WalletDto:
|
|
76
|
+
"""Create an instance of WalletDto from a dict"""
|
|
77
|
+
if obj is None:
|
|
78
|
+
return None
|
|
79
|
+
|
|
80
|
+
if not isinstance(obj, dict):
|
|
81
|
+
return WalletDto.parse_obj(obj)
|
|
82
|
+
|
|
83
|
+
_obj = WalletDto.parse_obj({
|
|
84
|
+
"id": obj.get("id"),
|
|
85
|
+
"did": obj.get("did"),
|
|
86
|
+
"name": obj.get("name"),
|
|
87
|
+
"description": obj.get("description"),
|
|
88
|
+
"did_document": obj.get("didDocument"),
|
|
89
|
+
"ari": obj.get("ari"),
|
|
90
|
+
"keys": [WalletDtoKeysInner.from_dict(_item) for _item in obj.get("keys")] if obj.get("keys") is not None else None,
|
|
91
|
+
"created_at": obj.get("createdAt"),
|
|
92
|
+
"modified_at": obj.get("modifiedAt")
|
|
93
|
+
})
|
|
94
|
+
return _obj
|
|
95
|
+
|
|
96
|
+
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
CloudWalletEssentials
|
|
5
|
+
|
|
6
|
+
Cloud Wallet For Enterprise Structure
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Contact: info@affinidi.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
from typing import Optional
|
|
23
|
+
from pydantic import BaseModel, Field, StrictStr
|
|
24
|
+
|
|
25
|
+
class WalletDtoKeysInner(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
WalletDtoKeysInner
|
|
28
|
+
"""
|
|
29
|
+
id: Optional[StrictStr] = Field(None, description="id of linked key")
|
|
30
|
+
ari: Optional[StrictStr] = Field(None, description="ari of linked key")
|
|
31
|
+
__properties = ["id", "ari"]
|
|
32
|
+
|
|
33
|
+
class Config:
|
|
34
|
+
"""Pydantic configuration"""
|
|
35
|
+
allow_population_by_field_name = True
|
|
36
|
+
validate_assignment = True
|
|
37
|
+
|
|
38
|
+
def to_str(self) -> str:
|
|
39
|
+
"""Returns the string representation of the model using alias"""
|
|
40
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
41
|
+
|
|
42
|
+
def to_json(self) -> str:
|
|
43
|
+
"""Returns the JSON representation of the model using alias"""
|
|
44
|
+
return json.dumps(self.to_dict())
|
|
45
|
+
|
|
46
|
+
@classmethod
|
|
47
|
+
def from_json(cls, json_str: str) -> WalletDtoKeysInner:
|
|
48
|
+
"""Create an instance of WalletDtoKeysInner from a JSON string"""
|
|
49
|
+
return cls.from_dict(json.loads(json_str))
|
|
50
|
+
|
|
51
|
+
def to_dict(self):
|
|
52
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
53
|
+
_dict = self.dict(by_alias=True,
|
|
54
|
+
exclude={
|
|
55
|
+
},
|
|
56
|
+
exclude_none=True)
|
|
57
|
+
return _dict
|
|
58
|
+
|
|
59
|
+
@classmethod
|
|
60
|
+
def from_dict(cls, obj: dict) -> WalletDtoKeysInner:
|
|
61
|
+
"""Create an instance of WalletDtoKeysInner from a dict"""
|
|
62
|
+
if obj is None:
|
|
63
|
+
return None
|
|
64
|
+
|
|
65
|
+
if not isinstance(obj, dict):
|
|
66
|
+
return WalletDtoKeysInner.parse_obj(obj)
|
|
67
|
+
|
|
68
|
+
_obj = WalletDtoKeysInner.parse_obj({
|
|
69
|
+
"id": obj.get("id"),
|
|
70
|
+
"ari": obj.get("ari")
|
|
71
|
+
})
|
|
72
|
+
return _obj
|
|
73
|
+
|
|
74
|
+
|