# coding: utf-8

"""
    Tator REST API

    Interface to the Tator backend.  # noqa: E501

    The version of the OpenAPI document: v1
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from ..configuration import Configuration


class File(object):
    """
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'attributes': 'dict(str, object)',
        'created_by': 'int',
        'created_datetime': 'datetime',
        'description': 'str',
        'elemental_id': 'str',
        'id': 'int',
        'modified_by': 'int',
        'modified_datetime': 'datetime',
        'name': 'str',
        'path': 'str',
        'project': 'int',
        'type': 'int'
    }

    attribute_map = {
        'attributes': 'attributes',
        'created_by': 'created_by',
        'created_datetime': 'created_datetime',
        'description': 'description',
        'elemental_id': 'elemental_id',
        'id': 'id',
        'modified_by': 'modified_by',
        'modified_datetime': 'modified_datetime',
        'name': 'name',
        'path': 'path',
        'project': 'project',
        'type': 'type'
    }

    def __init__(self, attributes=None, created_by=None, created_datetime=None, description=None, elemental_id=None, id=None, modified_by=None, modified_datetime=None, name=None, path=None, project=None, type=None, local_vars_configuration=None):  # noqa: E501
        """File - a model defined in OpenAPI"""
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._attributes = None
        self._created_by = None
        self._created_datetime = None
        self._description = None
        self._elemental_id = None
        self._id = None
        self._modified_by = None
        self._modified_datetime = None
        self._name = None
        self._path = None
        self._project = None
        self._type = None
        self.discriminator = None

        if attributes is not None:
            self.attributes = attributes
        if created_by is not None:
            self.created_by = created_by
        if created_datetime is not None:
            self.created_datetime = created_datetime
        if description is not None:
            self.description = description
        self.elemental_id = elemental_id
        if id is not None:
            self.id = id
        if modified_by is not None:
            self.modified_by = modified_by
        if modified_datetime is not None:
            self.modified_datetime = modified_datetime
        if name is not None:
            self.name = name
        if path is not None:
            self.path = path
        if project is not None:
            self.project = project
        if type is not None:
            self.type = type

    @property
    def attributes(self):
        """
        Object containing attribute values

        :return: The attributes of this File. 
        :rtype: dict(str, object)
        """
        return self._attributes

    @attributes.setter
    def attributes(self, attributes):
        """
        Object containing attribute values

        :param attributes: The attributes of this File.
        :type: dict(str, object)
        """

        self._attributes = attributes

    @property
    def created_by(self):
        """
        User that created this file

        :return: The created_by of this File. 
        :rtype: int
        """
        return self._created_by

    @created_by.setter
    def created_by(self, created_by):
        """
        User that created this file

        :param created_by: The created_by of this File.
        :type: int
        """

        self._created_by = created_by

    @property
    def created_datetime(self):
        """
        Datetime this file was created

        :return: The created_datetime of this File. 
        :rtype: datetime
        """
        return self._created_datetime

    @created_datetime.setter
    def created_datetime(self, created_datetime):
        """
        Datetime this file was created

        :param created_datetime: The created_datetime of this File.
        :type: datetime
        """

        self._created_datetime = created_datetime

    @property
    def description(self):
        """
        Description of file

        :return: The description of this File. 
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """
        Description of file

        :param description: The description of this File.
        :type: str
        """

        self._description = description

    @property
    def elemental_id(self):
        """
        The elemental ID of the object.

        :return: The elemental_id of this File. 
        :rtype: str
        """
        return self._elemental_id

    @elemental_id.setter
    def elemental_id(self, elemental_id):
        """
        The elemental ID of the object.

        :param elemental_id: The elemental_id of this File.
        :type: str
        """

        self._elemental_id = elemental_id

    @property
    def id(self):
        """
        Unique integer identifying the non-media file

        :return: The id of this File. 
        :rtype: int
        """
        return self._id

    @id.setter
    def id(self, id):
        """
        Unique integer identifying the non-media file

        :param id: The id of this File.
        :type: int
        """

        self._id = id

    @property
    def modified_by(self):
        """
        User who last edited this file

        :return: The modified_by of this File. 
        :rtype: int
        """
        return self._modified_by

    @modified_by.setter
    def modified_by(self, modified_by):
        """
        User who last edited this file

        :param modified_by: The modified_by of this File.
        :type: int
        """

        self._modified_by = modified_by

    @property
    def modified_datetime(self):
        """
        Datetime this file was created

        :return: The modified_datetime of this File. 
        :rtype: datetime
        """
        return self._modified_datetime

    @modified_datetime.setter
    def modified_datetime(self, modified_datetime):
        """
        Datetime this file was created

        :param modified_datetime: The modified_datetime of this File.
        :type: datetime
        """

        self._modified_datetime = modified_datetime

    @property
    def name(self):
        """
        Name of file

        :return: The name of this File. 
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """
        Name of file

        :param name: The name of this File.
        :type: str
        """

        self._name = name

    @property
    def path(self):
        """
        Relative URL to the file

        :return: The path of this File. 
        :rtype: str
        """
        return self._path

    @path.setter
    def path(self, path):
        """
        Relative URL to the file

        :param path: The path of this File.
        :type: str
        """

        self._path = path

    @property
    def project(self):
        """
        Unique integer identifying the project associated with the file

        :return: The project of this File. 
        :rtype: int
        """
        return self._project

    @project.setter
    def project(self, project):
        """
        Unique integer identifying the project associated with the file

        :param project: The project of this File.
        :type: int
        """

        self._project = project

    @property
    def type(self):
        """
        Unique integer identifying FileType of this File object.

        :return: The type of this File. 
        :rtype: int
        """
        return self._type

    @type.setter
    def type(self, type):
        """
        Unique integer identifying FileType of this File object.

        :param type: The type of this File.
        :type: int
        """

        self._type = type

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

        for attr, _ in six.iteritems(self.openapi_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

        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, File):
            return False

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
