# Code generated by Lark OpenAPI.

from typing import Optional

from lark_oapi.core.construct import init
from .pin import Pin


class CreatePinResponseBody(object):
    _types = {
        "pin": Pin,
    }

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

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


class CreatePinResponseBodyBuilder(object):
    def __init__(self) -> None:
        self._create_pin_response_body = CreatePinResponseBody()

    def pin(self, pin: Pin) -> "CreatePinResponseBodyBuilder":
        self._create_pin_response_body.pin = pin
        return self

    def build(self) -> "CreatePinResponseBody":
        return self._create_pin_response_body
