# coding: utf-8

"""
    Ed-Fi Operational Data Store API

    The Ed-Fi ODS / API enables applications to read and write education data stored in an Ed-Fi ODS through a secure REST interface.  ***  > *Note: Consumers of ODS / API information should sanitize all data for display and storage. The ODS / API provides reasonable safeguards against cross-site scripting attacks and other malicious content, but the platform does not and cannot guarantee that the data it contains is free of all potentially harmful content.*  ***   # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from swagger_client.configuration import Configuration


class EdFiCredentialReference(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 = {
        'credential_identifier': 'str',
        'state_of_issue_state_abbreviation_descriptor': 'str',
        'link': 'Link'
    }

    attribute_map = {
        'credential_identifier': 'credentialIdentifier',
        'state_of_issue_state_abbreviation_descriptor': 'stateOfIssueStateAbbreviationDescriptor',
        'link': 'link'
    }

    def __init__(self, credential_identifier=None, state_of_issue_state_abbreviation_descriptor=None, link=None, _configuration=None):  # noqa: E501
        """EdFiCredentialReference - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._credential_identifier = None
        self._state_of_issue_state_abbreviation_descriptor = None
        self._link = None
        self.discriminator = None

        self.credential_identifier = credential_identifier
        self.state_of_issue_state_abbreviation_descriptor = state_of_issue_state_abbreviation_descriptor
        if link is not None:
            self.link = link

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

        Identifier or serial number assigned to the credential.  # noqa: E501

        :return: The credential_identifier of this EdFiCredentialReference.  # noqa: E501
        :rtype: str
        """
        return self._credential_identifier

    @credential_identifier.setter
    def credential_identifier(self, credential_identifier):
        """Sets the credential_identifier of this EdFiCredentialReference.

        Identifier or serial number assigned to the credential.  # noqa: E501

        :param credential_identifier: The credential_identifier of this EdFiCredentialReference.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and credential_identifier is None:
            raise ValueError("Invalid value for `credential_identifier`, must not be `None`")  # noqa: E501
        if (self._configuration.client_side_validation and
                credential_identifier is not None and len(credential_identifier) > 60):
            raise ValueError("Invalid value for `credential_identifier`, length must be less than or equal to `60`")  # noqa: E501

        self._credential_identifier = credential_identifier

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

        The abbreviation for the name of the state (within the United States) or extra-state jurisdiction in which a license/credential was issued.  # noqa: E501

        :return: The state_of_issue_state_abbreviation_descriptor of this EdFiCredentialReference.  # noqa: E501
        :rtype: str
        """
        return self._state_of_issue_state_abbreviation_descriptor

    @state_of_issue_state_abbreviation_descriptor.setter
    def state_of_issue_state_abbreviation_descriptor(self, state_of_issue_state_abbreviation_descriptor):
        """Sets the state_of_issue_state_abbreviation_descriptor of this EdFiCredentialReference.

        The abbreviation for the name of the state (within the United States) or extra-state jurisdiction in which a license/credential was issued.  # noqa: E501

        :param state_of_issue_state_abbreviation_descriptor: The state_of_issue_state_abbreviation_descriptor of this EdFiCredentialReference.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and state_of_issue_state_abbreviation_descriptor is None:
            raise ValueError("Invalid value for `state_of_issue_state_abbreviation_descriptor`, must not be `None`")  # noqa: E501
        if (self._configuration.client_side_validation and
                state_of_issue_state_abbreviation_descriptor is not None and len(state_of_issue_state_abbreviation_descriptor) > 306):
            raise ValueError("Invalid value for `state_of_issue_state_abbreviation_descriptor`, length must be less than or equal to `306`")  # noqa: E501

        self._state_of_issue_state_abbreviation_descriptor = state_of_issue_state_abbreviation_descriptor

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


        :return: The link of this EdFiCredentialReference.  # noqa: E501
        :rtype: Link
        """
        return self._link

    @link.setter
    def link(self, link):
        """Sets the link of this EdFiCredentialReference.


        :param link: The link of this EdFiCredentialReference.  # noqa: E501
        :type: Link
        """

        self._link = link

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

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