# 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 Mailgroup:
    mailgroup_id = attr.ib(type=str, default=None, metadata={"json": "mailgroup_id"})
    email = attr.ib(type=str, default=None, metadata={"json": "email"})
    name = attr.ib(type=str, default=None, metadata={"json": "name"})
    description = attr.ib(type=str, default=None, metadata={"json": "description"})
    direct_members_count = attr.ib(
        type=str, default=None, metadata={"json": "direct_members_count"}
    )
    include_external_member = attr.ib(
        type=bool, default=None, metadata={"json": "include_external_member"}
    )
    include_all_company_member = attr.ib(
        type=bool, default=None, metadata={"json": "include_all_company_member"}
    )
    who_can_send_mail = attr.ib(
        type=str, default=None, metadata={"json": "who_can_send_mail"}
    )


@to_json_decorator
@attr.s
class MailgroupMember:
    member_id = attr.ib(type=str, default=None, metadata={"json": "member_id"})
    email = attr.ib(type=str, default=None, metadata={"json": "email"})
    user_id = attr.ib(type=str, default=None, metadata={"json": "user_id"})
    department_id = attr.ib(type=str, default=None, metadata={"json": "department_id"})
    type = attr.ib(type=str, default=None, metadata={"json": "type"})


@to_json_decorator
@attr.s
class MailgroupPermissionMember:
    permission_member_id = attr.ib(
        type=str, default=None, metadata={"json": "permission_member_id"}
    )
    user_id = attr.ib(type=str, default=None, metadata={"json": "user_id"})
    department_id = attr.ib(type=str, default=None, metadata={"json": "department_id"})
    type = attr.ib(type=str, default=None, metadata={"json": "type"})


@to_json_decorator
@attr.s
class PublicMailbox:
    public_mailbox_id = attr.ib(
        type=str, default=None, metadata={"json": "public_mailbox_id"}
    )
    email = attr.ib(type=str, default=None, metadata={"json": "email"})
    name = attr.ib(type=str, default=None, metadata={"json": "name"})


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


@attr.s
class MailgroupListResult:
    has_more = attr.ib(type=bool, default=None, metadata={"json": "has_more"})
    page_token = attr.ib(type=str, default=None, metadata={"json": "page_token"})
    items = attr.ib(type=List[Mailgroup], default=None, metadata={"json": "items"})


@attr.s
class MailgroupMemberListResult:
    has_more = attr.ib(type=bool, default=None, metadata={"json": "has_more"})
    page_token = attr.ib(type=str, default=None, metadata={"json": "page_token"})
    items = attr.ib(
        type=List[MailgroupMember], default=None, metadata={"json": "items"}
    )


@attr.s
class MailgroupPermissionMemberListResult:
    has_more = attr.ib(type=bool, default=None, metadata={"json": "has_more"})
    page_token = attr.ib(type=str, default=None, metadata={"json": "page_token"})
    items = attr.ib(
        type=List[MailgroupPermissionMember], default=None, metadata={"json": "items"}
    )


@attr.s
class PublicMailboxListResult:
    has_more = attr.ib(type=bool, default=None, metadata={"json": "has_more"})
    page_token = attr.ib(type=str, default=None, metadata={"json": "page_token"})
    items = attr.ib(type=List[PublicMailbox], default=None, metadata={"json": "items"})


@attr.s
class PublicMailboxMemberListResult:
    has_more = attr.ib(type=bool, default=None, metadata={"json": "has_more"})
    page_token = attr.ib(type=str, default=None, metadata={"json": "page_token"})
    items = attr.ib(
        type=List[PublicMailboxMember], default=None, metadata={"json": "items"}
    )
