# 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 Work(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, title=None, journal_title=None, short_description=None, citation=None, type=None, publication_date=None, external_ids=None, url=None, contributors=None, language_code=None, country=None, visibility=None):
        """
        Work - 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',
            'title': 'WorkTitle',
            'journal_title': 'Title',
            'short_description': 'str',
            'citation': 'Citation',
            'type': 'str',
            'publication_date': 'PublicationDate',
            'external_ids': 'ExternalIDs',
            'url': 'Url',
            'contributors': 'WorkContributors',
            'language_code': 'str',
            'country': 'Country',
            'visibility': 'str'
        }

        self.attribute_map = {
            'created_date': 'created-date',
            'last_modified_date': 'last-modified-date',
            'source': 'source',
            'put_code': 'put-code',
            'path': 'path',
            'title': 'title',
            'journal_title': 'journal-title',
            'short_description': 'short-description',
            'citation': 'citation',
            'type': 'type',
            'publication_date': 'publication-date',
            'external_ids': 'external-ids',
            'url': 'url',
            'contributors': 'contributors',
            'language_code': 'language-code',
            'country': 'country',
            '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._title = title
        self._journal_title = journal_title
        self._short_description = short_description
        self._citation = citation
        self._type = type
        self._publication_date = publication_date
        self._external_ids = external_ids
        self._url = url
        self._contributors = contributors
        self._language_code = language_code
        self._country = country
        self._visibility = visibility

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

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

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

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

        self._created_date = created_date

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

        :return: The last_modified_date of this Work.
        :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 Work.

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

        self._last_modified_date = last_modified_date

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

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

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

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

        self._source = source

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

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

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

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

        self._put_code = put_code

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

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

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

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

        self._path = path

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

        :return: The title of this Work.
        :rtype: WorkTitle
        """
        return self._title

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

        :param title: The title of this Work.
        :type: WorkTitle
        """

        self._title = title

    @property
    def journal_title(self):
        """
        Gets the journal_title of this Work.

        :return: The journal_title of this Work.
        :rtype: Title
        """
        return self._journal_title

    @journal_title.setter
    def journal_title(self, journal_title):
        """
        Sets the journal_title of this Work.

        :param journal_title: The journal_title of this Work.
        :type: Title
        """

        self._journal_title = journal_title

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

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

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

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

        self._short_description = short_description

    @property
    def citation(self):
        """
        Gets the citation of this Work.

        :return: The citation of this Work.
        :rtype: Citation
        """
        return self._citation

    @citation.setter
    def citation(self, citation):
        """
        Sets the citation of this Work.

        :param citation: The citation of this Work.
        :type: Citation
        """

        self._citation = citation

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

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

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

        :param type: The type of this Work.
        :type: str
        """
        allowed_values = ["ARTISTIC_PERFORMANCE", "BOOK_CHAPTER", "BOOK_REVIEW", "BOOK", "CONFERENCE_ABSTRACT", "CONFERENCE_PAPER", "CONFERENCE_POSTER", "DATA_SET", "DICTIONARY_ENTRY", "DISCLOSURE", "DISSERTATION", "EDITED_BOOK", "ENCYCLOPEDIA_ENTRY", "INVENTION", "JOURNAL_ARTICLE", "JOURNAL_ISSUE", "LECTURE_SPEECH", "LICENSE", "MAGAZINE_ARTICLE", "MANUAL", "NEWSLETTER_ARTICLE", "NEWSPAPER_ARTICLE", "ONLINE_RESOURCE", "OTHER", "PATENT", "REGISTERED_COPYRIGHT", "REPORT", "RESEARCH_TECHNIQUE", "RESEARCH_TOOL", "SPIN_OFF_COMPANY", "STANDARDS_AND_POLICY", "SUPERVISED_STUDENT_PUBLICATION", "TECHNICAL_STANDARD", "TEST", "TRADEMARK", "TRANSLATION", "WEBSITE", "WORKING_PAPER", "UNDEFINED"]
        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 publication_date(self):
        """
        Gets the publication_date of this Work.

        :return: The publication_date of this Work.
        :rtype: PublicationDate
        """
        return self._publication_date

    @publication_date.setter
    def publication_date(self, publication_date):
        """
        Sets the publication_date of this Work.

        :param publication_date: The publication_date of this Work.
        :type: PublicationDate
        """

        self._publication_date = publication_date

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

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

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

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

        self._external_ids = external_ids

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

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

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

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

        self._url = url

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

        :return: The contributors of this Work.
        :rtype: WorkContributors
        """
        return self._contributors

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

        :param contributors: The contributors of this Work.
        :type: WorkContributors
        """

        self._contributors = contributors

    @property
    def language_code(self):
        """
        Gets the language_code of this Work.

        :return: The language_code of this Work.
        :rtype: str
        """
        return self._language_code

    @language_code.setter
    def language_code(self, language_code):
        """
        Sets the language_code of this Work.

        :param language_code: The language_code of this Work.
        :type: str
        """

        self._language_code = language_code

    @property
    def country(self):
        """
        Gets the country of this Work.

        :return: The country of this Work.
        :rtype: Country
        """
        return self._country

    @country.setter
    def country(self, country):
        """
        Sets the country of this Work.

        :param country: The country of this Work.
        :type: Country
        """

        self._country = country

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

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

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

        :param visibility: The visibility of this Work.
        :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, Work):
            return False

        return self.__dict__ == other.__dict__

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