# Code generated by Lark OpenAPI.

from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type
from lark_oapi.core.model import BaseRequest
from lark_oapi.core.enum import HttpMethod, AccessTokenType


class ListUserGroupRequest(BaseRequest):
    def __init__(self) -> None:
        super().__init__()
        self.employee_type: Optional[str] = None
        self.dept_type: Optional[str] = None
        self.page_size: Optional[int] = None
        self.page_token: Optional[str] = None
        self.member_clock_type: Optional[int] = None
        self.group_id: Optional[str] = None

    @staticmethod
    def builder() -> "ListUserGroupRequestBuilder":
        return ListUserGroupRequestBuilder()


class ListUserGroupRequestBuilder(object):

    def __init__(self) -> None:
        list_user_group_request = ListUserGroupRequest()
        list_user_group_request.http_method = HttpMethod.GET
        list_user_group_request.uri = "/open-apis/attendance/v1/groups/:group_id/list_user"
        list_user_group_request.token_types = {AccessTokenType.TENANT, AccessTokenType.USER}
        self._list_user_group_request: ListUserGroupRequest = list_user_group_request

    def employee_type(self, employee_type: str) -> "ListUserGroupRequestBuilder":
        self._list_user_group_request.employee_type = employee_type
        self._list_user_group_request.add_query("employee_type", employee_type)
        return self

    def dept_type(self, dept_type: str) -> "ListUserGroupRequestBuilder":
        self._list_user_group_request.dept_type = dept_type
        self._list_user_group_request.add_query("dept_type", dept_type)
        return self

    def page_size(self, page_size: int) -> "ListUserGroupRequestBuilder":
        self._list_user_group_request.page_size = page_size
        self._list_user_group_request.add_query("page_size", page_size)
        return self

    def page_token(self, page_token: str) -> "ListUserGroupRequestBuilder":
        self._list_user_group_request.page_token = page_token
        self._list_user_group_request.add_query("page_token", page_token)
        return self

    def member_clock_type(self, member_clock_type: int) -> "ListUserGroupRequestBuilder":
        self._list_user_group_request.member_clock_type = member_clock_type
        self._list_user_group_request.add_query("member_clock_type", member_clock_type)
        return self

    def group_id(self, group_id: str) -> "ListUserGroupRequestBuilder":
        self._list_user_group_request.group_id = group_id
        self._list_user_group_request.paths["group_id"] = str(group_id)
        return self

    def build(self) -> ListUserGroupRequest:
        return self._list_user_group_request
