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


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 OlvmFencingPolicy(object):
    """
    Represents a cluster fencing policy.
    """

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

        :param is_enabled:
            The value to assign to the is_enabled property of this OlvmFencingPolicy.
        :type is_enabled: bool

        :param skip_if_connectivity_broken:
            The value to assign to the skip_if_connectivity_broken property of this OlvmFencingPolicy.
        :type skip_if_connectivity_broken: oci.cloud_migrations.models.SkipIfConnectivityBroken

        :param is_skip_if_gluster_bricks_up:
            The value to assign to the is_skip_if_gluster_bricks_up property of this OlvmFencingPolicy.
        :type is_skip_if_gluster_bricks_up: bool

        :param is_skip_if_gluster_quorum_not_met:
            The value to assign to the is_skip_if_gluster_quorum_not_met property of this OlvmFencingPolicy.
        :type is_skip_if_gluster_quorum_not_met: bool

        :param skip_if_sd_active:
            The value to assign to the skip_if_sd_active property of this OlvmFencingPolicy.
        :type skip_if_sd_active: oci.cloud_migrations.models.SkipIfSdActive

        """
        self.swagger_types = {
            'is_enabled': 'bool',
            'skip_if_connectivity_broken': 'SkipIfConnectivityBroken',
            'is_skip_if_gluster_bricks_up': 'bool',
            'is_skip_if_gluster_quorum_not_met': 'bool',
            'skip_if_sd_active': 'SkipIfSdActive'
        }
        self.attribute_map = {
            'is_enabled': 'isEnabled',
            'skip_if_connectivity_broken': 'skipIfConnectivityBroken',
            'is_skip_if_gluster_bricks_up': 'isSkipIfGlusterBricksUp',
            'is_skip_if_gluster_quorum_not_met': 'isSkipIfGlusterQuorumNotMet',
            'skip_if_sd_active': 'skipIfSdActive'
        }
        self._is_enabled = None
        self._skip_if_connectivity_broken = None
        self._is_skip_if_gluster_bricks_up = None
        self._is_skip_if_gluster_quorum_not_met = None
        self._skip_if_sd_active = None

    @property
    def is_enabled(self):
        """
        Gets the is_enabled of this OlvmFencingPolicy.
        Enable or disable fencing on this cluster.


        :return: The is_enabled of this OlvmFencingPolicy.
        :rtype: bool
        """
        return self._is_enabled

    @is_enabled.setter
    def is_enabled(self, is_enabled):
        """
        Sets the is_enabled of this OlvmFencingPolicy.
        Enable or disable fencing on this cluster.


        :param is_enabled: The is_enabled of this OlvmFencingPolicy.
        :type: bool
        """
        self._is_enabled = is_enabled

    @property
    def skip_if_connectivity_broken(self):
        """
        Gets the skip_if_connectivity_broken of this OlvmFencingPolicy.

        :return: The skip_if_connectivity_broken of this OlvmFencingPolicy.
        :rtype: oci.cloud_migrations.models.SkipIfConnectivityBroken
        """
        return self._skip_if_connectivity_broken

    @skip_if_connectivity_broken.setter
    def skip_if_connectivity_broken(self, skip_if_connectivity_broken):
        """
        Sets the skip_if_connectivity_broken of this OlvmFencingPolicy.

        :param skip_if_connectivity_broken: The skip_if_connectivity_broken of this OlvmFencingPolicy.
        :type: oci.cloud_migrations.models.SkipIfConnectivityBroken
        """
        self._skip_if_connectivity_broken = skip_if_connectivity_broken

    @property
    def is_skip_if_gluster_bricks_up(self):
        """
        Gets the is_skip_if_gluster_bricks_up of this OlvmFencingPolicy.
        A flag indicating if fencing should be skipped if Gluster bricks are up and running in the host being fenced.


        :return: The is_skip_if_gluster_bricks_up of this OlvmFencingPolicy.
        :rtype: bool
        """
        return self._is_skip_if_gluster_bricks_up

    @is_skip_if_gluster_bricks_up.setter
    def is_skip_if_gluster_bricks_up(self, is_skip_if_gluster_bricks_up):
        """
        Sets the is_skip_if_gluster_bricks_up of this OlvmFencingPolicy.
        A flag indicating if fencing should be skipped if Gluster bricks are up and running in the host being fenced.


        :param is_skip_if_gluster_bricks_up: The is_skip_if_gluster_bricks_up of this OlvmFencingPolicy.
        :type: bool
        """
        self._is_skip_if_gluster_bricks_up = is_skip_if_gluster_bricks_up

    @property
    def is_skip_if_gluster_quorum_not_met(self):
        """
        Gets the is_skip_if_gluster_quorum_not_met of this OlvmFencingPolicy.
        A flag indicating if fencing should be skipped if Gluster bricks are up and running and Gluster quorum will not be met without those bricks.


        :return: The is_skip_if_gluster_quorum_not_met of this OlvmFencingPolicy.
        :rtype: bool
        """
        return self._is_skip_if_gluster_quorum_not_met

    @is_skip_if_gluster_quorum_not_met.setter
    def is_skip_if_gluster_quorum_not_met(self, is_skip_if_gluster_quorum_not_met):
        """
        Sets the is_skip_if_gluster_quorum_not_met of this OlvmFencingPolicy.
        A flag indicating if fencing should be skipped if Gluster bricks are up and running and Gluster quorum will not be met without those bricks.


        :param is_skip_if_gluster_quorum_not_met: The is_skip_if_gluster_quorum_not_met of this OlvmFencingPolicy.
        :type: bool
        """
        self._is_skip_if_gluster_quorum_not_met = is_skip_if_gluster_quorum_not_met

    @property
    def skip_if_sd_active(self):
        """
        Gets the skip_if_sd_active of this OlvmFencingPolicy.

        :return: The skip_if_sd_active of this OlvmFencingPolicy.
        :rtype: oci.cloud_migrations.models.SkipIfSdActive
        """
        return self._skip_if_sd_active

    @skip_if_sd_active.setter
    def skip_if_sd_active(self, skip_if_sd_active):
        """
        Sets the skip_if_sd_active of this OlvmFencingPolicy.

        :param skip_if_sd_active: The skip_if_sd_active of this OlvmFencingPolicy.
        :type: oci.cloud_migrations.models.SkipIfSdActive
        """
        self._skip_if_sd_active = skip_if_sd_active

    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
