# Code generated by lark suite oapi sdk gen

from typing import List, Dict, Any
from ....utils.dt import to_json_decorator
import attr


@to_json_decorator
@attr.s
class Term:
    from_ = attr.ib(type=str, default=None, metadata={"json": "from"})
    to = attr.ib(type=str, default=None, metadata={"json": "to"})


@to_json_decorator
@attr.s
class TextTranslateReqBody:
    source_language = attr.ib(
        type=str, default=None, metadata={"json": "source_language"}
    )
    text = attr.ib(type=str, default=None, metadata={"json": "text"})
    target_language = attr.ib(
        type=str, default=None, metadata={"json": "target_language"}
    )
    glossary = attr.ib(type=List[Term], default=None, metadata={"json": "glossary"})


@attr.s
class TextTranslateResult:
    text = attr.ib(type=str, default=None, metadata={"json": "text"})


@to_json_decorator
@attr.s
class TextDetectReqBody:
    text = attr.ib(type=str, default=None, metadata={"json": "text"})


@attr.s
class TextDetectResult:
    language = attr.ib(type=str, default=None, metadata={"json": "language"})
