# 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 Child:
    token = attr.ib(type=str, default=None, metadata={"json": "token"})
    name = attr.ib(type=str, default=None, metadata={"json": "name"})
    type = attr.ib(type=str, default=None, metadata={"json": "type"})


@to_json_decorator
@attr.s
class OperatorId:
    open_id = attr.ib(type=str, default=None, metadata={"json": "open_id"})
    union_id = attr.ib(type=str, default=None, metadata={"json": "union_id"})
    user_id = attr.ib(type=str, default=None, metadata={"json": "user_id"})


@to_json_decorator
@attr.s
class FileCopyReqBody:
    type = attr.ib(type=str, default=None, metadata={"json": "type"})
    dst_folder_token = attr.ib(
        type=str, default=None, metadata={"json": "dstFolderToken"}
    )
    dst_name = attr.ib(type=str, default=None, metadata={"json": "dstName"})
    comment_needed = attr.ib(
        type=bool, default=None, metadata={"json": "commentNeeded"}
    )


@attr.s
class FileCopyResult:
    folder_token = attr.ib(type=str, default=None, metadata={"json": "folderToken"})
    revision = attr.ib(type=int, default=None, metadata={"json": "revision"})
    token = attr.ib(type=str, default=None, metadata={"json": "token"})
    type = attr.ib(type=str, default=None, metadata={"json": "type"})
    url = attr.ib(type=str, default=None, metadata={"json": "url"})


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


@attr.s
class FileCreateResult:
    url = attr.ib(type=str, default=None, metadata={"json": "url"})
    revision = attr.ib(type=int, default=None, metadata={"json": "revision"})
    token = attr.ib(type=str, default=None, metadata={"json": "token"})


@attr.s
class FileDocsDeleteResult:
    id = attr.ib(type=str, default=None, metadata={"json": "id"})
    result = attr.ib(type=bool, default=None, metadata={"json": "result"})


@attr.s
class FileSpreadsheetsDeleteResult:
    id = attr.ib(type=str, default=None, metadata={"json": "id"})
    result = attr.ib(type=bool, default=None, metadata={"json": "result"})


@attr.s
class FolderChildrenResult:
    parent_token = attr.ib(type=str, default=None, metadata={"json": "parentToken"})
    children = attr.ib(
        type=Dict[str, Child], default=None, metadata={"json": "children"}
    )


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


@attr.s
class FolderCreateResult:
    url = attr.ib(type=str, default=None, metadata={"json": "url"})
    revision = attr.ib(type=int, default=None, metadata={"json": "revision"})
    token = attr.ib(type=str, default=None, metadata={"json": "token"})


@attr.s
class FolderMetaResult:
    id = attr.ib(type=str, default=None, metadata={"json": "id"})
    name = attr.ib(type=str, default=None, metadata={"json": "name"})
    token = attr.ib(type=str, default=None, metadata={"json": "token"})
    create_uid = attr.ib(type=str, default=None, metadata={"json": "createUid"})
    edit_uid = attr.ib(type=str, default=None, metadata={"json": "editUid"})
    parent_id = attr.ib(type=str, default=None, metadata={"json": "parentId"})
    own_uid = attr.ib(type=str, default=None, metadata={"json": "ownUid"})


@attr.s
class FolderRootMetaResult:
    token = attr.ib(type=str, default=None, metadata={"json": "token"})
    id = attr.ib(type=str, default=None, metadata={"json": "id"})
    user_id = attr.ib(type=str, default=None, metadata={"json": "user_id"})
