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,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 InvalidDidParameterError(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
InvalidDidParameterError
|
|
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 ('InvalidDidParameterError'):
|
|
41
|
+
raise ValueError("must be one of enum values ('InvalidDidParameterError')")
|
|
42
|
+
return value
|
|
43
|
+
|
|
44
|
+
@validator('message')
|
|
45
|
+
def message_validate_enum(cls, value):
|
|
46
|
+
"""Validates the enum"""
|
|
47
|
+
if value not in ('Given did in field 'toDid' is invalid. Use only resolvable form of did.'):
|
|
48
|
+
raise ValueError("must be one of enum values ('Given did in field 'toDid' is invalid. Use only resolvable form of did.')")
|
|
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) -> InvalidDidParameterError:
|
|
73
|
+
"""Create an instance of InvalidDidParameterError 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) -> InvalidDidParameterError:
|
|
93
|
+
"""Create an instance of InvalidDidParameterError from a dict"""
|
|
94
|
+
if obj is None:
|
|
95
|
+
return None
|
|
96
|
+
|
|
97
|
+
if not isinstance(obj, dict):
|
|
98
|
+
return InvalidDidParameterError.parse_obj(obj)
|
|
99
|
+
|
|
100
|
+
_obj = InvalidDidParameterError.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,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 InvalidParameterError(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
InvalidParameterError
|
|
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 ('InvalidParameterError'):
|
|
41
|
+
raise ValueError("must be one of enum values ('InvalidParameterError')")
|
|
42
|
+
return value
|
|
43
|
+
|
|
44
|
+
@validator('message')
|
|
45
|
+
def message_validate_enum(cls, value):
|
|
46
|
+
"""Validates the enum"""
|
|
47
|
+
if value not in ('Invalid parameter: ${param}.'):
|
|
48
|
+
raise ValueError("must be one of enum values ('Invalid parameter: ${param}.')")
|
|
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) -> InvalidParameterError:
|
|
73
|
+
"""Create an instance of InvalidParameterError 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) -> InvalidParameterError:
|
|
93
|
+
"""Create an instance of InvalidParameterError from a dict"""
|
|
94
|
+
if obj is None:
|
|
95
|
+
return None
|
|
96
|
+
|
|
97
|
+
if not isinstance(obj, dict):
|
|
98
|
+
return InvalidParameterError.parse_obj(obj)
|
|
99
|
+
|
|
100
|
+
_obj = InvalidParameterError.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,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 KeyNotFoundError(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
KeyNotFoundError
|
|
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 ('KeyNotFoundError'):
|
|
41
|
+
raise ValueError("must be one of enum values ('KeyNotFoundError')")
|
|
42
|
+
return value
|
|
43
|
+
|
|
44
|
+
@validator('message')
|
|
45
|
+
def message_validate_enum(cls, value):
|
|
46
|
+
"""Validates the enum"""
|
|
47
|
+
if value not in ('Key not found'):
|
|
48
|
+
raise ValueError("must be one of enum values ('Key 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 (500):
|
|
55
|
+
raise ValueError("must be one of enum values (500)")
|
|
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) -> KeyNotFoundError:
|
|
73
|
+
"""Create an instance of KeyNotFoundError 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) -> KeyNotFoundError:
|
|
93
|
+
"""Create an instance of KeyNotFoundError from a dict"""
|
|
94
|
+
if obj is None:
|
|
95
|
+
return None
|
|
96
|
+
|
|
97
|
+
if not isinstance(obj, dict):
|
|
98
|
+
return KeyNotFoundError.parse_obj(obj)
|
|
99
|
+
|
|
100
|
+
_obj = KeyNotFoundError.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,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 NotFoundError(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
NotFoundError
|
|
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 ('NotFoundError'):
|
|
41
|
+
raise ValueError("must be one of enum values ('NotFoundError')")
|
|
42
|
+
return value
|
|
43
|
+
|
|
44
|
+
@validator('message')
|
|
45
|
+
def message_validate_enum(cls, value):
|
|
46
|
+
"""Validates the enum"""
|
|
47
|
+
if value not in ('Not found: ${param}.'):
|
|
48
|
+
raise ValueError("must be one of enum values ('Not found: ${param}.')")
|
|
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) -> NotFoundError:
|
|
73
|
+
"""Create an instance of NotFoundError 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) -> NotFoundError:
|
|
93
|
+
"""Create an instance of NotFoundError from a dict"""
|
|
94
|
+
if obj is None:
|
|
95
|
+
return None
|
|
96
|
+
|
|
97
|
+
if not isinstance(obj, dict):
|
|
98
|
+
return NotFoundError.parse_obj(obj)
|
|
99
|
+
|
|
100
|
+
_obj = NotFoundError.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,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 OperationForbiddenError(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
OperationForbiddenError
|
|
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 ('OperationForbiddenError'):
|
|
41
|
+
raise ValueError("must be one of enum values ('OperationForbiddenError')")
|
|
42
|
+
return value
|
|
43
|
+
|
|
44
|
+
@validator('message')
|
|
45
|
+
def message_validate_enum(cls, value):
|
|
46
|
+
"""Validates the enum"""
|
|
47
|
+
if value not in ('Operation forbidden: ${param}.'):
|
|
48
|
+
raise ValueError("must be one of enum values ('Operation forbidden: ${param}.')")
|
|
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 (403):
|
|
55
|
+
raise ValueError("must be one of enum values (403)")
|
|
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) -> OperationForbiddenError:
|
|
73
|
+
"""Create an instance of OperationForbiddenError 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) -> OperationForbiddenError:
|
|
93
|
+
"""Create an instance of OperationForbiddenError from a dict"""
|
|
94
|
+
if obj is None:
|
|
95
|
+
return None
|
|
96
|
+
|
|
97
|
+
if not isinstance(obj, dict):
|
|
98
|
+
return OperationForbiddenError.parse_obj(obj)
|
|
99
|
+
|
|
100
|
+
_obj = OperationForbiddenError.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,79 @@
|
|
|
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 RevokeCredentialInput(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
RevokeCredentialInput
|
|
28
|
+
"""
|
|
29
|
+
revocation_reason: Optional[StrictStr] = Field(None, alias="revocationReason")
|
|
30
|
+
credential_id: Optional[StrictStr] = Field(None, alias="credentialId")
|
|
31
|
+
__properties = ["revocationReason", "credentialId"]
|
|
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) -> RevokeCredentialInput:
|
|
48
|
+
"""Create an instance of RevokeCredentialInput 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
|
+
# set to None if revocation_reason (nullable) is None
|
|
58
|
+
# and __fields_set__ contains the field
|
|
59
|
+
if self.revocation_reason is None and "revocation_reason" in self.__fields_set__:
|
|
60
|
+
_dict['revocationReason'] = None
|
|
61
|
+
|
|
62
|
+
return _dict
|
|
63
|
+
|
|
64
|
+
@classmethod
|
|
65
|
+
def from_dict(cls, obj: dict) -> RevokeCredentialInput:
|
|
66
|
+
"""Create an instance of RevokeCredentialInput from a dict"""
|
|
67
|
+
if obj is None:
|
|
68
|
+
return None
|
|
69
|
+
|
|
70
|
+
if not isinstance(obj, dict):
|
|
71
|
+
return RevokeCredentialInput.parse_obj(obj)
|
|
72
|
+
|
|
73
|
+
_obj = RevokeCredentialInput.parse_obj({
|
|
74
|
+
"revocation_reason": obj.get("revocationReason"),
|
|
75
|
+
"credential_id": obj.get("credentialId")
|
|
76
|
+
})
|
|
77
|
+
return _obj
|
|
78
|
+
|
|
79
|
+
|