# 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 .employment_cost_allocation import EmploymentCostAllocation


class EmployeeCostAllocation(object):
    _types = {
        "employment_id": str,
        "cost_allocations": List[EmploymentCostAllocation],
    }

    def __init__(self, d=None):
        self.employment_id: Optional[str] = None
        self.cost_allocations: Optional[List[EmploymentCostAllocation]] = None
        init(self, d, self._types)

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


class EmployeeCostAllocationBuilder(object):
    def __init__(self) -> None:
        self._employee_cost_allocation = EmployeeCostAllocation()

    def employment_id(self, employment_id: str) -> "EmployeeCostAllocationBuilder":
        self._employee_cost_allocation.employment_id = employment_id
        return self

    def cost_allocations(self, cost_allocations: List[EmploymentCostAllocation]) -> "EmployeeCostAllocationBuilder":
        self._employee_cost_allocation.cost_allocations = cost_allocations
        return self

    def build(self) -> "EmployeeCostAllocation":
        return self._employee_cost_allocation
