# 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 OAuthConnectionResponse(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 = {
        'success': 'bool',
        'token_id': 'str',
        'connection_id': 'str',
        'message': 'str',
        'is_validation': 'bool'
    }

    attribute_map = {
        'success': 'success',
        'token_id': 'token_id',
        'connection_id': 'connection_id',
        'message': 'message',
        'is_validation': 'is_validation'
    }

    def __init__(self, success=None, token_id=None, connection_id=None, message=None, is_validation=None, local_vars_configuration=None):  # noqa: E501
        """OAuthConnectionResponse - 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._success = None
        self._token_id = None
        self._connection_id = None
        self._message = None
        self._is_validation = None
        self.discriminator = None

        self.success = success
        self.token_id = token_id
        self.connection_id = connection_id
        self.message = message
        self.is_validation = is_validation

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


        :return: The success of this OAuthConnectionResponse.  # noqa: E501
        :rtype: bool
        """
        return self._success

    @success.setter
    def success(self, success):
        """Sets the success of this OAuthConnectionResponse.


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

        self._success = success

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


        :return: The token_id of this OAuthConnectionResponse.  # noqa: E501
        :rtype: str
        """
        return self._token_id

    @token_id.setter
    def token_id(self, token_id):
        """Sets the token_id of this OAuthConnectionResponse.


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

        self._token_id = token_id

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


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

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


        :param connection_id: The connection_id of this OAuthConnectionResponse.  # 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 message(self):
        """Gets the message of this OAuthConnectionResponse.  # noqa: E501


        :return: The message of this OAuthConnectionResponse.  # noqa: E501
        :rtype: str
        """
        return self._message

    @message.setter
    def message(self, message):
        """Sets the message of this OAuthConnectionResponse.


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

        self._message = message

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


        :return: The is_validation of this OAuthConnectionResponse.  # noqa: E501
        :rtype: bool
        """
        return self._is_validation

    @is_validation.setter
    def is_validation(self, is_validation):
        """Sets the is_validation of this OAuthConnectionResponse.


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

        self._is_validation = is_validation

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

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