# 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 ApiMrUsageReportRow(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 = {
        'time_period': 'str',
        'user': 'str',
        'group': 'str',
        'cpu_sec': 'int',
        'memory_bytes': 'int',
        'job_count': 'int',
        'task_count': 'int',
        'duration_sec': 'int',
        'failed_maps': 'int',
        'total_maps': 'int',
        'failed_reduces': 'int',
        'total_reduces': 'int',
        'map_input_bytes': 'int',
        'map_output_bytes': 'int',
        'hdfs_bytes_read': 'int',
        'hdfs_bytes_written': 'int',
        'local_bytes_read': 'int',
        'local_bytes_written': 'int',
        'data_local_maps': 'int',
        'rack_local_maps': 'int'
    }

    attribute_map = {
        'time_period': 'timePeriod',
        'user': 'user',
        'group': 'group',
        'cpu_sec': 'cpuSec',
        'memory_bytes': 'memoryBytes',
        'job_count': 'jobCount',
        'task_count': 'taskCount',
        'duration_sec': 'durationSec',
        'failed_maps': 'failedMaps',
        'total_maps': 'totalMaps',
        'failed_reduces': 'failedReduces',
        'total_reduces': 'totalReduces',
        'map_input_bytes': 'mapInputBytes',
        'map_output_bytes': 'mapOutputBytes',
        'hdfs_bytes_read': 'hdfsBytesRead',
        'hdfs_bytes_written': 'hdfsBytesWritten',
        'local_bytes_read': 'localBytesRead',
        'local_bytes_written': 'localBytesWritten',
        'data_local_maps': 'dataLocalMaps',
        'rack_local_maps': 'rackLocalMaps'
    }

    def __init__(self, time_period=None, user=None, group=None, cpu_sec=None, memory_bytes=None, job_count=None, task_count=None, duration_sec=None, failed_maps=None, total_maps=None, failed_reduces=None, total_reduces=None, map_input_bytes=None, map_output_bytes=None, hdfs_bytes_read=None, hdfs_bytes_written=None, local_bytes_read=None, local_bytes_written=None, data_local_maps=None, rack_local_maps=None):
        """
        ApiMrUsageReportRow - a model defined in Swagger
        """

        self._time_period = None
        self._user = None
        self._group = None
        self._cpu_sec = None
        self._memory_bytes = None
        self._job_count = None
        self._task_count = None
        self._duration_sec = None
        self._failed_maps = None
        self._total_maps = None
        self._failed_reduces = None
        self._total_reduces = None
        self._map_input_bytes = None
        self._map_output_bytes = None
        self._hdfs_bytes_read = None
        self._hdfs_bytes_written = None
        self._local_bytes_read = None
        self._local_bytes_written = None
        self._data_local_maps = None
        self._rack_local_maps = None

        if time_period is not None:
          self.time_period = time_period
        if user is not None:
          self.user = user
        if group is not None:
          self.group = group
        if cpu_sec is not None:
          self.cpu_sec = cpu_sec
        if memory_bytes is not None:
          self.memory_bytes = memory_bytes
        if job_count is not None:
          self.job_count = job_count
        if task_count is not None:
          self.task_count = task_count
        if duration_sec is not None:
          self.duration_sec = duration_sec
        if failed_maps is not None:
          self.failed_maps = failed_maps
        if total_maps is not None:
          self.total_maps = total_maps
        if failed_reduces is not None:
          self.failed_reduces = failed_reduces
        if total_reduces is not None:
          self.total_reduces = total_reduces
        if map_input_bytes is not None:
          self.map_input_bytes = map_input_bytes
        if map_output_bytes is not None:
          self.map_output_bytes = map_output_bytes
        if hdfs_bytes_read is not None:
          self.hdfs_bytes_read = hdfs_bytes_read
        if hdfs_bytes_written is not None:
          self.hdfs_bytes_written = hdfs_bytes_written
        if local_bytes_read is not None:
          self.local_bytes_read = local_bytes_read
        if local_bytes_written is not None:
          self.local_bytes_written = local_bytes_written
        if data_local_maps is not None:
          self.data_local_maps = data_local_maps
        if rack_local_maps is not None:
          self.rack_local_maps = rack_local_maps

    @property
    def time_period(self):
        """
        Gets the time_period of this ApiMrUsageReportRow.
        The time period over which this report is generated.

        :return: The time_period of this ApiMrUsageReportRow.
        :rtype: str
        """
        return self._time_period

    @time_period.setter
    def time_period(self, time_period):
        """
        Sets the time_period of this ApiMrUsageReportRow.
        The time period over which this report is generated.

        :param time_period: The time_period of this ApiMrUsageReportRow.
        :type: str
        """

        self._time_period = time_period

    @property
    def user(self):
        """
        Gets the user of this ApiMrUsageReportRow.
        The user being reported.

        :return: The user of this ApiMrUsageReportRow.
        :rtype: str
        """
        return self._user

    @user.setter
    def user(self, user):
        """
        Sets the user of this ApiMrUsageReportRow.
        The user being reported.

        :param user: The user of this ApiMrUsageReportRow.
        :type: str
        """

        self._user = user

    @property
    def group(self):
        """
        Gets the group of this ApiMrUsageReportRow.
        The group this user belongs to.

        :return: The group of this ApiMrUsageReportRow.
        :rtype: str
        """
        return self._group

    @group.setter
    def group(self, group):
        """
        Sets the group of this ApiMrUsageReportRow.
        The group this user belongs to.

        :param group: The group of this ApiMrUsageReportRow.
        :type: str
        """

        self._group = group

    @property
    def cpu_sec(self):
        """
        Gets the cpu_sec of this ApiMrUsageReportRow.
        Amount of CPU time (in seconds) taken up this user's MapReduce jobs.

        :return: The cpu_sec of this ApiMrUsageReportRow.
        :rtype: int
        """
        return self._cpu_sec

    @cpu_sec.setter
    def cpu_sec(self, cpu_sec):
        """
        Sets the cpu_sec of this ApiMrUsageReportRow.
        Amount of CPU time (in seconds) taken up this user's MapReduce jobs.

        :param cpu_sec: The cpu_sec of this ApiMrUsageReportRow.
        :type: int
        """

        self._cpu_sec = cpu_sec

    @property
    def memory_bytes(self):
        """
        Gets the memory_bytes of this ApiMrUsageReportRow.
        The sum of physical memory used (collected as a snapshot) by this user's MapReduce jobs.

        :return: The memory_bytes of this ApiMrUsageReportRow.
        :rtype: int
        """
        return self._memory_bytes

    @memory_bytes.setter
    def memory_bytes(self, memory_bytes):
        """
        Sets the memory_bytes of this ApiMrUsageReportRow.
        The sum of physical memory used (collected as a snapshot) by this user's MapReduce jobs.

        :param memory_bytes: The memory_bytes of this ApiMrUsageReportRow.
        :type: int
        """

        self._memory_bytes = memory_bytes

    @property
    def job_count(self):
        """
        Gets the job_count of this ApiMrUsageReportRow.
        Number of jobs.

        :return: The job_count of this ApiMrUsageReportRow.
        :rtype: int
        """
        return self._job_count

    @job_count.setter
    def job_count(self, job_count):
        """
        Sets the job_count of this ApiMrUsageReportRow.
        Number of jobs.

        :param job_count: The job_count of this ApiMrUsageReportRow.
        :type: int
        """

        self._job_count = job_count

    @property
    def task_count(self):
        """
        Gets the task_count of this ApiMrUsageReportRow.
        Number of tasks.

        :return: The task_count of this ApiMrUsageReportRow.
        :rtype: int
        """
        return self._task_count

    @task_count.setter
    def task_count(self, task_count):
        """
        Sets the task_count of this ApiMrUsageReportRow.
        Number of tasks.

        :param task_count: The task_count of this ApiMrUsageReportRow.
        :type: int
        """

        self._task_count = task_count

    @property
    def duration_sec(self):
        """
        Gets the duration_sec of this ApiMrUsageReportRow.
        Total duration of this user's MapReduce jobs.

        :return: The duration_sec of this ApiMrUsageReportRow.
        :rtype: int
        """
        return self._duration_sec

    @duration_sec.setter
    def duration_sec(self, duration_sec):
        """
        Sets the duration_sec of this ApiMrUsageReportRow.
        Total duration of this user's MapReduce jobs.

        :param duration_sec: The duration_sec of this ApiMrUsageReportRow.
        :type: int
        """

        self._duration_sec = duration_sec

    @property
    def failed_maps(self):
        """
        Gets the failed_maps of this ApiMrUsageReportRow.
        Failed maps of this user's MapReduce jobs. Available since v11.

        :return: The failed_maps of this ApiMrUsageReportRow.
        :rtype: int
        """
        return self._failed_maps

    @failed_maps.setter
    def failed_maps(self, failed_maps):
        """
        Sets the failed_maps of this ApiMrUsageReportRow.
        Failed maps of this user's MapReduce jobs. Available since v11.

        :param failed_maps: The failed_maps of this ApiMrUsageReportRow.
        :type: int
        """

        self._failed_maps = failed_maps

    @property
    def total_maps(self):
        """
        Gets the total_maps of this ApiMrUsageReportRow.
        Total maps of this user's MapReduce jobs. Available since v11.

        :return: The total_maps of this ApiMrUsageReportRow.
        :rtype: int
        """
        return self._total_maps

    @total_maps.setter
    def total_maps(self, total_maps):
        """
        Sets the total_maps of this ApiMrUsageReportRow.
        Total maps of this user's MapReduce jobs. Available since v11.

        :param total_maps: The total_maps of this ApiMrUsageReportRow.
        :type: int
        """

        self._total_maps = total_maps

    @property
    def failed_reduces(self):
        """
        Gets the failed_reduces of this ApiMrUsageReportRow.
        Failed reduces of this user's MapReduce jobs. Available since v11.

        :return: The failed_reduces of this ApiMrUsageReportRow.
        :rtype: int
        """
        return self._failed_reduces

    @failed_reduces.setter
    def failed_reduces(self, failed_reduces):
        """
        Sets the failed_reduces of this ApiMrUsageReportRow.
        Failed reduces of this user's MapReduce jobs. Available since v11.

        :param failed_reduces: The failed_reduces of this ApiMrUsageReportRow.
        :type: int
        """

        self._failed_reduces = failed_reduces

    @property
    def total_reduces(self):
        """
        Gets the total_reduces of this ApiMrUsageReportRow.
        Total reduces of this user's MapReduce jobs. Available since v11.

        :return: The total_reduces of this ApiMrUsageReportRow.
        :rtype: int
        """
        return self._total_reduces

    @total_reduces.setter
    def total_reduces(self, total_reduces):
        """
        Sets the total_reduces of this ApiMrUsageReportRow.
        Total reduces of this user's MapReduce jobs. Available since v11.

        :param total_reduces: The total_reduces of this ApiMrUsageReportRow.
        :type: int
        """

        self._total_reduces = total_reduces

    @property
    def map_input_bytes(self):
        """
        Gets the map_input_bytes of this ApiMrUsageReportRow.
        Map input bytes of this user's MapReduce jobs. Available since v11.

        :return: The map_input_bytes of this ApiMrUsageReportRow.
        :rtype: int
        """
        return self._map_input_bytes

    @map_input_bytes.setter
    def map_input_bytes(self, map_input_bytes):
        """
        Sets the map_input_bytes of this ApiMrUsageReportRow.
        Map input bytes of this user's MapReduce jobs. Available since v11.

        :param map_input_bytes: The map_input_bytes of this ApiMrUsageReportRow.
        :type: int
        """

        self._map_input_bytes = map_input_bytes

    @property
    def map_output_bytes(self):
        """
        Gets the map_output_bytes of this ApiMrUsageReportRow.
        Map output bytes of this user's MapReduce jobs. Available since v11.

        :return: The map_output_bytes of this ApiMrUsageReportRow.
        :rtype: int
        """
        return self._map_output_bytes

    @map_output_bytes.setter
    def map_output_bytes(self, map_output_bytes):
        """
        Sets the map_output_bytes of this ApiMrUsageReportRow.
        Map output bytes of this user's MapReduce jobs. Available since v11.

        :param map_output_bytes: The map_output_bytes of this ApiMrUsageReportRow.
        :type: int
        """

        self._map_output_bytes = map_output_bytes

    @property
    def hdfs_bytes_read(self):
        """
        Gets the hdfs_bytes_read of this ApiMrUsageReportRow.
        HDFS bytes read of this user's MapReduce jobs. Available since v11.

        :return: The hdfs_bytes_read of this ApiMrUsageReportRow.
        :rtype: int
        """
        return self._hdfs_bytes_read

    @hdfs_bytes_read.setter
    def hdfs_bytes_read(self, hdfs_bytes_read):
        """
        Sets the hdfs_bytes_read of this ApiMrUsageReportRow.
        HDFS bytes read of this user's MapReduce jobs. Available since v11.

        :param hdfs_bytes_read: The hdfs_bytes_read of this ApiMrUsageReportRow.
        :type: int
        """

        self._hdfs_bytes_read = hdfs_bytes_read

    @property
    def hdfs_bytes_written(self):
        """
        Gets the hdfs_bytes_written of this ApiMrUsageReportRow.
        HDFS bytes written of this user's MapReduce jobs. Available since v11.

        :return: The hdfs_bytes_written of this ApiMrUsageReportRow.
        :rtype: int
        """
        return self._hdfs_bytes_written

    @hdfs_bytes_written.setter
    def hdfs_bytes_written(self, hdfs_bytes_written):
        """
        Sets the hdfs_bytes_written of this ApiMrUsageReportRow.
        HDFS bytes written of this user's MapReduce jobs. Available since v11.

        :param hdfs_bytes_written: The hdfs_bytes_written of this ApiMrUsageReportRow.
        :type: int
        """

        self._hdfs_bytes_written = hdfs_bytes_written

    @property
    def local_bytes_read(self):
        """
        Gets the local_bytes_read of this ApiMrUsageReportRow.
        Local bytes read of this user's MapReduce jobs. Available since v11.

        :return: The local_bytes_read of this ApiMrUsageReportRow.
        :rtype: int
        """
        return self._local_bytes_read

    @local_bytes_read.setter
    def local_bytes_read(self, local_bytes_read):
        """
        Sets the local_bytes_read of this ApiMrUsageReportRow.
        Local bytes read of this user's MapReduce jobs. Available since v11.

        :param local_bytes_read: The local_bytes_read of this ApiMrUsageReportRow.
        :type: int
        """

        self._local_bytes_read = local_bytes_read

    @property
    def local_bytes_written(self):
        """
        Gets the local_bytes_written of this ApiMrUsageReportRow.
        Local bytes written of this user's MapReduce jobs. Available since v11.

        :return: The local_bytes_written of this ApiMrUsageReportRow.
        :rtype: int
        """
        return self._local_bytes_written

    @local_bytes_written.setter
    def local_bytes_written(self, local_bytes_written):
        """
        Sets the local_bytes_written of this ApiMrUsageReportRow.
        Local bytes written of this user's MapReduce jobs. Available since v11.

        :param local_bytes_written: The local_bytes_written of this ApiMrUsageReportRow.
        :type: int
        """

        self._local_bytes_written = local_bytes_written

    @property
    def data_local_maps(self):
        """
        Gets the data_local_maps of this ApiMrUsageReportRow.
        Data local maps of this user's MapReduce jobs. Available since v11.

        :return: The data_local_maps of this ApiMrUsageReportRow.
        :rtype: int
        """
        return self._data_local_maps

    @data_local_maps.setter
    def data_local_maps(self, data_local_maps):
        """
        Sets the data_local_maps of this ApiMrUsageReportRow.
        Data local maps of this user's MapReduce jobs. Available since v11.

        :param data_local_maps: The data_local_maps of this ApiMrUsageReportRow.
        :type: int
        """

        self._data_local_maps = data_local_maps

    @property
    def rack_local_maps(self):
        """
        Gets the rack_local_maps of this ApiMrUsageReportRow.
        Rack local maps of this user's MapReduce jobs. Available since v11.

        :return: The rack_local_maps of this ApiMrUsageReportRow.
        :rtype: int
        """
        return self._rack_local_maps

    @rack_local_maps.setter
    def rack_local_maps(self, rack_local_maps):
        """
        Sets the rack_local_maps of this ApiMrUsageReportRow.
        Rack local maps of this user's MapReduce jobs. Available since v11.

        :param rack_local_maps: The rack_local_maps of this ApiMrUsageReportRow.
        :type: int
        """

        self._rack_local_maps = rack_local_maps

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

        return self.__dict__ == other.__dict__

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