# Code generated by Lark OpenAPI.

from typing import Optional, List

from lark_oapi.core.construct import init
from .bitable_table_field_action_value_property_auto_serial_options import \
    BitableTableFieldActionValuePropertyAutoSerialOptions


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

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

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


class BitableTableFieldActionValuePropertyAutoSerialBuilder(object):
    def __init__(self) -> None:
        self._bitable_table_field_action_value_property_auto_serial = BitableTableFieldActionValuePropertyAutoSerial()

    def type(self, type: str) -> "BitableTableFieldActionValuePropertyAutoSerialBuilder":
        self._bitable_table_field_action_value_property_auto_serial.type = type
        return self

    def options(self, options: List[
        BitableTableFieldActionValuePropertyAutoSerialOptions]) -> "BitableTableFieldActionValuePropertyAutoSerialBuilder":
        self._bitable_table_field_action_value_property_auto_serial.options = options
        return self

    def build(self) -> "BitableTableFieldActionValuePropertyAutoSerial":
        return self._bitable_table_field_action_value_property_auto_serial
