# Code generated by Lark OpenAPI.

from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type
from lark_oapi.core.construct import init
from .label import Label
from .object_field_type_for_query import ObjectFieldTypeForQuery


class ObjectFieldsForQuery(object):
    _types = {
        "api_name": str,
        "label": Label,
        "type": ObjectFieldTypeForQuery,
        "created_at": int,
        "updated_at": int,
    }

    def __init__(self, d=None):
        self.api_name: Optional[str] = None
        self.label: Optional[Label] = None
        self.type: Optional[ObjectFieldTypeForQuery] = None
        self.created_at: Optional[int] = None
        self.updated_at: Optional[int] = None
        init(self, d, self._types)

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


class ObjectFieldsForQueryBuilder(object):
    def __init__(self) -> None:
        self._object_fields_for_query = ObjectFieldsForQuery()

    def api_name(self, api_name: str) -> "ObjectFieldsForQueryBuilder":
        self._object_fields_for_query.api_name = api_name
        return self

    def label(self, label: Label) -> "ObjectFieldsForQueryBuilder":
        self._object_fields_for_query.label = label
        return self

    def type(self, type: ObjectFieldTypeForQuery) -> "ObjectFieldsForQueryBuilder":
        self._object_fields_for_query.type = type
        return self

    def created_at(self, created_at: int) -> "ObjectFieldsForQueryBuilder":
        self._object_fields_for_query.created_at = created_at
        return self

    def updated_at(self, updated_at: int) -> "ObjectFieldsForQueryBuilder":
        self._object_fields_for_query.updated_at = updated_at
        return self

    def build(self) -> "ObjectFieldsForQuery":
        return self._object_fields_for_query
