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

from .policy_condition import PolicyCondition
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 UserCondition(PolicyCondition):
    """
    The audit policy provisioning conditions.
    """

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

        :param entity_selection:
            The value to assign to the entity_selection property of this UserCondition.
            Allowed values for this property are: "INCLUDE", "EXCLUDE"
        :type entity_selection: str

        :param entity_type:
            The value to assign to the entity_type property of this UserCondition.
            Allowed values for this property are: "USER", "ROLE", "ALL_USERS", "ATTRIBUTE_SET"
        :type entity_type: str

        :param operation_status:
            The value to assign to the operation_status property of this UserCondition.
            Allowed values for this property are: "SUCCESS", "FAILURE", "BOTH"
        :type operation_status: str

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

        """
        self.swagger_types = {
            'entity_selection': 'str',
            'entity_type': 'str',
            'operation_status': 'str',
            'user_names': 'list[str]'
        }
        self.attribute_map = {
            'entity_selection': 'entitySelection',
            'entity_type': 'entityType',
            'operation_status': 'operationStatus',
            'user_names': 'userNames'
        }
        self._entity_selection = None
        self._entity_type = None
        self._operation_status = None
        self._user_names = None
        self._entity_type = 'USER'

    @property
    def user_names(self):
        """
        **[Required]** Gets the user_names of this UserCondition.
        The list of users that the unified audit policy is enabled for.


        :return: The user_names of this UserCondition.
        :rtype: list[str]
        """
        return self._user_names

    @user_names.setter
    def user_names(self, user_names):
        """
        Sets the user_names of this UserCondition.
        The list of users that the unified audit policy is enabled for.


        :param user_names: The user_names of this UserCondition.
        :type: list[str]
        """
        self._user_names = user_names

    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
