# coding: utf-8

"""
    LEIA RESTful API for AI

    Leia API  # noqa: E501

    OpenAPI spec version: 1.0.0
    Contact: contact@leia.io
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class Document(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """
    """
    Attributes:
      swagger_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    swagger_types = {
        'application_id': 'str',
        'creation_time': 'datetime',
        'expiration_time': 'datetime',
        'extension': 'str',
        'filename': 'str',
        'id': 'str',
        'md5sum': 'str',
        'mime_type': 'str',
        'original_id': 'str',
        'page': 'int',
        'rotation_angle': 'int',
        'size': 'int',
        'tags': 'list[str]'
    }

    attribute_map = {
        'application_id': 'application_id',
        'creation_time': 'creation_time',
        'expiration_time': 'expiration_time',
        'extension': 'extension',
        'filename': 'filename',
        'id': 'id',
        'md5sum': 'md5sum',
        'mime_type': 'mime_type',
        'original_id': 'original_id',
        'page': 'page',
        'rotation_angle': 'rotation_angle',
        'size': 'size',
        'tags': 'tags'
    }

    def __init__(self, application_id=None, creation_time=None, expiration_time=None, extension=None, filename=None, id=None, md5sum=None, mime_type=None, original_id=None, page=None, rotation_angle=None, size=None, tags=None):  # noqa: E501
        """Document - a model defined in Swagger"""  # noqa: E501
        self._application_id = None
        self._creation_time = None
        self._expiration_time = None
        self._extension = None
        self._filename = None
        self._id = None
        self._md5sum = None
        self._mime_type = None
        self._original_id = None
        self._page = None
        self._rotation_angle = None
        self._size = None
        self._tags = None
        self.discriminator = None
        self.application_id = application_id
        self.creation_time = creation_time
        if expiration_time is not None:
            self.expiration_time = expiration_time
        if extension is not None:
            self.extension = extension
        self.filename = filename
        self.id = id
        if md5sum is not None:
            self.md5sum = md5sum
        if mime_type is not None:
            self.mime_type = mime_type
        if original_id is not None:
            self.original_id = original_id
        if page is not None:
            self.page = page
        if rotation_angle is not None:
            self.rotation_angle = rotation_angle
        if size is not None:
            self.size = size
        if tags is not None:
            self.tags = tags

    @property
    def application_id(self):
        """Gets the application_id of this Document.  # noqa: E501


        :return: The application_id of this Document.  # noqa: E501
        :rtype: str
        """
        return self._application_id

    @application_id.setter
    def application_id(self, application_id):
        """Sets the application_id of this Document.


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

        self._application_id = application_id

    @property
    def creation_time(self):
        """Gets the creation_time of this Document.  # noqa: E501


        :return: The creation_time of this Document.  # noqa: E501
        :rtype: datetime
        """
        return self._creation_time

    @creation_time.setter
    def creation_time(self, creation_time):
        """Sets the creation_time of this Document.


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

        self._creation_time = creation_time

    @property
    def expiration_time(self):
        """Gets the expiration_time of this Document.  # noqa: E501


        :return: The expiration_time of this Document.  # noqa: E501
        :rtype: datetime
        """
        return self._expiration_time

    @expiration_time.setter
    def expiration_time(self, expiration_time):
        """Sets the expiration_time of this Document.


        :param expiration_time: The expiration_time of this Document.  # noqa: E501
        :type: datetime
        """

        self._expiration_time = expiration_time

    @property
    def extension(self):
        """Gets the extension of this Document.  # noqa: E501


        :return: The extension of this Document.  # noqa: E501
        :rtype: str
        """
        return self._extension

    @extension.setter
    def extension(self, extension):
        """Sets the extension of this Document.


        :param extension: The extension of this Document.  # noqa: E501
        :type: str
        """

        self._extension = extension

    @property
    def filename(self):
        """Gets the filename of this Document.  # noqa: E501


        :return: The filename of this Document.  # noqa: E501
        :rtype: str
        """
        return self._filename

    @filename.setter
    def filename(self, filename):
        """Sets the filename of this Document.


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

        self._filename = filename

    @property
    def id(self):
        """Gets the id of this Document.  # noqa: E501


        :return: The id of this Document.  # noqa: E501
        :rtype: str
        """
        return self._id

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


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

        self._id = id

    @property
    def md5sum(self):
        """Gets the md5sum of this Document.  # noqa: E501

        The MD5 sum of the document  # noqa: E501

        :return: The md5sum of this Document.  # noqa: E501
        :rtype: str
        """
        return self._md5sum

    @md5sum.setter
    def md5sum(self, md5sum):
        """Sets the md5sum of this Document.

        The MD5 sum of the document  # noqa: E501

        :param md5sum: The md5sum of this Document.  # noqa: E501
        :type: str
        """

        self._md5sum = md5sum

    @property
    def mime_type(self):
        """Gets the mime_type of this Document.  # noqa: E501


        :return: The mime_type of this Document.  # noqa: E501
        :rtype: str
        """
        return self._mime_type

    @mime_type.setter
    def mime_type(self, mime_type):
        """Sets the mime_type of this Document.


        :param mime_type: The mime_type of this Document.  # noqa: E501
        :type: str
        """

        self._mime_type = mime_type

    @property
    def original_id(self):
        """Gets the original_id of this Document.  # noqa: E501

        If this document is the result of a conversion, will contain the id of the original document  # noqa: E501

        :return: The original_id of this Document.  # noqa: E501
        :rtype: str
        """
        return self._original_id

    @original_id.setter
    def original_id(self, original_id):
        """Sets the original_id of this Document.

        If this document is the result of a conversion, will contain the id of the original document  # noqa: E501

        :param original_id: The original_id of this Document.  # noqa: E501
        :type: str
        """

        self._original_id = original_id

    @property
    def page(self):
        """Gets the page of this Document.  # noqa: E501

        The page represented by this document (only if it is a sub document of a multi page document such as a PDF)  # noqa: E501

        :return: The page of this Document.  # noqa: E501
        :rtype: int
        """
        return self._page

    @page.setter
    def page(self, page):
        """Sets the page of this Document.

        The page represented by this document (only if it is a sub document of a multi page document such as a PDF)  # noqa: E501

        :param page: The page of this Document.  # noqa: E501
        :type: int
        """

        self._page = page

    @property
    def rotation_angle(self):
        """Gets the rotation_angle of this Document.  # noqa: E501

        The rotation angle in degrees to apply to the document to present it in a human readable orientation  # noqa: E501

        :return: The rotation_angle of this Document.  # noqa: E501
        :rtype: int
        """
        return self._rotation_angle

    @rotation_angle.setter
    def rotation_angle(self, rotation_angle):
        """Sets the rotation_angle of this Document.

        The rotation angle in degrees to apply to the document to present it in a human readable orientation  # noqa: E501

        :param rotation_angle: The rotation_angle of this Document.  # noqa: E501
        :type: int
        """

        self._rotation_angle = rotation_angle

    @property
    def size(self):
        """Gets the size of this Document.  # noqa: E501

        The size of the document in bytes  # noqa: E501

        :return: The size of this Document.  # noqa: E501
        :rtype: int
        """
        return self._size

    @size.setter
    def size(self, size):
        """Sets the size of this Document.

        The size of the document in bytes  # noqa: E501

        :param size: The size of this Document.  # noqa: E501
        :type: int
        """

        self._size = size

    @property
    def tags(self):
        """Gets the tags of this Document.  # noqa: E501


        :return: The tags of this Document.  # noqa: E501
        :rtype: list[str]
        """
        return self._tags

    @tags.setter
    def tags(self, tags):
        """Sets the tags of this Document.


        :param tags: The tags of this Document.  # noqa: E501
        :type: list[str]
        """

        self._tags = tags

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.swagger_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value
        if issubclass(Document, dict):
            for key, value in self.items():
                result[key] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, Document):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
