# 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 ApiYarnTenantUtilization(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 = {
        'tenant_name': 'str',
        'avg_yarn_cpu_allocation': 'float',
        'avg_yarn_cpu_utilization': 'float',
        'avg_yarn_cpu_unused_capacity': 'float',
        'avg_yarn_cpu_steady_fair_share': 'float',
        'avg_yarn_pool_allocated_cpu_during_contention': 'float',
        'avg_yarn_pool_fair_share_cpu_during_contention': 'float',
        'avg_yarn_pool_steady_fair_share_cpu_during_contention': 'float',
        'avg_yarn_container_wait_ratio': 'float',
        'avg_yarn_memory_allocation': 'float',
        'avg_yarn_memory_utilization': 'float',
        'avg_yarn_memory_unused_capacity': 'float',
        'avg_yarn_memory_steady_fair_share': 'float',
        'avg_yarn_pool_allocated_memory_during_contention': 'float',
        'avg_yarn_pool_fair_share_memory_during_contention': 'float',
        'avg_yarn_pool_steady_fair_share_memory_during_contention': 'float'
    }

    attribute_map = {
        'tenant_name': 'tenantName',
        'avg_yarn_cpu_allocation': 'avgYarnCpuAllocation',
        'avg_yarn_cpu_utilization': 'avgYarnCpuUtilization',
        'avg_yarn_cpu_unused_capacity': 'avgYarnCpuUnusedCapacity',
        'avg_yarn_cpu_steady_fair_share': 'avgYarnCpuSteadyFairShare',
        'avg_yarn_pool_allocated_cpu_during_contention': 'avgYarnPoolAllocatedCpuDuringContention',
        'avg_yarn_pool_fair_share_cpu_during_contention': 'avgYarnPoolFairShareCpuDuringContention',
        'avg_yarn_pool_steady_fair_share_cpu_during_contention': 'avgYarnPoolSteadyFairShareCpuDuringContention',
        'avg_yarn_container_wait_ratio': 'avgYarnContainerWaitRatio',
        'avg_yarn_memory_allocation': 'avgYarnMemoryAllocation',
        'avg_yarn_memory_utilization': 'avgYarnMemoryUtilization',
        'avg_yarn_memory_unused_capacity': 'avgYarnMemoryUnusedCapacity',
        'avg_yarn_memory_steady_fair_share': 'avgYarnMemorySteadyFairShare',
        'avg_yarn_pool_allocated_memory_during_contention': 'avgYarnPoolAllocatedMemoryDuringContention',
        'avg_yarn_pool_fair_share_memory_during_contention': 'avgYarnPoolFairShareMemoryDuringContention',
        'avg_yarn_pool_steady_fair_share_memory_during_contention': 'avgYarnPoolSteadyFairShareMemoryDuringContention'
    }

    def __init__(self, tenant_name=None, avg_yarn_cpu_allocation=None, avg_yarn_cpu_utilization=None, avg_yarn_cpu_unused_capacity=None, avg_yarn_cpu_steady_fair_share=None, avg_yarn_pool_allocated_cpu_during_contention=None, avg_yarn_pool_fair_share_cpu_during_contention=None, avg_yarn_pool_steady_fair_share_cpu_during_contention=None, avg_yarn_container_wait_ratio=None, avg_yarn_memory_allocation=None, avg_yarn_memory_utilization=None, avg_yarn_memory_unused_capacity=None, avg_yarn_memory_steady_fair_share=None, avg_yarn_pool_allocated_memory_during_contention=None, avg_yarn_pool_fair_share_memory_during_contention=None, avg_yarn_pool_steady_fair_share_memory_during_contention=None):
        """
        ApiYarnTenantUtilization - a model defined in Swagger
        """

        self._tenant_name = None
        self._avg_yarn_cpu_allocation = None
        self._avg_yarn_cpu_utilization = None
        self._avg_yarn_cpu_unused_capacity = None
        self._avg_yarn_cpu_steady_fair_share = None
        self._avg_yarn_pool_allocated_cpu_during_contention = None
        self._avg_yarn_pool_fair_share_cpu_during_contention = None
        self._avg_yarn_pool_steady_fair_share_cpu_during_contention = None
        self._avg_yarn_container_wait_ratio = None
        self._avg_yarn_memory_allocation = None
        self._avg_yarn_memory_utilization = None
        self._avg_yarn_memory_unused_capacity = None
        self._avg_yarn_memory_steady_fair_share = None
        self._avg_yarn_pool_allocated_memory_during_contention = None
        self._avg_yarn_pool_fair_share_memory_during_contention = None
        self._avg_yarn_pool_steady_fair_share_memory_during_contention = None

        if tenant_name is not None:
          self.tenant_name = tenant_name
        if avg_yarn_cpu_allocation is not None:
          self.avg_yarn_cpu_allocation = avg_yarn_cpu_allocation
        if avg_yarn_cpu_utilization is not None:
          self.avg_yarn_cpu_utilization = avg_yarn_cpu_utilization
        if avg_yarn_cpu_unused_capacity is not None:
          self.avg_yarn_cpu_unused_capacity = avg_yarn_cpu_unused_capacity
        if avg_yarn_cpu_steady_fair_share is not None:
          self.avg_yarn_cpu_steady_fair_share = avg_yarn_cpu_steady_fair_share
        if avg_yarn_pool_allocated_cpu_during_contention is not None:
          self.avg_yarn_pool_allocated_cpu_during_contention = avg_yarn_pool_allocated_cpu_during_contention
        if avg_yarn_pool_fair_share_cpu_during_contention is not None:
          self.avg_yarn_pool_fair_share_cpu_during_contention = avg_yarn_pool_fair_share_cpu_during_contention
        if avg_yarn_pool_steady_fair_share_cpu_during_contention is not None:
          self.avg_yarn_pool_steady_fair_share_cpu_during_contention = avg_yarn_pool_steady_fair_share_cpu_during_contention
        if avg_yarn_container_wait_ratio is not None:
          self.avg_yarn_container_wait_ratio = avg_yarn_container_wait_ratio
        if avg_yarn_memory_allocation is not None:
          self.avg_yarn_memory_allocation = avg_yarn_memory_allocation
        if avg_yarn_memory_utilization is not None:
          self.avg_yarn_memory_utilization = avg_yarn_memory_utilization
        if avg_yarn_memory_unused_capacity is not None:
          self.avg_yarn_memory_unused_capacity = avg_yarn_memory_unused_capacity
        if avg_yarn_memory_steady_fair_share is not None:
          self.avg_yarn_memory_steady_fair_share = avg_yarn_memory_steady_fair_share
        if avg_yarn_pool_allocated_memory_during_contention is not None:
          self.avg_yarn_pool_allocated_memory_during_contention = avg_yarn_pool_allocated_memory_during_contention
        if avg_yarn_pool_fair_share_memory_during_contention is not None:
          self.avg_yarn_pool_fair_share_memory_during_contention = avg_yarn_pool_fair_share_memory_during_contention
        if avg_yarn_pool_steady_fair_share_memory_during_contention is not None:
          self.avg_yarn_pool_steady_fair_share_memory_during_contention = avg_yarn_pool_steady_fair_share_memory_during_contention

    @property
    def tenant_name(self):
        """
        Gets the tenant_name of this ApiYarnTenantUtilization.
        Name of the tenant.

        :return: The tenant_name of this ApiYarnTenantUtilization.
        :rtype: str
        """
        return self._tenant_name

    @tenant_name.setter
    def tenant_name(self, tenant_name):
        """
        Sets the tenant_name of this ApiYarnTenantUtilization.
        Name of the tenant.

        :param tenant_name: The tenant_name of this ApiYarnTenantUtilization.
        :type: str
        """

        self._tenant_name = tenant_name

    @property
    def avg_yarn_cpu_allocation(self):
        """
        Gets the avg_yarn_cpu_allocation of this ApiYarnTenantUtilization.
        Average number of VCores allocated to YARN applications of the tenant.

        :return: The avg_yarn_cpu_allocation of this ApiYarnTenantUtilization.
        :rtype: float
        """
        return self._avg_yarn_cpu_allocation

    @avg_yarn_cpu_allocation.setter
    def avg_yarn_cpu_allocation(self, avg_yarn_cpu_allocation):
        """
        Sets the avg_yarn_cpu_allocation of this ApiYarnTenantUtilization.
        Average number of VCores allocated to YARN applications of the tenant.

        :param avg_yarn_cpu_allocation: The avg_yarn_cpu_allocation of this ApiYarnTenantUtilization.
        :type: float
        """

        self._avg_yarn_cpu_allocation = avg_yarn_cpu_allocation

    @property
    def avg_yarn_cpu_utilization(self):
        """
        Gets the avg_yarn_cpu_utilization of this ApiYarnTenantUtilization.
        Average number of VCores used by YARN applications of the tenant.

        :return: The avg_yarn_cpu_utilization of this ApiYarnTenantUtilization.
        :rtype: float
        """
        return self._avg_yarn_cpu_utilization

    @avg_yarn_cpu_utilization.setter
    def avg_yarn_cpu_utilization(self, avg_yarn_cpu_utilization):
        """
        Sets the avg_yarn_cpu_utilization of this ApiYarnTenantUtilization.
        Average number of VCores used by YARN applications of the tenant.

        :param avg_yarn_cpu_utilization: The avg_yarn_cpu_utilization of this ApiYarnTenantUtilization.
        :type: float
        """

        self._avg_yarn_cpu_utilization = avg_yarn_cpu_utilization

    @property
    def avg_yarn_cpu_unused_capacity(self):
        """
        Gets the avg_yarn_cpu_unused_capacity of this ApiYarnTenantUtilization.
        Average unused VCores of the tenant.

        :return: The avg_yarn_cpu_unused_capacity of this ApiYarnTenantUtilization.
        :rtype: float
        """
        return self._avg_yarn_cpu_unused_capacity

    @avg_yarn_cpu_unused_capacity.setter
    def avg_yarn_cpu_unused_capacity(self, avg_yarn_cpu_unused_capacity):
        """
        Sets the avg_yarn_cpu_unused_capacity of this ApiYarnTenantUtilization.
        Average unused VCores of the tenant.

        :param avg_yarn_cpu_unused_capacity: The avg_yarn_cpu_unused_capacity of this ApiYarnTenantUtilization.
        :type: float
        """

        self._avg_yarn_cpu_unused_capacity = avg_yarn_cpu_unused_capacity

    @property
    def avg_yarn_cpu_steady_fair_share(self):
        """
        Gets the avg_yarn_cpu_steady_fair_share of this ApiYarnTenantUtilization.
        Average steady fair share VCores.

        :return: The avg_yarn_cpu_steady_fair_share of this ApiYarnTenantUtilization.
        :rtype: float
        """
        return self._avg_yarn_cpu_steady_fair_share

    @avg_yarn_cpu_steady_fair_share.setter
    def avg_yarn_cpu_steady_fair_share(self, avg_yarn_cpu_steady_fair_share):
        """
        Sets the avg_yarn_cpu_steady_fair_share of this ApiYarnTenantUtilization.
        Average steady fair share VCores.

        :param avg_yarn_cpu_steady_fair_share: The avg_yarn_cpu_steady_fair_share of this ApiYarnTenantUtilization.
        :type: float
        """

        self._avg_yarn_cpu_steady_fair_share = avg_yarn_cpu_steady_fair_share

    @property
    def avg_yarn_pool_allocated_cpu_during_contention(self):
        """
        Gets the avg_yarn_pool_allocated_cpu_during_contention of this ApiYarnTenantUtilization.
        Average allocated Vcores with pending containers.

        :return: The avg_yarn_pool_allocated_cpu_during_contention of this ApiYarnTenantUtilization.
        :rtype: float
        """
        return self._avg_yarn_pool_allocated_cpu_during_contention

    @avg_yarn_pool_allocated_cpu_during_contention.setter
    def avg_yarn_pool_allocated_cpu_during_contention(self, avg_yarn_pool_allocated_cpu_during_contention):
        """
        Sets the avg_yarn_pool_allocated_cpu_during_contention of this ApiYarnTenantUtilization.
        Average allocated Vcores with pending containers.

        :param avg_yarn_pool_allocated_cpu_during_contention: The avg_yarn_pool_allocated_cpu_during_contention of this ApiYarnTenantUtilization.
        :type: float
        """

        self._avg_yarn_pool_allocated_cpu_during_contention = avg_yarn_pool_allocated_cpu_during_contention

    @property
    def avg_yarn_pool_fair_share_cpu_during_contention(self):
        """
        Gets the avg_yarn_pool_fair_share_cpu_during_contention of this ApiYarnTenantUtilization.
        Average fair share VCores with pending containers.

        :return: The avg_yarn_pool_fair_share_cpu_during_contention of this ApiYarnTenantUtilization.
        :rtype: float
        """
        return self._avg_yarn_pool_fair_share_cpu_during_contention

    @avg_yarn_pool_fair_share_cpu_during_contention.setter
    def avg_yarn_pool_fair_share_cpu_during_contention(self, avg_yarn_pool_fair_share_cpu_during_contention):
        """
        Sets the avg_yarn_pool_fair_share_cpu_during_contention of this ApiYarnTenantUtilization.
        Average fair share VCores with pending containers.

        :param avg_yarn_pool_fair_share_cpu_during_contention: The avg_yarn_pool_fair_share_cpu_during_contention of this ApiYarnTenantUtilization.
        :type: float
        """

        self._avg_yarn_pool_fair_share_cpu_during_contention = avg_yarn_pool_fair_share_cpu_during_contention

    @property
    def avg_yarn_pool_steady_fair_share_cpu_during_contention(self):
        """
        Gets the avg_yarn_pool_steady_fair_share_cpu_during_contention of this ApiYarnTenantUtilization.
        Average steady fair share VCores with pending containers.

        :return: The avg_yarn_pool_steady_fair_share_cpu_during_contention of this ApiYarnTenantUtilization.
        :rtype: float
        """
        return self._avg_yarn_pool_steady_fair_share_cpu_during_contention

    @avg_yarn_pool_steady_fair_share_cpu_during_contention.setter
    def avg_yarn_pool_steady_fair_share_cpu_during_contention(self, avg_yarn_pool_steady_fair_share_cpu_during_contention):
        """
        Sets the avg_yarn_pool_steady_fair_share_cpu_during_contention of this ApiYarnTenantUtilization.
        Average steady fair share VCores with pending containers.

        :param avg_yarn_pool_steady_fair_share_cpu_during_contention: The avg_yarn_pool_steady_fair_share_cpu_during_contention of this ApiYarnTenantUtilization.
        :type: float
        """

        self._avg_yarn_pool_steady_fair_share_cpu_during_contention = avg_yarn_pool_steady_fair_share_cpu_during_contention

    @property
    def avg_yarn_container_wait_ratio(self):
        """
        Gets the avg_yarn_container_wait_ratio of this ApiYarnTenantUtilization.
        Average percentage of pending containers for the pool during periods of contention.

        :return: The avg_yarn_container_wait_ratio of this ApiYarnTenantUtilization.
        :rtype: float
        """
        return self._avg_yarn_container_wait_ratio

    @avg_yarn_container_wait_ratio.setter
    def avg_yarn_container_wait_ratio(self, avg_yarn_container_wait_ratio):
        """
        Sets the avg_yarn_container_wait_ratio of this ApiYarnTenantUtilization.
        Average percentage of pending containers for the pool during periods of contention.

        :param avg_yarn_container_wait_ratio: The avg_yarn_container_wait_ratio of this ApiYarnTenantUtilization.
        :type: float
        """

        self._avg_yarn_container_wait_ratio = avg_yarn_container_wait_ratio

    @property
    def avg_yarn_memory_allocation(self):
        """
        Gets the avg_yarn_memory_allocation of this ApiYarnTenantUtilization.
        Average memory allocated to YARN applications of the tenant.

        :return: The avg_yarn_memory_allocation of this ApiYarnTenantUtilization.
        :rtype: float
        """
        return self._avg_yarn_memory_allocation

    @avg_yarn_memory_allocation.setter
    def avg_yarn_memory_allocation(self, avg_yarn_memory_allocation):
        """
        Sets the avg_yarn_memory_allocation of this ApiYarnTenantUtilization.
        Average memory allocated to YARN applications of the tenant.

        :param avg_yarn_memory_allocation: The avg_yarn_memory_allocation of this ApiYarnTenantUtilization.
        :type: float
        """

        self._avg_yarn_memory_allocation = avg_yarn_memory_allocation

    @property
    def avg_yarn_memory_utilization(self):
        """
        Gets the avg_yarn_memory_utilization of this ApiYarnTenantUtilization.
        Average memory used by YARN applications of the tenant.

        :return: The avg_yarn_memory_utilization of this ApiYarnTenantUtilization.
        :rtype: float
        """
        return self._avg_yarn_memory_utilization

    @avg_yarn_memory_utilization.setter
    def avg_yarn_memory_utilization(self, avg_yarn_memory_utilization):
        """
        Sets the avg_yarn_memory_utilization of this ApiYarnTenantUtilization.
        Average memory used by YARN applications of the tenant.

        :param avg_yarn_memory_utilization: The avg_yarn_memory_utilization of this ApiYarnTenantUtilization.
        :type: float
        """

        self._avg_yarn_memory_utilization = avg_yarn_memory_utilization

    @property
    def avg_yarn_memory_unused_capacity(self):
        """
        Gets the avg_yarn_memory_unused_capacity of this ApiYarnTenantUtilization.
        Average unused memory of the tenant.

        :return: The avg_yarn_memory_unused_capacity of this ApiYarnTenantUtilization.
        :rtype: float
        """
        return self._avg_yarn_memory_unused_capacity

    @avg_yarn_memory_unused_capacity.setter
    def avg_yarn_memory_unused_capacity(self, avg_yarn_memory_unused_capacity):
        """
        Sets the avg_yarn_memory_unused_capacity of this ApiYarnTenantUtilization.
        Average unused memory of the tenant.

        :param avg_yarn_memory_unused_capacity: The avg_yarn_memory_unused_capacity of this ApiYarnTenantUtilization.
        :type: float
        """

        self._avg_yarn_memory_unused_capacity = avg_yarn_memory_unused_capacity

    @property
    def avg_yarn_memory_steady_fair_share(self):
        """
        Gets the avg_yarn_memory_steady_fair_share of this ApiYarnTenantUtilization.
        Average steady fair share memory.

        :return: The avg_yarn_memory_steady_fair_share of this ApiYarnTenantUtilization.
        :rtype: float
        """
        return self._avg_yarn_memory_steady_fair_share

    @avg_yarn_memory_steady_fair_share.setter
    def avg_yarn_memory_steady_fair_share(self, avg_yarn_memory_steady_fair_share):
        """
        Sets the avg_yarn_memory_steady_fair_share of this ApiYarnTenantUtilization.
        Average steady fair share memory.

        :param avg_yarn_memory_steady_fair_share: The avg_yarn_memory_steady_fair_share of this ApiYarnTenantUtilization.
        :type: float
        """

        self._avg_yarn_memory_steady_fair_share = avg_yarn_memory_steady_fair_share

    @property
    def avg_yarn_pool_allocated_memory_during_contention(self):
        """
        Gets the avg_yarn_pool_allocated_memory_during_contention of this ApiYarnTenantUtilization.
        Average allocated memory with pending containers.

        :return: The avg_yarn_pool_allocated_memory_during_contention of this ApiYarnTenantUtilization.
        :rtype: float
        """
        return self._avg_yarn_pool_allocated_memory_during_contention

    @avg_yarn_pool_allocated_memory_during_contention.setter
    def avg_yarn_pool_allocated_memory_during_contention(self, avg_yarn_pool_allocated_memory_during_contention):
        """
        Sets the avg_yarn_pool_allocated_memory_during_contention of this ApiYarnTenantUtilization.
        Average allocated memory with pending containers.

        :param avg_yarn_pool_allocated_memory_during_contention: The avg_yarn_pool_allocated_memory_during_contention of this ApiYarnTenantUtilization.
        :type: float
        """

        self._avg_yarn_pool_allocated_memory_during_contention = avg_yarn_pool_allocated_memory_during_contention

    @property
    def avg_yarn_pool_fair_share_memory_during_contention(self):
        """
        Gets the avg_yarn_pool_fair_share_memory_during_contention of this ApiYarnTenantUtilization.
        Average fair share memory with pending containers.

        :return: The avg_yarn_pool_fair_share_memory_during_contention of this ApiYarnTenantUtilization.
        :rtype: float
        """
        return self._avg_yarn_pool_fair_share_memory_during_contention

    @avg_yarn_pool_fair_share_memory_during_contention.setter
    def avg_yarn_pool_fair_share_memory_during_contention(self, avg_yarn_pool_fair_share_memory_during_contention):
        """
        Sets the avg_yarn_pool_fair_share_memory_during_contention of this ApiYarnTenantUtilization.
        Average fair share memory with pending containers.

        :param avg_yarn_pool_fair_share_memory_during_contention: The avg_yarn_pool_fair_share_memory_during_contention of this ApiYarnTenantUtilization.
        :type: float
        """

        self._avg_yarn_pool_fair_share_memory_during_contention = avg_yarn_pool_fair_share_memory_during_contention

    @property
    def avg_yarn_pool_steady_fair_share_memory_during_contention(self):
        """
        Gets the avg_yarn_pool_steady_fair_share_memory_during_contention of this ApiYarnTenantUtilization.
        Average steady fair share memory with pending containers.

        :return: The avg_yarn_pool_steady_fair_share_memory_during_contention of this ApiYarnTenantUtilization.
        :rtype: float
        """
        return self._avg_yarn_pool_steady_fair_share_memory_during_contention

    @avg_yarn_pool_steady_fair_share_memory_during_contention.setter
    def avg_yarn_pool_steady_fair_share_memory_during_contention(self, avg_yarn_pool_steady_fair_share_memory_during_contention):
        """
        Sets the avg_yarn_pool_steady_fair_share_memory_during_contention of this ApiYarnTenantUtilization.
        Average steady fair share memory with pending containers.

        :param avg_yarn_pool_steady_fair_share_memory_during_contention: The avg_yarn_pool_steady_fair_share_memory_during_contention of this ApiYarnTenantUtilization.
        :type: float
        """

        self._avg_yarn_pool_steady_fair_share_memory_during_contention = avg_yarn_pool_steady_fair_share_memory_during_contention

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

        return self.__dict__ == other.__dict__

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