# coding: utf-8

"""
    Onfido API

    The Onfido API is used to submit check requests.  # noqa: E501

    OpenAPI spec version: 2.0.0
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six


class IdNumber(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'type': 'str',
        'value': 'str',
        'state_code': 'str'
    }

    attribute_map = {
        'type': 'type',
        'value': 'value',
        'state_code': 'state_code'
    }

    def __init__(self, type=None, value=None, state_code=None):  # noqa: E501
        """IdNumber - a model defined in OpenAPI"""  # noqa: E501

        self._type = None
        self._value = None
        self._state_code = None
        self.discriminator = None

        if type is not None:
            self.type = type
        if value is not None:
            self.value = value
        if state_code is not None:
            self.state_code = state_code

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

        Type of ID number. Valid values are `ssn`, `social_insurance`, `tax_id`, `identity_card`, `passport` and `driving_license`  # noqa: E501

        :return: The type of this IdNumber.  # noqa: E501
        :rtype: str
        """
        return self._type

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

        Type of ID number. Valid values are `ssn`, `social_insurance`, `tax_id`, `identity_card`, `passport` and `driving_license`  # noqa: E501

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

        self._type = type

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

        Value of ID number  # noqa: E501

        :return: The value of this IdNumber.  # noqa: E501
        :rtype: str
        """
        return self._value

    @value.setter
    def value(self, value):
        """Sets the value of this IdNumber.

        Value of ID number  # noqa: E501

        :param value: The value of this IdNumber.  # noqa: E501
        :type: str
        """

        self._value = value

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

        Two letter code of issuing state (state-issued driving licenses only)  # noqa: E501

        :return: The state_code of this IdNumber.  # noqa: E501
        :rtype: str
        """
        return self._state_code

    @state_code.setter
    def state_code(self, state_code):
        """Sets the state_code of this IdNumber.

        Two letter code of issuing state (state-issued driving licenses only)  # noqa: E501

        :param state_code: The state_code of this IdNumber.  # noqa: E501
        :type: str
        """

        self._state_code = state_code

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_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 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, IdNumber):
            return False

        return self.__dict__ == other.__dict__

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