# 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 ConnectionVerificationResult(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 = {
        'connection_id': 'str',
        'is_healthy': 'bool',
        'verified_at': 'datetime',
        'details': 'str',
        'error_message': 'str'
    }

    attribute_map = {
        'connection_id': 'connection_id',
        'is_healthy': 'is_healthy',
        'verified_at': 'verified_at',
        'details': 'details',
        'error_message': 'error_message'
    }

    def __init__(self, connection_id=None, is_healthy=None, verified_at=None, details=None, error_message=None, local_vars_configuration=None):  # noqa: E501
        """ConnectionVerificationResult - 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._connection_id = None
        self._is_healthy = None
        self._verified_at = None
        self._details = None
        self._error_message = None
        self.discriminator = None

        self.connection_id = connection_id
        self.is_healthy = is_healthy
        self.verified_at = verified_at
        if details is not None:
            self.details = details
        if error_message is not None:
            self.error_message = error_message

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

        ID of the verified connection  # noqa: E501

        :return: The connection_id of this ConnectionVerificationResult.  # noqa: E501
        :rtype: str
        """
        return self._connection_id

    @connection_id.setter
    def connection_id(self, connection_id):
        """Sets the connection_id of this ConnectionVerificationResult.

        ID of the verified connection  # noqa: E501

        :param connection_id: The connection_id of this ConnectionVerificationResult.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and connection_id is None:  # noqa: E501
            raise ValueError("Invalid value for `connection_id`, must not be `None`")  # noqa: E501

        self._connection_id = connection_id

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

        Whether the connection is currently healthy and accessible  # noqa: E501

        :return: The is_healthy of this ConnectionVerificationResult.  # noqa: E501
        :rtype: bool
        """
        return self._is_healthy

    @is_healthy.setter
    def is_healthy(self, is_healthy):
        """Sets the is_healthy of this ConnectionVerificationResult.

        Whether the connection is currently healthy and accessible  # noqa: E501

        :param is_healthy: The is_healthy of this ConnectionVerificationResult.  # noqa: E501
        :type: bool
        """
        if self.local_vars_configuration.client_side_validation and is_healthy is None:  # noqa: E501
            raise ValueError("Invalid value for `is_healthy`, must not be `None`")  # noqa: E501

        self._is_healthy = is_healthy

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

        Timestamp when verification was performed  # noqa: E501

        :return: The verified_at of this ConnectionVerificationResult.  # noqa: E501
        :rtype: datetime
        """
        return self._verified_at

    @verified_at.setter
    def verified_at(self, verified_at):
        """Sets the verified_at of this ConnectionVerificationResult.

        Timestamp when verification was performed  # noqa: E501

        :param verified_at: The verified_at of this ConnectionVerificationResult.  # noqa: E501
        :type: datetime
        """
        if self.local_vars_configuration.client_side_validation and verified_at is None:  # noqa: E501
            raise ValueError("Invalid value for `verified_at`, must not be `None`")  # noqa: E501

        self._verified_at = verified_at

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

        Additional details about verification success (e.g., catalogs found)  # noqa: E501

        :return: The details of this ConnectionVerificationResult.  # noqa: E501
        :rtype: str
        """
        return self._details

    @details.setter
    def details(self, details):
        """Sets the details of this ConnectionVerificationResult.

        Additional details about verification success (e.g., catalogs found)  # noqa: E501

        :param details: The details of this ConnectionVerificationResult.  # noqa: E501
        :type: str
        """

        self._details = details

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

        Error message if verification failed  # noqa: E501

        :return: The error_message of this ConnectionVerificationResult.  # noqa: E501
        :rtype: str
        """
        return self._error_message

    @error_message.setter
    def error_message(self, error_message):
        """Sets the error_message of this ConnectionVerificationResult.

        Error message if verification failed  # noqa: E501

        :param error_message: The error_message of this ConnectionVerificationResult.  # noqa: E501
        :type: str
        """

        self._error_message = error_message

    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, ConnectionVerificationResult):
            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, ConnectionVerificationResult):
            return True

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