# Code generated by Lark OpenAPI.

from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type
from lark_oapi.core.construct import init
from .job_data_cost_center import JobDataCostCenter
from .job_data_id import JobDataId


class EmploymentCostAllocation(object):
    _types = {
        "wk_id": str,
        "effective_time": str,
        "expiration_time": str,
        "job_data_cost_center_id": List[JobDataCostCenter],
        "job_data_id": JobDataId,
        "reason": str,
    }

    def __init__(self, d=None):
        self.wk_id: Optional[str] = None
        self.effective_time: Optional[str] = None
        self.expiration_time: Optional[str] = None
        self.job_data_cost_center_id: Optional[List[JobDataCostCenter]] = None
        self.job_data_id: Optional[JobDataId] = None
        self.reason: Optional[str] = None
        init(self, d, self._types)

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


class EmploymentCostAllocationBuilder(object):
    def __init__(self) -> None:
        self._employment_cost_allocation = EmploymentCostAllocation()

    def wk_id(self, wk_id: str) -> "EmploymentCostAllocationBuilder":
        self._employment_cost_allocation.wk_id = wk_id
        return self

    def effective_time(self, effective_time: str) -> "EmploymentCostAllocationBuilder":
        self._employment_cost_allocation.effective_time = effective_time
        return self

    def expiration_time(self, expiration_time: str) -> "EmploymentCostAllocationBuilder":
        self._employment_cost_allocation.expiration_time = expiration_time
        return self

    def job_data_cost_center_id(self,
                                job_data_cost_center_id: List[JobDataCostCenter]) -> "EmploymentCostAllocationBuilder":
        self._employment_cost_allocation.job_data_cost_center_id = job_data_cost_center_id
        return self

    def job_data_id(self, job_data_id: JobDataId) -> "EmploymentCostAllocationBuilder":
        self._employment_cost_allocation.job_data_id = job_data_id
        return self

    def reason(self, reason: str) -> "EmploymentCostAllocationBuilder":
        self._employment_cost_allocation.reason = reason
        return self

    def build(self) -> "EmploymentCostAllocation":
        return self._employment_cost_allocation
