# coding: utf-8

"""
    ORCID Member

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

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

import pprint
import re  # noqa: F401

import six
from orcid_api_v3.models.transient_error import TransientError  # noqa: F401,E501
from orcid_api_v3.models.transient_non_empty_string import TransientNonEmptyString  # noqa: F401,E501
from orcid_api_v3.models.url_v30 import UrlV30  # noqa: F401,E501


class ExternalIDV30(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 = {
        'external_id_type': 'str',
        'external_id_value': 'str',
        'external_id_normalized': 'TransientNonEmptyString',
        'external_id_normalized_error': 'TransientError',
        'external_id_url': 'UrlV30',
        'external_id_relationship': 'str'
    }

    attribute_map = {
        'external_id_type': 'external-id-type',
        'external_id_value': 'external-id-value',
        'external_id_normalized': 'external-id-normalized',
        'external_id_normalized_error': 'external-id-normalized-error',
        'external_id_url': 'external-id-url',
        'external_id_relationship': 'external-id-relationship'
    }

    def __init__(self, external_id_type=None, external_id_value=None, external_id_normalized=None, external_id_normalized_error=None, external_id_url=None, external_id_relationship=None):  # noqa: E501
        """ExternalIDV30 - a model defined in Swagger"""  # noqa: E501
        self._external_id_type = None
        self._external_id_value = None
        self._external_id_normalized = None
        self._external_id_normalized_error = None
        self._external_id_url = None
        self._external_id_relationship = None
        self.discriminator = None
        self.external_id_type = external_id_type
        self.external_id_value = external_id_value
        if external_id_normalized is not None:
            self.external_id_normalized = external_id_normalized
        if external_id_normalized_error is not None:
            self.external_id_normalized_error = external_id_normalized_error
        if external_id_url is not None:
            self.external_id_url = external_id_url
        if external_id_relationship is not None:
            self.external_id_relationship = external_id_relationship

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


        :return: The external_id_type of this ExternalIDV30.  # noqa: E501
        :rtype: str
        """
        return self._external_id_type

    @external_id_type.setter
    def external_id_type(self, external_id_type):
        """Sets the external_id_type of this ExternalIDV30.


        :param external_id_type: The external_id_type of this ExternalIDV30.  # noqa: E501
        :type: str
        """
        if external_id_type is None:
            raise ValueError("Invalid value for `external_id_type`, must not be `None`")  # noqa: E501

        self._external_id_type = external_id_type

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


        :return: The external_id_value of this ExternalIDV30.  # noqa: E501
        :rtype: str
        """
        return self._external_id_value

    @external_id_value.setter
    def external_id_value(self, external_id_value):
        """Sets the external_id_value of this ExternalIDV30.


        :param external_id_value: The external_id_value of this ExternalIDV30.  # noqa: E501
        :type: str
        """
        if external_id_value is None:
            raise ValueError("Invalid value for `external_id_value`, must not be `None`")  # noqa: E501

        self._external_id_value = external_id_value

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


        :return: The external_id_normalized of this ExternalIDV30.  # noqa: E501
        :rtype: TransientNonEmptyString
        """
        return self._external_id_normalized

    @external_id_normalized.setter
    def external_id_normalized(self, external_id_normalized):
        """Sets the external_id_normalized of this ExternalIDV30.


        :param external_id_normalized: The external_id_normalized of this ExternalIDV30.  # noqa: E501
        :type: TransientNonEmptyString
        """

        self._external_id_normalized = external_id_normalized

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


        :return: The external_id_normalized_error of this ExternalIDV30.  # noqa: E501
        :rtype: TransientError
        """
        return self._external_id_normalized_error

    @external_id_normalized_error.setter
    def external_id_normalized_error(self, external_id_normalized_error):
        """Sets the external_id_normalized_error of this ExternalIDV30.


        :param external_id_normalized_error: The external_id_normalized_error of this ExternalIDV30.  # noqa: E501
        :type: TransientError
        """

        self._external_id_normalized_error = external_id_normalized_error

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


        :return: The external_id_url of this ExternalIDV30.  # noqa: E501
        :rtype: UrlV30
        """
        return self._external_id_url

    @external_id_url.setter
    def external_id_url(self, external_id_url):
        """Sets the external_id_url of this ExternalIDV30.


        :param external_id_url: The external_id_url of this ExternalIDV30.  # noqa: E501
        :type: UrlV30
        """

        self._external_id_url = external_id_url

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


        :return: The external_id_relationship of this ExternalIDV30.  # noqa: E501
        :rtype: str
        """
        return self._external_id_relationship

    @external_id_relationship.setter
    def external_id_relationship(self, external_id_relationship):
        """Sets the external_id_relationship of this ExternalIDV30.


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

        self._external_id_relationship = external_id_relationship

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

        return self.__dict__ == other.__dict__

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