# Code generated by Lark OpenAPI.

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


class ContractPeriodInfo(object):
    _types = {
        "period_type": int,
        "period": int,
    }

    def __init__(self, d=None):
        self.period_type: Optional[int] = None
        self.period: Optional[int] = None
        init(self, d, self._types)

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


class ContractPeriodInfoBuilder(object):
    def __init__(self) -> None:
        self._contract_period_info = ContractPeriodInfo()

    def period_type(self, period_type: int) -> "ContractPeriodInfoBuilder":
        self._contract_period_info.period_type = period_type
        return self

    def period(self, period: int) -> "ContractPeriodInfoBuilder":
        self._contract_period_info.period = period
        return self

    def build(self) -> "ContractPeriodInfo":
        return self._contract_period_info
