mapleflow 0.8.1__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.
- mapleflow/__init__.py +8 -0
- mapleflow/api/__init__.py +1 -0
- mapleflow/api/ai/__init__.py +1 -0
- mapleflow/api/ai/post_ai_chat.py +195 -0
- mapleflow/api/ai/post_ai_embeddings.py +191 -0
- mapleflow/api/ai/post_ai_images.py +195 -0
- mapleflow/api/ai/post_ai_speech.py +191 -0
- mapleflow/api/ai/post_ai_transcribe.py +189 -0
- mapleflow/api/images/__init__.py +1 -0
- mapleflow/api/images/post_images_bg_remove.py +235 -0
- mapleflow/api/utility/__init__.py +1 -0
- mapleflow/api/utility/get_currency.py +253 -0
- mapleflow/api/utility/get_weather.py +277 -0
- mapleflow/api/utility/post_translate.py +206 -0
- mapleflow/api/verify/__init__.py +1 -0
- mapleflow/api/verify/post_verify_face.py +190 -0
- mapleflow/api/verify/post_verify_labels.py +190 -0
- mapleflow/client.py +282 -0
- mapleflow/errors.py +16 -0
- mapleflow/models/__init__.py +99 -0
- mapleflow/models/get_currency_response_200.py +81 -0
- mapleflow/models/get_currency_response_400.py +81 -0
- mapleflow/models/get_currency_response_404.py +81 -0
- mapleflow/models/get_currency_response_502.py +81 -0
- mapleflow/models/get_weather_response_200.py +81 -0
- mapleflow/models/get_weather_response_400.py +81 -0
- mapleflow/models/get_weather_response_404.py +81 -0
- mapleflow/models/get_weather_response_502.py +81 -0
- mapleflow/models/get_weather_units.py +9 -0
- mapleflow/models/post_ai_chat_body.py +104 -0
- mapleflow/models/post_ai_chat_body_messages_item.py +69 -0
- mapleflow/models/post_ai_chat_body_model.py +9 -0
- mapleflow/models/post_ai_chat_response_200.py +72 -0
- mapleflow/models/post_ai_chat_response_400.py +69 -0
- mapleflow/models/post_ai_embeddings_body.py +98 -0
- mapleflow/models/post_ai_embeddings_body_model.py +8 -0
- mapleflow/models/post_ai_embeddings_response_200.py +72 -0
- mapleflow/models/post_ai_embeddings_response_400.py +69 -0
- mapleflow/models/post_ai_images_body.py +90 -0
- mapleflow/models/post_ai_images_body_model.py +9 -0
- mapleflow/models/post_ai_images_response_200.py +72 -0
- mapleflow/models/post_ai_images_response_400.py +69 -0
- mapleflow/models/post_ai_speech_body.py +80 -0
- mapleflow/models/post_ai_speech_body_model.py +8 -0
- mapleflow/models/post_ai_speech_response_200.py +72 -0
- mapleflow/models/post_ai_speech_response_400.py +69 -0
- mapleflow/models/post_ai_transcribe_body.py +81 -0
- mapleflow/models/post_ai_transcribe_response_200.py +72 -0
- mapleflow/models/post_ai_transcribe_response_400.py +69 -0
- mapleflow/models/post_images_bg_remove_files_body.py +93 -0
- mapleflow/models/post_images_bg_remove_json_body.py +70 -0
- mapleflow/models/post_images_bg_remove_response_200.py +72 -0
- mapleflow/models/post_images_bg_remove_response_400.py +69 -0
- mapleflow/models/post_images_bg_remove_response_502.py +69 -0
- mapleflow/models/post_images_bg_remove_response_504.py +69 -0
- mapleflow/models/post_translate_body.py +89 -0
- mapleflow/models/post_translate_response_200.py +81 -0
- mapleflow/models/post_translate_response_400.py +81 -0
- mapleflow/models/post_translate_response_402.py +81 -0
- mapleflow/models/post_verify_face_files_body.py +100 -0
- mapleflow/models/post_verify_face_json_body.py +69 -0
- mapleflow/models/post_verify_face_response_200.py +72 -0
- mapleflow/models/post_verify_face_response_400.py +69 -0
- mapleflow/models/post_verify_labels_files_body.py +81 -0
- mapleflow/models/post_verify_labels_json_body.py +61 -0
- mapleflow/models/post_verify_labels_response_200.py +72 -0
- mapleflow/models/post_verify_labels_response_400.py +69 -0
- mapleflow/types.py +54 -0
- mapleflow-0.8.1.dist-info/METADATA +54 -0
- mapleflow-0.8.1.dist-info/RECORD +71 -0
- mapleflow-0.8.1.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="PostImagesBgRemoveResponse502")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class PostImagesBgRemoveResponse502:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
success (bool):
|
|
17
|
+
error (str):
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
success: bool
|
|
21
|
+
error: str
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
success = self.success
|
|
26
|
+
|
|
27
|
+
error = self.error
|
|
28
|
+
|
|
29
|
+
field_dict: dict[str, Any] = {}
|
|
30
|
+
field_dict.update(self.additional_properties)
|
|
31
|
+
field_dict.update(
|
|
32
|
+
{
|
|
33
|
+
"success": success,
|
|
34
|
+
"error": error,
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
return field_dict
|
|
39
|
+
|
|
40
|
+
@classmethod
|
|
41
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
42
|
+
d = dict(src_dict)
|
|
43
|
+
success = d.pop("success")
|
|
44
|
+
|
|
45
|
+
error = d.pop("error")
|
|
46
|
+
|
|
47
|
+
post_images_bg_remove_response_502 = cls(
|
|
48
|
+
success=success,
|
|
49
|
+
error=error,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
post_images_bg_remove_response_502.additional_properties = d
|
|
53
|
+
return post_images_bg_remove_response_502
|
|
54
|
+
|
|
55
|
+
@property
|
|
56
|
+
def additional_keys(self) -> list[str]:
|
|
57
|
+
return list(self.additional_properties.keys())
|
|
58
|
+
|
|
59
|
+
def __getitem__(self, key: str) -> Any:
|
|
60
|
+
return self.additional_properties[key]
|
|
61
|
+
|
|
62
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
63
|
+
self.additional_properties[key] = value
|
|
64
|
+
|
|
65
|
+
def __delitem__(self, key: str) -> None:
|
|
66
|
+
del self.additional_properties[key]
|
|
67
|
+
|
|
68
|
+
def __contains__(self, key: str) -> bool:
|
|
69
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="PostImagesBgRemoveResponse504")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class PostImagesBgRemoveResponse504:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
success (bool):
|
|
17
|
+
error (str):
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
success: bool
|
|
21
|
+
error: str
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
success = self.success
|
|
26
|
+
|
|
27
|
+
error = self.error
|
|
28
|
+
|
|
29
|
+
field_dict: dict[str, Any] = {}
|
|
30
|
+
field_dict.update(self.additional_properties)
|
|
31
|
+
field_dict.update(
|
|
32
|
+
{
|
|
33
|
+
"success": success,
|
|
34
|
+
"error": error,
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
return field_dict
|
|
39
|
+
|
|
40
|
+
@classmethod
|
|
41
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
42
|
+
d = dict(src_dict)
|
|
43
|
+
success = d.pop("success")
|
|
44
|
+
|
|
45
|
+
error = d.pop("error")
|
|
46
|
+
|
|
47
|
+
post_images_bg_remove_response_504 = cls(
|
|
48
|
+
success=success,
|
|
49
|
+
error=error,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
post_images_bg_remove_response_504.additional_properties = d
|
|
53
|
+
return post_images_bg_remove_response_504
|
|
54
|
+
|
|
55
|
+
@property
|
|
56
|
+
def additional_keys(self) -> list[str]:
|
|
57
|
+
return list(self.additional_properties.keys())
|
|
58
|
+
|
|
59
|
+
def __getitem__(self, key: str) -> Any:
|
|
60
|
+
return self.additional_properties[key]
|
|
61
|
+
|
|
62
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
63
|
+
self.additional_properties[key] = value
|
|
64
|
+
|
|
65
|
+
def __delitem__(self, key: str) -> None:
|
|
66
|
+
del self.additional_properties[key]
|
|
67
|
+
|
|
68
|
+
def __contains__(self, key: str) -> bool:
|
|
69
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="PostTranslateBody")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class PostTranslateBody:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
text (str): Text to translate Example: Hello, world!.
|
|
19
|
+
to (str): Target language code (ISO 639-1) Example: es.
|
|
20
|
+
from_ (str | Unset): Source language code (ISO 639-1) or 'auto' Default: 'auto'. Example: auto.
|
|
21
|
+
model (str | Unset): Model (only 'auto' supported) Example: auto.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
text: str
|
|
25
|
+
to: str
|
|
26
|
+
from_: str | Unset = "auto"
|
|
27
|
+
model: str | Unset = UNSET
|
|
28
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
29
|
+
|
|
30
|
+
def to_dict(self) -> dict[str, Any]:
|
|
31
|
+
text = self.text
|
|
32
|
+
|
|
33
|
+
to = self.to
|
|
34
|
+
|
|
35
|
+
from_ = self.from_
|
|
36
|
+
|
|
37
|
+
model = self.model
|
|
38
|
+
|
|
39
|
+
field_dict: dict[str, Any] = {}
|
|
40
|
+
field_dict.update(self.additional_properties)
|
|
41
|
+
field_dict.update(
|
|
42
|
+
{
|
|
43
|
+
"text": text,
|
|
44
|
+
"to": to,
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
if from_ is not UNSET:
|
|
48
|
+
field_dict["from"] = from_
|
|
49
|
+
if model is not UNSET:
|
|
50
|
+
field_dict["model"] = model
|
|
51
|
+
|
|
52
|
+
return field_dict
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
56
|
+
d = dict(src_dict)
|
|
57
|
+
text = d.pop("text")
|
|
58
|
+
|
|
59
|
+
to = d.pop("to")
|
|
60
|
+
|
|
61
|
+
from_ = d.pop("from", UNSET)
|
|
62
|
+
|
|
63
|
+
model = d.pop("model", UNSET)
|
|
64
|
+
|
|
65
|
+
post_translate_body = cls(
|
|
66
|
+
text=text,
|
|
67
|
+
to=to,
|
|
68
|
+
from_=from_,
|
|
69
|
+
model=model,
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
post_translate_body.additional_properties = d
|
|
73
|
+
return post_translate_body
|
|
74
|
+
|
|
75
|
+
@property
|
|
76
|
+
def additional_keys(self) -> list[str]:
|
|
77
|
+
return list(self.additional_properties.keys())
|
|
78
|
+
|
|
79
|
+
def __getitem__(self, key: str) -> Any:
|
|
80
|
+
return self.additional_properties[key]
|
|
81
|
+
|
|
82
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
83
|
+
self.additional_properties[key] = value
|
|
84
|
+
|
|
85
|
+
def __delitem__(self, key: str) -> None:
|
|
86
|
+
del self.additional_properties[key]
|
|
87
|
+
|
|
88
|
+
def __contains__(self, key: str) -> bool:
|
|
89
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="PostTranslateResponse200")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class PostTranslateResponse200:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
success (bool):
|
|
19
|
+
data (Any | Unset):
|
|
20
|
+
error (str | Unset):
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
success: bool
|
|
24
|
+
data: Any | Unset = UNSET
|
|
25
|
+
error: str | Unset = UNSET
|
|
26
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
27
|
+
|
|
28
|
+
def to_dict(self) -> dict[str, Any]:
|
|
29
|
+
success = self.success
|
|
30
|
+
|
|
31
|
+
data = self.data
|
|
32
|
+
|
|
33
|
+
error = self.error
|
|
34
|
+
|
|
35
|
+
field_dict: dict[str, Any] = {}
|
|
36
|
+
field_dict.update(self.additional_properties)
|
|
37
|
+
field_dict.update(
|
|
38
|
+
{
|
|
39
|
+
"success": success,
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
if data is not UNSET:
|
|
43
|
+
field_dict["data"] = data
|
|
44
|
+
if error is not UNSET:
|
|
45
|
+
field_dict["error"] = error
|
|
46
|
+
|
|
47
|
+
return field_dict
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
51
|
+
d = dict(src_dict)
|
|
52
|
+
success = d.pop("success")
|
|
53
|
+
|
|
54
|
+
data = d.pop("data", UNSET)
|
|
55
|
+
|
|
56
|
+
error = d.pop("error", UNSET)
|
|
57
|
+
|
|
58
|
+
post_translate_response_200 = cls(
|
|
59
|
+
success=success,
|
|
60
|
+
data=data,
|
|
61
|
+
error=error,
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
post_translate_response_200.additional_properties = d
|
|
65
|
+
return post_translate_response_200
|
|
66
|
+
|
|
67
|
+
@property
|
|
68
|
+
def additional_keys(self) -> list[str]:
|
|
69
|
+
return list(self.additional_properties.keys())
|
|
70
|
+
|
|
71
|
+
def __getitem__(self, key: str) -> Any:
|
|
72
|
+
return self.additional_properties[key]
|
|
73
|
+
|
|
74
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
75
|
+
self.additional_properties[key] = value
|
|
76
|
+
|
|
77
|
+
def __delitem__(self, key: str) -> None:
|
|
78
|
+
del self.additional_properties[key]
|
|
79
|
+
|
|
80
|
+
def __contains__(self, key: str) -> bool:
|
|
81
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="PostTranslateResponse400")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class PostTranslateResponse400:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
success (bool):
|
|
19
|
+
data (Any | Unset):
|
|
20
|
+
error (str | Unset):
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
success: bool
|
|
24
|
+
data: Any | Unset = UNSET
|
|
25
|
+
error: str | Unset = UNSET
|
|
26
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
27
|
+
|
|
28
|
+
def to_dict(self) -> dict[str, Any]:
|
|
29
|
+
success = self.success
|
|
30
|
+
|
|
31
|
+
data = self.data
|
|
32
|
+
|
|
33
|
+
error = self.error
|
|
34
|
+
|
|
35
|
+
field_dict: dict[str, Any] = {}
|
|
36
|
+
field_dict.update(self.additional_properties)
|
|
37
|
+
field_dict.update(
|
|
38
|
+
{
|
|
39
|
+
"success": success,
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
if data is not UNSET:
|
|
43
|
+
field_dict["data"] = data
|
|
44
|
+
if error is not UNSET:
|
|
45
|
+
field_dict["error"] = error
|
|
46
|
+
|
|
47
|
+
return field_dict
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
51
|
+
d = dict(src_dict)
|
|
52
|
+
success = d.pop("success")
|
|
53
|
+
|
|
54
|
+
data = d.pop("data", UNSET)
|
|
55
|
+
|
|
56
|
+
error = d.pop("error", UNSET)
|
|
57
|
+
|
|
58
|
+
post_translate_response_400 = cls(
|
|
59
|
+
success=success,
|
|
60
|
+
data=data,
|
|
61
|
+
error=error,
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
post_translate_response_400.additional_properties = d
|
|
65
|
+
return post_translate_response_400
|
|
66
|
+
|
|
67
|
+
@property
|
|
68
|
+
def additional_keys(self) -> list[str]:
|
|
69
|
+
return list(self.additional_properties.keys())
|
|
70
|
+
|
|
71
|
+
def __getitem__(self, key: str) -> Any:
|
|
72
|
+
return self.additional_properties[key]
|
|
73
|
+
|
|
74
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
75
|
+
self.additional_properties[key] = value
|
|
76
|
+
|
|
77
|
+
def __delitem__(self, key: str) -> None:
|
|
78
|
+
del self.additional_properties[key]
|
|
79
|
+
|
|
80
|
+
def __contains__(self, key: str) -> bool:
|
|
81
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="PostTranslateResponse402")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class PostTranslateResponse402:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
success (bool):
|
|
19
|
+
data (Any | Unset):
|
|
20
|
+
error (str | Unset):
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
success: bool
|
|
24
|
+
data: Any | Unset = UNSET
|
|
25
|
+
error: str | Unset = UNSET
|
|
26
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
27
|
+
|
|
28
|
+
def to_dict(self) -> dict[str, Any]:
|
|
29
|
+
success = self.success
|
|
30
|
+
|
|
31
|
+
data = self.data
|
|
32
|
+
|
|
33
|
+
error = self.error
|
|
34
|
+
|
|
35
|
+
field_dict: dict[str, Any] = {}
|
|
36
|
+
field_dict.update(self.additional_properties)
|
|
37
|
+
field_dict.update(
|
|
38
|
+
{
|
|
39
|
+
"success": success,
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
if data is not UNSET:
|
|
43
|
+
field_dict["data"] = data
|
|
44
|
+
if error is not UNSET:
|
|
45
|
+
field_dict["error"] = error
|
|
46
|
+
|
|
47
|
+
return field_dict
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
51
|
+
d = dict(src_dict)
|
|
52
|
+
success = d.pop("success")
|
|
53
|
+
|
|
54
|
+
data = d.pop("data", UNSET)
|
|
55
|
+
|
|
56
|
+
error = d.pop("error", UNSET)
|
|
57
|
+
|
|
58
|
+
post_translate_response_402 = cls(
|
|
59
|
+
success=success,
|
|
60
|
+
data=data,
|
|
61
|
+
error=error,
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
post_translate_response_402.additional_properties = d
|
|
65
|
+
return post_translate_response_402
|
|
66
|
+
|
|
67
|
+
@property
|
|
68
|
+
def additional_keys(self) -> list[str]:
|
|
69
|
+
return list(self.additional_properties.keys())
|
|
70
|
+
|
|
71
|
+
def __getitem__(self, key: str) -> Any:
|
|
72
|
+
return self.additional_properties[key]
|
|
73
|
+
|
|
74
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
75
|
+
self.additional_properties[key] = value
|
|
76
|
+
|
|
77
|
+
def __delitem__(self, key: str) -> None:
|
|
78
|
+
del self.additional_properties[key]
|
|
79
|
+
|
|
80
|
+
def __contains__(self, key: str) -> bool:
|
|
81
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from io import BytesIO
|
|
5
|
+
from typing import Any, TypeVar
|
|
6
|
+
|
|
7
|
+
from attrs import define as _attrs_define
|
|
8
|
+
from attrs import field as _attrs_field
|
|
9
|
+
|
|
10
|
+
from .. import types
|
|
11
|
+
from ..types import UNSET, File, FileTypes, Unset
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="PostVerifyFaceFilesBody")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class PostVerifyFaceFilesBody:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
image1 (File | Unset):
|
|
21
|
+
image2 (File | Unset):
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
image1: File | Unset = UNSET
|
|
25
|
+
image2: File | Unset = UNSET
|
|
26
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
27
|
+
|
|
28
|
+
def to_dict(self) -> dict[str, Any]:
|
|
29
|
+
image1: FileTypes | Unset = UNSET
|
|
30
|
+
if not isinstance(self.image1, Unset):
|
|
31
|
+
image1 = self.image1.to_tuple()
|
|
32
|
+
|
|
33
|
+
image2: FileTypes | Unset = UNSET
|
|
34
|
+
if not isinstance(self.image2, Unset):
|
|
35
|
+
image2 = self.image2.to_tuple()
|
|
36
|
+
|
|
37
|
+
field_dict: dict[str, Any] = {}
|
|
38
|
+
field_dict.update(self.additional_properties)
|
|
39
|
+
field_dict.update({})
|
|
40
|
+
if image1 is not UNSET:
|
|
41
|
+
field_dict["image1"] = image1
|
|
42
|
+
if image2 is not UNSET:
|
|
43
|
+
field_dict["image2"] = image2
|
|
44
|
+
|
|
45
|
+
return field_dict
|
|
46
|
+
|
|
47
|
+
def to_multipart(self) -> types.RequestFiles:
|
|
48
|
+
files: types.RequestFiles = []
|
|
49
|
+
|
|
50
|
+
if not isinstance(self.image1, Unset):
|
|
51
|
+
files.append(("image1", self.image1.to_tuple()))
|
|
52
|
+
|
|
53
|
+
if not isinstance(self.image2, Unset):
|
|
54
|
+
files.append(("image2", self.image2.to_tuple()))
|
|
55
|
+
|
|
56
|
+
for prop_name, prop in self.additional_properties.items():
|
|
57
|
+
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
|
58
|
+
|
|
59
|
+
return files
|
|
60
|
+
|
|
61
|
+
@classmethod
|
|
62
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
63
|
+
d = dict(src_dict)
|
|
64
|
+
_image1 = d.pop("image1", UNSET)
|
|
65
|
+
image1: File | Unset
|
|
66
|
+
if isinstance(_image1, Unset):
|
|
67
|
+
image1 = UNSET
|
|
68
|
+
else:
|
|
69
|
+
image1 = File(payload=BytesIO(_image1))
|
|
70
|
+
|
|
71
|
+
_image2 = d.pop("image2", UNSET)
|
|
72
|
+
image2: File | Unset
|
|
73
|
+
if isinstance(_image2, Unset):
|
|
74
|
+
image2 = UNSET
|
|
75
|
+
else:
|
|
76
|
+
image2 = File(payload=BytesIO(_image2))
|
|
77
|
+
|
|
78
|
+
post_verify_face_files_body = cls(
|
|
79
|
+
image1=image1,
|
|
80
|
+
image2=image2,
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
post_verify_face_files_body.additional_properties = d
|
|
84
|
+
return post_verify_face_files_body
|
|
85
|
+
|
|
86
|
+
@property
|
|
87
|
+
def additional_keys(self) -> list[str]:
|
|
88
|
+
return list(self.additional_properties.keys())
|
|
89
|
+
|
|
90
|
+
def __getitem__(self, key: str) -> Any:
|
|
91
|
+
return self.additional_properties[key]
|
|
92
|
+
|
|
93
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
94
|
+
self.additional_properties[key] = value
|
|
95
|
+
|
|
96
|
+
def __delitem__(self, key: str) -> None:
|
|
97
|
+
del self.additional_properties[key]
|
|
98
|
+
|
|
99
|
+
def __contains__(self, key: str) -> bool:
|
|
100
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="PostVerifyFaceJsonBody")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class PostVerifyFaceJsonBody:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
image1 (str): Base64-encoded image Example: <base64>.
|
|
17
|
+
image2 (str): Base64-encoded image Example: <base64>.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
image1: str
|
|
21
|
+
image2: str
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
image1 = self.image1
|
|
26
|
+
|
|
27
|
+
image2 = self.image2
|
|
28
|
+
|
|
29
|
+
field_dict: dict[str, Any] = {}
|
|
30
|
+
field_dict.update(self.additional_properties)
|
|
31
|
+
field_dict.update(
|
|
32
|
+
{
|
|
33
|
+
"image1": image1,
|
|
34
|
+
"image2": image2,
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
return field_dict
|
|
39
|
+
|
|
40
|
+
@classmethod
|
|
41
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
42
|
+
d = dict(src_dict)
|
|
43
|
+
image1 = d.pop("image1")
|
|
44
|
+
|
|
45
|
+
image2 = d.pop("image2")
|
|
46
|
+
|
|
47
|
+
post_verify_face_json_body = cls(
|
|
48
|
+
image1=image1,
|
|
49
|
+
image2=image2,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
post_verify_face_json_body.additional_properties = d
|
|
53
|
+
return post_verify_face_json_body
|
|
54
|
+
|
|
55
|
+
@property
|
|
56
|
+
def additional_keys(self) -> list[str]:
|
|
57
|
+
return list(self.additional_properties.keys())
|
|
58
|
+
|
|
59
|
+
def __getitem__(self, key: str) -> Any:
|
|
60
|
+
return self.additional_properties[key]
|
|
61
|
+
|
|
62
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
63
|
+
self.additional_properties[key] = value
|
|
64
|
+
|
|
65
|
+
def __delitem__(self, key: str) -> None:
|
|
66
|
+
del self.additional_properties[key]
|
|
67
|
+
|
|
68
|
+
def __contains__(self, key: str) -> bool:
|
|
69
|
+
return key in self.additional_properties
|