# 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 Address(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 = {
        'flat_number': 'str',
        'building_number': 'str',
        'building_name': 'str',
        'street': 'str',
        'sub_street': 'str',
        'town': 'str',
        'postcode': 'str',
        'country': 'str',
        'start_date': 'date',
        'end_date': 'date',
        'state': 'str'
    }

    attribute_map = {
        'flat_number': 'flat_number',
        'building_number': 'building_number',
        'building_name': 'building_name',
        'street': 'street',
        'sub_street': 'sub_street',
        'town': 'town',
        'postcode': 'postcode',
        'country': 'country',
        'start_date': 'start_date',
        'end_date': 'end_date',
        'state': 'state'
    }

    def __init__(self, flat_number=None, building_number=None, building_name=None, street=None, sub_street=None, town=None, postcode=None, country=None, start_date=None, end_date=None, state=None):  # noqa: E501
        """Address - a model defined in OpenAPI"""  # noqa: E501

        self._flat_number = None
        self._building_number = None
        self._building_name = None
        self._street = None
        self._sub_street = None
        self._town = None
        self._postcode = None
        self._country = None
        self._start_date = None
        self._end_date = None
        self._state = None
        self.discriminator = None

        if flat_number is not None:
            self.flat_number = flat_number
        if building_number is not None:
            self.building_number = building_number
        if building_name is not None:
            self.building_name = building_name
        if street is not None:
            self.street = street
        if sub_street is not None:
            self.sub_street = sub_street
        if town is not None:
            self.town = town
        if postcode is not None:
            self.postcode = postcode
        if country is not None:
            self.country = country
        if start_date is not None:
            self.start_date = start_date
        if end_date is not None:
            self.end_date = end_date
        if state is not None:
            self.state = state

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

        The flat number of this address  # noqa: E501

        :return: The flat_number of this Address.  # noqa: E501
        :rtype: str
        """
        return self._flat_number

    @flat_number.setter
    def flat_number(self, flat_number):
        """Sets the flat_number of this Address.

        The flat number of this address  # noqa: E501

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

        self._flat_number = flat_number

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

        The building number of this address  # noqa: E501

        :return: The building_number of this Address.  # noqa: E501
        :rtype: str
        """
        return self._building_number

    @building_number.setter
    def building_number(self, building_number):
        """Sets the building_number of this Address.

        The building number of this address  # noqa: E501

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

        self._building_number = building_number

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

        The building name of this address  # noqa: E501

        :return: The building_name of this Address.  # noqa: E501
        :rtype: str
        """
        return self._building_name

    @building_name.setter
    def building_name(self, building_name):
        """Sets the building_name of this Address.

        The building name of this address  # noqa: E501

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

        self._building_name = building_name

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

        The street of the applicant’s address  # noqa: E501

        :return: The street of this Address.  # noqa: E501
        :rtype: str
        """
        return self._street

    @street.setter
    def street(self, street):
        """Sets the street of this Address.

        The street of the applicant’s address  # noqa: E501

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

        self._street = street

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

        The sub-street of the applicant’s address  # noqa: E501

        :return: The sub_street of this Address.  # noqa: E501
        :rtype: str
        """
        return self._sub_street

    @sub_street.setter
    def sub_street(self, sub_street):
        """Sets the sub_street of this Address.

        The sub-street of the applicant’s address  # noqa: E501

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

        self._sub_street = sub_street

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

        The town of the applicant’s address  # noqa: E501

        :return: The town of this Address.  # noqa: E501
        :rtype: str
        """
        return self._town

    @town.setter
    def town(self, town):
        """Sets the town of this Address.

        The town of the applicant’s address  # noqa: E501

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

        self._town = town

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

        The postcode or ZIP of the applicant’s address  # noqa: E501

        :return: The postcode of this Address.  # noqa: E501
        :rtype: str
        """
        return self._postcode

    @postcode.setter
    def postcode(self, postcode):
        """Sets the postcode of this Address.

        The postcode or ZIP of the applicant’s address  # noqa: E501

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

        self._postcode = postcode

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

        The 3 character ISO country code of this address. For example, GBR is the country code for the United Kingdom  # noqa: E501

        :return: The country of this Address.  # noqa: E501
        :rtype: str
        """
        return self._country

    @country.setter
    def country(self, country):
        """Sets the country of this Address.

        The 3 character ISO country code of this address. For example, GBR is the country code for the United Kingdom  # noqa: E501

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

        self._country = country

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

        The date the applicant started living at this address  # noqa: E501

        :return: The start_date of this Address.  # noqa: E501
        :rtype: date
        """
        return self._start_date

    @start_date.setter
    def start_date(self, start_date):
        """Sets the start_date of this Address.

        The date the applicant started living at this address  # noqa: E501

        :param start_date: The start_date of this Address.  # noqa: E501
        :type: date
        """

        self._start_date = start_date

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

        The date the applicant left this address. If current residence, leave null  # noqa: E501

        :return: The end_date of this Address.  # noqa: E501
        :rtype: date
        """
        return self._end_date

    @end_date.setter
    def end_date(self, end_date):
        """Sets the end_date of this Address.

        The date the applicant left this address. If current residence, leave null  # noqa: E501

        :param end_date: The end_date of this Address.  # noqa: E501
        :type: date
        """

        self._end_date = end_date

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

        The address state. US states must use the USPS abbreviation (see also ISO 3166-2:US), for example AK, CA, or TX.  # noqa: E501

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

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

        The address state. US states must use the USPS abbreviation (see also ISO 3166-2:US), for example AK, CA, or TX.  # noqa: E501

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

        self._state = state

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

        return self.__dict__ == other.__dict__

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