# 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 PropertySet(object):
    """
    The base definition for a property set
    """

    #: A constant which can be used with the key property of a PropertySet.
    #: This constant has a value of "APEX_DOCUMENT_GENERATOR"
    KEY_APEX_DOCUMENT_GENERATOR = "APEX_DOCUMENT_GENERATOR"

    #: A constant which can be used with the key property of a PropertySet.
    #: This constant has a value of "APEX"
    KEY_APEX = "APEX"

    #: A constant which can be used with the key property of a PropertySet.
    #: This constant has a value of "APEX_FA_INTEGRATION"
    KEY_APEX_FA_INTEGRATION = "APEX_FA_INTEGRATION"

    #: A constant which can be used with the key property of a PropertySet.
    #: This constant has a value of "ORACLE_DATABASE_EXTERNAL_AUTHENTICATION"
    KEY_ORACLE_DATABASE_EXTERNAL_AUTHENTICATION = "ORACLE_DATABASE_EXTERNAL_AUTHENTICATION"

    def __init__(self, **kwargs):
        """
        Initializes a new PropertySet 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.PropertySetApex`
        * :class:`~oci.database_tools_runtime.models.PropertySetApexFaIntegration`
        * :class:`~oci.database_tools_runtime.models.PropertySetApexDocumentGenerator`
        * :class:`~oci.database_tools_runtime.models.PropertySetOracleDatabaseExternalAuthentication`

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

        :param key:
            The value to assign to the key property of this PropertySet.
            Allowed values for this property are: "APEX_DOCUMENT_GENERATOR", "APEX", "APEX_FA_INTEGRATION", "ORACLE_DATABASE_EXTERNAL_AUTHENTICATION", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type key: str

        :param is_mutable:
            The value to assign to the is_mutable property of this PropertySet.
        :type is_mutable: bool

        """
        self.swagger_types = {
            'key': 'str',
            'is_mutable': 'bool'
        }
        self.attribute_map = {
            'key': 'key',
            'is_mutable': 'isMutable'
        }
        self._key = None
        self._is_mutable = 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['key']

        if type == 'APEX':
            return 'PropertySetApex'

        if type == 'APEX_FA_INTEGRATION':
            return 'PropertySetApexFaIntegration'

        if type == 'APEX_DOCUMENT_GENERATOR':
            return 'PropertySetApexDocumentGenerator'

        if type == 'ORACLE_DATABASE_EXTERNAL_AUTHENTICATION':
            return 'PropertySetOracleDatabaseExternalAuthentication'
        else:
            return 'PropertySet'

    @property
    def key(self):
        """
        **[Required]** Gets the key of this PropertySet.
        The name of the property set

        Allowed values for this property are: "APEX_DOCUMENT_GENERATOR", "APEX", "APEX_FA_INTEGRATION", "ORACLE_DATABASE_EXTERNAL_AUTHENTICATION", 'UNKNOWN_ENUM_VALUE'.
        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.


        :return: The key of this PropertySet.
        :rtype: str
        """
        return self._key

    @key.setter
    def key(self, key):
        """
        Sets the key of this PropertySet.
        The name of the property set


        :param key: The key of this PropertySet.
        :type: str
        """
        allowed_values = ["APEX_DOCUMENT_GENERATOR", "APEX", "APEX_FA_INTEGRATION", "ORACLE_DATABASE_EXTERNAL_AUTHENTICATION"]
        if not value_allowed_none_or_none_sentinel(key, allowed_values):
            key = 'UNKNOWN_ENUM_VALUE'
        self._key = key

    @property
    def is_mutable(self):
        """
        **[Required]** Gets the is_mutable of this PropertySet.
        Indicates whether the property set is mutable or not


        :return: The is_mutable of this PropertySet.
        :rtype: bool
        """
        return self._is_mutable

    @is_mutable.setter
    def is_mutable(self, is_mutable):
        """
        Sets the is_mutable of this PropertySet.
        Indicates whether the property set is mutable or not


        :param is_mutable: The is_mutable of this PropertySet.
        :type: bool
        """
        self._is_mutable = is_mutable

    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
