# coding: utf-8

"""
    CardPay REST API

    Welcome to the CardPay REST API. The CardPay API uses HTTP verbs and a [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) resources endpoint structure (see more info about REST). Request and response payloads are formatted as JSON. Merchant uses API to create payments, refunds, payouts or recurrings, check or update transaction status and get information about created transactions. In API authentication process based on [OAuth 2.0](https://oauth.net/2/) standard. For recent changes see changelog section.  # noqa: E501

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


import pprint
import re  # noqa: F401

import six


class PayoutRequestLivingAddress(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 = {
        "address": "str",
        "city": "str",
        "country": "str",
        "state": "str",
        "zip": "str",
    }

    attribute_map = {
        "address": "address",
        "city": "city",
        "country": "country",
        "state": "state",
        "zip": "zip",
    }

    def __init__(
        self, address=None, city=None, country=None, state=None, zip=None
    ):  # noqa: E501
        """PayoutRequestLivingAddress - a model defined in Swagger"""  # noqa: E501

        self._address = None
        self._city = None
        self._country = None
        self._state = None
        self._zip = None
        self.discriminator = None

        if address is not None:
            self.address = address
        if city is not None:
            self.city = city
        if country is not None:
            self.country = country
        if state is not None:
            self.state = state
        if zip is not None:
            self.zip = zip

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

        Customer address *(mandatory for 'Latin America' methods only)* For 'Latin America' is required for methods where country = CO  # noqa: E501

        :return: The address of this PayoutRequestLivingAddress.  # noqa: E501
        :rtype: str
        """
        return self._address

    @address.setter
    def address(self, address):
        """Sets the address of this PayoutRequestLivingAddress.

        Customer address *(mandatory for 'Latin America' methods only)* For 'Latin America' is required for methods where country = CO  # noqa: E501

        :param address: The address of this PayoutRequestLivingAddress.  # noqa: E501
        :type: str
        """
        if address is not None and len(address) > 100:
            raise ValueError(
                "Invalid value for `address`, length must be less than or equal to `100`"
            )  # noqa: E501
        if address is not None and len(address) < 0:
            raise ValueError(
                "Invalid value for `address`, length must be greater than or equal to `0`"
            )  # noqa: E501

        self._address = address

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

        Customer city.  # noqa: E501

        :return: The city of this PayoutRequestLivingAddress.  # noqa: E501
        :rtype: str
        """
        return self._city

    @city.setter
    def city(self, city):
        """Sets the city of this PayoutRequestLivingAddress.

        Customer city.  # noqa: E501

        :param city: The city of this PayoutRequestLivingAddress.  # noqa: E501
        :type: str
        """
        if city is not None and len(city) > 20:
            raise ValueError(
                "Invalid value for `city`, length must be less than or equal to `20`"
            )  # noqa: E501
        if city is not None and len(city) < 0:
            raise ValueError(
                "Invalid value for `city`, length must be greater than or equal to `0`"
            )  # noqa: E501

        self._city = city

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

        ISO 3166-1 code of country: 2 or 3 latin letters or numeric code.  # noqa: E501

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

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

        ISO 3166-1 code of country: 2 or 3 latin letters or numeric code.  # noqa: E501

        :param country: The country of this PayoutRequestLivingAddress.  # noqa: E501
        :type: str
        """
        if country is not None and len(country) > 3:
            raise ValueError(
                "Invalid value for `country`, length must be less than or equal to `3`"
            )  # noqa: E501
        if country is not None and len(country) < 2:
            raise ValueError(
                "Invalid value for `country`, length must be greater than or equal to `2`"
            )  # noqa: E501

        self._country = country

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

        Living state or province.  # noqa: E501

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

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

        Living state or province.  # noqa: E501

        :param state: The state of this PayoutRequestLivingAddress.  # noqa: E501
        :type: str
        """
        if state is not None and len(state) > 20:
            raise ValueError(
                "Invalid value for `state`, length must be less than or equal to `20`"
            )  # noqa: E501
        if state is not None and len(state) < 0:
            raise ValueError(
                "Invalid value for `state`, length must be greater than or equal to `0`"
            )  # noqa: E501

        self._state = state

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

        Customer postal code  # noqa: E501

        :return: The zip of this PayoutRequestLivingAddress.  # noqa: E501
        :rtype: str
        """
        return self._zip

    @zip.setter
    def zip(self, zip):
        """Sets the zip of this PayoutRequestLivingAddress.

        Customer postal code  # noqa: E501

        :param zip: The zip of this PayoutRequestLivingAddress.  # noqa: E501
        :type: str
        """
        if zip is not None and len(zip) > 17:
            raise ValueError(
                "Invalid value for `zip`, length must be less than or equal to `17`"
            )  # noqa: E501
        if zip is not None and len(zip) < 0:
            raise ValueError(
                "Invalid value for `zip`, length must be greater than or equal to `0`"
            )  # noqa: E501

        self._zip = zip

    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:
                if value is not None:
                    result[attr] = value
        if issubclass(PayoutRequestLivingAddress, 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, PayoutRequestLivingAddress):
            return False

        return self.__dict__ == other.__dict__

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