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.vector_store_file_object_chunking_strategy import \
    VectorStoreFileObjectChunkingStrategy  # noqa: E501
from timestep.api.openai.v1.models.vector_store_file_object_last_error import \
    VectorStoreFileObjectLastError  # noqa: E501


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

    Do not edit the class manually.
    """

    def __init__(self, id=None, object=None, usage_bytes=None, created_at=None, vector_store_id=None, status=None, last_error=None, chunking_strategy=None):  # noqa: E501
        """VectorStoreFileObject - a model defined in OpenAPI

        :param id: The id of this VectorStoreFileObject.  # noqa: E501
        :type id: str
        :param object: The object of this VectorStoreFileObject.  # noqa: E501
        :type object: str
        :param usage_bytes: The usage_bytes of this VectorStoreFileObject.  # noqa: E501
        :type usage_bytes: int
        :param created_at: The created_at of this VectorStoreFileObject.  # noqa: E501
        :type created_at: int
        :param vector_store_id: The vector_store_id of this VectorStoreFileObject.  # noqa: E501
        :type vector_store_id: str
        :param status: The status of this VectorStoreFileObject.  # noqa: E501
        :type status: str
        :param last_error: The last_error of this VectorStoreFileObject.  # noqa: E501
        :type last_error: VectorStoreFileObjectLastError
        :param chunking_strategy: The chunking_strategy of this VectorStoreFileObject.  # noqa: E501
        :type chunking_strategy: VectorStoreFileObjectChunkingStrategy
        """
        self.openapi_types = {
            'id': str,
            'object': str,
            'usage_bytes': int,
            'created_at': int,
            'vector_store_id': str,
            'status': str,
            'last_error': VectorStoreFileObjectLastError,
            'chunking_strategy': VectorStoreFileObjectChunkingStrategy
        }

        self.attribute_map = {
            'id': 'id',
            'object': 'object',
            'usage_bytes': 'usage_bytes',
            'created_at': 'created_at',
            'vector_store_id': 'vector_store_id',
            'status': 'status',
            'last_error': 'last_error',
            'chunking_strategy': 'chunking_strategy'
        }

        self._id = id
        self._object = object
        self._usage_bytes = usage_bytes
        self._created_at = created_at
        self._vector_store_id = vector_store_id
        self._status = status
        self._last_error = last_error
        self._chunking_strategy = chunking_strategy

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

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

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

        The identifier, which can be referenced in API endpoints.  # noqa: E501

        :return: The id of this VectorStoreFileObject.
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id: str):
        """Sets the id of this VectorStoreFileObject.

        The identifier, which can be referenced in API endpoints.  # noqa: E501

        :param id: The id of this VectorStoreFileObject.
        :type id: str
        """
        if id is None:
            raise ValueError("Invalid value for `id`, must not be `None`")  # noqa: E501

        self._id = id

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

        The object type, which is always `vector_store.file`.  # noqa: E501

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

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

        The object type, which is always `vector_store.file`.  # noqa: E501

        :param object: The object of this VectorStoreFileObject.
        :type object: str
        """
        allowed_values = ["vector_store.file"]  # 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 usage_bytes(self) -> int:
        """Gets the usage_bytes of this VectorStoreFileObject.

        The total vector store usage in bytes. Note that this may be different from the original file size.  # noqa: E501

        :return: The usage_bytes of this VectorStoreFileObject.
        :rtype: int
        """
        return self._usage_bytes

    @usage_bytes.setter
    def usage_bytes(self, usage_bytes: int):
        """Sets the usage_bytes of this VectorStoreFileObject.

        The total vector store usage in bytes. Note that this may be different from the original file size.  # noqa: E501

        :param usage_bytes: The usage_bytes of this VectorStoreFileObject.
        :type usage_bytes: int
        """
        if usage_bytes is None:
            raise ValueError("Invalid value for `usage_bytes`, must not be `None`")  # noqa: E501

        self._usage_bytes = usage_bytes

    @property
    def created_at(self) -> int:
        """Gets the created_at of this VectorStoreFileObject.

        The Unix timestamp (in seconds) for when the vector store file was created.  # noqa: E501

        :return: The created_at of this VectorStoreFileObject.
        :rtype: int
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at: int):
        """Sets the created_at of this VectorStoreFileObject.

        The Unix timestamp (in seconds) for when the vector store file was created.  # noqa: E501

        :param created_at: The created_at of this VectorStoreFileObject.
        :type created_at: int
        """
        if created_at is None:
            raise ValueError("Invalid value for `created_at`, must not be `None`")  # noqa: E501

        self._created_at = created_at

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

        The ID of the [vector store](/docs/api-reference/vector-stores/object) that the [File](/docs/api-reference/files) is attached to.  # noqa: E501

        :return: The vector_store_id of this VectorStoreFileObject.
        :rtype: str
        """
        return self._vector_store_id

    @vector_store_id.setter
    def vector_store_id(self, vector_store_id: str):
        """Sets the vector_store_id of this VectorStoreFileObject.

        The ID of the [vector store](/docs/api-reference/vector-stores/object) that the [File](/docs/api-reference/files) is attached to.  # noqa: E501

        :param vector_store_id: The vector_store_id of this VectorStoreFileObject.
        :type vector_store_id: str
        """
        if vector_store_id is None:
            raise ValueError("Invalid value for `vector_store_id`, must not be `None`")  # noqa: E501

        self._vector_store_id = vector_store_id

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

        The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use.  # noqa: E501

        :return: The status of this VectorStoreFileObject.
        :rtype: str
        """
        return self._status

    @status.setter
    def status(self, status: str):
        """Sets the status of this VectorStoreFileObject.

        The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use.  # noqa: E501

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

        self._status = status

    @property
    def last_error(self) -> VectorStoreFileObjectLastError:
        """Gets the last_error of this VectorStoreFileObject.


        :return: The last_error of this VectorStoreFileObject.
        :rtype: VectorStoreFileObjectLastError
        """
        return self._last_error

    @last_error.setter
    def last_error(self, last_error: VectorStoreFileObjectLastError):
        """Sets the last_error of this VectorStoreFileObject.


        :param last_error: The last_error of this VectorStoreFileObject.
        :type last_error: VectorStoreFileObjectLastError
        """
        if last_error is None:
            raise ValueError("Invalid value for `last_error`, must not be `None`")  # noqa: E501

        self._last_error = last_error

    @property
    def chunking_strategy(self) -> VectorStoreFileObjectChunkingStrategy:
        """Gets the chunking_strategy of this VectorStoreFileObject.


        :return: The chunking_strategy of this VectorStoreFileObject.
        :rtype: VectorStoreFileObjectChunkingStrategy
        """
        return self._chunking_strategy

    @chunking_strategy.setter
    def chunking_strategy(self, chunking_strategy: VectorStoreFileObjectChunkingStrategy):
        """Sets the chunking_strategy of this VectorStoreFileObject.


        :param chunking_strategy: The chunking_strategy of this VectorStoreFileObject.
        :type chunking_strategy: VectorStoreFileObjectChunkingStrategy
        """

        self._chunking_strategy = chunking_strategy
