# coding: utf-8

"""
    Cloudera Manager API

    <h1>Cloudera Manager API v50</h1>       <p>Introduced in Cloudera Manager 7.8.1</p>       <p><a href=\"http://www.cloudera.com/documentation.html\">Cloudera Product Documentation</a></p>

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


from pprint import pformat
from six import iteritems
import re


class ApiRoleRef(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 = {
        'cluster_name': 'str',
        'service_name': 'str',
        'role_name': 'str',
        'health_summary': 'ApiHealthSummary',
        'role_status': 'ApiRoleState'
    }

    attribute_map = {
        'cluster_name': 'clusterName',
        'service_name': 'serviceName',
        'role_name': 'roleName',
        'health_summary': 'healthSummary',
        'role_status': 'roleStatus'
    }

    def __init__(self, cluster_name=None, service_name=None, role_name=None, health_summary=None, role_status=None):
        """
        ApiRoleRef - a model defined in Swagger
        """

        self._cluster_name = None
        self._service_name = None
        self._role_name = None
        self._health_summary = None
        self._role_status = None

        if cluster_name is not None:
          self.cluster_name = cluster_name
        if service_name is not None:
          self.service_name = service_name
        if role_name is not None:
          self.role_name = role_name
        if health_summary is not None:
          self.health_summary = health_summary
        if role_status is not None:
          self.role_status = role_status

    @property
    def cluster_name(self):
        """
        Gets the cluster_name of this ApiRoleRef.
        

        :return: The cluster_name of this ApiRoleRef.
        :rtype: str
        """
        return self._cluster_name

    @cluster_name.setter
    def cluster_name(self, cluster_name):
        """
        Sets the cluster_name of this ApiRoleRef.
        

        :param cluster_name: The cluster_name of this ApiRoleRef.
        :type: str
        """

        self._cluster_name = cluster_name

    @property
    def service_name(self):
        """
        Gets the service_name of this ApiRoleRef.
        

        :return: The service_name of this ApiRoleRef.
        :rtype: str
        """
        return self._service_name

    @service_name.setter
    def service_name(self, service_name):
        """
        Sets the service_name of this ApiRoleRef.
        

        :param service_name: The service_name of this ApiRoleRef.
        :type: str
        """

        self._service_name = service_name

    @property
    def role_name(self):
        """
        Gets the role_name of this ApiRoleRef.
        

        :return: The role_name of this ApiRoleRef.
        :rtype: str
        """
        return self._role_name

    @role_name.setter
    def role_name(self, role_name):
        """
        Sets the role_name of this ApiRoleRef.
        

        :param role_name: The role_name of this ApiRoleRef.
        :type: str
        """

        self._role_name = role_name

    @property
    def health_summary(self):
        """
        Gets the health_summary of this ApiRoleRef.
        The high-level health status of this role.

        :return: The health_summary of this ApiRoleRef.
        :rtype: ApiHealthSummary
        """
        return self._health_summary

    @health_summary.setter
    def health_summary(self, health_summary):
        """
        Sets the health_summary of this ApiRoleRef.
        The high-level health status of this role.

        :param health_summary: The health_summary of this ApiRoleRef.
        :type: ApiHealthSummary
        """

        self._health_summary = health_summary

    @property
    def role_status(self):
        """
        Gets the role_status of this ApiRoleRef.
        Readonly. The entity status for this role. Available since API v11.

        :return: The role_status of this ApiRoleRef.
        :rtype: ApiRoleState
        """
        return self._role_status

    @role_status.setter
    def role_status(self, role_status):
        """
        Sets the role_status of this ApiRoleRef.
        Readonly. The entity status for this role. Available since API v11.

        :param role_status: The role_status of this ApiRoleRef.
        :type: ApiRoleState
        """

        self._role_status = role_status

    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
        """
        if not isinstance(other, ApiRoleRef):
            return False

        return self.__dict__ == other.__dict__

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