# 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 GenerateCaldavConfReq(object):
    device_name: str = attr.ib(
        default="", metadata={"req_type": "json"}
    )  # 需要同步日历的设备名，在日历中展示用来管理密码, 示例值："iPhone", 最大长度：`100` 字符


@attr.s
class GenerateCaldavConfResp(object):
    password: str = attr.ib(default="", metadata={"req_type": "json"})  # caldav密码
    user_name: str = attr.ib(default="", metadata={"req_type": "json"})  # caldav用户名
    server_address: str = attr.ib(default="", metadata={"req_type": "json"})  # 服务器地址
    device_name: str = attr.ib(default="", metadata={"req_type": "json"})  # 设备名


def _gen_generate_caldav_conf_req(request, options) -> RawRequestReq:
    return RawRequestReq(
        dataclass=GenerateCaldavConfResp,
        scope="Calendar",
        api="GenerateCaldavConf",
        method="POST",
        url="https://open.feishu.cn/open-apis/calendar/v4/settings/generate_caldav_conf",
        body=request,
        method_option=_new_method_option(options),
        need_user_access_token=True,
    )
