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,142 @@
|
|
|
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, List, Optional
|
|
23
|
+
from pydantic import BaseModel, Field, StrictStr, ValidationError, validator
|
|
24
|
+
from affinidi_tdk_wallets_client.models.did_key_input_params import DidKeyInputParams
|
|
25
|
+
from affinidi_tdk_wallets_client.models.did_web_input_params import DidWebInputParams
|
|
26
|
+
from typing import Union, Any, List, TYPE_CHECKING
|
|
27
|
+
from pydantic import StrictStr, Field
|
|
28
|
+
|
|
29
|
+
CREATEWALLETINPUT_ONE_OF_SCHEMAS = ["DidKeyInputParams", "DidWebInputParams"]
|
|
30
|
+
|
|
31
|
+
class CreateWalletInput(BaseModel):
|
|
32
|
+
"""
|
|
33
|
+
CreateWalletInput
|
|
34
|
+
"""
|
|
35
|
+
# data type: DidWebInputParams
|
|
36
|
+
oneof_schema_1_validator: Optional[DidWebInputParams] = None
|
|
37
|
+
# data type: DidKeyInputParams
|
|
38
|
+
oneof_schema_2_validator: Optional[DidKeyInputParams] = None
|
|
39
|
+
if TYPE_CHECKING:
|
|
40
|
+
actual_instance: Union[DidKeyInputParams, DidWebInputParams]
|
|
41
|
+
else:
|
|
42
|
+
actual_instance: Any
|
|
43
|
+
one_of_schemas: List[str] = Field(CREATEWALLETINPUT_ONE_OF_SCHEMAS, const=True)
|
|
44
|
+
|
|
45
|
+
class Config:
|
|
46
|
+
validate_assignment = True
|
|
47
|
+
|
|
48
|
+
def __init__(self, *args, **kwargs) -> None:
|
|
49
|
+
if args:
|
|
50
|
+
if len(args) > 1:
|
|
51
|
+
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
|
52
|
+
if kwargs:
|
|
53
|
+
raise ValueError("If a position argument is used, keyword arguments cannot be used.")
|
|
54
|
+
super().__init__(actual_instance=args[0])
|
|
55
|
+
else:
|
|
56
|
+
super().__init__(**kwargs)
|
|
57
|
+
|
|
58
|
+
@validator('actual_instance')
|
|
59
|
+
def actual_instance_must_validate_oneof(cls, v):
|
|
60
|
+
instance = CreateWalletInput.construct()
|
|
61
|
+
error_messages = []
|
|
62
|
+
match = 0
|
|
63
|
+
# validate data type: DidWebInputParams
|
|
64
|
+
if not isinstance(v, DidWebInputParams):
|
|
65
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `DidWebInputParams`")
|
|
66
|
+
else:
|
|
67
|
+
match += 1
|
|
68
|
+
# validate data type: DidKeyInputParams
|
|
69
|
+
if not isinstance(v, DidKeyInputParams):
|
|
70
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `DidKeyInputParams`")
|
|
71
|
+
else:
|
|
72
|
+
match += 1
|
|
73
|
+
if match > 1:
|
|
74
|
+
# more than 1 match
|
|
75
|
+
raise ValueError("Multiple matches found when setting `actual_instance` in CreateWalletInput with oneOf schemas: DidKeyInputParams, DidWebInputParams. Details: " + ", ".join(error_messages))
|
|
76
|
+
elif match == 0:
|
|
77
|
+
# no match
|
|
78
|
+
raise ValueError("No match found when setting `actual_instance` in CreateWalletInput with oneOf schemas: DidKeyInputParams, DidWebInputParams. Details: " + ", ".join(error_messages))
|
|
79
|
+
else:
|
|
80
|
+
return v
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_dict(cls, obj: dict) -> CreateWalletInput:
|
|
84
|
+
return cls.from_json(json.dumps(obj))
|
|
85
|
+
|
|
86
|
+
@classmethod
|
|
87
|
+
def from_json(cls, json_str: str) -> CreateWalletInput:
|
|
88
|
+
"""Returns the object represented by the json string"""
|
|
89
|
+
instance = CreateWalletInput.construct()
|
|
90
|
+
error_messages = []
|
|
91
|
+
match = 0
|
|
92
|
+
|
|
93
|
+
# deserialize data into DidWebInputParams
|
|
94
|
+
try:
|
|
95
|
+
instance.actual_instance = DidWebInputParams.from_json(json_str)
|
|
96
|
+
match += 1
|
|
97
|
+
except (ValidationError, ValueError) as e:
|
|
98
|
+
error_messages.append(str(e))
|
|
99
|
+
# deserialize data into DidKeyInputParams
|
|
100
|
+
try:
|
|
101
|
+
instance.actual_instance = DidKeyInputParams.from_json(json_str)
|
|
102
|
+
match += 1
|
|
103
|
+
except (ValidationError, ValueError) as e:
|
|
104
|
+
error_messages.append(str(e))
|
|
105
|
+
|
|
106
|
+
if match > 1:
|
|
107
|
+
# more than 1 match
|
|
108
|
+
raise ValueError("Multiple matches found when deserializing the JSON string into CreateWalletInput with oneOf schemas: DidKeyInputParams, DidWebInputParams. Details: " + ", ".join(error_messages))
|
|
109
|
+
elif match == 0:
|
|
110
|
+
# no match
|
|
111
|
+
raise ValueError("No match found when deserializing the JSON string into CreateWalletInput with oneOf schemas: DidKeyInputParams, DidWebInputParams. Details: " + ", ".join(error_messages))
|
|
112
|
+
else:
|
|
113
|
+
return instance
|
|
114
|
+
|
|
115
|
+
def to_json(self) -> str:
|
|
116
|
+
"""Returns the JSON representation of the actual instance"""
|
|
117
|
+
if self.actual_instance is None:
|
|
118
|
+
return "null"
|
|
119
|
+
|
|
120
|
+
to_json = getattr(self.actual_instance, "to_json", None)
|
|
121
|
+
if callable(to_json):
|
|
122
|
+
return self.actual_instance.to_json()
|
|
123
|
+
else:
|
|
124
|
+
return json.dumps(self.actual_instance)
|
|
125
|
+
|
|
126
|
+
def to_dict(self) -> dict:
|
|
127
|
+
"""Returns the dict representation of the actual instance"""
|
|
128
|
+
if self.actual_instance is None:
|
|
129
|
+
return None
|
|
130
|
+
|
|
131
|
+
to_dict = getattr(self.actual_instance, "to_dict", None)
|
|
132
|
+
if callable(to_dict):
|
|
133
|
+
return self.actual_instance.to_dict()
|
|
134
|
+
else:
|
|
135
|
+
# primitive type
|
|
136
|
+
return self.actual_instance
|
|
137
|
+
|
|
138
|
+
def to_str(self) -> str:
|
|
139
|
+
"""Returns the string representation of the actual instance"""
|
|
140
|
+
return pprint.pformat(self.dict())
|
|
141
|
+
|
|
142
|
+
|
|
@@ -0,0 +1,76 @@
|
|
|
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
|
|
24
|
+
from affinidi_tdk_wallets_client.models.wallet_dto import WalletDto
|
|
25
|
+
|
|
26
|
+
class CreateWalletResponse(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
wallet dto # noqa: E501
|
|
29
|
+
"""
|
|
30
|
+
wallet: Optional[WalletDto] = None
|
|
31
|
+
__properties = ["wallet"]
|
|
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) -> CreateWalletResponse:
|
|
48
|
+
"""Create an instance of CreateWalletResponse 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
|
+
# override the default output from pydantic by calling `to_dict()` of wallet
|
|
58
|
+
if self.wallet:
|
|
59
|
+
_dict['wallet'] = self.wallet.to_dict()
|
|
60
|
+
return _dict
|
|
61
|
+
|
|
62
|
+
@classmethod
|
|
63
|
+
def from_dict(cls, obj: dict) -> CreateWalletResponse:
|
|
64
|
+
"""Create an instance of CreateWalletResponse from a dict"""
|
|
65
|
+
if obj is None:
|
|
66
|
+
return None
|
|
67
|
+
|
|
68
|
+
if not isinstance(obj, dict):
|
|
69
|
+
return CreateWalletResponse.parse_obj(obj)
|
|
70
|
+
|
|
71
|
+
_obj = CreateWalletResponse.parse_obj({
|
|
72
|
+
"wallet": WalletDto.from_dict(obj.get("wallet")) if obj.get("wallet") is not None else None
|
|
73
|
+
})
|
|
74
|
+
return _obj
|
|
75
|
+
|
|
76
|
+
|
|
@@ -0,0 +1,86 @@
|
|
|
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, validator
|
|
24
|
+
|
|
25
|
+
class DidKeyInputParams(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Did key 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
|
+
did_method: Optional[StrictStr] = Field(None, alias="didMethod")
|
|
32
|
+
__properties = ["name", "description", "didMethod"]
|
|
33
|
+
|
|
34
|
+
@validator('did_method')
|
|
35
|
+
def did_method_validate_enum(cls, value):
|
|
36
|
+
"""Validates the enum"""
|
|
37
|
+
if value is None:
|
|
38
|
+
return value
|
|
39
|
+
|
|
40
|
+
if value not in ('key'):
|
|
41
|
+
raise ValueError("must be one of enum values ('key')")
|
|
42
|
+
return value
|
|
43
|
+
|
|
44
|
+
class Config:
|
|
45
|
+
"""Pydantic configuration"""
|
|
46
|
+
allow_population_by_field_name = True
|
|
47
|
+
validate_assignment = True
|
|
48
|
+
|
|
49
|
+
def to_str(self) -> str:
|
|
50
|
+
"""Returns the string representation of the model using alias"""
|
|
51
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
52
|
+
|
|
53
|
+
def to_json(self) -> str:
|
|
54
|
+
"""Returns the JSON representation of the model using alias"""
|
|
55
|
+
return json.dumps(self.to_dict())
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_json(cls, json_str: str) -> DidKeyInputParams:
|
|
59
|
+
"""Create an instance of DidKeyInputParams from a JSON string"""
|
|
60
|
+
return cls.from_dict(json.loads(json_str))
|
|
61
|
+
|
|
62
|
+
def to_dict(self):
|
|
63
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
64
|
+
_dict = self.dict(by_alias=True,
|
|
65
|
+
exclude={
|
|
66
|
+
},
|
|
67
|
+
exclude_none=True)
|
|
68
|
+
return _dict
|
|
69
|
+
|
|
70
|
+
@classmethod
|
|
71
|
+
def from_dict(cls, obj: dict) -> DidKeyInputParams:
|
|
72
|
+
"""Create an instance of DidKeyInputParams from a dict"""
|
|
73
|
+
if obj is None:
|
|
74
|
+
return None
|
|
75
|
+
|
|
76
|
+
if not isinstance(obj, dict):
|
|
77
|
+
return DidKeyInputParams.parse_obj(obj)
|
|
78
|
+
|
|
79
|
+
_obj = DidKeyInputParams.parse_obj({
|
|
80
|
+
"name": obj.get("name"),
|
|
81
|
+
"description": obj.get("description"),
|
|
82
|
+
"did_method": obj.get("didMethod")
|
|
83
|
+
})
|
|
84
|
+
return _obj
|
|
85
|
+
|
|
86
|
+
|
|
@@ -0,0 +1,92 @@
|
|
|
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, constr, validator
|
|
24
|
+
|
|
25
|
+
class DidWebInputParams(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Additional params for did method web # 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
|
+
did_method: StrictStr = Field(..., alias="didMethod")
|
|
32
|
+
did_web_url: constr(strict=True, max_length=300) = Field(..., alias="didWebUrl", description="If the did method is web, this is the URL of the did")
|
|
33
|
+
__properties = ["name", "description", "didMethod", "didWebUrl"]
|
|
34
|
+
|
|
35
|
+
@validator('did_method')
|
|
36
|
+
def did_method_validate_enum(cls, value):
|
|
37
|
+
"""Validates the enum"""
|
|
38
|
+
if value not in ('web'):
|
|
39
|
+
raise ValueError("must be one of enum values ('web')")
|
|
40
|
+
return value
|
|
41
|
+
|
|
42
|
+
@validator('did_web_url')
|
|
43
|
+
def did_web_url_validate_regular_expression(cls, value):
|
|
44
|
+
"""Validates the regular expression"""
|
|
45
|
+
if not re.match(r"^(?!:\/\/)([a-zA-Z0-9\-\.]+)(:[0-9]+)?(\/[a-zA-Z0-9\-\/]*)?$", value):
|
|
46
|
+
raise ValueError(r"must validate the regular expression /^(?!:\/\/)([a-zA-Z0-9\-\.]+)(:[0-9]+)?(\/[a-zA-Z0-9\-\/]*)?$/")
|
|
47
|
+
return value
|
|
48
|
+
|
|
49
|
+
class Config:
|
|
50
|
+
"""Pydantic configuration"""
|
|
51
|
+
allow_population_by_field_name = True
|
|
52
|
+
validate_assignment = True
|
|
53
|
+
|
|
54
|
+
def to_str(self) -> str:
|
|
55
|
+
"""Returns the string representation of the model using alias"""
|
|
56
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
57
|
+
|
|
58
|
+
def to_json(self) -> str:
|
|
59
|
+
"""Returns the JSON representation of the model using alias"""
|
|
60
|
+
return json.dumps(self.to_dict())
|
|
61
|
+
|
|
62
|
+
@classmethod
|
|
63
|
+
def from_json(cls, json_str: str) -> DidWebInputParams:
|
|
64
|
+
"""Create an instance of DidWebInputParams from a JSON string"""
|
|
65
|
+
return cls.from_dict(json.loads(json_str))
|
|
66
|
+
|
|
67
|
+
def to_dict(self):
|
|
68
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
69
|
+
_dict = self.dict(by_alias=True,
|
|
70
|
+
exclude={
|
|
71
|
+
},
|
|
72
|
+
exclude_none=True)
|
|
73
|
+
return _dict
|
|
74
|
+
|
|
75
|
+
@classmethod
|
|
76
|
+
def from_dict(cls, obj: dict) -> DidWebInputParams:
|
|
77
|
+
"""Create an instance of DidWebInputParams from a dict"""
|
|
78
|
+
if obj is None:
|
|
79
|
+
return None
|
|
80
|
+
|
|
81
|
+
if not isinstance(obj, dict):
|
|
82
|
+
return DidWebInputParams.parse_obj(obj)
|
|
83
|
+
|
|
84
|
+
_obj = DidWebInputParams.parse_obj({
|
|
85
|
+
"name": obj.get("name"),
|
|
86
|
+
"description": obj.get("description"),
|
|
87
|
+
"did_method": obj.get("didMethod"),
|
|
88
|
+
"did_web_url": obj.get("didWebUrl")
|
|
89
|
+
})
|
|
90
|
+
return _obj
|
|
91
|
+
|
|
92
|
+
|
|
@@ -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 EntityNotFoundError(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
EntityNotFoundError
|
|
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 ('EntityNotFoundError'):
|
|
41
|
+
raise ValueError("must be one of enum values ('EntityNotFoundError')")
|
|
42
|
+
return value
|
|
43
|
+
|
|
44
|
+
@validator('message')
|
|
45
|
+
def message_validate_enum(cls, value):
|
|
46
|
+
"""Validates the enum"""
|
|
47
|
+
if value not in ('Entity not found'):
|
|
48
|
+
raise ValueError("must be one of enum values ('Entity not found')")
|
|
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 (404):
|
|
55
|
+
raise ValueError("must be one of enum values (404)")
|
|
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) -> EntityNotFoundError:
|
|
73
|
+
"""Create an instance of EntityNotFoundError 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) -> EntityNotFoundError:
|
|
93
|
+
"""Create an instance of EntityNotFoundError from a dict"""
|
|
94
|
+
if obj is None:
|
|
95
|
+
return None
|
|
96
|
+
|
|
97
|
+
if not isinstance(obj, dict):
|
|
98
|
+
return EntityNotFoundError.parse_obj(obj)
|
|
99
|
+
|
|
100
|
+
_obj = EntityNotFoundError.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,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 Any, Dict
|
|
23
|
+
from pydantic import BaseModel, Field
|
|
24
|
+
|
|
25
|
+
class GetRevocationCredentialStatusOK(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
DTO contains revocation list credential # noqa: E501
|
|
28
|
+
"""
|
|
29
|
+
revocation_list_credential: Dict[str, Any] = Field(..., alias="revocationListCredential")
|
|
30
|
+
__properties = ["revocationListCredential"]
|
|
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) -> GetRevocationCredentialStatusOK:
|
|
47
|
+
"""Create an instance of GetRevocationCredentialStatusOK 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) -> GetRevocationCredentialStatusOK:
|
|
60
|
+
"""Create an instance of GetRevocationCredentialStatusOK from a dict"""
|
|
61
|
+
if obj is None:
|
|
62
|
+
return None
|
|
63
|
+
|
|
64
|
+
if not isinstance(obj, dict):
|
|
65
|
+
return GetRevocationCredentialStatusOK.parse_obj(obj)
|
|
66
|
+
|
|
67
|
+
_obj = GetRevocationCredentialStatusOK.parse_obj({
|
|
68
|
+
"revocation_list_credential": obj.get("revocationListCredential")
|
|
69
|
+
})
|
|
70
|
+
return _obj
|
|
71
|
+
|
|
72
|
+
|
|
@@ -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 Any, Dict
|
|
23
|
+
from pydantic import BaseModel, Field
|
|
24
|
+
|
|
25
|
+
class GetRevocationListCredentialResultDto(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
DTO contains revocation list credential # noqa: E501
|
|
28
|
+
"""
|
|
29
|
+
revocation_list_credential: Dict[str, Any] = Field(..., alias="revocationListCredential")
|
|
30
|
+
__properties = ["revocationListCredential"]
|
|
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) -> GetRevocationListCredentialResultDto:
|
|
47
|
+
"""Create an instance of GetRevocationListCredentialResultDto 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) -> GetRevocationListCredentialResultDto:
|
|
60
|
+
"""Create an instance of GetRevocationListCredentialResultDto from a dict"""
|
|
61
|
+
if obj is None:
|
|
62
|
+
return None
|
|
63
|
+
|
|
64
|
+
if not isinstance(obj, dict):
|
|
65
|
+
return GetRevocationListCredentialResultDto.parse_obj(obj)
|
|
66
|
+
|
|
67
|
+
_obj = GetRevocationListCredentialResultDto.parse_obj({
|
|
68
|
+
"revocation_list_credential": obj.get("revocationListCredential")
|
|
69
|
+
})
|
|
70
|
+
return _obj
|
|
71
|
+
|
|
72
|
+
|