# coding: utf-8

"""
    Managed Ray API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 0.1.0
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from openapi_client.configuration import Configuration


class OperatorStatusDetails(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'operator_version': 'str',
        'check_results': 'list[OperatorCheckResult]',
        'reported_at': 'datetime'
    }

    attribute_map = {
        'operator_version': 'operator_version',
        'check_results': 'check_results',
        'reported_at': 'reported_at'
    }

    def __init__(self, operator_version=None, check_results=None, reported_at=None, local_vars_configuration=None):  # noqa: E501
        """OperatorStatusDetails - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._operator_version = None
        self._check_results = None
        self._reported_at = None
        self.discriminator = None

        if operator_version is not None:
            self.operator_version = operator_version
        if check_results is not None:
            self.check_results = check_results
        if reported_at is not None:
            self.reported_at = reported_at

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

        The version of the Anyscale Operator.  # noqa: E501

        :return: The operator_version of this OperatorStatusDetails.  # noqa: E501
        :rtype: str
        """
        return self._operator_version

    @operator_version.setter
    def operator_version(self, operator_version):
        """Sets the operator_version of this OperatorStatusDetails.

        The version of the Anyscale Operator.  # noqa: E501

        :param operator_version: The operator_version of this OperatorStatusDetails.  # noqa: E501
        :type: str
        """

        self._operator_version = operator_version

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

        The results of the operator checks.  # noqa: E501

        :return: The check_results of this OperatorStatusDetails.  # noqa: E501
        :rtype: list[OperatorCheckResult]
        """
        return self._check_results

    @check_results.setter
    def check_results(self, check_results):
        """Sets the check_results of this OperatorStatusDetails.

        The results of the operator checks.  # noqa: E501

        :param check_results: The check_results of this OperatorStatusDetails.  # noqa: E501
        :type: list[OperatorCheckResult]
        """

        self._check_results = check_results

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

        The timestamp when the operator status was last reported.  # noqa: E501

        :return: The reported_at of this OperatorStatusDetails.  # noqa: E501
        :rtype: datetime
        """
        return self._reported_at

    @reported_at.setter
    def reported_at(self, reported_at):
        """Sets the reported_at of this OperatorStatusDetails.

        The timestamp when the operator status was last reported.  # noqa: E501

        :param reported_at: The reported_at of this OperatorStatusDetails.  # noqa: E501
        :type: datetime
        """

        self._reported_at = reported_at

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_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 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, OperatorStatusDetails):
            return False

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
