# coding: utf-8

"""
    Literature Graph Service

    Fetch paper and author data from the Semantic Scholar corpus  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from s2cholar.configuration import Configuration


class BasePaper(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 = {
        'paper_id': 'str',
        'external_ids': 'object',
        'url': 'str',
        'title': 'str',
        'abstract': 'str',
        'venue': 'str',
        'year': 'int',
        'reference_count': 'int',
        'citation_count': 'int',
        'influential_citation_count': 'int',
        'is_open_access': 'bool',
        'fields_of_study': 'object',
        'authors': 'list[AuthorInfo]'
    }

    attribute_map = {
        'paper_id': 'paperId',
        'external_ids': 'externalIds',
        'url': 'url',
        'title': 'title',
        'abstract': 'abstract',
        'venue': 'venue',
        'year': 'year',
        'reference_count': 'referenceCount',
        'citation_count': 'citationCount',
        'influential_citation_count': 'influentialCitationCount',
        'is_open_access': 'isOpenAccess',
        'fields_of_study': 'fieldsOfStudy',
        'authors': 'authors'
    }

    def __init__(self, paper_id=None, external_ids=None, url=None, title=None, abstract=None, venue=None, year=None, reference_count=None, citation_count=None, influential_citation_count=None, is_open_access=None, fields_of_study=None, authors=None, _configuration=None):  # noqa: E501
        """BasePaper - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._paper_id = None
        self._external_ids = None
        self._url = None
        self._title = None
        self._abstract = None
        self._venue = None
        self._year = None
        self._reference_count = None
        self._citation_count = None
        self._influential_citation_count = None
        self._is_open_access = None
        self._fields_of_study = None
        self._authors = None
        self.discriminator = None

        self.paper_id = paper_id
        if external_ids is not None:
            self.external_ids = external_ids
        if url is not None:
            self.url = url
        if title is not None:
            self.title = title
        if abstract is not None:
            self.abstract = abstract
        if venue is not None:
            self.venue = venue
        if year is not None:
            self.year = year
        if reference_count is not None:
            self.reference_count = reference_count
        if citation_count is not None:
            self.citation_count = citation_count
        if influential_citation_count is not None:
            self.influential_citation_count = influential_citation_count
        if is_open_access is not None:
            self.is_open_access = is_open_access
        if fields_of_study is not None:
            self.fields_of_study = fields_of_study
        if authors is not None:
            self.authors = authors

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


        :return: The paper_id of this BasePaper.  # noqa: E501
        :rtype: str
        """
        return self._paper_id

    @paper_id.setter
    def paper_id(self, paper_id):
        """Sets the paper_id of this BasePaper.


        :param paper_id: The paper_id of this BasePaper.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and paper_id is None:
            raise ValueError("Invalid value for `paper_id`, must not be `None`")  # noqa: E501

        self._paper_id = paper_id

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

        Other catalog IDs for this paper, if known. Supports ArXiv, MAG, ACL, PubMed, Medline, PubMedCentral, DBLP, DOI.  # noqa: E501

        :return: The external_ids of this BasePaper.  # noqa: E501
        :rtype: object
        """
        return self._external_ids

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

        Other catalog IDs for this paper, if known. Supports ArXiv, MAG, ACL, PubMed, Medline, PubMedCentral, DBLP, DOI.  # noqa: E501

        :param external_ids: The external_ids of this BasePaper.  # noqa: E501
        :type: object
        """

        self._external_ids = external_ids

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

        URL on the Semantic Scholar website  # noqa: E501

        :return: The url of this BasePaper.  # noqa: E501
        :rtype: str
        """
        return self._url

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

        URL on the Semantic Scholar website  # noqa: E501

        :param url: The url of this BasePaper.  # noqa: E501
        :type: str
        """

        self._url = url

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


        :return: The title of this BasePaper.  # noqa: E501
        :rtype: str
        """
        return self._title

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


        :param title: The title of this BasePaper.  # noqa: E501
        :type: str
        """

        self._title = title

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


        :return: The abstract of this BasePaper.  # noqa: E501
        :rtype: str
        """
        return self._abstract

    @abstract.setter
    def abstract(self, abstract):
        """Sets the abstract of this BasePaper.


        :param abstract: The abstract of this BasePaper.  # noqa: E501
        :type: str
        """

        self._abstract = abstract

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


        :return: The venue of this BasePaper.  # noqa: E501
        :rtype: str
        """
        return self._venue

    @venue.setter
    def venue(self, venue):
        """Sets the venue of this BasePaper.


        :param venue: The venue of this BasePaper.  # noqa: E501
        :type: str
        """

        self._venue = venue

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


        :return: The year of this BasePaper.  # noqa: E501
        :rtype: int
        """
        return self._year

    @year.setter
    def year(self, year):
        """Sets the year of this BasePaper.


        :param year: The year of this BasePaper.  # noqa: E501
        :type: int
        """

        self._year = year

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


        :return: The reference_count of this BasePaper.  # noqa: E501
        :rtype: int
        """
        return self._reference_count

    @reference_count.setter
    def reference_count(self, reference_count):
        """Sets the reference_count of this BasePaper.


        :param reference_count: The reference_count of this BasePaper.  # noqa: E501
        :type: int
        """

        self._reference_count = reference_count

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


        :return: The citation_count of this BasePaper.  # noqa: E501
        :rtype: int
        """
        return self._citation_count

    @citation_count.setter
    def citation_count(self, citation_count):
        """Sets the citation_count of this BasePaper.


        :param citation_count: The citation_count of this BasePaper.  # noqa: E501
        :type: int
        """

        self._citation_count = citation_count

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

        https://www.semanticscholar.org/faq#influential-citations  # noqa: E501

        :return: The influential_citation_count of this BasePaper.  # noqa: E501
        :rtype: int
        """
        return self._influential_citation_count

    @influential_citation_count.setter
    def influential_citation_count(self, influential_citation_count):
        """Sets the influential_citation_count of this BasePaper.

        https://www.semanticscholar.org/faq#influential-citations  # noqa: E501

        :param influential_citation_count: The influential_citation_count of this BasePaper.  # noqa: E501
        :type: int
        """

        self._influential_citation_count = influential_citation_count

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

        https://www.openaccess.nl/en/what-is-open-access  # noqa: E501

        :return: The is_open_access of this BasePaper.  # noqa: E501
        :rtype: bool
        """
        return self._is_open_access

    @is_open_access.setter
    def is_open_access(self, is_open_access):
        """Sets the is_open_access of this BasePaper.

        https://www.openaccess.nl/en/what-is-open-access  # noqa: E501

        :param is_open_access: The is_open_access of this BasePaper.  # noqa: E501
        :type: bool
        """

        self._is_open_access = is_open_access

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

        A list of high-level academic categories  # noqa: E501

        :return: The fields_of_study of this BasePaper.  # noqa: E501
        :rtype: object
        """
        return self._fields_of_study

    @fields_of_study.setter
    def fields_of_study(self, fields_of_study):
        """Sets the fields_of_study of this BasePaper.

        A list of high-level academic categories  # noqa: E501

        :param fields_of_study: The fields_of_study of this BasePaper.  # noqa: E501
        :type: object
        """

        self._fields_of_study = fields_of_study

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


        :return: The authors of this BasePaper.  # noqa: E501
        :rtype: list[AuthorInfo]
        """
        return self._authors

    @authors.setter
    def authors(self, authors):
        """Sets the authors of this BasePaper.


        :param authors: The authors of this BasePaper.  # noqa: E501
        :type: list[AuthorInfo]
        """

        self._authors = authors

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

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