# Code generated by lark_sdk_gen. DO NOT EDIT.

from pylark.lark_request import RawRequestReq, _new_method_option
import attr
import typing
import io


@attr.s
class GetHireOfferSchemaReq(object):
    offer_schema_id: str = attr.ib(
        default="", metadata={"req_type": "path"}
    )  # offer申请表的ID *必需属性, 示例值："1231231231231"


@attr.s
class GetHireOfferSchemaRespObjectOptionName(object):
    zh_cn: str = attr.ib(default="", metadata={"req_type": "json"})  # 中文名
    en_us: str = attr.ib(default="", metadata={"req_type": "json"})  # 英文名


@attr.s
class GetHireOfferSchemaRespObjectOption(object):
    name: GetHireOfferSchemaRespObjectOptionName = attr.ib(
        default=None, metadata={"req_type": "json"}
    )  # 名字
    index: int = attr.ib(default=0, metadata={"req_type": "json"})  # 选项序号
    active_status: int = attr.ib(
        default=0, metadata={"req_type": "json"}
    )  # 选项当前是否启用, 可选值有: `1`：进行中, `2`：已终止


@attr.s
class GetHireOfferSchemaRespObjectName(object):
    zh_cn: str = attr.ib(default="", metadata={"req_type": "json"})  # 中文名
    en_us: str = attr.ib(default="", metadata={"req_type": "json"})  # 英文名


@attr.s
class GetHireOfferSchemaRespObject(object):
    id: str = attr.ib(default="", metadata={"req_type": "json"})  # 字段ID
    name: GetHireOfferSchemaRespObjectName = attr.ib(
        default=None, metadata={"req_type": "json"}
    )  # 字段名称
    type: str = attr.ib(
        default="", metadata={"req_type": "json"}
    )  # 字段类型, text=单行文本, long_text=多行文本, select=单选, multi_select=多选, date_select=日期, number=数字
    is_customized: bool = attr.ib(
        factory=lambda: bool(), metadata={"req_type": "json"}
    )  # 字段是否为自定义
    option_list: typing.List[GetHireOfferSchemaRespObjectOption] = attr.ib(
        factory=lambda: [], metadata={"req_type": "json"}
    )  # 单选/多选可选择字段的选项值


@attr.s
class GetHireOfferSchemaResp(object):
    id: str = attr.ib(default="", metadata={"req_type": "json"})  # offer申请表ID
    scenario: int = attr.ib(
        default=0, metadata={"req_type": "json"}
    )  # offer申请表使用场景, 可选值有: `1`：Offer审批表
    version: int = attr.ib(default=0, metadata={"req_type": "json"})  # 申请表版本
    object_list: typing.List[GetHireOfferSchemaRespObject] = attr.ib(
        factory=lambda: [], metadata={"req_type": "json"}
    )  # 字段对象信息


def _gen_get_hire_offer_schema_req(request, options) -> RawRequestReq:
    return RawRequestReq(
        dataclass=GetHireOfferSchemaResp,
        scope="Hire",
        api="GetHireOfferSchema",
        method="GET",
        url="https://open.feishu.cn/open-apis/hire/v1/offer_schemas/:offer_schema_id",
        body=request,
        method_option=_new_method_option(options),
        need_tenant_access_token=True,
    )
