# 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: 20160918

from .launch_db_system_base import LaunchDbSystemBase
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 LaunchStandbyDbSystemDetails(LaunchDbSystemBase):
    """
    Used for creating a new standby database system in dataguard environment.
    """

    #: A constant which can be used with the license_model property of a LaunchStandbyDbSystemDetails.
    #: This constant has a value of "LICENSE_INCLUDED"
    LICENSE_MODEL_LICENSE_INCLUDED = "LICENSE_INCLUDED"

    #: A constant which can be used with the license_model property of a LaunchStandbyDbSystemDetails.
    #: This constant has a value of "BRING_YOUR_OWN_LICENSE"
    LICENSE_MODEL_BRING_YOUR_OWN_LICENSE = "BRING_YOUR_OWN_LICENSE"

    def __init__(self, **kwargs):
        """
        Initializes a new LaunchStandbyDbSystemDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.database.models.LaunchStandbyDbSystemDetails.source` attribute
        of this class is ``DATAGUARD`` and it should not be changed.
        The following keyword arguments are supported (corresponding to the getters/setters of this class):

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

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

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

        :param availability_domain:
            The value to assign to the availability_domain property of this LaunchStandbyDbSystemDetails.
        :type availability_domain: str

        :param subnet_id:
            The value to assign to the subnet_id property of this LaunchStandbyDbSystemDetails.
        :type subnet_id: str

        :param backup_subnet_id:
            The value to assign to the backup_subnet_id property of this LaunchStandbyDbSystemDetails.
        :type backup_subnet_id: str

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

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

        :param shape:
            The value to assign to the shape property of this LaunchStandbyDbSystemDetails.
        :type shape: str

        :param time_zone:
            The value to assign to the time_zone property of this LaunchStandbyDbSystemDetails.
        :type time_zone: str

        :param db_system_options:
            The value to assign to the db_system_options property of this LaunchStandbyDbSystemDetails.
        :type db_system_options: oci.database.models.DbSystemOptions

        :param storage_volume_performance_mode:
            The value to assign to the storage_volume_performance_mode property of this LaunchStandbyDbSystemDetails.
            Allowed values for this property are: "BALANCED", "HIGH_PERFORMANCE"
        :type storage_volume_performance_mode: str

        :param sparse_diskgroup:
            The value to assign to the sparse_diskgroup property of this LaunchStandbyDbSystemDetails.
        :type sparse_diskgroup: bool

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

        :param hostname:
            The value to assign to the hostname property of this LaunchStandbyDbSystemDetails.
        :type hostname: str

        :param domain:
            The value to assign to the domain property of this LaunchStandbyDbSystemDetails.
        :type domain: str

        :param cpu_core_count:
            The value to assign to the cpu_core_count property of this LaunchStandbyDbSystemDetails.
        :type cpu_core_count: int

        :param cluster_name:
            The value to assign to the cluster_name property of this LaunchStandbyDbSystemDetails.
        :type cluster_name: str

        :param data_storage_percentage:
            The value to assign to the data_storage_percentage property of this LaunchStandbyDbSystemDetails.
        :type data_storage_percentage: int

        :param initial_data_storage_size_in_gb:
            The value to assign to the initial_data_storage_size_in_gb property of this LaunchStandbyDbSystemDetails.
        :type initial_data_storage_size_in_gb: int

        :param kms_key_id:
            The value to assign to the kms_key_id property of this LaunchStandbyDbSystemDetails.
        :type kms_key_id: str

        :param kms_key_version_id:
            The value to assign to the kms_key_version_id property of this LaunchStandbyDbSystemDetails.
        :type kms_key_version_id: str

        :param node_count:
            The value to assign to the node_count property of this LaunchStandbyDbSystemDetails.
        :type node_count: int

        :param freeform_tags:
            The value to assign to the freeform_tags property of this LaunchStandbyDbSystemDetails.
        :type freeform_tags: dict(str, str)

        :param defined_tags:
            The value to assign to the defined_tags property of this LaunchStandbyDbSystemDetails.
        :type defined_tags: dict(str, dict(str, object))

        :param security_attributes:
            The value to assign to the security_attributes property of this LaunchStandbyDbSystemDetails.
        :type security_attributes: dict(str, dict(str, object))

        :param source:
            The value to assign to the source property of this LaunchStandbyDbSystemDetails.
            Allowed values for this property are: "NONE", "DB_BACKUP", "DATABASE", "DB_SYSTEM", "DATAGUARD"
        :type source: str

        :param private_ip:
            The value to assign to the private_ip property of this LaunchStandbyDbSystemDetails.
        :type private_ip: str

        :param private_ip_v6:
            The value to assign to the private_ip_v6 property of this LaunchStandbyDbSystemDetails.
        :type private_ip_v6: str

        :param cluster_placement_group_id:
            The value to assign to the cluster_placement_group_id property of this LaunchStandbyDbSystemDetails.
        :type cluster_placement_group_id: str

        :param subscription_id:
            The value to assign to the subscription_id property of this LaunchStandbyDbSystemDetails.
        :type subscription_id: str

        :param data_collection_options:
            The value to assign to the data_collection_options property of this LaunchStandbyDbSystemDetails.
        :type data_collection_options: oci.database.models.DataCollectionOptions

        :param compute_model:
            The value to assign to the compute_model property of this LaunchStandbyDbSystemDetails.
            Allowed values for this property are: "ECPU", "OCPU"
        :type compute_model: str

        :param compute_count:
            The value to assign to the compute_count property of this LaunchStandbyDbSystemDetails.
        :type compute_count: int

        :param primary_db_system_id:
            The value to assign to the primary_db_system_id property of this LaunchStandbyDbSystemDetails.
        :type primary_db_system_id: str

        :param db_home:
            The value to assign to the db_home property of this LaunchStandbyDbSystemDetails.
        :type db_home: oci.database.models.CreateDbHomeForStandbyDbSystem

        :param license_model:
            The value to assign to the license_model property of this LaunchStandbyDbSystemDetails.
            Allowed values for this property are: "LICENSE_INCLUDED", "BRING_YOUR_OWN_LICENSE"
        :type license_model: str

        """
        self.swagger_types = {
            'compartment_id': 'str',
            'fault_domains': 'list[str]',
            'display_name': 'str',
            'availability_domain': 'str',
            'subnet_id': 'str',
            'backup_subnet_id': 'str',
            'nsg_ids': 'list[str]',
            'backup_network_nsg_ids': 'list[str]',
            'shape': 'str',
            'time_zone': 'str',
            'db_system_options': 'DbSystemOptions',
            'storage_volume_performance_mode': 'str',
            'sparse_diskgroup': 'bool',
            'ssh_public_keys': 'list[str]',
            'hostname': 'str',
            'domain': 'str',
            'cpu_core_count': 'int',
            'cluster_name': 'str',
            'data_storage_percentage': 'int',
            'initial_data_storage_size_in_gb': 'int',
            'kms_key_id': 'str',
            'kms_key_version_id': 'str',
            'node_count': 'int',
            'freeform_tags': 'dict(str, str)',
            'defined_tags': 'dict(str, dict(str, object))',
            'security_attributes': 'dict(str, dict(str, object))',
            'source': 'str',
            'private_ip': 'str',
            'private_ip_v6': 'str',
            'cluster_placement_group_id': 'str',
            'subscription_id': 'str',
            'data_collection_options': 'DataCollectionOptions',
            'compute_model': 'str',
            'compute_count': 'int',
            'primary_db_system_id': 'str',
            'db_home': 'CreateDbHomeForStandbyDbSystem',
            'license_model': 'str'
        }
        self.attribute_map = {
            'compartment_id': 'compartmentId',
            'fault_domains': 'faultDomains',
            'display_name': 'displayName',
            'availability_domain': 'availabilityDomain',
            'subnet_id': 'subnetId',
            'backup_subnet_id': 'backupSubnetId',
            'nsg_ids': 'nsgIds',
            'backup_network_nsg_ids': 'backupNetworkNsgIds',
            'shape': 'shape',
            'time_zone': 'timeZone',
            'db_system_options': 'dbSystemOptions',
            'storage_volume_performance_mode': 'storageVolumePerformanceMode',
            'sparse_diskgroup': 'sparseDiskgroup',
            'ssh_public_keys': 'sshPublicKeys',
            'hostname': 'hostname',
            'domain': 'domain',
            'cpu_core_count': 'cpuCoreCount',
            'cluster_name': 'clusterName',
            'data_storage_percentage': 'dataStoragePercentage',
            'initial_data_storage_size_in_gb': 'initialDataStorageSizeInGB',
            'kms_key_id': 'kmsKeyId',
            'kms_key_version_id': 'kmsKeyVersionId',
            'node_count': 'nodeCount',
            'freeform_tags': 'freeformTags',
            'defined_tags': 'definedTags',
            'security_attributes': 'securityAttributes',
            'source': 'source',
            'private_ip': 'privateIp',
            'private_ip_v6': 'privateIpV6',
            'cluster_placement_group_id': 'clusterPlacementGroupId',
            'subscription_id': 'subscriptionId',
            'data_collection_options': 'dataCollectionOptions',
            'compute_model': 'computeModel',
            'compute_count': 'computeCount',
            'primary_db_system_id': 'primaryDbSystemId',
            'db_home': 'dbHome',
            'license_model': 'licenseModel'
        }
        self._compartment_id = None
        self._fault_domains = None
        self._display_name = None
        self._availability_domain = None
        self._subnet_id = None
        self._backup_subnet_id = None
        self._nsg_ids = None
        self._backup_network_nsg_ids = None
        self._shape = None
        self._time_zone = None
        self._db_system_options = None
        self._storage_volume_performance_mode = None
        self._sparse_diskgroup = None
        self._ssh_public_keys = None
        self._hostname = None
        self._domain = None
        self._cpu_core_count = None
        self._cluster_name = None
        self._data_storage_percentage = None
        self._initial_data_storage_size_in_gb = None
        self._kms_key_id = None
        self._kms_key_version_id = None
        self._node_count = None
        self._freeform_tags = None
        self._defined_tags = None
        self._security_attributes = None
        self._source = None
        self._private_ip = None
        self._private_ip_v6 = None
        self._cluster_placement_group_id = None
        self._subscription_id = None
        self._data_collection_options = None
        self._compute_model = None
        self._compute_count = None
        self._primary_db_system_id = None
        self._db_home = None
        self._license_model = None
        self._source = 'DATAGUARD'

    @property
    def primary_db_system_id(self):
        """
        **[Required]** Gets the primary_db_system_id of this LaunchStandbyDbSystemDetails.
        The `OCID`__ of the DB system.

        __ https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm


        :return: The primary_db_system_id of this LaunchStandbyDbSystemDetails.
        :rtype: str
        """
        return self._primary_db_system_id

    @primary_db_system_id.setter
    def primary_db_system_id(self, primary_db_system_id):
        """
        Sets the primary_db_system_id of this LaunchStandbyDbSystemDetails.
        The `OCID`__ of the DB system.

        __ https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm


        :param primary_db_system_id: The primary_db_system_id of this LaunchStandbyDbSystemDetails.
        :type: str
        """
        self._primary_db_system_id = primary_db_system_id

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

        :return: The db_home of this LaunchStandbyDbSystemDetails.
        :rtype: oci.database.models.CreateDbHomeForStandbyDbSystem
        """
        return self._db_home

    @db_home.setter
    def db_home(self, db_home):
        """
        Sets the db_home of this LaunchStandbyDbSystemDetails.

        :param db_home: The db_home of this LaunchStandbyDbSystemDetails.
        :type: oci.database.models.CreateDbHomeForStandbyDbSystem
        """
        self._db_home = db_home

    @property
    def license_model(self):
        """
        Gets the license_model of this LaunchStandbyDbSystemDetails.
        The Oracle license model that applies to all the databases on the DB system. The default is LICENSE_INCLUDED.

        Allowed values for this property are: "LICENSE_INCLUDED", "BRING_YOUR_OWN_LICENSE"


        :return: The license_model of this LaunchStandbyDbSystemDetails.
        :rtype: str
        """
        return self._license_model

    @license_model.setter
    def license_model(self, license_model):
        """
        Sets the license_model of this LaunchStandbyDbSystemDetails.
        The Oracle license model that applies to all the databases on the DB system. The default is LICENSE_INCLUDED.


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

    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
