# 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 DatabricksConnectionInfo(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 = {
        'id': 'str',
        'name': 'str',
        'connection_type': 'ConnectionType',
        'connection_config': 'DatabricksConnectionConfig',
        'validation_status': 'ValidationStatus',
        'created_at': 'datetime',
        'last_verified_at': 'datetime',
        'connection_expired': 'bool',
        'creator': 'MiniUser'
    }

    attribute_map = {
        'id': 'id',
        'name': 'name',
        'connection_type': 'connection_type',
        'connection_config': 'connection_config',
        'validation_status': 'validation_status',
        'created_at': 'created_at',
        'last_verified_at': 'last_verified_at',
        'connection_expired': 'connection_expired',
        'creator': 'creator'
    }

    def __init__(self, id=None, name=None, connection_type=None, connection_config=None, validation_status=None, created_at=None, last_verified_at=None, connection_expired=None, creator=None, local_vars_configuration=None):  # noqa: E501
        """DatabricksConnectionInfo - 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._id = None
        self._name = None
        self._connection_type = None
        self._connection_config = None
        self._validation_status = None
        self._created_at = None
        self._last_verified_at = None
        self._connection_expired = None
        self._creator = None
        self.discriminator = None

        self.id = id
        self.name = name
        self.connection_type = connection_type
        self.connection_config = connection_config
        self.validation_status = validation_status
        self.created_at = created_at
        if last_verified_at is not None:
            self.last_verified_at = last_verified_at
        if connection_expired is not None:
            self.connection_expired = connection_expired
        if creator is not None:
            self.creator = creator

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


        :return: The id of this DatabricksConnectionInfo.  # noqa: E501
        :rtype: str
        """
        return self._id

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


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

        self._id = id

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


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

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


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

        self._name = name

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


        :return: The connection_type of this DatabricksConnectionInfo.  # noqa: E501
        :rtype: ConnectionType
        """
        return self._connection_type

    @connection_type.setter
    def connection_type(self, connection_type):
        """Sets the connection_type of this DatabricksConnectionInfo.


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

        self._connection_type = connection_type

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


        :return: The connection_config of this DatabricksConnectionInfo.  # noqa: E501
        :rtype: DatabricksConnectionConfig
        """
        return self._connection_config

    @connection_config.setter
    def connection_config(self, connection_config):
        """Sets the connection_config of this DatabricksConnectionInfo.


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

        self._connection_config = connection_config

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


        :return: The validation_status of this DatabricksConnectionInfo.  # noqa: E501
        :rtype: ValidationStatus
        """
        return self._validation_status

    @validation_status.setter
    def validation_status(self, validation_status):
        """Sets the validation_status of this DatabricksConnectionInfo.


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

        self._validation_status = validation_status

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


        :return: The created_at of this DatabricksConnectionInfo.  # noqa: E501
        :rtype: datetime
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """Sets the created_at of this DatabricksConnectionInfo.


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

        self._created_at = created_at

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


        :return: The last_verified_at of this DatabricksConnectionInfo.  # noqa: E501
        :rtype: datetime
        """
        return self._last_verified_at

    @last_verified_at.setter
    def last_verified_at(self, last_verified_at):
        """Sets the last_verified_at of this DatabricksConnectionInfo.


        :param last_verified_at: The last_verified_at of this DatabricksConnectionInfo.  # noqa: E501
        :type: datetime
        """

        self._last_verified_at = last_verified_at

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


        :return: The connection_expired of this DatabricksConnectionInfo.  # noqa: E501
        :rtype: bool
        """
        return self._connection_expired

    @connection_expired.setter
    def connection_expired(self, connection_expired):
        """Sets the connection_expired of this DatabricksConnectionInfo.


        :param connection_expired: The connection_expired of this DatabricksConnectionInfo.  # noqa: E501
        :type: bool
        """

        self._connection_expired = connection_expired

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


        :return: The creator of this DatabricksConnectionInfo.  # noqa: E501
        :rtype: MiniUser
        """
        return self._creator

    @creator.setter
    def creator(self, creator):
        """Sets the creator of this DatabricksConnectionInfo.


        :param creator: The creator of this DatabricksConnectionInfo.  # noqa: E501
        :type: MiniUser
        """

        self._creator = creator

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

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