nadeshiko-sdk 0.1.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.
- nadeshiko/__init__.py +10 -0
- nadeshiko/_version.py +1 -0
- nadeshiko/api/__init__.py +1 -0
- nadeshiko/api/auth/__init__.py +3 -0
- nadeshiko/api/auth/internal/__init__.py +11 -0
- nadeshiko/api/auth/internal/get_discord_auth_url.py +176 -0
- nadeshiko/api/auth/internal/login.py +213 -0
- nadeshiko/api/auth/internal/login_discord.py +204 -0
- nadeshiko/api/auth/internal/login_google.py +204 -0
- nadeshiko/api/auth/internal/register.py +212 -0
- nadeshiko/api/auth_jwt/__init__.py +3 -0
- nadeshiko/api/auth_jwt/internal/__init__.py +7 -0
- nadeshiko/api/auth_jwt/internal/logout.py +151 -0
- nadeshiko/api/lists/__init__.py +8 -0
- nadeshiko/api/lists/internal/__init__.py +12 -0
- nadeshiko/api/lists/internal/list_add_item.py +215 -0
- nadeshiko/api/lists/internal/list_create.py +194 -0
- nadeshiko/api/lists/internal/list_destroy.py +193 -0
- nadeshiko/api/lists/internal/list_remove_item.py +207 -0
- nadeshiko/api/lists/internal/list_update.py +215 -0
- nadeshiko/api/lists/internal/list_update_item.py +229 -0
- nadeshiko/api/lists/list_index.py +257 -0
- nadeshiko/api/lists/list_show.py +193 -0
- nadeshiko/api/media/__init__.py +14 -0
- nadeshiko/api/media/character_show.py +193 -0
- nadeshiko/api/media/episode_index.py +229 -0
- nadeshiko/api/media/episode_show.py +207 -0
- nadeshiko/api/media/internal/__init__.py +16 -0
- nadeshiko/api/media/internal/episode_create.py +215 -0
- nadeshiko/api/media/internal/episode_destroy.py +205 -0
- nadeshiko/api/media/internal/episode_update.py +229 -0
- nadeshiko/api/media/internal/media_create.py +194 -0
- nadeshiko/api/media/internal/media_destroy.py +197 -0
- nadeshiko/api/media/internal/media_update.py +219 -0
- nadeshiko/api/media/internal/segment_create.py +229 -0
- nadeshiko/api/media/internal/segment_destroy.py +219 -0
- nadeshiko/api/media/internal/segment_index.py +243 -0
- nadeshiko/api/media/internal/segment_update.py +243 -0
- nadeshiko/api/media/media_index.py +232 -0
- nadeshiko/api/media/media_show.py +193 -0
- nadeshiko/api/media/segment_show.py +221 -0
- nadeshiko/api/media/segment_show_by_uuid.py +193 -0
- nadeshiko/api/media/seiyuu_show.py +193 -0
- nadeshiko/api/search/__init__.py +11 -0
- nadeshiko/api/search/fetch_media_info.py +278 -0
- nadeshiko/api/search/fetch_sentence_context.py +219 -0
- nadeshiko/api/search/internal/__init__.py +6 -0
- nadeshiko/api/search/search.py +295 -0
- nadeshiko/api/search/search_health_check.py +168 -0
- nadeshiko/api/search/search_multiple.py +238 -0
- nadeshiko/api/user/__init__.py +3 -0
- nadeshiko/api/user/internal/__init__.py +11 -0
- nadeshiko/api/user/internal/create_api_key.py +199 -0
- nadeshiko/api/user/internal/deactivate_api_key.py +194 -0
- nadeshiko/api/user/internal/get_api_keys.py +151 -0
- nadeshiko/api/user/internal/get_identity_me.py +156 -0
- nadeshiko/api/user/internal/get_user_info.py +156 -0
- nadeshiko/client.py +138 -0
- nadeshiko/errors.py +16 -0
- nadeshiko/models/__init__.py +215 -0
- nadeshiko/models/api_key.py +118 -0
- nadeshiko/models/api_key_permission.py +70 -0
- nadeshiko/models/auth_user.py +107 -0
- nadeshiko/models/basic_info.py +132 -0
- nadeshiko/models/category_statistic.py +71 -0
- nadeshiko/models/character.py +100 -0
- nadeshiko/models/character_input.py +130 -0
- nadeshiko/models/character_input_character_role.py +10 -0
- nadeshiko/models/character_with_media.py +124 -0
- nadeshiko/models/character_with_media_media_appearances_item.py +93 -0
- nadeshiko/models/character_with_media_media_appearances_item_role.py +10 -0
- nadeshiko/models/create_api_key_request.py +75 -0
- nadeshiko/models/create_api_key_response.py +70 -0
- nadeshiko/models/deactivate_api_key_request.py +62 -0
- nadeshiko/models/deactivate_api_key_response.py +62 -0
- nadeshiko/models/discord_auth_url_response.py +62 -0
- nadeshiko/models/discord_login_request.py +62 -0
- nadeshiko/models/episode.py +253 -0
- nadeshiko/models/episode_create_request.py +145 -0
- nadeshiko/models/episode_list_response.py +94 -0
- nadeshiko/models/episode_update_request.py +135 -0
- nadeshiko/models/error.py +128 -0
- nadeshiko/models/error_errors.py +46 -0
- nadeshiko/models/fetch_media_info_response.py +115 -0
- nadeshiko/models/fetch_media_info_type.py +10 -0
- nadeshiko/models/fetch_sentence_context_request.py +96 -0
- nadeshiko/models/fetch_sentence_context_response.py +75 -0
- nadeshiko/models/get_api_keys_response.py +86 -0
- nadeshiko/models/google_login_request.py +62 -0
- nadeshiko/models/list_.py +97 -0
- nadeshiko/models/list_add_item_body.py +69 -0
- nadeshiko/models/list_add_item_response_201.py +61 -0
- nadeshiko/models/list_create_request.py +107 -0
- nadeshiko/models/list_create_request_type.py +9 -0
- nadeshiko/models/list_create_request_visibility.py +9 -0
- nadeshiko/models/list_destroy_response_200.py +70 -0
- nadeshiko/models/list_index_type.py +9 -0
- nadeshiko/models/list_index_visibility.py +9 -0
- nadeshiko/models/list_input.py +138 -0
- nadeshiko/models/list_input_list_type.py +9 -0
- nadeshiko/models/list_input_list_visibility.py +9 -0
- nadeshiko/models/list_remove_item_response_200.py +61 -0
- nadeshiko/models/list_type.py +9 -0
- nadeshiko/models/list_update_body.py +78 -0
- nadeshiko/models/list_update_body_visibility.py +9 -0
- nadeshiko/models/list_update_item_body.py +61 -0
- nadeshiko/models/list_update_item_response_200.py +61 -0
- nadeshiko/models/list_visibility.py +9 -0
- nadeshiko/models/list_with_media.py +119 -0
- nadeshiko/models/list_with_media_media_item.py +83 -0
- nadeshiko/models/list_with_media_type.py +9 -0
- nadeshiko/models/list_with_media_visibility.py +9 -0
- nadeshiko/models/login_request.py +70 -0
- nadeshiko/models/login_response.py +84 -0
- nadeshiko/models/logout_response.py +73 -0
- nadeshiko/models/media.py +288 -0
- nadeshiko/models/media_category.py +11 -0
- nadeshiko/models/media_character.py +78 -0
- nadeshiko/models/media_character_role.py +10 -0
- nadeshiko/models/media_create_request.py +270 -0
- nadeshiko/models/media_create_request_category.py +11 -0
- nadeshiko/models/media_destroy_response_200.py +70 -0
- nadeshiko/models/media_index_category.py +9 -0
- nadeshiko/models/media_info_data.py +307 -0
- nadeshiko/models/media_info_path.py +83 -0
- nadeshiko/models/media_info_stats.py +89 -0
- nadeshiko/models/media_list_response.py +94 -0
- nadeshiko/models/media_update_request.py +297 -0
- nadeshiko/models/media_update_request_category.py +9 -0
- nadeshiko/models/quota_info.py +87 -0
- nadeshiko/models/quota_info_quota_limit_type_1.py +8 -0
- nadeshiko/models/register_request.py +78 -0
- nadeshiko/models/register_response.py +76 -0
- nadeshiko/models/register_response_user.py +46 -0
- nadeshiko/models/search_health_check_response.py +138 -0
- nadeshiko/models/search_multiple_request.py +72 -0
- nadeshiko/models/search_multiple_response.py +79 -0
- nadeshiko/models/search_request.py +253 -0
- nadeshiko/models/search_request_content_sort.py +13 -0
- nadeshiko/models/search_request_media_item.py +85 -0
- nadeshiko/models/search_request_media_item_seasons_item.py +69 -0
- nadeshiko/models/search_response.py +158 -0
- nadeshiko/models/segment.py +303 -0
- nadeshiko/models/segment_create_request.py +203 -0
- nadeshiko/models/segment_create_request_status.py +13 -0
- nadeshiko/models/segment_info.py +207 -0
- nadeshiko/models/segment_list_response.py +94 -0
- nadeshiko/models/segment_status.py +13 -0
- nadeshiko/models/segment_update_request.py +198 -0
- nadeshiko/models/segment_update_request_status.py +13 -0
- nadeshiko/models/seiyuu.py +86 -0
- nadeshiko/models/seiyuu_with_roles.py +108 -0
- nadeshiko/models/seiyuu_with_roles_roles_item.py +109 -0
- nadeshiko/models/seiyuu_with_roles_roles_item_role.py +10 -0
- nadeshiko/models/sentence.py +88 -0
- nadeshiko/models/statistic.py +132 -0
- nadeshiko/models/statistic_season_with_episode_hits.py +74 -0
- nadeshiko/models/statistic_season_with_episode_hits_additional_property.py +46 -0
- nadeshiko/models/user_info_response.py +79 -0
- nadeshiko/models/user_info_response_user.py +91 -0
- nadeshiko/models/user_role.py +71 -0
- nadeshiko/models/word_match.py +107 -0
- nadeshiko/models/word_match_media.py +98 -0
- nadeshiko/types.py +54 -0
- nadeshiko_sdk-0.1.0.dist-info/METADATA +147 -0
- nadeshiko_sdk-0.1.0.dist-info/RECORD +167 -0
- nadeshiko_sdk-0.1.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from typing import Any, TypeVar, cast
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
|
|
9
|
+
from ..models.segment_status import SegmentStatus
|
|
10
|
+
from ..types import UNSET, Unset
|
|
11
|
+
|
|
12
|
+
T = TypeVar("T", bound="Segment")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@_attrs_define
|
|
16
|
+
class Segment:
|
|
17
|
+
"""
|
|
18
|
+
Attributes:
|
|
19
|
+
id (int): Auto-generated segment ID Example: 12345.
|
|
20
|
+
uuid (str): Unique identifier for the segment Example: 3fd94cef-a3e1-31ae-bc8d-e743f03e9c7e.
|
|
21
|
+
position (int): Position of the segment within the episode Example: 1133.
|
|
22
|
+
status (SegmentStatus): Segment status (0=Deleted, 1=Active, 2=Suspended, 3=Verified, 100=Invalid Sentence,
|
|
23
|
+
101=Sentence Too Long) Example: 1.
|
|
24
|
+
start_time (str): Timestamp in H:MM:SS.ffffff format indicating when the segment starts Example: 0:33:27.255000.
|
|
25
|
+
end_time (str): Timestamp in H:MM:SS.ffffff format indicating when the segment ends Example: 0:33:28.464000.
|
|
26
|
+
content (str): Original Japanese content of the segment Example: 僕は僕で、君は君だ。.
|
|
27
|
+
content_length (int): Length of the content Example: 10.
|
|
28
|
+
content_spanish_mt (bool): Whether the Spanish translation was machine-translated
|
|
29
|
+
content_english_mt (bool): Whether the English translation was machine-translated
|
|
30
|
+
is_nsfw (bool): Whether the segment contains NSFW content
|
|
31
|
+
episode (int): Episode number this segment belongs to Example: 1.
|
|
32
|
+
media_id (int): Media ID this segment belongs to Example: 7674.
|
|
33
|
+
content_spanish (None | str | Unset): Spanish translation of the segment content Example: Yo soy yo, y tú eres
|
|
34
|
+
tú..
|
|
35
|
+
content_english (None | str | Unset): English translation of the segment content Example: I am me, and you are
|
|
36
|
+
you..
|
|
37
|
+
image_url (None | str | Unset): URL to segment screenshot/image Example: https://example.com/images/segment.jpg.
|
|
38
|
+
audio_url (None | str | Unset): URL to segment audio file Example: https://example.com/audio/segment.mp3.
|
|
39
|
+
actor_ja (None | str | Unset): Japanese voice actor name Example: Mamoru Miyano.
|
|
40
|
+
actor_es (None | str | Unset): Spanish voice actor name Example: Alejandro Levis.
|
|
41
|
+
actor_en (None | str | Unset): English voice actor name Example: J. Michael Tatum.
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
id: int
|
|
45
|
+
uuid: str
|
|
46
|
+
position: int
|
|
47
|
+
status: SegmentStatus
|
|
48
|
+
start_time: str
|
|
49
|
+
end_time: str
|
|
50
|
+
content: str
|
|
51
|
+
content_length: int
|
|
52
|
+
content_spanish_mt: bool
|
|
53
|
+
content_english_mt: bool
|
|
54
|
+
is_nsfw: bool
|
|
55
|
+
episode: int
|
|
56
|
+
media_id: int
|
|
57
|
+
content_spanish: None | str | Unset = UNSET
|
|
58
|
+
content_english: None | str | Unset = UNSET
|
|
59
|
+
image_url: None | str | Unset = UNSET
|
|
60
|
+
audio_url: None | str | Unset = UNSET
|
|
61
|
+
actor_ja: None | str | Unset = UNSET
|
|
62
|
+
actor_es: None | str | Unset = UNSET
|
|
63
|
+
actor_en: None | str | Unset = UNSET
|
|
64
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
65
|
+
|
|
66
|
+
def to_dict(self) -> dict[str, Any]:
|
|
67
|
+
id = self.id
|
|
68
|
+
|
|
69
|
+
uuid = self.uuid
|
|
70
|
+
|
|
71
|
+
position = self.position
|
|
72
|
+
|
|
73
|
+
status = self.status.value
|
|
74
|
+
|
|
75
|
+
start_time = self.start_time
|
|
76
|
+
|
|
77
|
+
end_time = self.end_time
|
|
78
|
+
|
|
79
|
+
content = self.content
|
|
80
|
+
|
|
81
|
+
content_length = self.content_length
|
|
82
|
+
|
|
83
|
+
content_spanish_mt = self.content_spanish_mt
|
|
84
|
+
|
|
85
|
+
content_english_mt = self.content_english_mt
|
|
86
|
+
|
|
87
|
+
is_nsfw = self.is_nsfw
|
|
88
|
+
|
|
89
|
+
episode = self.episode
|
|
90
|
+
|
|
91
|
+
media_id = self.media_id
|
|
92
|
+
|
|
93
|
+
content_spanish: None | str | Unset
|
|
94
|
+
if isinstance(self.content_spanish, Unset):
|
|
95
|
+
content_spanish = UNSET
|
|
96
|
+
else:
|
|
97
|
+
content_spanish = self.content_spanish
|
|
98
|
+
|
|
99
|
+
content_english: None | str | Unset
|
|
100
|
+
if isinstance(self.content_english, Unset):
|
|
101
|
+
content_english = UNSET
|
|
102
|
+
else:
|
|
103
|
+
content_english = self.content_english
|
|
104
|
+
|
|
105
|
+
image_url: None | str | Unset
|
|
106
|
+
if isinstance(self.image_url, Unset):
|
|
107
|
+
image_url = UNSET
|
|
108
|
+
else:
|
|
109
|
+
image_url = self.image_url
|
|
110
|
+
|
|
111
|
+
audio_url: None | str | Unset
|
|
112
|
+
if isinstance(self.audio_url, Unset):
|
|
113
|
+
audio_url = UNSET
|
|
114
|
+
else:
|
|
115
|
+
audio_url = self.audio_url
|
|
116
|
+
|
|
117
|
+
actor_ja: None | str | Unset
|
|
118
|
+
if isinstance(self.actor_ja, Unset):
|
|
119
|
+
actor_ja = UNSET
|
|
120
|
+
else:
|
|
121
|
+
actor_ja = self.actor_ja
|
|
122
|
+
|
|
123
|
+
actor_es: None | str | Unset
|
|
124
|
+
if isinstance(self.actor_es, Unset):
|
|
125
|
+
actor_es = UNSET
|
|
126
|
+
else:
|
|
127
|
+
actor_es = self.actor_es
|
|
128
|
+
|
|
129
|
+
actor_en: None | str | Unset
|
|
130
|
+
if isinstance(self.actor_en, Unset):
|
|
131
|
+
actor_en = UNSET
|
|
132
|
+
else:
|
|
133
|
+
actor_en = self.actor_en
|
|
134
|
+
|
|
135
|
+
field_dict: dict[str, Any] = {}
|
|
136
|
+
field_dict.update(self.additional_properties)
|
|
137
|
+
field_dict.update(
|
|
138
|
+
{
|
|
139
|
+
"id": id,
|
|
140
|
+
"uuid": uuid,
|
|
141
|
+
"position": position,
|
|
142
|
+
"status": status,
|
|
143
|
+
"startTime": start_time,
|
|
144
|
+
"endTime": end_time,
|
|
145
|
+
"content": content,
|
|
146
|
+
"contentLength": content_length,
|
|
147
|
+
"contentSpanishMt": content_spanish_mt,
|
|
148
|
+
"contentEnglishMt": content_english_mt,
|
|
149
|
+
"isNsfw": is_nsfw,
|
|
150
|
+
"episode": episode,
|
|
151
|
+
"mediaId": media_id,
|
|
152
|
+
}
|
|
153
|
+
)
|
|
154
|
+
if content_spanish is not UNSET:
|
|
155
|
+
field_dict["contentSpanish"] = content_spanish
|
|
156
|
+
if content_english is not UNSET:
|
|
157
|
+
field_dict["contentEnglish"] = content_english
|
|
158
|
+
if image_url is not UNSET:
|
|
159
|
+
field_dict["imageUrl"] = image_url
|
|
160
|
+
if audio_url is not UNSET:
|
|
161
|
+
field_dict["audioUrl"] = audio_url
|
|
162
|
+
if actor_ja is not UNSET:
|
|
163
|
+
field_dict["actorJa"] = actor_ja
|
|
164
|
+
if actor_es is not UNSET:
|
|
165
|
+
field_dict["actorEs"] = actor_es
|
|
166
|
+
if actor_en is not UNSET:
|
|
167
|
+
field_dict["actorEn"] = actor_en
|
|
168
|
+
|
|
169
|
+
return field_dict
|
|
170
|
+
|
|
171
|
+
@classmethod
|
|
172
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
173
|
+
d = dict(src_dict)
|
|
174
|
+
id = d.pop("id")
|
|
175
|
+
|
|
176
|
+
uuid = d.pop("uuid")
|
|
177
|
+
|
|
178
|
+
position = d.pop("position")
|
|
179
|
+
|
|
180
|
+
status = SegmentStatus(d.pop("status"))
|
|
181
|
+
|
|
182
|
+
start_time = d.pop("startTime")
|
|
183
|
+
|
|
184
|
+
end_time = d.pop("endTime")
|
|
185
|
+
|
|
186
|
+
content = d.pop("content")
|
|
187
|
+
|
|
188
|
+
content_length = d.pop("contentLength")
|
|
189
|
+
|
|
190
|
+
content_spanish_mt = d.pop("contentSpanishMt")
|
|
191
|
+
|
|
192
|
+
content_english_mt = d.pop("contentEnglishMt")
|
|
193
|
+
|
|
194
|
+
is_nsfw = d.pop("isNsfw")
|
|
195
|
+
|
|
196
|
+
episode = d.pop("episode")
|
|
197
|
+
|
|
198
|
+
media_id = d.pop("mediaId")
|
|
199
|
+
|
|
200
|
+
def _parse_content_spanish(data: object) -> None | str | Unset:
|
|
201
|
+
if data is None:
|
|
202
|
+
return data
|
|
203
|
+
if isinstance(data, Unset):
|
|
204
|
+
return data
|
|
205
|
+
return cast(None | str | Unset, data)
|
|
206
|
+
|
|
207
|
+
content_spanish = _parse_content_spanish(d.pop("contentSpanish", UNSET))
|
|
208
|
+
|
|
209
|
+
def _parse_content_english(data: object) -> None | str | Unset:
|
|
210
|
+
if data is None:
|
|
211
|
+
return data
|
|
212
|
+
if isinstance(data, Unset):
|
|
213
|
+
return data
|
|
214
|
+
return cast(None | str | Unset, data)
|
|
215
|
+
|
|
216
|
+
content_english = _parse_content_english(d.pop("contentEnglish", UNSET))
|
|
217
|
+
|
|
218
|
+
def _parse_image_url(data: object) -> None | str | Unset:
|
|
219
|
+
if data is None:
|
|
220
|
+
return data
|
|
221
|
+
if isinstance(data, Unset):
|
|
222
|
+
return data
|
|
223
|
+
return cast(None | str | Unset, data)
|
|
224
|
+
|
|
225
|
+
image_url = _parse_image_url(d.pop("imageUrl", UNSET))
|
|
226
|
+
|
|
227
|
+
def _parse_audio_url(data: object) -> None | str | Unset:
|
|
228
|
+
if data is None:
|
|
229
|
+
return data
|
|
230
|
+
if isinstance(data, Unset):
|
|
231
|
+
return data
|
|
232
|
+
return cast(None | str | Unset, data)
|
|
233
|
+
|
|
234
|
+
audio_url = _parse_audio_url(d.pop("audioUrl", UNSET))
|
|
235
|
+
|
|
236
|
+
def _parse_actor_ja(data: object) -> None | str | Unset:
|
|
237
|
+
if data is None:
|
|
238
|
+
return data
|
|
239
|
+
if isinstance(data, Unset):
|
|
240
|
+
return data
|
|
241
|
+
return cast(None | str | Unset, data)
|
|
242
|
+
|
|
243
|
+
actor_ja = _parse_actor_ja(d.pop("actorJa", UNSET))
|
|
244
|
+
|
|
245
|
+
def _parse_actor_es(data: object) -> None | str | Unset:
|
|
246
|
+
if data is None:
|
|
247
|
+
return data
|
|
248
|
+
if isinstance(data, Unset):
|
|
249
|
+
return data
|
|
250
|
+
return cast(None | str | Unset, data)
|
|
251
|
+
|
|
252
|
+
actor_es = _parse_actor_es(d.pop("actorEs", UNSET))
|
|
253
|
+
|
|
254
|
+
def _parse_actor_en(data: object) -> None | str | Unset:
|
|
255
|
+
if data is None:
|
|
256
|
+
return data
|
|
257
|
+
if isinstance(data, Unset):
|
|
258
|
+
return data
|
|
259
|
+
return cast(None | str | Unset, data)
|
|
260
|
+
|
|
261
|
+
actor_en = _parse_actor_en(d.pop("actorEn", UNSET))
|
|
262
|
+
|
|
263
|
+
segment = cls(
|
|
264
|
+
id=id,
|
|
265
|
+
uuid=uuid,
|
|
266
|
+
position=position,
|
|
267
|
+
status=status,
|
|
268
|
+
start_time=start_time,
|
|
269
|
+
end_time=end_time,
|
|
270
|
+
content=content,
|
|
271
|
+
content_length=content_length,
|
|
272
|
+
content_spanish_mt=content_spanish_mt,
|
|
273
|
+
content_english_mt=content_english_mt,
|
|
274
|
+
is_nsfw=is_nsfw,
|
|
275
|
+
episode=episode,
|
|
276
|
+
media_id=media_id,
|
|
277
|
+
content_spanish=content_spanish,
|
|
278
|
+
content_english=content_english,
|
|
279
|
+
image_url=image_url,
|
|
280
|
+
audio_url=audio_url,
|
|
281
|
+
actor_ja=actor_ja,
|
|
282
|
+
actor_es=actor_es,
|
|
283
|
+
actor_en=actor_en,
|
|
284
|
+
)
|
|
285
|
+
|
|
286
|
+
segment.additional_properties = d
|
|
287
|
+
return segment
|
|
288
|
+
|
|
289
|
+
@property
|
|
290
|
+
def additional_keys(self) -> list[str]:
|
|
291
|
+
return list(self.additional_properties.keys())
|
|
292
|
+
|
|
293
|
+
def __getitem__(self, key: str) -> Any:
|
|
294
|
+
return self.additional_properties[key]
|
|
295
|
+
|
|
296
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
297
|
+
self.additional_properties[key] = value
|
|
298
|
+
|
|
299
|
+
def __delitem__(self, key: str) -> None:
|
|
300
|
+
del self.additional_properties[key]
|
|
301
|
+
|
|
302
|
+
def __contains__(self, key: str) -> bool:
|
|
303
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,203 @@
|
|
|
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 ..models.segment_create_request_status import SegmentCreateRequestStatus
|
|
10
|
+
from ..types import UNSET, Unset
|
|
11
|
+
|
|
12
|
+
T = TypeVar("T", bound="SegmentCreateRequest")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@_attrs_define
|
|
16
|
+
class SegmentCreateRequest:
|
|
17
|
+
"""
|
|
18
|
+
Attributes:
|
|
19
|
+
uuid (str): Unique identifier for the segment Example: 3fd94cef-a3e1-31ae-bc8d-e743f03e9c7e.
|
|
20
|
+
position (int): Position of the segment within the episode Example: 1133.
|
|
21
|
+
start_time (str): Timestamp in H:MM:SS.ffffff format indicating when the segment starts Example: 0:33:27.255000.
|
|
22
|
+
end_time (str): Timestamp in H:MM:SS.ffffff format indicating when the segment ends Example: 0:33:28.464000.
|
|
23
|
+
content (str): Original Japanese content of the segment Example: 僕は僕で、君は君だ。.
|
|
24
|
+
status (SegmentCreateRequestStatus | Unset): Segment status (default is 1=Active) Default:
|
|
25
|
+
SegmentCreateRequestStatus.VALUE_1. Example: 1.
|
|
26
|
+
content_spanish (str | Unset): Spanish translation of the segment content Example: Yo soy yo, y tú eres tú..
|
|
27
|
+
content_spanish_mt (bool | Unset): Whether the Spanish translation was machine-translated Default: False.
|
|
28
|
+
content_english (str | Unset): English translation of the segment content Example: I am me, and you are you..
|
|
29
|
+
content_english_mt (bool | Unset): Whether the English translation was machine-translated Default: False.
|
|
30
|
+
is_nsfw (bool | Unset): Whether the segment contains NSFW content Default: False.
|
|
31
|
+
image_url (str | Unset): URL to segment screenshot/image Example: https://example.com/images/segment.jpg.
|
|
32
|
+
audio_url (str | Unset): URL to segment audio file Example: https://example.com/audio/segment.mp3.
|
|
33
|
+
actor_ja (str | Unset): Japanese voice actor name Example: Mamoru Miyano.
|
|
34
|
+
actor_es (str | Unset): Spanish voice actor name Example: Alejandro Levis.
|
|
35
|
+
actor_en (str | Unset): English voice actor name Example: J. Michael Tatum.
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
uuid: str
|
|
39
|
+
position: int
|
|
40
|
+
start_time: str
|
|
41
|
+
end_time: str
|
|
42
|
+
content: str
|
|
43
|
+
status: SegmentCreateRequestStatus | Unset = SegmentCreateRequestStatus.VALUE_1
|
|
44
|
+
content_spanish: str | Unset = UNSET
|
|
45
|
+
content_spanish_mt: bool | Unset = False
|
|
46
|
+
content_english: str | Unset = UNSET
|
|
47
|
+
content_english_mt: bool | Unset = False
|
|
48
|
+
is_nsfw: bool | Unset = False
|
|
49
|
+
image_url: str | Unset = UNSET
|
|
50
|
+
audio_url: str | Unset = UNSET
|
|
51
|
+
actor_ja: str | Unset = UNSET
|
|
52
|
+
actor_es: str | Unset = UNSET
|
|
53
|
+
actor_en: str | Unset = UNSET
|
|
54
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> dict[str, Any]:
|
|
57
|
+
uuid = self.uuid
|
|
58
|
+
|
|
59
|
+
position = self.position
|
|
60
|
+
|
|
61
|
+
start_time = self.start_time
|
|
62
|
+
|
|
63
|
+
end_time = self.end_time
|
|
64
|
+
|
|
65
|
+
content = self.content
|
|
66
|
+
|
|
67
|
+
status: int | Unset = UNSET
|
|
68
|
+
if not isinstance(self.status, Unset):
|
|
69
|
+
status = self.status.value
|
|
70
|
+
|
|
71
|
+
content_spanish = self.content_spanish
|
|
72
|
+
|
|
73
|
+
content_spanish_mt = self.content_spanish_mt
|
|
74
|
+
|
|
75
|
+
content_english = self.content_english
|
|
76
|
+
|
|
77
|
+
content_english_mt = self.content_english_mt
|
|
78
|
+
|
|
79
|
+
is_nsfw = self.is_nsfw
|
|
80
|
+
|
|
81
|
+
image_url = self.image_url
|
|
82
|
+
|
|
83
|
+
audio_url = self.audio_url
|
|
84
|
+
|
|
85
|
+
actor_ja = self.actor_ja
|
|
86
|
+
|
|
87
|
+
actor_es = self.actor_es
|
|
88
|
+
|
|
89
|
+
actor_en = self.actor_en
|
|
90
|
+
|
|
91
|
+
field_dict: dict[str, Any] = {}
|
|
92
|
+
field_dict.update(self.additional_properties)
|
|
93
|
+
field_dict.update(
|
|
94
|
+
{
|
|
95
|
+
"uuid": uuid,
|
|
96
|
+
"position": position,
|
|
97
|
+
"startTime": start_time,
|
|
98
|
+
"endTime": end_time,
|
|
99
|
+
"content": content,
|
|
100
|
+
}
|
|
101
|
+
)
|
|
102
|
+
if status is not UNSET:
|
|
103
|
+
field_dict["status"] = status
|
|
104
|
+
if content_spanish is not UNSET:
|
|
105
|
+
field_dict["contentSpanish"] = content_spanish
|
|
106
|
+
if content_spanish_mt is not UNSET:
|
|
107
|
+
field_dict["contentSpanishMt"] = content_spanish_mt
|
|
108
|
+
if content_english is not UNSET:
|
|
109
|
+
field_dict["contentEnglish"] = content_english
|
|
110
|
+
if content_english_mt is not UNSET:
|
|
111
|
+
field_dict["contentEnglishMt"] = content_english_mt
|
|
112
|
+
if is_nsfw is not UNSET:
|
|
113
|
+
field_dict["isNsfw"] = is_nsfw
|
|
114
|
+
if image_url is not UNSET:
|
|
115
|
+
field_dict["imageUrl"] = image_url
|
|
116
|
+
if audio_url is not UNSET:
|
|
117
|
+
field_dict["audioUrl"] = audio_url
|
|
118
|
+
if actor_ja is not UNSET:
|
|
119
|
+
field_dict["actorJa"] = actor_ja
|
|
120
|
+
if actor_es is not UNSET:
|
|
121
|
+
field_dict["actorEs"] = actor_es
|
|
122
|
+
if actor_en is not UNSET:
|
|
123
|
+
field_dict["actorEn"] = actor_en
|
|
124
|
+
|
|
125
|
+
return field_dict
|
|
126
|
+
|
|
127
|
+
@classmethod
|
|
128
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
129
|
+
d = dict(src_dict)
|
|
130
|
+
uuid = d.pop("uuid")
|
|
131
|
+
|
|
132
|
+
position = d.pop("position")
|
|
133
|
+
|
|
134
|
+
start_time = d.pop("startTime")
|
|
135
|
+
|
|
136
|
+
end_time = d.pop("endTime")
|
|
137
|
+
|
|
138
|
+
content = d.pop("content")
|
|
139
|
+
|
|
140
|
+
_status = d.pop("status", UNSET)
|
|
141
|
+
status: SegmentCreateRequestStatus | Unset
|
|
142
|
+
if isinstance(_status, Unset):
|
|
143
|
+
status = UNSET
|
|
144
|
+
else:
|
|
145
|
+
status = SegmentCreateRequestStatus(_status)
|
|
146
|
+
|
|
147
|
+
content_spanish = d.pop("contentSpanish", UNSET)
|
|
148
|
+
|
|
149
|
+
content_spanish_mt = d.pop("contentSpanishMt", UNSET)
|
|
150
|
+
|
|
151
|
+
content_english = d.pop("contentEnglish", UNSET)
|
|
152
|
+
|
|
153
|
+
content_english_mt = d.pop("contentEnglishMt", UNSET)
|
|
154
|
+
|
|
155
|
+
is_nsfw = d.pop("isNsfw", UNSET)
|
|
156
|
+
|
|
157
|
+
image_url = d.pop("imageUrl", UNSET)
|
|
158
|
+
|
|
159
|
+
audio_url = d.pop("audioUrl", UNSET)
|
|
160
|
+
|
|
161
|
+
actor_ja = d.pop("actorJa", UNSET)
|
|
162
|
+
|
|
163
|
+
actor_es = d.pop("actorEs", UNSET)
|
|
164
|
+
|
|
165
|
+
actor_en = d.pop("actorEn", UNSET)
|
|
166
|
+
|
|
167
|
+
segment_create_request = cls(
|
|
168
|
+
uuid=uuid,
|
|
169
|
+
position=position,
|
|
170
|
+
start_time=start_time,
|
|
171
|
+
end_time=end_time,
|
|
172
|
+
content=content,
|
|
173
|
+
status=status,
|
|
174
|
+
content_spanish=content_spanish,
|
|
175
|
+
content_spanish_mt=content_spanish_mt,
|
|
176
|
+
content_english=content_english,
|
|
177
|
+
content_english_mt=content_english_mt,
|
|
178
|
+
is_nsfw=is_nsfw,
|
|
179
|
+
image_url=image_url,
|
|
180
|
+
audio_url=audio_url,
|
|
181
|
+
actor_ja=actor_ja,
|
|
182
|
+
actor_es=actor_es,
|
|
183
|
+
actor_en=actor_en,
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
segment_create_request.additional_properties = d
|
|
187
|
+
return segment_create_request
|
|
188
|
+
|
|
189
|
+
@property
|
|
190
|
+
def additional_keys(self) -> list[str]:
|
|
191
|
+
return list(self.additional_properties.keys())
|
|
192
|
+
|
|
193
|
+
def __getitem__(self, key: str) -> Any:
|
|
194
|
+
return self.additional_properties[key]
|
|
195
|
+
|
|
196
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
197
|
+
self.additional_properties[key] = value
|
|
198
|
+
|
|
199
|
+
def __delitem__(self, key: str) -> None:
|
|
200
|
+
del self.additional_properties[key]
|
|
201
|
+
|
|
202
|
+
def __contains__(self, key: str) -> bool:
|
|
203
|
+
return key in self.additional_properties
|