# coding: utf-8
# Copyright (c) 2016, 2026, Oracle and/or its affiliates.  All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.

# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20230222


from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel  # noqa: F401
from oci.decorators import init_model_state_from_kwargs


@init_model_state_from_kwargs
class ExecuteSqlOutputResultDispositionTemplate(object):
    """
    Template defining how the result of a command should be stored.
    """

    #: A constant which can be used with the statement_type property of a ExecuteSqlOutputResultDispositionTemplate.
    #: This constant has a value of "QUERY"
    STATEMENT_TYPE_QUERY = "QUERY"

    #: A constant which can be used with the statement_type property of a ExecuteSqlOutputResultDispositionTemplate.
    #: This constant has a value of "DML"
    STATEMENT_TYPE_DML = "DML"

    #: A constant which can be used with the statement_type property of a ExecuteSqlOutputResultDispositionTemplate.
    #: This constant has a value of "DDL"
    STATEMENT_TYPE_DDL = "DDL"

    #: A constant which can be used with the statement_type property of a ExecuteSqlOutputResultDispositionTemplate.
    #: This constant has a value of "PLSQL"
    STATEMENT_TYPE_PLSQL = "PLSQL"

    #: A constant which can be used with the statement_type property of a ExecuteSqlOutputResultDispositionTemplate.
    #: This constant has a value of "SQLPLUS"
    STATEMENT_TYPE_SQLPLUS = "SQLPLUS"

    #: A constant which can be used with the statement_type property of a ExecuteSqlOutputResultDispositionTemplate.
    #: This constant has a value of "IGNORE"
    STATEMENT_TYPE_IGNORE = "IGNORE"

    #: A constant which can be used with the statement_type property of a ExecuteSqlOutputResultDispositionTemplate.
    #: This constant has a value of "TRANSACTION_CONTROL"
    STATEMENT_TYPE_TRANSACTION_CONTROL = "TRANSACTION_CONTROL"

    #: A constant which can be used with the statement_type property of a ExecuteSqlOutputResultDispositionTemplate.
    #: This constant has a value of "SESSION_CONTROL"
    STATEMENT_TYPE_SESSION_CONTROL = "SESSION_CONTROL"

    #: A constant which can be used with the statement_type property of a ExecuteSqlOutputResultDispositionTemplate.
    #: This constant has a value of "SYSTEM_CONTROL"
    STATEMENT_TYPE_SYSTEM_CONTROL = "SYSTEM_CONTROL"

    #: A constant which can be used with the statement_type property of a ExecuteSqlOutputResultDispositionTemplate.
    #: This constant has a value of "JDBC"
    STATEMENT_TYPE_JDBC = "JDBC"

    #: A constant which can be used with the statement_type property of a ExecuteSqlOutputResultDispositionTemplate.
    #: This constant has a value of "OTHER"
    STATEMENT_TYPE_OTHER = "OTHER"

    def __init__(self, **kwargs):
        """
        Initializes a new ExecuteSqlOutputResultDispositionTemplate object with values from keyword arguments.
        The following keyword arguments are supported (corresponding to the getters/setters of this class):

        :param statement_type:
            The value to assign to the statement_type property of this ExecuteSqlOutputResultDispositionTemplate.
            Allowed values for this property are: "QUERY", "DML", "DDL", "PLSQL", "SQLPLUS", "IGNORE", "TRANSACTION_CONTROL", "SESSION_CONTROL", "SYSTEM_CONTROL", "JDBC", "OTHER"
        :type statement_type: str

        :param object_template:
            The value to assign to the object_template property of this ExecuteSqlOutputResultDispositionTemplate.
        :type object_template: oci.database_tools_runtime.models.ExecuteSqlOutputDispositionDetails

        """
        self.swagger_types = {
            'statement_type': 'str',
            'object_template': 'ExecuteSqlOutputDispositionDetails'
        }
        self.attribute_map = {
            'statement_type': 'statementType',
            'object_template': 'objectTemplate'
        }
        self._statement_type = None
        self._object_template = None

    @property
    def statement_type(self):
        """
        **[Required]** Gets the statement_type of this ExecuteSqlOutputResultDispositionTemplate.
        Commands matching this statement type will use this result disposition.

        Allowed values for this property are: "QUERY", "DML", "DDL", "PLSQL", "SQLPLUS", "IGNORE", "TRANSACTION_CONTROL", "SESSION_CONTROL", "SYSTEM_CONTROL", "JDBC", "OTHER"


        :return: The statement_type of this ExecuteSqlOutputResultDispositionTemplate.
        :rtype: str
        """
        return self._statement_type

    @statement_type.setter
    def statement_type(self, statement_type):
        """
        Sets the statement_type of this ExecuteSqlOutputResultDispositionTemplate.
        Commands matching this statement type will use this result disposition.


        :param statement_type: The statement_type of this ExecuteSqlOutputResultDispositionTemplate.
        :type: str
        """
        allowed_values = ["QUERY", "DML", "DDL", "PLSQL", "SQLPLUS", "IGNORE", "TRANSACTION_CONTROL", "SESSION_CONTROL", "SYSTEM_CONTROL", "JDBC", "OTHER"]
        if not value_allowed_none_or_none_sentinel(statement_type, allowed_values):
            raise ValueError(
                f"Invalid value for `statement_type`, must be None or one of {allowed_values}"
            )
        self._statement_type = statement_type

    @property
    def object_template(self):
        """
        **[Required]** Gets the object_template of this ExecuteSqlOutputResultDispositionTemplate.

        :return: The object_template of this ExecuteSqlOutputResultDispositionTemplate.
        :rtype: oci.database_tools_runtime.models.ExecuteSqlOutputDispositionDetails
        """
        return self._object_template

    @object_template.setter
    def object_template(self, object_template):
        """
        Sets the object_template of this ExecuteSqlOutputResultDispositionTemplate.

        :param object_template: The object_template of this ExecuteSqlOutputResultDispositionTemplate.
        :type: oci.database_tools_runtime.models.ExecuteSqlOutputDispositionDetails
        """
        self._object_template = object_template

    def __repr__(self):
        return formatted_flat_dict(self)

    def __eq__(self, other):
        if other is None:
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not self == other
