# coding: utf-8

"""
    ORCID Member

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)

    OpenAPI spec version: Latest
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from pprint import pformat
from six import iteritems
import re


class Funding(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self, created_date=None, last_modified_date=None, source=None, put_code=None, path=None, type=None, organization_defined_type=None, title=None, short_description=None, amount=None, url=None, start_date=None, end_date=None, external_ids=None, contributors=None, organization=None, visibility=None):
        """
        Funding - a model defined in Swagger

        :param dict swaggerTypes: The key is attribute name
                                  and the value is attribute type.
        :param dict attributeMap: The key is attribute name
                                  and the value is json key in definition.
        """
        self.swagger_types = {
            'created_date': 'CreatedDate',
            'last_modified_date': 'LastModifiedDate',
            'source': 'Source',
            'put_code': 'int',
            'path': 'str',
            'type': 'str',
            'organization_defined_type': 'OrganizationDefinedFundingSubType',
            'title': 'FundingTitle',
            'short_description': 'str',
            'amount': 'Amount',
            'url': 'Url',
            'start_date': 'FuzzyDate',
            'end_date': 'FuzzyDate',
            'external_ids': 'ExternalIDs',
            'contributors': 'FundingContributors',
            'organization': 'Organization',
            'visibility': 'str'
        }

        self.attribute_map = {
            'created_date': 'created-date',
            'last_modified_date': 'last-modified-date',
            'source': 'source',
            'put_code': 'put-code',
            'path': 'path',
            'type': 'type',
            'organization_defined_type': 'organization-defined-type',
            'title': 'title',
            'short_description': 'short-description',
            'amount': 'amount',
            'url': 'url',
            'start_date': 'start-date',
            'end_date': 'end-date',
            'external_ids': 'external-ids',
            'contributors': 'contributors',
            'organization': 'organization',
            'visibility': 'visibility'
        }

        self._created_date = created_date
        self._last_modified_date = last_modified_date
        self._source = source
        self._put_code = put_code
        self._path = path
        self._type = type
        self._organization_defined_type = organization_defined_type
        self._title = title
        self._short_description = short_description
        self._amount = amount
        self._url = url
        self._start_date = start_date
        self._end_date = end_date
        self._external_ids = external_ids
        self._contributors = contributors
        self._organization = organization
        self._visibility = visibility

    @property
    def created_date(self):
        """
        Gets the created_date of this Funding.

        :return: The created_date of this Funding.
        :rtype: CreatedDate
        """
        return self._created_date

    @created_date.setter
    def created_date(self, created_date):
        """
        Sets the created_date of this Funding.

        :param created_date: The created_date of this Funding.
        :type: CreatedDate
        """

        self._created_date = created_date

    @property
    def last_modified_date(self):
        """
        Gets the last_modified_date of this Funding.

        :return: The last_modified_date of this Funding.
        :rtype: LastModifiedDate
        """
        return self._last_modified_date

    @last_modified_date.setter
    def last_modified_date(self, last_modified_date):
        """
        Sets the last_modified_date of this Funding.

        :param last_modified_date: The last_modified_date of this Funding.
        :type: LastModifiedDate
        """

        self._last_modified_date = last_modified_date

    @property
    def source(self):
        """
        Gets the source of this Funding.

        :return: The source of this Funding.
        :rtype: Source
        """
        return self._source

    @source.setter
    def source(self, source):
        """
        Sets the source of this Funding.

        :param source: The source of this Funding.
        :type: Source
        """

        self._source = source

    @property
    def put_code(self):
        """
        Gets the put_code of this Funding.

        :return: The put_code of this Funding.
        :rtype: int
        """
        return self._put_code

    @put_code.setter
    def put_code(self, put_code):
        """
        Sets the put_code of this Funding.

        :param put_code: The put_code of this Funding.
        :type: int
        """

        self._put_code = put_code

    @property
    def path(self):
        """
        Gets the path of this Funding.

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

    @path.setter
    def path(self, path):
        """
        Sets the path of this Funding.

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

        self._path = path

    @property
    def type(self):
        """
        Gets the type of this Funding.

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

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

        :param type: The type of this Funding.
        :type: str
        """
        allowed_values = ["GRANT", "CONTRACT", "AWARD", "SALARY_AWARD"]
        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 organization_defined_type(self):
        """
        Gets the organization_defined_type of this Funding.

        :return: The organization_defined_type of this Funding.
        :rtype: OrganizationDefinedFundingSubType
        """
        return self._organization_defined_type

    @organization_defined_type.setter
    def organization_defined_type(self, organization_defined_type):
        """
        Sets the organization_defined_type of this Funding.

        :param organization_defined_type: The organization_defined_type of this Funding.
        :type: OrganizationDefinedFundingSubType
        """

        self._organization_defined_type = organization_defined_type

    @property
    def title(self):
        """
        Gets the title of this Funding.

        :return: The title of this Funding.
        :rtype: FundingTitle
        """
        return self._title

    @title.setter
    def title(self, title):
        """
        Sets the title of this Funding.

        :param title: The title of this Funding.
        :type: FundingTitle
        """
        if title is None:
            raise ValueError("Invalid value for `title`, must not be `None`")

        self._title = title

    @property
    def short_description(self):
        """
        Gets the short_description of this Funding.

        :return: The short_description of this Funding.
        :rtype: str
        """
        return self._short_description

    @short_description.setter
    def short_description(self, short_description):
        """
        Sets the short_description of this Funding.

        :param short_description: The short_description of this Funding.
        :type: str
        """

        self._short_description = short_description

    @property
    def amount(self):
        """
        Gets the amount of this Funding.

        :return: The amount of this Funding.
        :rtype: Amount
        """
        return self._amount

    @amount.setter
    def amount(self, amount):
        """
        Sets the amount of this Funding.

        :param amount: The amount of this Funding.
        :type: Amount
        """

        self._amount = amount

    @property
    def url(self):
        """
        Gets the url of this Funding.

        :return: The url of this Funding.
        :rtype: Url
        """
        return self._url

    @url.setter
    def url(self, url):
        """
        Sets the url of this Funding.

        :param url: The url of this Funding.
        :type: Url
        """

        self._url = url

    @property
    def start_date(self):
        """
        Gets the start_date of this Funding.

        :return: The start_date of this Funding.
        :rtype: FuzzyDate
        """
        return self._start_date

    @start_date.setter
    def start_date(self, start_date):
        """
        Sets the start_date of this Funding.

        :param start_date: The start_date of this Funding.
        :type: FuzzyDate
        """

        self._start_date = start_date

    @property
    def end_date(self):
        """
        Gets the end_date of this Funding.

        :return: The end_date of this Funding.
        :rtype: FuzzyDate
        """
        return self._end_date

    @end_date.setter
    def end_date(self, end_date):
        """
        Sets the end_date of this Funding.

        :param end_date: The end_date of this Funding.
        :type: FuzzyDate
        """

        self._end_date = end_date

    @property
    def external_ids(self):
        """
        Gets the external_ids of this Funding.

        :return: The external_ids of this Funding.
        :rtype: ExternalIDs
        """
        return self._external_ids

    @external_ids.setter
    def external_ids(self, external_ids):
        """
        Sets the external_ids of this Funding.

        :param external_ids: The external_ids of this Funding.
        :type: ExternalIDs
        """

        self._external_ids = external_ids

    @property
    def contributors(self):
        """
        Gets the contributors of this Funding.

        :return: The contributors of this Funding.
        :rtype: FundingContributors
        """
        return self._contributors

    @contributors.setter
    def contributors(self, contributors):
        """
        Sets the contributors of this Funding.

        :param contributors: The contributors of this Funding.
        :type: FundingContributors
        """

        self._contributors = contributors

    @property
    def organization(self):
        """
        Gets the organization of this Funding.

        :return: The organization of this Funding.
        :rtype: Organization
        """
        return self._organization

    @organization.setter
    def organization(self, organization):
        """
        Sets the organization of this Funding.

        :param organization: The organization of this Funding.
        :type: Organization
        """
        if organization is None:
            raise ValueError("Invalid value for `organization`, must not be `None`")

        self._organization = organization

    @property
    def visibility(self):
        """
        Gets the visibility of this Funding.

        :return: The visibility of this Funding.
        :rtype: str
        """
        return self._visibility

    @visibility.setter
    def visibility(self, visibility):
        """
        Sets the visibility of this Funding.

        :param visibility: The visibility of this Funding.
        :type: str
        """
        allowed_values = ["LIMITED", "REGISTERED_ONLY", "PUBLIC", "PRIVATE"]
        if visibility not in allowed_values:
            raise ValueError(
                "Invalid value for `visibility` ({0}), must be one of {1}"
                .format(visibility, allowed_values)
            )

        self._visibility = visibility

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

        for attr, _ in 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

        return result

    def to_str(self):
        """
        Returns the string representation of the model
        """
        return 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, Funding):
            return False

        return self.__dict__ == other.__dict__

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