# Code generated by Lark OpenAPI.

from typing import Optional

from lark_oapi.core.construct import init
from .contract import Contract


class GetContractResponseBody(object):
    _types = {
        "contract": Contract,
    }

    def __init__(self, d=None):
        self.contract: Optional[Contract] = None
        init(self, d, self._types)

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


class GetContractResponseBodyBuilder(object):
    def __init__(self) -> None:
        self._get_contract_response_body = GetContractResponseBody()

    def contract(self, contract: Contract) -> "GetContractResponseBodyBuilder":
        self._get_contract_response_body.contract = contract
        return self

    def build(self) -> "GetContractResponseBody":
        return self._get_contract_response_body
