# coding: utf-8

"""
    Cloudera Manager API

    <h1>Cloudera Manager API v57</h1>       <p>Introduced in Cloudera Manager 7.13.1</p>       <p><a href=\"http://www.cloudera.com/documentation.html\">Cloudera Product Documentation</a></p>  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class ApiHive3ReplicationMetricsStage(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 = {
        'name': 'str',
        'status': 'ApiHive3ReplicationMetricsStatus',
        'start_date': 'str',
        'end_date': 'str',
        'metrics': 'list[ApiHive3ReplicationMetric]',
        'error_log_path': 'str',
        'oldest_open_txn_timestamp_at_begin': 'int',
        'oldest_open_txn_timestamp_at_end': 'int',
        'end_date_on_src': 'str',
        'end_date_on_tgt': 'str',
        'last_successful_dump_id': 'int'
    }

    attribute_map = {
        'name': 'name',
        'status': 'status',
        'start_date': 'startDate',
        'end_date': 'endDate',
        'metrics': 'metrics',
        'error_log_path': 'errorLogPath',
        'oldest_open_txn_timestamp_at_begin': 'oldestOpenTxnTimestampAtBegin',
        'oldest_open_txn_timestamp_at_end': 'oldestOpenTxnTimestampAtEnd',
        'end_date_on_src': 'endDateOnSrc',
        'end_date_on_tgt': 'endDateOnTgt',
        'last_successful_dump_id': 'lastSuccessfulDumpId'
    }

    def __init__(self, name=None, status=None, start_date=None, end_date=None, metrics=None, error_log_path=None, oldest_open_txn_timestamp_at_begin=None, oldest_open_txn_timestamp_at_end=None, end_date_on_src=None, end_date_on_tgt=None, last_successful_dump_id=None):  # noqa: E501
        """ApiHive3ReplicationMetricsStage - a model defined in Swagger"""  # noqa: E501
        self._name = None
        self._status = None
        self._start_date = None
        self._end_date = None
        self._metrics = None
        self._error_log_path = None
        self._oldest_open_txn_timestamp_at_begin = None
        self._oldest_open_txn_timestamp_at_end = None
        self._end_date_on_src = None
        self._end_date_on_tgt = None
        self._last_successful_dump_id = None
        self.discriminator = None
        if name is not None:
            self.name = name
        if status is not None:
            self.status = status
        if start_date is not None:
            self.start_date = start_date
        if end_date is not None:
            self.end_date = end_date
        if metrics is not None:
            self.metrics = metrics
        if error_log_path is not None:
            self.error_log_path = error_log_path
        self.oldest_open_txn_timestamp_at_begin = oldest_open_txn_timestamp_at_begin
        self.oldest_open_txn_timestamp_at_end = oldest_open_txn_timestamp_at_end
        if end_date_on_src is not None:
            self.end_date_on_src = end_date_on_src
        if end_date_on_tgt is not None:
            self.end_date_on_tgt = end_date_on_tgt
        if last_successful_dump_id is not None:
            self.last_successful_dump_id = last_successful_dump_id

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


        :return: The name of this ApiHive3ReplicationMetricsStage.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this ApiHive3ReplicationMetricsStage.


        :param name: The name of this ApiHive3ReplicationMetricsStage.  # noqa: E501
        :type: str
        """

        self._name = name

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


        :return: The status of this ApiHive3ReplicationMetricsStage.  # noqa: E501
        :rtype: ApiHive3ReplicationMetricsStatus
        """
        return self._status

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


        :param status: The status of this ApiHive3ReplicationMetricsStage.  # noqa: E501
        :type: ApiHive3ReplicationMetricsStatus
        """

        self._status = status

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


        :return: The start_date of this ApiHive3ReplicationMetricsStage.  # noqa: E501
        :rtype: str
        """
        return self._start_date

    @start_date.setter
    def start_date(self, start_date):
        """Sets the start_date of this ApiHive3ReplicationMetricsStage.


        :param start_date: The start_date of this ApiHive3ReplicationMetricsStage.  # noqa: E501
        :type: str
        """

        self._start_date = start_date

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


        :return: The end_date of this ApiHive3ReplicationMetricsStage.  # noqa: E501
        :rtype: str
        """
        return self._end_date

    @end_date.setter
    def end_date(self, end_date):
        """Sets the end_date of this ApiHive3ReplicationMetricsStage.


        :param end_date: The end_date of this ApiHive3ReplicationMetricsStage.  # noqa: E501
        :type: str
        """

        self._end_date = end_date

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


        :return: The metrics of this ApiHive3ReplicationMetricsStage.  # noqa: E501
        :rtype: list[ApiHive3ReplicationMetric]
        """
        return self._metrics

    @metrics.setter
    def metrics(self, metrics):
        """Sets the metrics of this ApiHive3ReplicationMetricsStage.


        :param metrics: The metrics of this ApiHive3ReplicationMetricsStage.  # noqa: E501
        :type: list[ApiHive3ReplicationMetric]
        """

        self._metrics = metrics

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


        :return: The error_log_path of this ApiHive3ReplicationMetricsStage.  # noqa: E501
        :rtype: str
        """
        return self._error_log_path

    @error_log_path.setter
    def error_log_path(self, error_log_path):
        """Sets the error_log_path of this ApiHive3ReplicationMetricsStage.


        :param error_log_path: The error_log_path of this ApiHive3ReplicationMetricsStage.  # noqa: E501
        :type: str
        """

        self._error_log_path = error_log_path

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


        :return: The oldest_open_txn_timestamp_at_begin of this ApiHive3ReplicationMetricsStage.  # noqa: E501
        :rtype: int
        """
        return self._oldest_open_txn_timestamp_at_begin

    @oldest_open_txn_timestamp_at_begin.setter
    def oldest_open_txn_timestamp_at_begin(self, oldest_open_txn_timestamp_at_begin):
        """Sets the oldest_open_txn_timestamp_at_begin of this ApiHive3ReplicationMetricsStage.


        :param oldest_open_txn_timestamp_at_begin: The oldest_open_txn_timestamp_at_begin of this ApiHive3ReplicationMetricsStage.  # noqa: E501
        :type: int
        """
        if oldest_open_txn_timestamp_at_begin is None:
            raise ValueError("Invalid value for `oldest_open_txn_timestamp_at_begin`, must not be `None`")  # noqa: E501

        self._oldest_open_txn_timestamp_at_begin = oldest_open_txn_timestamp_at_begin

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


        :return: The oldest_open_txn_timestamp_at_end of this ApiHive3ReplicationMetricsStage.  # noqa: E501
        :rtype: int
        """
        return self._oldest_open_txn_timestamp_at_end

    @oldest_open_txn_timestamp_at_end.setter
    def oldest_open_txn_timestamp_at_end(self, oldest_open_txn_timestamp_at_end):
        """Sets the oldest_open_txn_timestamp_at_end of this ApiHive3ReplicationMetricsStage.


        :param oldest_open_txn_timestamp_at_end: The oldest_open_txn_timestamp_at_end of this ApiHive3ReplicationMetricsStage.  # noqa: E501
        :type: int
        """
        if oldest_open_txn_timestamp_at_end is None:
            raise ValueError("Invalid value for `oldest_open_txn_timestamp_at_end`, must not be `None`")  # noqa: E501

        self._oldest_open_txn_timestamp_at_end = oldest_open_txn_timestamp_at_end

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


        :return: The end_date_on_src of this ApiHive3ReplicationMetricsStage.  # noqa: E501
        :rtype: str
        """
        return self._end_date_on_src

    @end_date_on_src.setter
    def end_date_on_src(self, end_date_on_src):
        """Sets the end_date_on_src of this ApiHive3ReplicationMetricsStage.


        :param end_date_on_src: The end_date_on_src of this ApiHive3ReplicationMetricsStage.  # noqa: E501
        :type: str
        """

        self._end_date_on_src = end_date_on_src

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


        :return: The end_date_on_tgt of this ApiHive3ReplicationMetricsStage.  # noqa: E501
        :rtype: str
        """
        return self._end_date_on_tgt

    @end_date_on_tgt.setter
    def end_date_on_tgt(self, end_date_on_tgt):
        """Sets the end_date_on_tgt of this ApiHive3ReplicationMetricsStage.


        :param end_date_on_tgt: The end_date_on_tgt of this ApiHive3ReplicationMetricsStage.  # noqa: E501
        :type: str
        """

        self._end_date_on_tgt = end_date_on_tgt

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


        :return: The last_successful_dump_id of this ApiHive3ReplicationMetricsStage.  # noqa: E501
        :rtype: int
        """
        return self._last_successful_dump_id

    @last_successful_dump_id.setter
    def last_successful_dump_id(self, last_successful_dump_id):
        """Sets the last_successful_dump_id of this ApiHive3ReplicationMetricsStage.


        :param last_successful_dump_id: The last_successful_dump_id of this ApiHive3ReplicationMetricsStage.  # noqa: E501
        :type: int
        """

        self._last_successful_dump_id = last_successful_dump_id

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

        return self.__dict__ == other.__dict__

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