# Code generated by Lark OpenAPI.

from typing import Optional, List

from lark_oapi.core.construct import init
from .app_field_property_auto_serial_options import AppFieldPropertyAutoSerialOptions


class AppFieldPropertyAutoSerial(object):
    _types = {
        "type": str,
        "options": List[AppFieldPropertyAutoSerialOptions],
    }

    def __init__(self, d=None):
        self.type: Optional[str] = None
        self.options: Optional[List[AppFieldPropertyAutoSerialOptions]] = None
        init(self, d, self._types)

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


class AppFieldPropertyAutoSerialBuilder(object):
    def __init__(self) -> None:
        self._app_field_property_auto_serial = AppFieldPropertyAutoSerial()

    def type(self, type: str) -> "AppFieldPropertyAutoSerialBuilder":
        self._app_field_property_auto_serial.type = type
        return self

    def options(self, options: List[AppFieldPropertyAutoSerialOptions]) -> "AppFieldPropertyAutoSerialBuilder":
        self._app_field_property_auto_serial.options = options
        return self

    def build(self) -> "AppFieldPropertyAutoSerial":
        return self._app_field_property_auto_serial
