# coding: utf-8

"""
    Flink API Client

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

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

import pprint
import re  # noqa: F401

import six


class TaskCheckpointStatistics(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 = {
        'id': 'int',
        'status': 'str',
        'latest_ack_timestamp': 'int',
        'state_size': 'int',
        'end_to_end_duration': 'int',
        'alignment_buffered': 'int',
        'num_subtasks': 'int',
        'num_acknowledged_subtasks': 'int'
    }

    attribute_map = {
        'id': 'id',
        'status': 'status',
        'latest_ack_timestamp': 'latest_ack_timestamp',
        'state_size': 'state_size',
        'end_to_end_duration': 'end_to_end_duration',
        'alignment_buffered': 'alignment_buffered',
        'num_subtasks': 'num_subtasks',
        'num_acknowledged_subtasks': 'num_acknowledged_subtasks'
    }

    def __init__(self, id=None, status=None, latest_ack_timestamp=None, state_size=None, end_to_end_duration=None, alignment_buffered=None, num_subtasks=None, num_acknowledged_subtasks=None):  # noqa: E501
        """TaskCheckpointStatistics - a model defined in Swagger"""  # noqa: E501
        self._id = None
        self._status = None
        self._latest_ack_timestamp = None
        self._state_size = None
        self._end_to_end_duration = None
        self._alignment_buffered = None
        self._num_subtasks = None
        self._num_acknowledged_subtasks = None
        self.discriminator = None
        if id is not None:
            self.id = id
        if status is not None:
            self.status = status
        if latest_ack_timestamp is not None:
            self.latest_ack_timestamp = latest_ack_timestamp
        if state_size is not None:
            self.state_size = state_size
        if end_to_end_duration is not None:
            self.end_to_end_duration = end_to_end_duration
        if alignment_buffered is not None:
            self.alignment_buffered = alignment_buffered
        if num_subtasks is not None:
            self.num_subtasks = num_subtasks
        if num_acknowledged_subtasks is not None:
            self.num_acknowledged_subtasks = num_acknowledged_subtasks

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


        :return: The id of this TaskCheckpointStatistics.  # noqa: E501
        :rtype: int
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this TaskCheckpointStatistics.


        :param id: The id of this TaskCheckpointStatistics.  # noqa: E501
        :type: int
        """

        self._id = id

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


        :return: The status of this TaskCheckpointStatistics.  # noqa: E501
        :rtype: str
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this TaskCheckpointStatistics.


        :param status: The status of this TaskCheckpointStatistics.  # noqa: E501
        :type: str
        """
        allowed_values = ["IN_PROGRESS", "COMPLETED", "FAILED"]  # noqa: E501
        if status not in allowed_values:
            raise ValueError(
                "Invalid value for `status` ({0}), must be one of {1}"  # noqa: E501
                .format(status, allowed_values)
            )

        self._status = status

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


        :return: The latest_ack_timestamp of this TaskCheckpointStatistics.  # noqa: E501
        :rtype: int
        """
        return self._latest_ack_timestamp

    @latest_ack_timestamp.setter
    def latest_ack_timestamp(self, latest_ack_timestamp):
        """Sets the latest_ack_timestamp of this TaskCheckpointStatistics.


        :param latest_ack_timestamp: The latest_ack_timestamp of this TaskCheckpointStatistics.  # noqa: E501
        :type: int
        """

        self._latest_ack_timestamp = latest_ack_timestamp

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


        :return: The state_size of this TaskCheckpointStatistics.  # noqa: E501
        :rtype: int
        """
        return self._state_size

    @state_size.setter
    def state_size(self, state_size):
        """Sets the state_size of this TaskCheckpointStatistics.


        :param state_size: The state_size of this TaskCheckpointStatistics.  # noqa: E501
        :type: int
        """

        self._state_size = state_size

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


        :return: The end_to_end_duration of this TaskCheckpointStatistics.  # noqa: E501
        :rtype: int
        """
        return self._end_to_end_duration

    @end_to_end_duration.setter
    def end_to_end_duration(self, end_to_end_duration):
        """Sets the end_to_end_duration of this TaskCheckpointStatistics.


        :param end_to_end_duration: The end_to_end_duration of this TaskCheckpointStatistics.  # noqa: E501
        :type: int
        """

        self._end_to_end_duration = end_to_end_duration

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


        :return: The alignment_buffered of this TaskCheckpointStatistics.  # noqa: E501
        :rtype: int
        """
        return self._alignment_buffered

    @alignment_buffered.setter
    def alignment_buffered(self, alignment_buffered):
        """Sets the alignment_buffered of this TaskCheckpointStatistics.


        :param alignment_buffered: The alignment_buffered of this TaskCheckpointStatistics.  # noqa: E501
        :type: int
        """

        self._alignment_buffered = alignment_buffered

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


        :return: The num_subtasks of this TaskCheckpointStatistics.  # noqa: E501
        :rtype: int
        """
        return self._num_subtasks

    @num_subtasks.setter
    def num_subtasks(self, num_subtasks):
        """Sets the num_subtasks of this TaskCheckpointStatistics.


        :param num_subtasks: The num_subtasks of this TaskCheckpointStatistics.  # noqa: E501
        :type: int
        """

        self._num_subtasks = num_subtasks

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


        :return: The num_acknowledged_subtasks of this TaskCheckpointStatistics.  # noqa: E501
        :rtype: int
        """
        return self._num_acknowledged_subtasks

    @num_acknowledged_subtasks.setter
    def num_acknowledged_subtasks(self, num_acknowledged_subtasks):
        """Sets the num_acknowledged_subtasks of this TaskCheckpointStatistics.


        :param num_acknowledged_subtasks: The num_acknowledged_subtasks of this TaskCheckpointStatistics.  # noqa: E501
        :type: int
        """

        self._num_acknowledged_subtasks = num_acknowledged_subtasks

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

        return self.__dict__ == other.__dict__

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