# coding: utf-8

"""
    Coin CRDB Rest API

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

    OpenAPI spec version: 3.0.0
    Contact: devops@coin.nl
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six


class CustomerInfo(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 = {
        'lastname': 'str',
        'companyname': 'str',
        'housenr': 'str',
        'housenrext': 'str',
        'postcode': 'str',
        'customerid': 'str'
    }

    attribute_map = {
        'lastname': 'lastname',
        'companyname': 'companyname',
        'housenr': 'housenr',
        'housenrext': 'housenrext',
        'postcode': 'postcode',
        'customerid': 'customerid'
    }

    def __init__(self, lastname=None, companyname=None, housenr=None, housenrext=None, postcode=None, customerid=None):  # noqa: E501
        """CustomerInfo - a model defined in Swagger"""  # noqa: E501

        self._lastname = None
        self._companyname = None
        self._housenr = None
        self._housenrext = None
        self._postcode = None
        self._customerid = None
        self.discriminator = None

        if lastname is not None:
            self.lastname = lastname
        if companyname is not None:
            self.companyname = companyname
        if housenr is not None:
            self.housenr = housenr
        if housenrext is not None:
            self.housenrext = housenrext
        if postcode is not None:
            self.postcode = postcode
        if customerid is not None:
            self.customerid = customerid

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


        :return: The lastname of this CustomerInfo.  # noqa: E501
        :rtype: str
        """
        return self._lastname

    @lastname.setter
    def lastname(self, lastname):
        """Sets the lastname of this CustomerInfo.


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

        self._lastname = lastname

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


        :return: The companyname of this CustomerInfo.  # noqa: E501
        :rtype: str
        """
        return self._companyname

    @companyname.setter
    def companyname(self, companyname):
        """Sets the companyname of this CustomerInfo.


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

        self._companyname = companyname

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


        :return: The housenr of this CustomerInfo.  # noqa: E501
        :rtype: str
        """
        return self._housenr

    @housenr.setter
    def housenr(self, housenr):
        """Sets the housenr of this CustomerInfo.


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

        self._housenr = housenr

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


        :return: The housenrext of this CustomerInfo.  # noqa: E501
        :rtype: str
        """
        return self._housenrext

    @housenrext.setter
    def housenrext(self, housenrext):
        """Sets the housenrext of this CustomerInfo.


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

        self._housenrext = housenrext

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


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

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


        :param postcode: The postcode of this CustomerInfo.  # noqa: E501
        :type: str
        """
        if postcode is not None and not re.search(r'[0-9A-Z]{1,6}', postcode):  # noqa: E501
            raise ValueError(r"Invalid value for `postcode`, must be a follow pattern or equal to `/[0-9A-Z]{1,6}/`")  # noqa: E501

        self._postcode = postcode

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


        :return: The customerid of this CustomerInfo.  # noqa: E501
        :rtype: str
        """
        return self._customerid

    @customerid.setter
    def customerid(self, customerid):
        """Sets the customerid of this CustomerInfo.


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

        self._customerid = customerid

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

        return self.__dict__ == other.__dict__

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