HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //lib/mysqlsh/lib/python3.8/site-packages/oci/database_management/models/managed_my_sql_database.py
# coding: utf-8
# Copyright (c) 2016, 2025, 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: 20201101


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 ManagedMySqlDatabase(object):
    """
    The details of the Managed MySQL Database.
    """

    #: A constant which can be used with the database_type property of a ManagedMySqlDatabase.
    #: This constant has a value of "EXTERNAL"
    DATABASE_TYPE_EXTERNAL = "EXTERNAL"

    #: A constant which can be used with the database_type property of a ManagedMySqlDatabase.
    #: This constant has a value of "MDS"
    DATABASE_TYPE_MDS = "MDS"

    #: A constant which can be used with the management_state property of a ManagedMySqlDatabase.
    #: This constant has a value of "ENABLED"
    MANAGEMENT_STATE_ENABLED = "ENABLED"

    #: A constant which can be used with the management_state property of a ManagedMySqlDatabase.
    #: This constant has a value of "DISABLED"
    MANAGEMENT_STATE_DISABLED = "DISABLED"

    #: A constant which can be used with the lifecycle_state property of a ManagedMySqlDatabase.
    #: This constant has a value of "CREATING"
    LIFECYCLE_STATE_CREATING = "CREATING"

    #: A constant which can be used with the lifecycle_state property of a ManagedMySqlDatabase.
    #: This constant has a value of "UPDATING"
    LIFECYCLE_STATE_UPDATING = "UPDATING"

    #: A constant which can be used with the lifecycle_state property of a ManagedMySqlDatabase.
    #: This constant has a value of "ACTIVE"
    LIFECYCLE_STATE_ACTIVE = "ACTIVE"

    #: A constant which can be used with the lifecycle_state property of a ManagedMySqlDatabase.
    #: This constant has a value of "DELETING"
    LIFECYCLE_STATE_DELETING = "DELETING"

    #: A constant which can be used with the lifecycle_state property of a ManagedMySqlDatabase.
    #: This constant has a value of "DELETED"
    LIFECYCLE_STATE_DELETED = "DELETED"

    #: A constant which can be used with the lifecycle_state property of a ManagedMySqlDatabase.
    #: This constant has a value of "FAILED"
    LIFECYCLE_STATE_FAILED = "FAILED"

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

        :param id:
            The value to assign to the id property of this ManagedMySqlDatabase.
        :type id: str

        :param compartment_id:
            The value to assign to the compartment_id property of this ManagedMySqlDatabase.
        :type compartment_id: str

        :param db_name:
            The value to assign to the db_name property of this ManagedMySqlDatabase.
        :type db_name: str

        :param db_version:
            The value to assign to the db_version property of this ManagedMySqlDatabase.
        :type db_version: str

        :param time_created:
            The value to assign to the time_created property of this ManagedMySqlDatabase.
        :type time_created: datetime

        :param name:
            The value to assign to the name property of this ManagedMySqlDatabase.
        :type name: str

        :param heat_wave_cluster_display_name:
            The value to assign to the heat_wave_cluster_display_name property of this ManagedMySqlDatabase.
        :type heat_wave_cluster_display_name: str

        :param is_heat_wave_enabled:
            The value to assign to the is_heat_wave_enabled property of this ManagedMySqlDatabase.
        :type is_heat_wave_enabled: bool

        :param is_lakehouse_enabled:
            The value to assign to the is_lakehouse_enabled property of this ManagedMySqlDatabase.
        :type is_lakehouse_enabled: bool

        :param heat_wave_node_shape:
            The value to assign to the heat_wave_node_shape property of this ManagedMySqlDatabase.
        :type heat_wave_node_shape: str

        :param heat_wave_memory_size:
            The value to assign to the heat_wave_memory_size property of this ManagedMySqlDatabase.
        :type heat_wave_memory_size: int

        :param heat_wave_nodes:
            The value to assign to the heat_wave_nodes property of this ManagedMySqlDatabase.
        :type heat_wave_nodes: list[oci.database_management.models.HeatWaveNode]

        :param is_heat_wave_active:
            The value to assign to the is_heat_wave_active property of this ManagedMySqlDatabase.
        :type is_heat_wave_active: bool

        :param time_created_heat_wave:
            The value to assign to the time_created_heat_wave property of this ManagedMySqlDatabase.
        :type time_created_heat_wave: datetime

        :param database_type:
            The value to assign to the database_type property of this ManagedMySqlDatabase.
            Allowed values for this property are: "EXTERNAL", "MDS", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type database_type: str

        :param management_state:
            The value to assign to the management_state property of this ManagedMySqlDatabase.
            Allowed values for this property are: "ENABLED", "DISABLED", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type management_state: str

        :param lifecycle_state:
            The value to assign to the lifecycle_state property of this ManagedMySqlDatabase.
            Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type lifecycle_state: str

        :param time_updated:
            The value to assign to the time_updated property of this ManagedMySqlDatabase.
        :type time_updated: datetime

        """
        self.swagger_types = {
            'id': 'str',
            'compartment_id': 'str',
            'db_name': 'str',
            'db_version': 'str',
            'time_created': 'datetime',
            'name': 'str',
            'heat_wave_cluster_display_name': 'str',
            'is_heat_wave_enabled': 'bool',
            'is_lakehouse_enabled': 'bool',
            'heat_wave_node_shape': 'str',
            'heat_wave_memory_size': 'int',
            'heat_wave_nodes': 'list[HeatWaveNode]',
            'is_heat_wave_active': 'bool',
            'time_created_heat_wave': 'datetime',
            'database_type': 'str',
            'management_state': 'str',
            'lifecycle_state': 'str',
            'time_updated': 'datetime'
        }
        self.attribute_map = {
            'id': 'id',
            'compartment_id': 'compartmentId',
            'db_name': 'dbName',
            'db_version': 'dbVersion',
            'time_created': 'timeCreated',
            'name': 'name',
            'heat_wave_cluster_display_name': 'heatWaveClusterDisplayName',
            'is_heat_wave_enabled': 'isHeatWaveEnabled',
            'is_lakehouse_enabled': 'isLakehouseEnabled',
            'heat_wave_node_shape': 'heatWaveNodeShape',
            'heat_wave_memory_size': 'heatWaveMemorySize',
            'heat_wave_nodes': 'heatWaveNodes',
            'is_heat_wave_active': 'isHeatWaveActive',
            'time_created_heat_wave': 'timeCreatedHeatWave',
            'database_type': 'databaseType',
            'management_state': 'managementState',
            'lifecycle_state': 'lifecycleState',
            'time_updated': 'timeUpdated'
        }
        self._id = None
        self._compartment_id = None
        self._db_name = None
        self._db_version = None
        self._time_created = None
        self._name = None
        self._heat_wave_cluster_display_name = None
        self._is_heat_wave_enabled = None
        self._is_lakehouse_enabled = None
        self._heat_wave_node_shape = None
        self._heat_wave_memory_size = None
        self._heat_wave_nodes = None
        self._is_heat_wave_active = None
        self._time_created_heat_wave = None
        self._database_type = None
        self._management_state = None
        self._lifecycle_state = None
        self._time_updated = None

    @property
    def id(self):
        """
        **[Required]** Gets the id of this ManagedMySqlDatabase.
        The OCID of the Managed MySQL Database.


        :return: The id of this ManagedMySqlDatabase.
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """
        Sets the id of this ManagedMySqlDatabase.
        The OCID of the Managed MySQL Database.


        :param id: The id of this ManagedMySqlDatabase.
        :type: str
        """
        self._id = id

    @property
    def compartment_id(self):
        """
        **[Required]** Gets the compartment_id of this ManagedMySqlDatabase.
        The OCID of the compartment.


        :return: The compartment_id of this ManagedMySqlDatabase.
        :rtype: str
        """
        return self._compartment_id

    @compartment_id.setter
    def compartment_id(self, compartment_id):
        """
        Sets the compartment_id of this ManagedMySqlDatabase.
        The OCID of the compartment.


        :param compartment_id: The compartment_id of this ManagedMySqlDatabase.
        :type: str
        """
        self._compartment_id = compartment_id

    @property
    def db_name(self):
        """
        **[Required]** Gets the db_name of this ManagedMySqlDatabase.
        The name of the MySQL Database.


        :return: The db_name of this ManagedMySqlDatabase.
        :rtype: str
        """
        return self._db_name

    @db_name.setter
    def db_name(self, db_name):
        """
        Sets the db_name of this ManagedMySqlDatabase.
        The name of the MySQL Database.


        :param db_name: The db_name of this ManagedMySqlDatabase.
        :type: str
        """
        self._db_name = db_name

    @property
    def db_version(self):
        """
        **[Required]** Gets the db_version of this ManagedMySqlDatabase.
        The version of the MySQL Database.


        :return: The db_version of this ManagedMySqlDatabase.
        :rtype: str
        """
        return self._db_version

    @db_version.setter
    def db_version(self, db_version):
        """
        Sets the db_version of this ManagedMySqlDatabase.
        The version of the MySQL Database.


        :param db_version: The db_version of this ManagedMySqlDatabase.
        :type: str
        """
        self._db_version = db_version

    @property
    def time_created(self):
        """
        **[Required]** Gets the time_created of this ManagedMySqlDatabase.
        The date and time the Managed MySQL Database was created.


        :return: The time_created of this ManagedMySqlDatabase.
        :rtype: datetime
        """
        return self._time_created

    @time_created.setter
    def time_created(self, time_created):
        """
        Sets the time_created of this ManagedMySqlDatabase.
        The date and time the Managed MySQL Database was created.


        :param time_created: The time_created of this ManagedMySqlDatabase.
        :type: datetime
        """
        self._time_created = time_created

    @property
    def name(self):
        """
        **[Required]** Gets the name of this ManagedMySqlDatabase.
        The name of the Managed MySQL Database.


        :return: The name of this ManagedMySqlDatabase.
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """
        Sets the name of this ManagedMySqlDatabase.
        The name of the Managed MySQL Database.


        :param name: The name of this ManagedMySqlDatabase.
        :type: str
        """
        self._name = name

    @property
    def heat_wave_cluster_display_name(self):
        """
        Gets the heat_wave_cluster_display_name of this ManagedMySqlDatabase.
        The name of the HeatWave cluster.


        :return: The heat_wave_cluster_display_name of this ManagedMySqlDatabase.
        :rtype: str
        """
        return self._heat_wave_cluster_display_name

    @heat_wave_cluster_display_name.setter
    def heat_wave_cluster_display_name(self, heat_wave_cluster_display_name):
        """
        Sets the heat_wave_cluster_display_name of this ManagedMySqlDatabase.
        The name of the HeatWave cluster.


        :param heat_wave_cluster_display_name: The heat_wave_cluster_display_name of this ManagedMySqlDatabase.
        :type: str
        """
        self._heat_wave_cluster_display_name = heat_wave_cluster_display_name

    @property
    def is_heat_wave_enabled(self):
        """
        Gets the is_heat_wave_enabled of this ManagedMySqlDatabase.
        Indicates whether HeatWave is enabled for the MySQL Database System or not.


        :return: The is_heat_wave_enabled of this ManagedMySqlDatabase.
        :rtype: bool
        """
        return self._is_heat_wave_enabled

    @is_heat_wave_enabled.setter
    def is_heat_wave_enabled(self, is_heat_wave_enabled):
        """
        Sets the is_heat_wave_enabled of this ManagedMySqlDatabase.
        Indicates whether HeatWave is enabled for the MySQL Database System or not.


        :param is_heat_wave_enabled: The is_heat_wave_enabled of this ManagedMySqlDatabase.
        :type: bool
        """
        self._is_heat_wave_enabled = is_heat_wave_enabled

    @property
    def is_lakehouse_enabled(self):
        """
        Gets the is_lakehouse_enabled of this ManagedMySqlDatabase.
        Indicates whether HeatWave Lakehouse is enabled for the MySQL Database System or not.


        :return: The is_lakehouse_enabled of this ManagedMySqlDatabase.
        :rtype: bool
        """
        return self._is_lakehouse_enabled

    @is_lakehouse_enabled.setter
    def is_lakehouse_enabled(self, is_lakehouse_enabled):
        """
        Sets the is_lakehouse_enabled of this ManagedMySqlDatabase.
        Indicates whether HeatWave Lakehouse is enabled for the MySQL Database System or not.


        :param is_lakehouse_enabled: The is_lakehouse_enabled of this ManagedMySqlDatabase.
        :type: bool
        """
        self._is_lakehouse_enabled = is_lakehouse_enabled

    @property
    def heat_wave_node_shape(self):
        """
        Gets the heat_wave_node_shape of this ManagedMySqlDatabase.
        The shape of the nodes in the HeatWave cluster.


        :return: The heat_wave_node_shape of this ManagedMySqlDatabase.
        :rtype: str
        """
        return self._heat_wave_node_shape

    @heat_wave_node_shape.setter
    def heat_wave_node_shape(self, heat_wave_node_shape):
        """
        Sets the heat_wave_node_shape of this ManagedMySqlDatabase.
        The shape of the nodes in the HeatWave cluster.


        :param heat_wave_node_shape: The heat_wave_node_shape of this ManagedMySqlDatabase.
        :type: str
        """
        self._heat_wave_node_shape = heat_wave_node_shape

    @property
    def heat_wave_memory_size(self):
        """
        Gets the heat_wave_memory_size of this ManagedMySqlDatabase.
        The total memory belonging to the HeatWave cluster in GBs.


        :return: The heat_wave_memory_size of this ManagedMySqlDatabase.
        :rtype: int
        """
        return self._heat_wave_memory_size

    @heat_wave_memory_size.setter
    def heat_wave_memory_size(self, heat_wave_memory_size):
        """
        Sets the heat_wave_memory_size of this ManagedMySqlDatabase.
        The total memory belonging to the HeatWave cluster in GBs.


        :param heat_wave_memory_size: The heat_wave_memory_size of this ManagedMySqlDatabase.
        :type: int
        """
        self._heat_wave_memory_size = heat_wave_memory_size

    @property
    def heat_wave_nodes(self):
        """
        Gets the heat_wave_nodes of this ManagedMySqlDatabase.
        The information about individual HeatWave nodes in the cluster.


        :return: The heat_wave_nodes of this ManagedMySqlDatabase.
        :rtype: list[oci.database_management.models.HeatWaveNode]
        """
        return self._heat_wave_nodes

    @heat_wave_nodes.setter
    def heat_wave_nodes(self, heat_wave_nodes):
        """
        Sets the heat_wave_nodes of this ManagedMySqlDatabase.
        The information about individual HeatWave nodes in the cluster.


        :param heat_wave_nodes: The heat_wave_nodes of this ManagedMySqlDatabase.
        :type: list[oci.database_management.models.HeatWaveNode]
        """
        self._heat_wave_nodes = heat_wave_nodes

    @property
    def is_heat_wave_active(self):
        """
        Gets the is_heat_wave_active of this ManagedMySqlDatabase.
        Indicates whether the HeatWave cluster is active or not.


        :return: The is_heat_wave_active of this ManagedMySqlDatabase.
        :rtype: bool
        """
        return self._is_heat_wave_active

    @is_heat_wave_active.setter
    def is_heat_wave_active(self, is_heat_wave_active):
        """
        Sets the is_heat_wave_active of this ManagedMySqlDatabase.
        Indicates whether the HeatWave cluster is active or not.


        :param is_heat_wave_active: The is_heat_wave_active of this ManagedMySqlDatabase.
        :type: bool
        """
        self._is_heat_wave_active = is_heat_wave_active

    @property
    def time_created_heat_wave(self):
        """
        Gets the time_created_heat_wave of this ManagedMySqlDatabase.
        The date and time the Managed MySQL Database was created.


        :return: The time_created_heat_wave of this ManagedMySqlDatabase.
        :rtype: datetime
        """
        return self._time_created_heat_wave

    @time_created_heat_wave.setter
    def time_created_heat_wave(self, time_created_heat_wave):
        """
        Sets the time_created_heat_wave of this ManagedMySqlDatabase.
        The date and time the Managed MySQL Database was created.


        :param time_created_heat_wave: The time_created_heat_wave of this ManagedMySqlDatabase.
        :type: datetime
        """
        self._time_created_heat_wave = time_created_heat_wave

    @property
    def database_type(self):
        """
        Gets the database_type of this ManagedMySqlDatabase.
        The type of the MySQL Database. Indicates whether the database
        is external or MDS.

        Allowed values for this property are: "EXTERNAL", "MDS", 'UNKNOWN_ENUM_VALUE'.
        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.


        :return: The database_type of this ManagedMySqlDatabase.
        :rtype: str
        """
        return self._database_type

    @database_type.setter
    def database_type(self, database_type):
        """
        Sets the database_type of this ManagedMySqlDatabase.
        The type of the MySQL Database. Indicates whether the database
        is external or MDS.


        :param database_type: The database_type of this ManagedMySqlDatabase.
        :type: str
        """
        allowed_values = ["EXTERNAL", "MDS"]
        if not value_allowed_none_or_none_sentinel(database_type, allowed_values):
            database_type = 'UNKNOWN_ENUM_VALUE'
        self._database_type = database_type

    @property
    def management_state(self):
        """
        Gets the management_state of this ManagedMySqlDatabase.
        Indicates database management status.

        Allowed values for this property are: "ENABLED", "DISABLED", 'UNKNOWN_ENUM_VALUE'.
        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.


        :return: The management_state of this ManagedMySqlDatabase.
        :rtype: str
        """
        return self._management_state

    @management_state.setter
    def management_state(self, management_state):
        """
        Sets the management_state of this ManagedMySqlDatabase.
        Indicates database management status.


        :param management_state: The management_state of this ManagedMySqlDatabase.
        :type: str
        """
        allowed_values = ["ENABLED", "DISABLED"]
        if not value_allowed_none_or_none_sentinel(management_state, allowed_values):
            management_state = 'UNKNOWN_ENUM_VALUE'
        self._management_state = management_state

    @property
    def lifecycle_state(self):
        """
        Gets the lifecycle_state of this ManagedMySqlDatabase.
        Indicates lifecycle  state of the resource.

        Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'.
        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.


        :return: The lifecycle_state of this ManagedMySqlDatabase.
        :rtype: str
        """
        return self._lifecycle_state

    @lifecycle_state.setter
    def lifecycle_state(self, lifecycle_state):
        """
        Sets the lifecycle_state of this ManagedMySqlDatabase.
        Indicates lifecycle  state of the resource.


        :param lifecycle_state: The lifecycle_state of this ManagedMySqlDatabase.
        :type: str
        """
        allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"]
        if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values):
            lifecycle_state = 'UNKNOWN_ENUM_VALUE'
        self._lifecycle_state = lifecycle_state

    @property
    def time_updated(self):
        """
        Gets the time_updated of this ManagedMySqlDatabase.
        The date and time the Managed MySQL Database was updated.


        :return: The time_updated of this ManagedMySqlDatabase.
        :rtype: datetime
        """
        return self._time_updated

    @time_updated.setter
    def time_updated(self, time_updated):
        """
        Sets the time_updated of this ManagedMySqlDatabase.
        The date and time the Managed MySQL Database was updated.


        :param time_updated: The time_updated of this ManagedMySqlDatabase.
        :type: datetime
        """
        self._time_updated = time_updated

    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