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.message_delta_content_image_file_object_image_file import \
    MessageDeltaContentImageFileObjectImageFile  # noqa: E501


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

    Do not edit the class manually.
    """

    def __init__(self, index=None, type=None, image_file=None):  # noqa: E501
        """MessageDeltaContentImageFileObject - a model defined in OpenAPI

        :param index: The index of this MessageDeltaContentImageFileObject.  # noqa: E501
        :type index: int
        :param type: The type of this MessageDeltaContentImageFileObject.  # noqa: E501
        :type type: str
        :param image_file: The image_file of this MessageDeltaContentImageFileObject.  # noqa: E501
        :type image_file: MessageDeltaContentImageFileObjectImageFile
        """
        self.openapi_types = {
            'index': int,
            'type': str,
            'image_file': MessageDeltaContentImageFileObjectImageFile
        }

        self.attribute_map = {
            'index': 'index',
            'type': 'type',
            'image_file': 'image_file'
        }

        self._index = index
        self._type = type
        self._image_file = image_file

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

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

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

        The index of the content part in the message.  # noqa: E501

        :return: The index of this MessageDeltaContentImageFileObject.
        :rtype: int
        """
        return self._index

    @index.setter
    def index(self, index: int):
        """Sets the index of this MessageDeltaContentImageFileObject.

        The index of the content part in the message.  # noqa: E501

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

        self._index = index

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

        Always `image_file`.  # noqa: E501

        :return: The type of this MessageDeltaContentImageFileObject.
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type: str):
        """Sets the type of this MessageDeltaContentImageFileObject.

        Always `image_file`.  # noqa: E501

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

        self._type = type

    @property
    def image_file(self) -> MessageDeltaContentImageFileObjectImageFile:
        """Gets the image_file of this MessageDeltaContentImageFileObject.


        :return: The image_file of this MessageDeltaContentImageFileObject.
        :rtype: MessageDeltaContentImageFileObjectImageFile
        """
        return self._image_file

    @image_file.setter
    def image_file(self, image_file: MessageDeltaContentImageFileObjectImageFile):
        """Sets the image_file of this MessageDeltaContentImageFileObject.


        :param image_file: The image_file of this MessageDeltaContentImageFileObject.
        :type image_file: MessageDeltaContentImageFileObjectImageFile
        """

        self._image_file = image_file
