# coding: utf-8

"""
    Cloudera Manager API

    <h1>Cloudera Manager API v57</h1>       <p>Introduced in Cloudera Manager 7.13.1</p>       <p><a href=\"http://www.cloudera.com/documentation.html\">Cloudera Product Documentation</a></p>  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class ApiCmServer(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 = {
        'cm_server_id': 'str',
        'name': 'str',
        'ip_address': 'str',
        'created_time': 'str',
        'last_updated_time': 'str',
        'ha_priority': 'str',
        'is_alive': 'str'
    }

    attribute_map = {
        'cm_server_id': 'cmServerId',
        'name': 'name',
        'ip_address': 'ipAddress',
        'created_time': 'createdTime',
        'last_updated_time': 'lastUpdatedTime',
        'ha_priority': 'haPriority',
        'is_alive': 'isAlive'
    }

    def __init__(self, cm_server_id=None, name=None, ip_address=None, created_time=None, last_updated_time=None, ha_priority=None, is_alive=None):  # noqa: E501
        """ApiCmServer - a model defined in Swagger"""  # noqa: E501
        self._cm_server_id = None
        self._name = None
        self._ip_address = None
        self._created_time = None
        self._last_updated_time = None
        self._ha_priority = None
        self._is_alive = None
        self.discriminator = None
        if cm_server_id is not None:
            self.cm_server_id = cm_server_id
        if name is not None:
            self.name = name
        if ip_address is not None:
            self.ip_address = ip_address
        if created_time is not None:
            self.created_time = created_time
        if last_updated_time is not None:
            self.last_updated_time = last_updated_time
        if ha_priority is not None:
            self.ha_priority = ha_priority
        if is_alive is not None:
            self.is_alive = is_alive

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

        The CM server ID.  # noqa: E501

        :return: The cm_server_id of this ApiCmServer.  # noqa: E501
        :rtype: str
        """
        return self._cm_server_id

    @cm_server_id.setter
    def cm_server_id(self, cm_server_id):
        """Sets the cm_server_id of this ApiCmServer.

        The CM server ID.  # noqa: E501

        :param cm_server_id: The cm_server_id of this ApiCmServer.  # noqa: E501
        :type: str
        """

        self._cm_server_id = cm_server_id

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

        The CM server hostname.  # noqa: E501

        :return: The name of this ApiCmServer.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this ApiCmServer.

        The CM server hostname.  # noqa: E501

        :param name: The name of this ApiCmServer.  # noqa: E501
        :type: str
        """

        self._name = name

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

        The IP address.  # noqa: E501

        :return: The ip_address of this ApiCmServer.  # noqa: E501
        :rtype: str
        """
        return self._ip_address

    @ip_address.setter
    def ip_address(self, ip_address):
        """Sets the ip_address of this ApiCmServer.

        The IP address.  # noqa: E501

        :param ip_address: The ip_address of this ApiCmServer.  # noqa: E501
        :type: str
        """

        self._ip_address = ip_address

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

        The created time.  # noqa: E501

        :return: The created_time of this ApiCmServer.  # noqa: E501
        :rtype: str
        """
        return self._created_time

    @created_time.setter
    def created_time(self, created_time):
        """Sets the created_time of this ApiCmServer.

        The created time.  # noqa: E501

        :param created_time: The created_time of this ApiCmServer.  # noqa: E501
        :type: str
        """

        self._created_time = created_time

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

        The last updated time.  # noqa: E501

        :return: The last_updated_time of this ApiCmServer.  # noqa: E501
        :rtype: str
        """
        return self._last_updated_time

    @last_updated_time.setter
    def last_updated_time(self, last_updated_time):
        """Sets the last_updated_time of this ApiCmServer.

        The last updated time.  # noqa: E501

        :param last_updated_time: The last_updated_time of this ApiCmServer.  # noqa: E501
        :type: str
        """

        self._last_updated_time = last_updated_time

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

        HA Priority for active passive mode.  # noqa: E501

        :return: The ha_priority of this ApiCmServer.  # noqa: E501
        :rtype: str
        """
        return self._ha_priority

    @ha_priority.setter
    def ha_priority(self, ha_priority):
        """Sets the ha_priority of this ApiCmServer.

        HA Priority for active passive mode.  # noqa: E501

        :param ha_priority: The ha_priority of this ApiCmServer.  # noqa: E501
        :type: str
        """

        self._ha_priority = ha_priority

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

        Is the cm server running.  # noqa: E501

        :return: The is_alive of this ApiCmServer.  # noqa: E501
        :rtype: str
        """
        return self._is_alive

    @is_alive.setter
    def is_alive(self, is_alive):
        """Sets the is_alive of this ApiCmServer.

        Is the cm server running.  # noqa: E501

        :param is_alive: The is_alive of this ApiCmServer.  # noqa: E501
        :type: str
        """

        self._is_alive = is_alive

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

        return self.__dict__ == other.__dict__

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