# 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 State(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self):
        """
        State - 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 = {
            'id': 'int',
            'name': 'str',
            'code': 'str',
            'fips_number': 'str',
            'last_date_for_individual': 'date',
            'last_date_for_shop': 'date',
            'live_for_business': 'bool',
            'live_for_consumers': 'bool'
        }

        self.attribute_map = {
            'id': 'id',
            'name': 'name',
            'code': 'code',
            'fips_number': 'fips_number',
            'last_date_for_individual': 'last_date_for_individual',
            'last_date_for_shop': 'last_date_for_shop',
            'live_for_business': 'live_for_business',
            'live_for_consumers': 'live_for_consumers'
        }

        self._id = None
        self._name = None
        self._code = None
        self._fips_number = None
        self._last_date_for_individual = None
        self._last_date_for_shop = None
        self._live_for_business = None
        self._live_for_consumers = None

    @property
    def id(self):
        """
        Gets the id of this State.
        Primary Key of State

        :return: The id of this State.
        :rtype: int
        """
        return self._id

    @id.setter
    def id(self, id):
        """
        Sets the id of this State.
        Primary Key of State

        :param id: The id of this State.
        :type: int
        """
        self._id = id

    @property
    def name(self):
        """
        Gets the name of this State.
        Name of state

        :return: The name of this State.
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """
        Sets the name of this State.
        Name of state

        :param name: The name of this State.
        :type: str
        """
        self._name = name

    @property
    def code(self):
        """
        Gets the code of this State.
        2 letter code for state

        :return: The code of this State.
        :rtype: str
        """
        return self._code

    @code.setter
    def code(self, code):
        """
        Sets the code of this State.
        2 letter code for state

        :param code: The code of this State.
        :type: str
        """
        self._code = code

    @property
    def fips_number(self):
        """
        Gets the fips_number of this State.
        National FIPs number

        :return: The fips_number of this State.
        :rtype: str
        """
        return self._fips_number

    @fips_number.setter
    def fips_number(self, fips_number):
        """
        Sets the fips_number of this State.
        National FIPs number

        :param fips_number: The fips_number of this State.
        :type: str
        """
        self._fips_number = fips_number

    @property
    def last_date_for_individual(self):
        """
        Gets the last_date_for_individual of this State.
        Last date this state is live for individuals

        :return: The last_date_for_individual of this State.
        :rtype: date
        """
        return self._last_date_for_individual

    @last_date_for_individual.setter
    def last_date_for_individual(self, last_date_for_individual):
        """
        Sets the last_date_for_individual of this State.
        Last date this state is live for individuals

        :param last_date_for_individual: The last_date_for_individual of this State.
        :type: date
        """
        self._last_date_for_individual = last_date_for_individual

    @property
    def last_date_for_shop(self):
        """
        Gets the last_date_for_shop of this State.
        Last date this state is live for shop

        :return: The last_date_for_shop of this State.
        :rtype: date
        """
        return self._last_date_for_shop

    @last_date_for_shop.setter
    def last_date_for_shop(self, last_date_for_shop):
        """
        Sets the last_date_for_shop of this State.
        Last date this state is live for shop

        :param last_date_for_shop: The last_date_for_shop of this State.
        :type: date
        """
        self._last_date_for_shop = last_date_for_shop

    @property
    def live_for_business(self):
        """
        Gets the live_for_business of this State.
        Is this State available for businesses

        :return: The live_for_business of this State.
        :rtype: bool
        """
        return self._live_for_business

    @live_for_business.setter
    def live_for_business(self, live_for_business):
        """
        Sets the live_for_business of this State.
        Is this State available for businesses

        :param live_for_business: The live_for_business of this State.
        :type: bool
        """
        self._live_for_business = live_for_business

    @property
    def live_for_consumers(self):
        """
        Gets the live_for_consumers of this State.
        Is this State available for individuals

        :return: The live_for_consumers of this State.
        :rtype: bool
        """
        return self._live_for_consumers

    @live_for_consumers.setter
    def live_for_consumers(self, live_for_consumers):
        """
        Sets the live_for_consumers of this State.
        Is this State available for individuals

        :param live_for_consumers: The live_for_consumers of this State.
        :type: bool
        """
        self._live_for_consumers = live_for_consumers

    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

