# coding: utf-8

"""
Copyright 2016 SmartBear Software

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

    Ref: https://github.com/swagger-api/swagger-codegen
"""

from pprint import pformat
from six import iteritems


class ZipCountyResponse(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self):
        """
        ZipCountyResponse - a model defined in Swagger

        :param dict swaggerTypes: The key is attribute name
                                  and the value is attribute type.
        :param dict attributeMap: The key is attribute name
                                  and the value is json key in definition.
        """
        self.swagger_types = {
            'counties': 'list[County]',
            'states': 'list[State]',
            'zip_codes': 'list[ZipCode]',
            'zip_county': 'ZipCounty'
        }

        self.attribute_map = {
            'counties': 'counties',
            'states': 'states',
            'zip_codes': 'zip_codes',
            'zip_county': 'zip_county'
        }

        self._counties = None
        self._states = None
        self._zip_codes = None
        self._zip_county = None

    @property
    def counties(self):
        """
        Gets the counties of this ZipCountyResponse.
        Counties that exist in the provided zip prefix.

        :return: The counties of this ZipCountyResponse.
        :rtype: list[County]
        """
        return self._counties

    @counties.setter
    def counties(self, counties):
        """
        Sets the counties of this ZipCountyResponse.
        Counties that exist in the provided zip prefix.

        :param counties: The counties of this ZipCountyResponse.
        :type: list[County]
        """
        self._counties = counties

    @property
    def states(self):
        """
        Gets the states of this ZipCountyResponse.
        States that exist in the provided zip prefix.

        :return: The states of this ZipCountyResponse.
        :rtype: list[State]
        """
        return self._states

    @states.setter
    def states(self, states):
        """
        Sets the states of this ZipCountyResponse.
        States that exist in the provided zip prefix.

        :param states: The states of this ZipCountyResponse.
        :type: list[State]
        """
        self._states = states

    @property
    def zip_codes(self):
        """
        Gets the zip_codes of this ZipCountyResponse.
        ZipCodes that exist in the provided zip prefix.

        :return: The zip_codes of this ZipCountyResponse.
        :rtype: list[ZipCode]
        """
        return self._zip_codes

    @zip_codes.setter
    def zip_codes(self, zip_codes):
        """
        Sets the zip_codes of this ZipCountyResponse.
        ZipCodes that exist in the provided zip prefix.

        :param zip_codes: The zip_codes of this ZipCountyResponse.
        :type: list[ZipCode]
        """
        self._zip_codes = zip_codes

    @property
    def zip_county(self):
        """
        Gets the zip_county of this ZipCountyResponse.
        ZipCounty data

        :return: The zip_county of this ZipCountyResponse.
        :rtype: ZipCounty
        """
        return self._zip_county

    @zip_county.setter
    def zip_county(self, zip_county):
        """
        Sets the zip_county of this ZipCountyResponse.
        ZipCounty data

        :param zip_county: The zip_county of this ZipCountyResponse.
        :type: ZipCounty
        """
        self._zip_county = zip_county

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

        for attr, _ in 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

        return result

    def to_str(self):
        """
        Returns the string representation of the model
        """
        return 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
        """
        return self.__dict__ == other.__dict__

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

