# coding: utf-8

"""
    node-server

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 0.0.237
    Generated by: https://openapi-generator.tech
"""

from datetime import date, datetime  # noqa: F401
import decimal  # noqa: F401
import functools  # noqa: F401
import io  # noqa: F401
import re  # noqa: F401
import typing  # noqa: F401
import typing_extensions  # noqa: F401
import uuid  # noqa: F401

import frozendict  # noqa: F401

from openapi_client import schemas  # noqa: F401


class ESFilter(
    schemas.DictSchema
):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """


    class MetaOapg:
        required = {
            "field",
            "value",
            "operator",
        }
        
        class properties:
        
            @staticmethod
            def operator() -> typing.Type['FilterOperatorType']:
                return FilterOperatorType
            field = schemas.StrSchema
        
            @staticmethod
            def value() -> typing.Type['ESFilterValue']:
                return ESFilterValue
            disable = schemas.BoolSchema
            __annotations__ = {
                "operator": operator,
                "field": field,
                "value": value,
                "disable": disable,
            }
        additional_properties = schemas.NotAnyTypeSchema
    
    field: MetaOapg.properties.field
    value: 'ESFilterValue'
    operator: 'FilterOperatorType'
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["field"]) -> MetaOapg.properties.field: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["value"]) -> 'ESFilterValue': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["operator"]) -> 'FilterOperatorType': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["disable"]) -> MetaOapg.properties.disable: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["field"], typing_extensions.Literal["value"], typing_extensions.Literal["operator"], typing_extensions.Literal["disable"], ]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["field"]) -> MetaOapg.properties.field: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["value"]) -> 'ESFilterValue': ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["operator"]) -> 'FilterOperatorType': ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["disable"]) -> typing.Union[MetaOapg.properties.disable, schemas.Unset]: ...
    
    def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["field"], typing_extensions.Literal["value"], typing_extensions.Literal["operator"], typing_extensions.Literal["disable"], ]):
        return super().get_item_oapg(name)

    def __new__(
        cls,
        *args: typing.Union[dict, frozendict.frozendict, ],
        field: typing.Union[MetaOapg.properties.field, str, ],
        value: 'ESFilterValue',
        operator: 'FilterOperatorType',
        disable: typing.Union[MetaOapg.properties.disable, bool, schemas.Unset] = schemas.unset,
        _configuration: typing.Optional[schemas.Configuration] = None,
    ) -> 'ESFilter':
        return super().__new__(
            cls,
            *args,
            field=field,
            value=value,
            operator=operator,
            disable=disable,
            _configuration=_configuration,
        )

from openapi_client.model.es_filter_value import ESFilterValue
from openapi_client.model.filter_operator_type import FilterOperatorType
