# coding: utf-8

"""
    herd

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

    OpenAPI spec version: 0.178.0-SNAPSHOT
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six


class JdbcStatement(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 = {
        'type': 'str',
        'sql': 'str',
        'continue_on_error': 'bool',
        'status': 'str',
        'result': 'str',
        'result_set': 'JdbcStatementResultSet',
        'error_message': 'str'
    }

    attribute_map = {
        'type': 'type',
        'sql': 'sql',
        'continue_on_error': 'continueOnError',
        'status': 'status',
        'result': 'result',
        'result_set': 'resultSet',
        'error_message': 'errorMessage'
    }

    def __init__(self, type=None, sql=None, continue_on_error=None, status=None, result=None, result_set=None, error_message=None):  # noqa: E501
        """JdbcStatement - a model defined in OpenAPI"""  # noqa: E501

        self._type = None
        self._sql = None
        self._continue_on_error = None
        self._status = None
        self._result = None
        self._result_set = None
        self._error_message = None
        self.discriminator = None

        self.type = type
        self.sql = sql
        if continue_on_error is not None:
            self.continue_on_error = continue_on_error
        if status is not None:
            self.status = status
        if result is not None:
            self.result = result
        if result_set is not None:
            self.result_set = result_set
        if error_message is not None:
            self.error_message = error_message

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


        :return: The type of this JdbcStatement.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this JdbcStatement.


        :param type: The type of this JdbcStatement.  # noqa: E501
        :type: str
        """
        if type is None:
            raise ValueError("Invalid value for `type`, must not be `None`")  # noqa: E501
        allowed_values = ["UPDATE", "QUERY"]  # noqa: E501
        if type not in allowed_values:
            raise ValueError(
                "Invalid value for `type` ({0}), must be one of {1}"  # noqa: E501
                .format(type, allowed_values)
            )

        self._type = type

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


        :return: The sql of this JdbcStatement.  # noqa: E501
        :rtype: str
        """
        return self._sql

    @sql.setter
    def sql(self, sql):
        """Sets the sql of this JdbcStatement.


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

        self._sql = sql

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


        :return: The continue_on_error of this JdbcStatement.  # noqa: E501
        :rtype: bool
        """
        return self._continue_on_error

    @continue_on_error.setter
    def continue_on_error(self, continue_on_error):
        """Sets the continue_on_error of this JdbcStatement.


        :param continue_on_error: The continue_on_error of this JdbcStatement.  # noqa: E501
        :type: bool
        """

        self._continue_on_error = continue_on_error

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


        :return: The status of this JdbcStatement.  # noqa: E501
        :rtype: str
        """
        return self._status

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


        :param status: The status of this JdbcStatement.  # noqa: E501
        :type: str
        """
        allowed_values = ["SUCCESS", "ERROR", "SKIPPED"]  # noqa: E501
        if status not in allowed_values:
            raise ValueError(
                "Invalid value for `status` ({0}), must be one of {1}"  # noqa: E501
                .format(status, allowed_values)
            )

        self._status = status

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


        :return: The result of this JdbcStatement.  # noqa: E501
        :rtype: str
        """
        return self._result

    @result.setter
    def result(self, result):
        """Sets the result of this JdbcStatement.


        :param result: The result of this JdbcStatement.  # noqa: E501
        :type: str
        """

        self._result = result

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


        :return: The result_set of this JdbcStatement.  # noqa: E501
        :rtype: JdbcStatementResultSet
        """
        return self._result_set

    @result_set.setter
    def result_set(self, result_set):
        """Sets the result_set of this JdbcStatement.


        :param result_set: The result_set of this JdbcStatement.  # noqa: E501
        :type: JdbcStatementResultSet
        """

        self._result_set = result_set

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


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

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


        :param error_message: The error_message of this JdbcStatement.  # 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, JdbcStatement):
            return False

        return self.__dict__ == other.__dict__

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