# 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 DatasetFieldType(object):
    _types = {
        "name": str,
        "settings": str,
    }

    def __init__(self, d=None):
        self.name: Optional[str] = None
        self.settings: Optional[str] = None
        init(self, d, self._types)

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


class DatasetFieldTypeBuilder(object):
    def __init__(self) -> None:
        self._dataset_field_type = DatasetFieldType()

    def name(self, name: str) -> "DatasetFieldTypeBuilder":
        self._dataset_field_type.name = name
        return self

    def settings(self, settings: str) -> "DatasetFieldTypeBuilder":
        self._dataset_field_type.settings = settings
        return self

    def build(self) -> "DatasetFieldType":
        return self._dataset_field_type
