# 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 Collaborator:
    member_type = attr.ib(type=str, default=None, metadata={"json": "member_type"})
    member_open_id = attr.ib(
        type=str, default=None, metadata={"json": "member_open_id"}
    )
    member_user_id = attr.ib(
        type=str, default=None, metadata={"json": "member_user_id"}
    )
    perm = attr.ib(type=str, default=None, metadata={"json": "perm"})


@to_json_decorator
@attr.s
class Member:
    member_type = attr.ib(type=str, default=None, metadata={"json": "member_type"})
    member_id = attr.ib(type=str, default=None, metadata={"json": "member_id"})
    perm = attr.ib(type=str, default=None, metadata={"json": "perm"})


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


@to_json_decorator
@attr.s
class MemberCreateReqBody:
    token = attr.ib(type=str, default=None, metadata={"json": "token"})
    type = attr.ib(type=str, default=None, metadata={"json": "type"})
    members = attr.ib(type=List[Member], default=None, metadata={"json": "members"})
    notify_lark = attr.ib(type=bool, default=None, metadata={"json": "notify_lark"})


@attr.s
class MemberCreateResult:
    is_all_success = attr.ib(
        type=bool, default=None, metadata={"json": "is_all_success"}
    )
    fail_members = attr.ib(
        type=List[Member], default=None, metadata={"json": "fail_members"}
    )


@to_json_decorator
@attr.s
class MemberDeleteReqBody:
    token = attr.ib(type=str, default=None, metadata={"json": "token"})
    type = attr.ib(type=str, default=None, metadata={"json": "type"})
    member_type = attr.ib(type=str, default=None, metadata={"json": "member_type"})
    member_id = attr.ib(type=str, default=None, metadata={"json": "member_id"})


@attr.s
class MemberDeleteResult:
    is_success = attr.ib(type=bool, default=None, metadata={"json": "is_success"})


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


@attr.s
class MemberListResult:
    members = attr.ib(
        type=List[Collaborator], default=None, metadata={"json": "members"}
    )


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


@attr.s
class MemberPermittedResult:
    is_permitted = attr.ib(type=bool, default=None, metadata={"json": "is_permitted"})


@to_json_decorator
@attr.s
class MemberTransferReqBody:
    token = attr.ib(type=str, default=None, metadata={"json": "token"})
    type = attr.ib(type=str, default=None, metadata={"json": "type"})
    owner = attr.ib(type=Owner, default=None, metadata={"json": "owner"})
    remove_old_owner = attr.ib(
        type=bool, default=None, metadata={"json": "remove_old_owner"}
    )
    cancel_notify = attr.ib(type=bool, default=None, metadata={"json": "cancel_notify"})


@attr.s
class MemberTransferResult:
    is_success = attr.ib(type=bool, default=None, metadata={"json": "is_success"})
    type = attr.ib(type=str, default=None, metadata={"json": "type"})
    token = attr.ib(type=str, default=None, metadata={"json": "token"})
    owner = attr.ib(type=Owner, default=None, metadata={"json": "owner"})


@to_json_decorator
@attr.s
class MemberUpdateReqBody:
    token = attr.ib(type=str, default=None, metadata={"json": "token"})
    type = attr.ib(type=str, default=None, metadata={"json": "type"})
    member_type = attr.ib(type=str, default=None, metadata={"json": "member_type"})
    member_id = attr.ib(type=str, default=None, metadata={"json": "member_id"})
    perm = attr.ib(type=str, default=None, metadata={"json": "perm"})
    notify_lark = attr.ib(type=bool, default=None, metadata={"json": "notify_lark"})


@attr.s
class MemberUpdateResult:
    is_success = attr.ib(type=bool, default=None, metadata={"json": "is_success"})


@to_json_decorator
@attr.s
class PublicUpdateReqBody:
    token = attr.ib(type=str, default=None, metadata={"json": "token"})
    type = attr.ib(type=str, default=None, metadata={"json": "type"})
    copy_print_export_status = attr.ib(
        type=bool, default=None, metadata={"json": "copy_print_export_status"}
    )
    comment = attr.ib(type=bool, default=None, metadata={"json": "comment"})
    tenant_shareable = attr.ib(
        type=bool, default=None, metadata={"json": "tenant_shareable"}
    )
    link_share_entity = attr.ib(
        type=str, default=None, metadata={"json": "link_share_entity"}
    )
    external_access = attr.ib(
        type=bool, default=None, metadata={"json": "external_access"}
    )
    invite_external = attr.ib(
        type=bool, default=None, metadata={"json": "invite_external"}
    )


@attr.s
class PublicUpdateResult:
    is_success = attr.ib(type=bool, default=None, metadata={"json": "is_success"})
