# 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 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 AutoFailoverConfiguration(object):
    """
    The properties for defining auto failover configuration.
    """

    #: A constant which can be used with the managed_auto_failover property of a AutoFailoverConfiguration.
    #: This constant has a value of "ENABLE"
    MANAGED_AUTO_FAILOVER_ENABLE = "ENABLE"

    #: A constant which can be used with the managed_auto_failover property of a AutoFailoverConfiguration.
    #: This constant has a value of "DISABLE"
    MANAGED_AUTO_FAILOVER_DISABLE = "DISABLE"

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

        :param managed_auto_failover:
            The value to assign to the managed_auto_failover property of this AutoFailoverConfiguration.
            Allowed values for this property are: "ENABLE", "DISABLE"
        :type managed_auto_failover: str

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

        """
        self.swagger_types = {
            'managed_auto_failover': 'str',
            'failover_targets': 'list[str]'
        }
        self.attribute_map = {
            'managed_auto_failover': 'managedAutoFailover',
            'failover_targets': 'failoverTargets'
        }
        self._managed_auto_failover = None
        self._failover_targets = None

    @property
    def managed_auto_failover(self):
        """
        Gets the managed_auto_failover of this AutoFailoverConfiguration.
        The state of managed auto failover.

        Allowed values for this property are: "ENABLE", "DISABLE"


        :return: The managed_auto_failover of this AutoFailoverConfiguration.
        :rtype: str
        """
        return self._managed_auto_failover

    @managed_auto_failover.setter
    def managed_auto_failover(self, managed_auto_failover):
        """
        Sets the managed_auto_failover of this AutoFailoverConfiguration.
        The state of managed auto failover.


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

    @property
    def failover_targets(self):
        """
        Gets the failover_targets of this AutoFailoverConfiguration.
        Specifies the `DB_UNIQUE_NAME` of the data guard group member databases.


        :return: The failover_targets of this AutoFailoverConfiguration.
        :rtype: list[str]
        """
        return self._failover_targets

    @failover_targets.setter
    def failover_targets(self, failover_targets):
        """
        Sets the failover_targets of this AutoFailoverConfiguration.
        Specifies the `DB_UNIQUE_NAME` of the data guard group member databases.


        :param failover_targets: The failover_targets of this AutoFailoverConfiguration.
        :type: list[str]
        """
        self._failover_targets = failover_targets

    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
