# 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
from .create_employee_request_body import CreateEmployeeRequestBody


class CreateEmployeeRequest(BaseRequest):
    def __init__(self) -> None:
        super().__init__()
        self.employee_id_type: Optional[str] = None
        self.department_id_type: Optional[str] = None
        self.request_body: Optional[CreateEmployeeRequestBody] = None

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


class CreateEmployeeRequestBuilder(object):

    def __init__(self) -> None:
        create_employee_request = CreateEmployeeRequest()
        create_employee_request.http_method = HttpMethod.POST
        create_employee_request.uri = "/open-apis/directory/v1/employees"
        create_employee_request.token_types = {AccessTokenType.USER, AccessTokenType.TENANT}
        self._create_employee_request: CreateEmployeeRequest = create_employee_request

    def employee_id_type(self, employee_id_type: str) -> "CreateEmployeeRequestBuilder":
        self._create_employee_request.employee_id_type = employee_id_type
        self._create_employee_request.add_query("employee_id_type", employee_id_type)
        return self

    def department_id_type(self, department_id_type: str) -> "CreateEmployeeRequestBuilder":
        self._create_employee_request.department_id_type = department_id_type
        self._create_employee_request.add_query("department_id_type", department_id_type)
        return self

    def request_body(self, request_body: CreateEmployeeRequestBody) -> "CreateEmployeeRequestBuilder":
        self._create_employee_request.request_body = request_body
        self._create_employee_request.body = request_body
        return self

    def build(self) -> CreateEmployeeRequest:
        return self._create_employee_request
