# coding: utf-8

"""
    Tator REST API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from ..configuration import Configuration


class GenericFile(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 = {
        'name': 'str',
        'project': 'int',
        'upload_url': 'str',
        'url': 'str'
    }

    attribute_map = {
        'name': 'name',
        'project': 'project',
        'upload_url': 'upload_url',
        'url': 'url'
    }

    def __init__(self, name=None, project=None, upload_url=None, url=None, local_vars_configuration=None):  # noqa: E501
        """GenericFile - a model defined in OpenAPI"""
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._name = None
        self._project = None
        self._upload_url = None
        self._url = None
        self.discriminator = None

        if name is not None:
            self.name = name
        if project is not None:
            self.project = project
        if upload_url is not None:
            self.upload_url = upload_url
        if url is not None:
            self.url = url

    @property
    def name(self):
        """
        Name of generic, non-media file

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

    @name.setter
    def name(self, name):
        """
        Name of generic, non-media file

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

        self._name = name

    @property
    def project(self):
        """
        Unique integer identifying project to store the file in

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

    @project.setter
    def project(self, project):
        """
        Unique integer identifying project to store the file in

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

        self._project = project

    @property
    def upload_url(self):
        """
        URL of the uploaded file

        :return: The upload_url of this GenericFile. 
        :rtype: str
        """
        return self._upload_url

    @upload_url.setter
    def upload_url(self, upload_url):
        """
        URL of the uploaded file

        :param upload_url: The upload_url of this GenericFile.
        :type: str
        """

        self._upload_url = upload_url

    @property
    def url(self):
        """
        Name of generic, non-media file

        :return: The url of this GenericFile. 
        :rtype: str
        """
        return self._url

    @url.setter
    def url(self, url):
        """
        Name of generic, non-media file

        :param url: The url of this GenericFile.
        :type: str
        """

        self._url = url

    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, GenericFile):
            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, GenericFile):
            return True

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