from datetime import date, datetime  # noqa: F401
from typing import Dict, List  # noqa: F401

from timestep.api.openai.v1 import util
from timestep.api.openai.v1.models.base_model import Model
from timestep.api.openai.v1.models.model import Model  # noqa: E501


class ListModelsResponse(Model):
    """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

    Do not edit the class manually.
    """

    def __init__(self, object=None, data=None):  # noqa: E501
        """ListModelsResponse - a model defined in OpenAPI

        :param object: The object of this ListModelsResponse.  # noqa: E501
        :type object: str
        :param data: The data of this ListModelsResponse.  # noqa: E501
        :type data: List[Model]
        """
        self.openapi_types = {
            'object': str,
            'data': List[Model]
        }

        self.attribute_map = {
            'object': 'object',
            'data': 'data'
        }

        self._object = object
        self._data = data

    @classmethod
    def from_dict(cls, dikt) -> 'ListModelsResponse':
        """Returns the dict as a model

        :param dikt: A dict.
        :type: dict
        :return: The ListModelsResponse of this ListModelsResponse.  # noqa: E501
        :rtype: ListModelsResponse
        """
        return util.deserialize_model(dikt, cls)

    @property
    def object(self) -> str:
        """Gets the object of this ListModelsResponse.


        :return: The object of this ListModelsResponse.
        :rtype: str
        """
        return self._object

    @object.setter
    def object(self, object: str):
        """Sets the object of this ListModelsResponse.


        :param object: The object of this ListModelsResponse.
        :type object: str
        """
        allowed_values = ["list"]  # noqa: E501
        if object not in allowed_values:
            raise ValueError(
                "Invalid value for `object` ({0}), must be one of {1}"
                .format(object, allowed_values)
            )

        self._object = object

    @property
    def data(self) -> List[Model]:
        """Gets the data of this ListModelsResponse.


        :return: The data of this ListModelsResponse.
        :rtype: List[Model]
        """
        return self._data

    @data.setter
    def data(self, data: List[Model]):
        """Sets the data of this ListModelsResponse.


        :param data: The data of this ListModelsResponse.
        :type data: List[Model]
        """
        if data is None:
            raise ValueError("Invalid value for `data`, must not be `None`")  # noqa: E501

        self._data = data
