# coding: utf-8

"""
    Netilion API Documentation

    Welcome to the Netilion API Documentation, which provides interactive access and documentation to our REST API. Please visit our developer portal for further instructions and information: https://developer.netilion.endress.com/   # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class AddressBase(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 = {
        'street': 'str',
        'street_number': 'str',
        'zip_code': 'str',
        'city': 'str',
        'region_code': 'str',
        'country_code': 'str',
        'phone': 'str',
        'company_name': 'str'
    }

    attribute_map = {
        'street': 'street',
        'street_number': 'street_number',
        'zip_code': 'zip_code',
        'city': 'city',
        'region_code': 'region_code',
        'country_code': 'country_code',
        'phone': 'phone',
        'company_name': 'company_name'
    }

    discriminator_value_class_map = {
          'ShippingAddressResponse': 'ShippingAddressResponse',
'BillingContactResponse': 'BillingContactResponse',
'BillingAddressResponse': 'BillingAddressResponse',
'CompanyAddressRequest': 'CompanyAddressRequest',
'UserAddressRequest': 'UserAddressRequest',
'ShippingAddressRequest': 'ShippingAddressRequest',
'BillingAddressRequest': 'BillingAddressRequest',
'UserAddressResponse': 'UserAddressResponse',
'BillingContactRequest': 'BillingContactRequest',
'CompanyAddressResponse': 'CompanyAddressResponse'    }

    def __init__(self, street=None, street_number=None, zip_code=None, city=None, region_code=None, country_code=None, phone=None, company_name=None):  # noqa: E501
        """AddressBase - a model defined in Swagger"""  # noqa: E501
        self._street = None
        self._street_number = None
        self._zip_code = None
        self._city = None
        self._region_code = None
        self._country_code = None
        self._phone = None
        self._company_name = None
        self.discriminator = 'addressBaseType'
        self.street = street
        if street_number is not None:
            self.street_number = street_number
        self.zip_code = zip_code
        self.city = city
        if region_code is not None:
            self.region_code = region_code
        self.country_code = country_code
        if phone is not None:
            self.phone = phone
        if company_name is not None:
            self.company_name = company_name

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

        streetname  # noqa: E501

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

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

        streetname  # noqa: E501

        :param street: The street of this AddressBase.  # noqa: E501
        :type: str
        """
        if street is None:
            raise ValueError("Invalid value for `street`, must not be `None`")  # noqa: E501

        self._street = street

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

        street number  # noqa: E501

        :return: The street_number of this AddressBase.  # noqa: E501
        :rtype: str
        """
        return self._street_number

    @street_number.setter
    def street_number(self, street_number):
        """Sets the street_number of this AddressBase.

        street number  # noqa: E501

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

        self._street_number = street_number

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

        zip code of the city  # noqa: E501

        :return: The zip_code of this AddressBase.  # noqa: E501
        :rtype: str
        """
        return self._zip_code

    @zip_code.setter
    def zip_code(self, zip_code):
        """Sets the zip_code of this AddressBase.

        zip code of the city  # noqa: E501

        :param zip_code: The zip_code of this AddressBase.  # noqa: E501
        :type: str
        """
        if zip_code is None:
            raise ValueError("Invalid value for `zip_code`, must not be `None`")  # noqa: E501

        self._zip_code = zip_code

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

        city name  # noqa: E501

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

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

        city name  # noqa: E501

        :param city: The city of this AddressBase.  # noqa: E501
        :type: str
        """
        if city is None:
            raise ValueError("Invalid value for `city`, must not be `None`")  # noqa: E501

        self._city = city

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

        code of the region  # noqa: E501

        :return: The region_code of this AddressBase.  # noqa: E501
        :rtype: str
        """
        return self._region_code

    @region_code.setter
    def region_code(self, region_code):
        """Sets the region_code of this AddressBase.

        code of the region  # noqa: E501

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

        self._region_code = region_code

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

        abbreviation of the country conform to ISO-3166  # noqa: E501

        :return: The country_code of this AddressBase.  # noqa: E501
        :rtype: str
        """
        return self._country_code

    @country_code.setter
    def country_code(self, country_code):
        """Sets the country_code of this AddressBase.

        abbreviation of the country conform to ISO-3166  # noqa: E501

        :param country_code: The country_code of this AddressBase.  # noqa: E501
        :type: str
        """
        if country_code is None:
            raise ValueError("Invalid value for `country_code`, must not be `None`")  # noqa: E501

        self._country_code = country_code

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

        phone number  # noqa: E501

        :return: The phone of this AddressBase.  # noqa: E501
        :rtype: str
        """
        return self._phone

    @phone.setter
    def phone(self, phone):
        """Sets the phone of this AddressBase.

        phone number  # noqa: E501

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

        self._phone = phone

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

        company name  # noqa: E501

        :return: The company_name of this AddressBase.  # noqa: E501
        :rtype: str
        """
        return self._company_name

    @company_name.setter
    def company_name(self, company_name):
        """Sets the company_name of this AddressBase.

        company name  # noqa: E501

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

        self._company_name = company_name

    def get_real_child_model(self, data):
        """Returns the real base class specified by the discriminator"""
        discriminator_value = data[self.discriminator].lower()
        return self.discriminator_value_class_map.get(discriminator_value)

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

        return self.__dict__ == other.__dict__

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