# 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 BucketAggregation(
    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 = {
            "orderParams",
            "xField",
            "dataDistributionType",
            "xAxisSizeInterval",
        }
        
        class properties:
            xField = schemas.StrSchema
        
            @staticmethod
            def dataDistributionType() -> typing.Type['DataDistributionType']:
                return DataDistributionType
            xAxisSizeInterval = schemas.Float64Schema
            
            
            class orderParams(
                schemas.EnumBase,
                schemas.StrSchema
            ):
            
            
                class MetaOapg:
                    enum_value_to_name = {
                        "asc": "ASC",
                        "desc": "DESC",
                    }
                
                @schemas.classproperty
                def ASC(cls):
                    return cls("asc")
                
                @schemas.classproperty
                def DESC(cls):
                    return cls("desc")
            __annotations__ = {
                "xField": xField,
                "dataDistributionType": dataDistributionType,
                "xAxisSizeInterval": xAxisSizeInterval,
                "orderParams": orderParams,
            }
        additional_properties = schemas.NotAnyTypeSchema
    
    orderParams: MetaOapg.properties.orderParams
    xField: MetaOapg.properties.xField
    dataDistributionType: 'DataDistributionType'
    xAxisSizeInterval: MetaOapg.properties.xAxisSizeInterval
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["orderParams"]) -> MetaOapg.properties.orderParams: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["xField"]) -> MetaOapg.properties.xField: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["dataDistributionType"]) -> 'DataDistributionType': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["xAxisSizeInterval"]) -> MetaOapg.properties.xAxisSizeInterval: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["orderParams"], typing_extensions.Literal["xField"], typing_extensions.Literal["dataDistributionType"], typing_extensions.Literal["xAxisSizeInterval"], ]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["orderParams"]) -> MetaOapg.properties.orderParams: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["xField"]) -> MetaOapg.properties.xField: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["dataDistributionType"]) -> 'DataDistributionType': ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["xAxisSizeInterval"]) -> MetaOapg.properties.xAxisSizeInterval: ...
    
    def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["orderParams"], typing_extensions.Literal["xField"], typing_extensions.Literal["dataDistributionType"], typing_extensions.Literal["xAxisSizeInterval"], ]):
        return super().get_item_oapg(name)

    def __new__(
        cls,
        *args: typing.Union[dict, frozendict.frozendict, ],
        orderParams: typing.Union[MetaOapg.properties.orderParams, str, ],
        xField: typing.Union[MetaOapg.properties.xField, str, ],
        dataDistributionType: 'DataDistributionType',
        xAxisSizeInterval: typing.Union[MetaOapg.properties.xAxisSizeInterval, decimal.Decimal, int, float, ],
        _configuration: typing.Optional[schemas.Configuration] = None,
    ) -> 'BucketAggregation':
        return super().__new__(
            cls,
            *args,
            orderParams=orderParams,
            xField=xField,
            dataDistributionType=dataDistributionType,
            xAxisSizeInterval=xAxisSizeInterval,
            _configuration=_configuration,
        )

from openapi_client.model.data_distribution_type import DataDistributionType
