Skip to content

Commit fefa4c9

Browse files
committed
Define types for adding pronunciation dictionaries and rules
1 parent 45af754 commit fefa4c9

File tree

3 files changed

+70
-0
lines changed

3 files changed

+70
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
from .pronunciation_dictionary_add_from_file_request_workspace_access import (
4+
PronunciationDictionaryAddFromFileRequestWorkspaceAccess,
5+
)
6+
from .pronunciation_dictionary_rule import (
7+
PronunciationDictionaryRule,
8+
PronunciationDictionaryRule_Alias,
9+
PronunciationDictionaryRule_Phoneme,
10+
)
11+
12+
__all__ = [
13+
"PronunciationDictionaryAddFromFileRequestWorkspaceAccess",
14+
"PronunciationDictionaryRule",
15+
"PronunciationDictionaryRule_Alias",
16+
"PronunciationDictionaryRule_Phoneme",
17+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
import typing
4+
5+
PronunciationDictionaryAddFromFileRequestWorkspaceAccess = typing.Union[
6+
typing.Literal["admin", "editor", "viewer"], typing.Any
7+
]
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
from __future__ import annotations
4+
from ...core.unchecked_base_model import UncheckedBaseModel
5+
import typing
6+
from ...core.pydantic_utilities import IS_PYDANTIC_V2
7+
import pydantic
8+
import typing_extensions
9+
from ...core.unchecked_base_model import UnionMetadata
10+
11+
12+
class PronunciationDictionaryRule_Alias(UncheckedBaseModel):
13+
type: typing.Literal["alias"] = "alias"
14+
string_to_replace: str
15+
alias: str
16+
17+
if IS_PYDANTIC_V2:
18+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
19+
else:
20+
21+
class Config:
22+
frozen = True
23+
smart_union = True
24+
extra = pydantic.Extra.allow
25+
26+
27+
class PronunciationDictionaryRule_Phoneme(UncheckedBaseModel):
28+
type: typing.Literal["phoneme"] = "phoneme"
29+
string_to_replace: str
30+
phoneme: str
31+
alphabet: str
32+
33+
if IS_PYDANTIC_V2:
34+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
35+
else:
36+
37+
class Config:
38+
frozen = True
39+
smart_union = True
40+
extra = pydantic.Extra.allow
41+
42+
43+
PronunciationDictionaryRule = typing_extensions.Annotated[
44+
typing.Union[PronunciationDictionaryRule_Alias, PronunciationDictionaryRule_Phoneme],
45+
UnionMetadata(discriminant="type"),
46+
]

0 commit comments

Comments
 (0)