# 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 ListWebsiteJobPostRequest(BaseRequest):
    def __init__(self) -> None:
        super().__init__()
        self.page_token: Optional[str] = None
        self.page_size: Optional[int] = None
        self.user_id_type: Optional[str] = None
        self.department_id_type: Optional[str] = None
        self.job_level_id_type: Optional[str] = None
        self.update_start_time: Optional[str] = None
        self.update_end_time: Optional[str] = None
        self.create_start_time: Optional[str] = None
        self.create_end_time: Optional[str] = None
        self.website_id: Optional[str] = None

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


class ListWebsiteJobPostRequestBuilder(object):

    def __init__(self) -> None:
        list_website_job_post_request = ListWebsiteJobPostRequest()
        list_website_job_post_request.http_method = HttpMethod.GET
        list_website_job_post_request.uri = "/open-apis/hire/v1/websites/:website_id/job_posts"
        list_website_job_post_request.token_types = {AccessTokenType.TENANT}
        self._list_website_job_post_request: ListWebsiteJobPostRequest = list_website_job_post_request

    def page_token(self, page_token: str) -> "ListWebsiteJobPostRequestBuilder":
        self._list_website_job_post_request.page_token = page_token
        self._list_website_job_post_request.add_query("page_token", page_token)
        return self

    def page_size(self, page_size: int) -> "ListWebsiteJobPostRequestBuilder":
        self._list_website_job_post_request.page_size = page_size
        self._list_website_job_post_request.add_query("page_size", page_size)
        return self

    def user_id_type(self, user_id_type: str) -> "ListWebsiteJobPostRequestBuilder":
        self._list_website_job_post_request.user_id_type = user_id_type
        self._list_website_job_post_request.add_query("user_id_type", user_id_type)
        return self

    def department_id_type(self, department_id_type: str) -> "ListWebsiteJobPostRequestBuilder":
        self._list_website_job_post_request.department_id_type = department_id_type
        self._list_website_job_post_request.add_query("department_id_type", department_id_type)
        return self

    def job_level_id_type(self, job_level_id_type: str) -> "ListWebsiteJobPostRequestBuilder":
        self._list_website_job_post_request.job_level_id_type = job_level_id_type
        self._list_website_job_post_request.add_query("job_level_id_type", job_level_id_type)
        return self

    def update_start_time(self, update_start_time: str) -> "ListWebsiteJobPostRequestBuilder":
        self._list_website_job_post_request.update_start_time = update_start_time
        self._list_website_job_post_request.add_query("update_start_time", update_start_time)
        return self

    def update_end_time(self, update_end_time: str) -> "ListWebsiteJobPostRequestBuilder":
        self._list_website_job_post_request.update_end_time = update_end_time
        self._list_website_job_post_request.add_query("update_end_time", update_end_time)
        return self

    def create_start_time(self, create_start_time: str) -> "ListWebsiteJobPostRequestBuilder":
        self._list_website_job_post_request.create_start_time = create_start_time
        self._list_website_job_post_request.add_query("create_start_time", create_start_time)
        return self

    def create_end_time(self, create_end_time: str) -> "ListWebsiteJobPostRequestBuilder":
        self._list_website_job_post_request.create_end_time = create_end_time
        self._list_website_job_post_request.add_query("create_end_time", create_end_time)
        return self

    def website_id(self, website_id: str) -> "ListWebsiteJobPostRequestBuilder":
        self._list_website_job_post_request.website_id = website_id
        self._list_website_job_post_request.paths["website_id"] = str(website_id)
        return self

    def build(self) -> ListWebsiteJobPostRequest:
        return self._list_website_job_post_request
