# coding: utf-8

"""
    PubMan REST API

    This is an automatically generated REST API client for PubMan.  # noqa: E501

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


import pprint
import re  # noqa: F401

import six


class ContextDbVO(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 = {
        'allowed_genres': 'list[str]',
        'allowed_subject_classifications': 'list[str]',
        'contact_email': 'str',
        'creation_date': 'datetime',
        'creator': 'AccountUserDbRO',
        'description': 'str',
        'last_modification_date': 'datetime',
        'modifier': 'AccountUserDbRO',
        'name': 'str',
        'object_id': 'str',
        'responsible_affiliations': 'list[AffiliationDbRO]',
        'state': 'str',
        'workflow': 'str'
    }

    attribute_map = {
        'allowed_genres': 'allowedGenres',
        'allowed_subject_classifications': 'allowedSubjectClassifications',
        'contact_email': 'contactEmail',
        'creation_date': 'creationDate',
        'creator': 'creator',
        'description': 'description',
        'last_modification_date': 'lastModificationDate',
        'modifier': 'modifier',
        'name': 'name',
        'object_id': 'objectId',
        'responsible_affiliations': 'responsibleAffiliations',
        'state': 'state',
        'workflow': 'workflow'
    }

    def __init__(self, allowed_genres=None, allowed_subject_classifications=None, contact_email=None, creation_date=None, creator=None, description=None, last_modification_date=None, modifier=None, name=None, object_id=None, responsible_affiliations=None, state=None, workflow=None):  # noqa: E501
        """ContextDbVO - a model defined in Swagger"""  # noqa: E501

        self._allowed_genres = None
        self._allowed_subject_classifications = None
        self._contact_email = None
        self._creation_date = None
        self._creator = None
        self._description = None
        self._last_modification_date = None
        self._modifier = None
        self._name = None
        self._object_id = None
        self._responsible_affiliations = None
        self._state = None
        self._workflow = None
        self.discriminator = None

        if allowed_genres is not None:
            self.allowed_genres = allowed_genres
        if allowed_subject_classifications is not None:
            self.allowed_subject_classifications = allowed_subject_classifications
        if contact_email is not None:
            self.contact_email = contact_email
        if creation_date is not None:
            self.creation_date = creation_date
        if creator is not None:
            self.creator = creator
        if description is not None:
            self.description = description
        if last_modification_date is not None:
            self.last_modification_date = last_modification_date
        if modifier is not None:
            self.modifier = modifier
        if name is not None:
            self.name = name
        if object_id is not None:
            self.object_id = object_id
        if responsible_affiliations is not None:
            self.responsible_affiliations = responsible_affiliations
        if state is not None:
            self.state = state
        if workflow is not None:
            self.workflow = workflow

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


        :return: The allowed_genres of this ContextDbVO.  # noqa: E501
        :rtype: list[str]
        """
        return self._allowed_genres

    @allowed_genres.setter
    def allowed_genres(self, allowed_genres):
        """Sets the allowed_genres of this ContextDbVO.


        :param allowed_genres: The allowed_genres of this ContextDbVO.  # noqa: E501
        :type: list[str]
        """
        allowed_values = ["ARTICLE", "BOOK", "BOOK_ITEM", "BOOK_REVIEW", "CASE_NOTE", "CASE_STUDY", "COLLECTED_EDITION", "COMMENTARY", "CONFERENCE_PAPER", "CONFERENCE_REPORT", "CONTRIBUTION_TO_COLLECTED_EDITION", "CONTRIBUTION_TO_COMMENTARY", "CONTRIBUTION_TO_ENCYCLOPEDIA", "CONTRIBUTION_TO_FESTSCHRIFT", "CONTRIBUTION_TO_HANDBOOK", "COURSEWARE_LECTURE", "EDITORIAL", "ENCYCLOPEDIA", "FESTSCHRIFT", "FILM", "HANDBOOK", "ISSUE", "JOURNAL", "MANUAL", "MANUSCRIPT", "MEETING_ABSTRACT", "MONOGRAPH", "MULTI_VOLUME", "NEWSPAPER", "NEWSPAPER_ARTICLE", "OPINION", "OTHER", "PAPER", "PATENT", "POSTER", "PROCEEDINGS", "REPORT", "SERIES", "TALK_AT_EVENT", "THESIS"]  # noqa: E501
        if not set(allowed_genres).issubset(set(allowed_values)):
            raise ValueError(
                "Invalid values for `allowed_genres` [{0}], must be a subset of [{1}]"  # noqa: E501
                .format(", ".join(map(str, set(allowed_genres) - set(allowed_values))),  # noqa: E501
                        ", ".join(map(str, allowed_values)))
            )

        self._allowed_genres = allowed_genres

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


        :return: The allowed_subject_classifications of this ContextDbVO.  # noqa: E501
        :rtype: list[str]
        """
        return self._allowed_subject_classifications

    @allowed_subject_classifications.setter
    def allowed_subject_classifications(self, allowed_subject_classifications):
        """Sets the allowed_subject_classifications of this ContextDbVO.


        :param allowed_subject_classifications: The allowed_subject_classifications of this ContextDbVO.  # noqa: E501
        :type: list[str]
        """
        allowed_values = ["DDC", "ISO639_3", "JEL", "JUS", "MPINP", "MPIPKS", "MPIRG", "MPIS_GROUPS", "MPIS_PROJECTS", "MPIWG_PROJECTS", "MPICC_PROJECTS", "PACS"]  # noqa: E501
        if not set(allowed_subject_classifications).issubset(set(allowed_values)):
            raise ValueError(
                "Invalid values for `allowed_subject_classifications` [{0}], must be a subset of [{1}]"  # noqa: E501
                .format(", ".join(map(str, set(allowed_subject_classifications) - set(allowed_values))),  # noqa: E501
                        ", ".join(map(str, allowed_values)))
            )

        self._allowed_subject_classifications = allowed_subject_classifications

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


        :return: The contact_email of this ContextDbVO.  # noqa: E501
        :rtype: str
        """
        return self._contact_email

    @contact_email.setter
    def contact_email(self, contact_email):
        """Sets the contact_email of this ContextDbVO.


        :param contact_email: The contact_email of this ContextDbVO.  # noqa: E501
        :type: str
        """

        self._contact_email = contact_email

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


        :return: The creation_date of this ContextDbVO.  # noqa: E501
        :rtype: datetime
        """
        return self._creation_date

    @creation_date.setter
    def creation_date(self, creation_date):
        """Sets the creation_date of this ContextDbVO.


        :param creation_date: The creation_date of this ContextDbVO.  # noqa: E501
        :type: datetime
        """

        self._creation_date = creation_date

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


        :return: The creator of this ContextDbVO.  # noqa: E501
        :rtype: AccountUserDbRO
        """
        return self._creator

    @creator.setter
    def creator(self, creator):
        """Sets the creator of this ContextDbVO.


        :param creator: The creator of this ContextDbVO.  # noqa: E501
        :type: AccountUserDbRO
        """

        self._creator = creator

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


        :return: The description of this ContextDbVO.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this ContextDbVO.


        :param description: The description of this ContextDbVO.  # noqa: E501
        :type: str
        """

        self._description = description

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


        :return: The last_modification_date of this ContextDbVO.  # noqa: E501
        :rtype: datetime
        """
        return self._last_modification_date

    @last_modification_date.setter
    def last_modification_date(self, last_modification_date):
        """Sets the last_modification_date of this ContextDbVO.


        :param last_modification_date: The last_modification_date of this ContextDbVO.  # noqa: E501
        :type: datetime
        """

        self._last_modification_date = last_modification_date

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


        :return: The modifier of this ContextDbVO.  # noqa: E501
        :rtype: AccountUserDbRO
        """
        return self._modifier

    @modifier.setter
    def modifier(self, modifier):
        """Sets the modifier of this ContextDbVO.


        :param modifier: The modifier of this ContextDbVO.  # noqa: E501
        :type: AccountUserDbRO
        """

        self._modifier = modifier

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


        :return: The name of this ContextDbVO.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this ContextDbVO.


        :param name: The name of this ContextDbVO.  # noqa: E501
        :type: str
        """

        self._name = name

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


        :return: The object_id of this ContextDbVO.  # noqa: E501
        :rtype: str
        """
        return self._object_id

    @object_id.setter
    def object_id(self, object_id):
        """Sets the object_id of this ContextDbVO.


        :param object_id: The object_id of this ContextDbVO.  # noqa: E501
        :type: str
        """

        self._object_id = object_id

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


        :return: The responsible_affiliations of this ContextDbVO.  # noqa: E501
        :rtype: list[AffiliationDbRO]
        """
        return self._responsible_affiliations

    @responsible_affiliations.setter
    def responsible_affiliations(self, responsible_affiliations):
        """Sets the responsible_affiliations of this ContextDbVO.


        :param responsible_affiliations: The responsible_affiliations of this ContextDbVO.  # noqa: E501
        :type: list[AffiliationDbRO]
        """

        self._responsible_affiliations = responsible_affiliations

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


        :return: The state of this ContextDbVO.  # noqa: E501
        :rtype: str
        """
        return self._state

    @state.setter
    def state(self, state):
        """Sets the state of this ContextDbVO.


        :param state: The state of this ContextDbVO.  # noqa: E501
        :type: str
        """
        allowed_values = ["CREATED", "CLOSED", "OPENED", "DELETED"]  # noqa: E501
        if state not in allowed_values:
            raise ValueError(
                "Invalid value for `state` ({0}), must be one of {1}"  # noqa: E501
                .format(state, allowed_values)
            )

        self._state = state

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


        :return: The workflow of this ContextDbVO.  # noqa: E501
        :rtype: str
        """
        return self._workflow

    @workflow.setter
    def workflow(self, workflow):
        """Sets the workflow of this ContextDbVO.


        :param workflow: The workflow of this ContextDbVO.  # noqa: E501
        :type: str
        """
        allowed_values = ["STANDARD", "SIMPLE"]  # noqa: E501
        if workflow not in allowed_values:
            raise ValueError(
                "Invalid value for `workflow` ({0}), must be one of {1}"  # noqa: E501
                .format(workflow, allowed_values)
            )

        self._workflow = workflow

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

        return self.__dict__ == other.__dict__

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