# 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 UpdateApplicationAppVisibilityReqAddUsers(object):
    open_id: str = attr.ib(
        default="", metadata={"req_type": "json"}
    )  # 与 user_id 至少给其中之一，user_id 优先于 open_id
    user_id: str = attr.ib(default="", metadata={"req_type": "json"})


@attr.s
class UpdateApplicationAppVisibilityReqDelUsers(object):
    open_id: str = attr.ib(
        default="", metadata={"req_type": "json"}
    )  # 与 user_id 至少给其中之一，user_id 优先于 open_id
    user_id: str = attr.ib(default="", metadata={"req_type": "json"})


@attr.s
class UpdateApplicationAppVisibilityReq(object):
    app_id: str = attr.ib(default="", metadata={"req_type": "json"})  # 目标应用的 ID
    del_users: UpdateApplicationAppVisibilityReqDelUsers = attr.ib(
        default=None, metadata={"req_type": "json"}
    )  # 删除的用户列表，元素个数不超过 500，**先增加后删除**
    add_users: UpdateApplicationAppVisibilityReqAddUsers = attr.ib(
        default=None, metadata={"req_type": "json"}
    )  # 增加的用户列表，元素个数不超过500，**先增加后删除**
    is_visiable_to_all: int = attr.ib(
        default=0, metadata={"req_type": "json"}
    )  # 是否全员可见，0：否；1：是；不填：继续当前状态不改变
    add_departments: str = attr.ib(
        default="", metadata={"req_type": "json"}
    )  # 添加的部门列表，元素个数不超过 500，**先增加后删除**
    del_departments: str = attr.ib(
        default="", metadata={"req_type": "json"}
    )  # 删除的部门列表，元素个数不超过 500，**先增加后删除**


@attr.s
class UpdateApplicationAppVisibilityResp(object):
    pass


def _gen_update_application_app_visibility_req(request, options) -> RawRequestReq:
    return RawRequestReq(
        dataclass=UpdateApplicationAppVisibilityResp,
        scope="Application",
        api="UpdateApplicationAppVisibility",
        method="POST",
        url="https://open.feishu.cn/open-apis/application/v3/app/update_visibility",
        body=request,
        method_option=_new_method_option(options),
        need_tenant_access_token=True,
    )
