# 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 ApiParcelUsageParcel(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 = {
        'parcel_ref': 'ApiParcelRef',
        'process_count': 'int',
        'activated': 'bool'
    }

    attribute_map = {
        'parcel_ref': 'parcelRef',
        'process_count': 'processCount',
        'activated': 'activated'
    }

    def __init__(self, parcel_ref=None, process_count=None, activated=None):
        """
        ApiParcelUsageParcel - a model defined in Swagger
        """

        self._parcel_ref = None
        self._process_count = None
        self._activated = None

        if parcel_ref is not None:
          self.parcel_ref = parcel_ref
        if process_count is not None:
          self.process_count = process_count
        if activated is not None:
          self.activated = activated

    @property
    def parcel_ref(self):
        """
        Gets the parcel_ref of this ApiParcelUsageParcel.
        Reference to the corresponding Parcel object.

        :return: The parcel_ref of this ApiParcelUsageParcel.
        :rtype: ApiParcelRef
        """
        return self._parcel_ref

    @parcel_ref.setter
    def parcel_ref(self, parcel_ref):
        """
        Sets the parcel_ref of this ApiParcelUsageParcel.
        Reference to the corresponding Parcel object.

        :param parcel_ref: The parcel_ref of this ApiParcelUsageParcel.
        :type: ApiParcelRef
        """

        self._parcel_ref = parcel_ref

    @property
    def process_count(self):
        """
        Gets the process_count of this ApiParcelUsageParcel.
        How many running processes on the cluster are using the parcel.

        :return: The process_count of this ApiParcelUsageParcel.
        :rtype: int
        """
        return self._process_count

    @process_count.setter
    def process_count(self, process_count):
        """
        Sets the process_count of this ApiParcelUsageParcel.
        How many running processes on the cluster are using the parcel.

        :param process_count: The process_count of this ApiParcelUsageParcel.
        :type: int
        """

        self._process_count = process_count

    @property
    def activated(self):
        """
        Gets the activated of this ApiParcelUsageParcel.
        Is this parcel currently activated on the cluster.

        :return: The activated of this ApiParcelUsageParcel.
        :rtype: bool
        """
        return self._activated

    @activated.setter
    def activated(self, activated):
        """
        Sets the activated of this ApiParcelUsageParcel.
        Is this parcel currently activated on the cluster.

        :param activated: The activated of this ApiParcelUsageParcel.
        :type: bool
        """

        self._activated = activated

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

        return self.__dict__ == other.__dict__

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