# 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 .cost_center_id import CostCenterId


class DefaultCostCenterRecord(object):
    _types = {
        "reason": str,
        "is_inherit": bool,
        "cost_center_id": CostCenterId,
    }

    def __init__(self, d=None):
        self.reason: Optional[str] = None
        self.is_inherit: Optional[bool] = None
        self.cost_center_id: Optional[CostCenterId] = None
        init(self, d, self._types)

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


class DefaultCostCenterRecordBuilder(object):
    def __init__(self) -> None:
        self._default_cost_center_record = DefaultCostCenterRecord()

    def reason(self, reason: str) -> "DefaultCostCenterRecordBuilder":
        self._default_cost_center_record.reason = reason
        return self

    def is_inherit(self, is_inherit: bool) -> "DefaultCostCenterRecordBuilder":
        self._default_cost_center_record.is_inherit = is_inherit
        return self

    def cost_center_id(self, cost_center_id: CostCenterId) -> "DefaultCostCenterRecordBuilder":
        self._default_cost_center_record.cost_center_id = cost_center_id
        return self

    def build(self) -> "DefaultCostCenterRecord":
        return self._default_cost_center_record
