# coding: utf-8

"""
    DigitalRebar Provision Server

    # An RestFUL API-driven Provisioner and DHCP server  # noqa: E501

    OpenAPI spec version: 4.14.0
    Contact: support@rackn.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from drppy_client.configuration import Configuration


class HaPassiveState(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',
        'electable': 'bool',
        'id': 'str',
        'state': 'str'
    }

    attribute_map = {
        'address': 'address',
        'electable': 'electable',
        'id': 'id',
        'state': 'state'
    }

    def __init__(self, address=None, electable=None, id=None, state=None, _configuration=None):  # noqa: E501
        """HaPassiveState - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._address = None
        self._electable = None
        self._id = None
        self._state = None
        self.discriminator = None

        self.address = address
        self.electable = electable
        self.id = id
        self.state = state

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


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

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


        :param address: The address of this HaPassiveState.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and address is None:
            raise ValueError("Invalid value for `address`, must not be `None`")  # noqa: E501

        self._address = address

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


        :return: The electable of this HaPassiveState.  # noqa: E501
        :rtype: bool
        """
        return self._electable

    @electable.setter
    def electable(self, electable):
        """Sets the electable of this HaPassiveState.


        :param electable: The electable of this HaPassiveState.  # noqa: E501
        :type: bool
        """
        if self._configuration.client_side_validation and electable is None:
            raise ValueError("Invalid value for `electable`, must not be `None`")  # noqa: E501

        self._electable = electable

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


        :return: The id of this HaPassiveState.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this HaPassiveState.


        :param id: The id of this HaPassiveState.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and id is None:
            raise ValueError("Invalid value for `id`, must not be `None`")  # noqa: E501

        self._id = id

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


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

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


        :param state: The state of this HaPassiveState.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and state is None:
            raise ValueError("Invalid value for `state`, must not be `None`")  # noqa: E501

        self._state = state

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

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
