# 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 UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails(object):
    """
    The content of a Database Tools database API gateway config auto API spec sub resource to be updated.
    """

    #: A constant which can be used with the type property of a UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
    #: This constant has a value of "DEFAULT"
    TYPE_DEFAULT = "DEFAULT"

    #: A constant which can be used with the database_object_type property of a UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
    #: This constant has a value of "FUNCTION"
    DATABASE_OBJECT_TYPE_FUNCTION = "FUNCTION"

    #: A constant which can be used with the database_object_type property of a UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
    #: This constant has a value of "MVIEW"
    DATABASE_OBJECT_TYPE_MVIEW = "MVIEW"

    #: A constant which can be used with the database_object_type property of a UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
    #: This constant has a value of "PACKAGE"
    DATABASE_OBJECT_TYPE_PACKAGE = "PACKAGE"

    #: A constant which can be used with the database_object_type property of a UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
    #: This constant has a value of "PROCEDURE"
    DATABASE_OBJECT_TYPE_PROCEDURE = "PROCEDURE"

    #: A constant which can be used with the database_object_type property of a UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
    #: This constant has a value of "TABLE"
    DATABASE_OBJECT_TYPE_TABLE = "TABLE"

    #: A constant which can be used with the database_object_type property of a UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
    #: This constant has a value of "VIEW"
    DATABASE_OBJECT_TYPE_VIEW = "VIEW"

    #: A constant which can be used with the database_object_type property of a UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
    #: This constant has a value of "DUALITYVIEW"
    DATABASE_OBJECT_TYPE_DUALITYVIEW = "DUALITYVIEW"

    #: A constant which can be used with the operations property of a UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
    #: This constant has a value of "READ"
    OPERATIONS_READ = "READ"

    #: A constant which can be used with the operations property of a UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
    #: This constant has a value of "WRITE"
    OPERATIONS_WRITE = "WRITE"

    #: A constant which can be used with the security_schemes property of a UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
    #: This constant has a value of "BASIC"
    SECURITY_SCHEMES_BASIC = "BASIC"

    #: A constant which can be used with the security_schemes property of a UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
    #: This constant has a value of "BEARER"
    SECURITY_SCHEMES_BEARER = "BEARER"

    def __init__(self, **kwargs):
        """
        Initializes a new UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input
        to a service operations then you should favor using a subclass over the base class:

        * :class:`~oci.database_tools_runtime.models.UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDefaultDetails`

        The following keyword arguments are supported (corresponding to the getters/setters of this class):

        :param type:
            The value to assign to the type property of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
            Allowed values for this property are: "DEFAULT"
        :type type: str

        :param display_name:
            The value to assign to the display_name property of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        :type display_name: str

        :param database_object_name:
            The value to assign to the database_object_name property of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        :type database_object_name: str

        :param database_object_type:
            The value to assign to the database_object_type property of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
            Allowed values for this property are: "FUNCTION", "MVIEW", "PACKAGE", "PROCEDURE", "TABLE", "VIEW", "DUALITYVIEW"
        :type database_object_type: str

        :param description:
            The value to assign to the description property of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        :type description: str

        :param alias:
            The value to assign to the alias property of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        :type alias: str

        :param operations:
            The value to assign to the operations property of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
            Allowed values for items in this list are: "READ", "WRITE"
        :type operations: list[str]

        :param security_schemes:
            The value to assign to the security_schemes property of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
            Allowed values for items in this list are: "BASIC", "BEARER"
        :type security_schemes: list[str]

        :param scope:
            The value to assign to the scope property of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        :type scope: str

        :param roles:
            The value to assign to the roles property of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        :type roles: list[str]

        """
        self.swagger_types = {
            'type': 'str',
            'display_name': 'str',
            'database_object_name': 'str',
            'database_object_type': 'str',
            'description': 'str',
            'alias': 'str',
            'operations': 'list[str]',
            'security_schemes': 'list[str]',
            'scope': 'str',
            'roles': 'list[str]'
        }
        self.attribute_map = {
            'type': 'type',
            'display_name': 'displayName',
            'database_object_name': 'databaseObjectName',
            'database_object_type': 'databaseObjectType',
            'description': 'description',
            'alias': 'alias',
            'operations': 'operations',
            'security_schemes': 'securitySchemes',
            'scope': 'scope',
            'roles': 'roles'
        }
        self._type = None
        self._display_name = None
        self._database_object_name = None
        self._database_object_type = None
        self._description = None
        self._alias = None
        self._operations = None
        self._security_schemes = None
        self._scope = None
        self._roles = None

    @staticmethod
    def get_subtype(object_dictionary):
        """
        Given the hash representation of a subtype of this class,
        use the info in the hash to return the class of the subtype.
        """
        type = object_dictionary['type']

        if type == 'DEFAULT':
            return 'UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDefaultDetails'
        else:
            return 'UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails'

    @property
    def type(self):
        """
        **[Required]** Gets the type of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        The type of the Database Tools database API gateway config auto API spec sub resource.

        Allowed values for this property are: "DEFAULT"


        :return: The type of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """
        Sets the type of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        The type of the Database Tools database API gateway config auto API spec sub resource.


        :param type: The type of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        :type: str
        """
        allowed_values = ["DEFAULT"]
        if not value_allowed_none_or_none_sentinel(type, allowed_values):
            raise ValueError(
                f"Invalid value for `type`, must be None or one of {allowed_values}"
            )
        self._type = type

    @property
    def display_name(self):
        """
        Gets the display_name of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        A user-friendly name. Does not have to be unique, and it\u2019s changeable. Avoid entering confidential information.


        :return: The display_name of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        :rtype: str
        """
        return self._display_name

    @display_name.setter
    def display_name(self, display_name):
        """
        Sets the display_name of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        A user-friendly name. Does not have to be unique, and it\u2019s changeable. Avoid entering confidential information.


        :param display_name: The display_name of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        :type: str
        """
        self._display_name = display_name

    @property
    def database_object_name(self):
        """
        Gets the database_object_name of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        The name of the database object.


        :return: The database_object_name of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        :rtype: str
        """
        return self._database_object_name

    @database_object_name.setter
    def database_object_name(self, database_object_name):
        """
        Sets the database_object_name of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        The name of the database object.


        :param database_object_name: The database_object_name of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        :type: str
        """
        self._database_object_name = database_object_name

    @property
    def database_object_type(self):
        """
        Gets the database_object_type of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        The type of the database object.

        Allowed values for this property are: "FUNCTION", "MVIEW", "PACKAGE", "PROCEDURE", "TABLE", "VIEW", "DUALITYVIEW"


        :return: The database_object_type of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        :rtype: str
        """
        return self._database_object_type

    @database_object_type.setter
    def database_object_type(self, database_object_type):
        """
        Sets the database_object_type of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        The type of the database object.


        :param database_object_type: The database_object_type of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        :type: str
        """
        allowed_values = ["FUNCTION", "MVIEW", "PACKAGE", "PROCEDURE", "TABLE", "VIEW", "DUALITYVIEW"]
        if not value_allowed_none_or_none_sentinel(database_object_type, allowed_values):
            raise ValueError(
                f"Invalid value for `database_object_type`, must be None or one of {allowed_values}"
            )
        self._database_object_type = database_object_type

    @property
    def description(self):
        """
        Gets the description of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        Description of the autoApiSpec.


        :return: The description of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """
        Sets the description of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        Description of the autoApiSpec.


        :param description: The description of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        :type: str
        """
        self._description = description

    @property
    def alias(self):
        """
        Gets the alias of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        Used as the URI path element for this object. When not specified the objectName lowercase is the default value.


        :return: The alias of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        :rtype: str
        """
        return self._alias

    @alias.setter
    def alias(self, alias):
        """
        Sets the alias of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        Used as the URI path element for this object. When not specified the objectName lowercase is the default value.


        :param alias: The alias of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        :type: str
        """
        self._alias = alias

    @property
    def operations(self):
        """
        Gets the operations of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        The operations to limit access to this resource. If not specified then the default is [\"READ\",\"WRITE\"].

        Allowed values for items in this list are: "READ", "WRITE"


        :return: The operations of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        :rtype: list[str]
        """
        return self._operations

    @operations.setter
    def operations(self, operations):
        """
        Sets the operations of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        The operations to limit access to this resource. If not specified then the default is [\"READ\",\"WRITE\"].


        :param operations: The operations of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        :type: list[str]
        """
        allowed_values = ["READ", "WRITE"]

        if operations and operations is not NONE_SENTINEL:
            for value in operations:
                if not value_allowed_none_or_none_sentinel(value, allowed_values):
                    raise ValueError(
                        f"Invalid value for `operations`, must be None or one of {allowed_values}"
                    )
        self._operations = operations

    @property
    def security_schemes(self):
        """
        Gets the security_schemes of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        The security schemes that can access this resource. If not specified then the resource is public.

        Allowed values for items in this list are: "BASIC", "BEARER"


        :return: The security_schemes of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        :rtype: list[str]
        """
        return self._security_schemes

    @security_schemes.setter
    def security_schemes(self, security_schemes):
        """
        Sets the security_schemes of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        The security schemes that can access this resource. If not specified then the resource is public.


        :param security_schemes: The security_schemes of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        :type: list[str]
        """
        allowed_values = ["BASIC", "BEARER"]

        if security_schemes and security_schemes is not NONE_SENTINEL:
            for value in security_schemes:
                if not value_allowed_none_or_none_sentinel(value, allowed_values):
                    raise ValueError(
                        f"Invalid value for `security_schemes`, must be None or one of {allowed_values}"
                    )
        self._security_schemes = security_schemes

    @property
    def scope(self):
        """
        Gets the scope of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        The name of the database API gateway config privilege protecting the resource. Only valid for SCOPE JWT Profile pools and BEARER securitySchemes.


        :return: The scope of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        :rtype: str
        """
        return self._scope

    @scope.setter
    def scope(self, scope):
        """
        Sets the scope of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        The name of the database API gateway config privilege protecting the resource. Only valid for SCOPE JWT Profile pools and BEARER securitySchemes.


        :param scope: The scope of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        :type: str
        """
        self._scope = scope

    @property
    def roles(self):
        """
        Gets the roles of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        The name of the database API gateway config roles protecting the resource. Only valid for RBAC JWT Profile pools and BEARER securitySchemes.


        :return: The roles of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        :rtype: list[str]
        """
        return self._roles

    @roles.setter
    def roles(self, roles):
        """
        Sets the roles of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        The name of the database API gateway config roles protecting the resource. Only valid for RBAC JWT Profile pools and BEARER securitySchemes.


        :param roles: The roles of this UpdateDatabaseToolsDatabaseApiGatewayConfigPoolAutoApiSpecDetails.
        :type: list[str]
        """
        self._roles = roles

    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
