# 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 ListWorkforcePlanRequest(BaseRequest):
    def __init__(self) -> None:
        super().__init__()
        self.get_all_plan: Optional[bool] = None
        self.active: Optional[bool] = None

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


class ListWorkforcePlanRequestBuilder(object):

    def __init__(self) -> None:
        list_workforce_plan_request = ListWorkforcePlanRequest()
        list_workforce_plan_request.http_method = HttpMethod.GET
        list_workforce_plan_request.uri = "/open-apis/corehr/v2/workforce_plans"
        list_workforce_plan_request.token_types = {AccessTokenType.TENANT}
        self._list_workforce_plan_request: ListWorkforcePlanRequest = list_workforce_plan_request

    def get_all_plan(self, get_all_plan: bool) -> "ListWorkforcePlanRequestBuilder":
        self._list_workforce_plan_request.get_all_plan = get_all_plan
        self._list_workforce_plan_request.add_query("get_all_plan", get_all_plan)
        return self

    def active(self, active: bool) -> "ListWorkforcePlanRequestBuilder":
        self._list_workforce_plan_request.active = active
        self._list_workforce_plan_request.add_query("active", active)
        return self

    def build(self) -> ListWorkforcePlanRequest:
        return self._list_workforce_plan_request
