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


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 CreateOciFssSecurityDetails(object):
    """
    Security options for OCI FSS File System.
    """

    #: A constant which can be used with the auth property of a CreateOciFssSecurityDetails.
    #: This constant has a value of "SYS"
    AUTH_SYS = "SYS"

    def __init__(self, **kwargs):
        """
        Initializes a new CreateOciFssSecurityDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input
        to a service operations then you should favor using a subclass over the base class:

        * :class:`~oci.container_instances.models.CreateOciFssSysSecurityDetails`

        The following keyword arguments are supported (corresponding to the getters/setters of this class):

        :param auth:
            The value to assign to the auth property of this CreateOciFssSecurityDetails.
            Allowed values for this property are: "SYS"
        :type auth: str

        :param is_encrypted_in_transit:
            The value to assign to the is_encrypted_in_transit property of this CreateOciFssSecurityDetails.
        :type is_encrypted_in_transit: bool

        """
        self.swagger_types = {
            'auth': 'str',
            'is_encrypted_in_transit': 'bool'
        }
        self.attribute_map = {
            'auth': 'auth',
            'is_encrypted_in_transit': 'isEncryptedInTransit'
        }
        self._auth = None
        self._is_encrypted_in_transit = None

    @staticmethod
    def get_subtype(object_dictionary):
        """
        Given the hash representation of a subtype of this class,
        use the info in the hash to return the class of the subtype.
        """
        type = object_dictionary['auth']

        if type == 'SYS':
            return 'CreateOciFssSysSecurityDetails'
        else:
            return 'CreateOciFssSecurityDetails'

    @property
    def auth(self):
        """
        Gets the auth of this CreateOciFssSecurityDetails.
        NFS authentication type to be used. Currently, only auth type SYS is supported.

        Allowed values for this property are: "SYS"


        :return: The auth of this CreateOciFssSecurityDetails.
        :rtype: str
        """
        return self._auth

    @auth.setter
    def auth(self, auth):
        """
        Sets the auth of this CreateOciFssSecurityDetails.
        NFS authentication type to be used. Currently, only auth type SYS is supported.


        :param auth: The auth of this CreateOciFssSecurityDetails.
        :type: str
        """
        allowed_values = ["SYS"]
        if not value_allowed_none_or_none_sentinel(auth, allowed_values):
            raise ValueError(
                f"Invalid value for `auth`, must be None or one of {allowed_values}"
            )
        self._auth = auth

    @property
    def is_encrypted_in_transit(self):
        """
        Gets the is_encrypted_in_transit of this CreateOciFssSecurityDetails.
        Determines whether in-transit encryption needs to be enables.
        Check https://docs.oracle.com/en-us/iaas/Content/File/Tasks/intransitencryption.htm#Using_Intransit_Encryption for more details.


        :return: The is_encrypted_in_transit of this CreateOciFssSecurityDetails.
        :rtype: bool
        """
        return self._is_encrypted_in_transit

    @is_encrypted_in_transit.setter
    def is_encrypted_in_transit(self, is_encrypted_in_transit):
        """
        Sets the is_encrypted_in_transit of this CreateOciFssSecurityDetails.
        Determines whether in-transit encryption needs to be enables.
        Check https://docs.oracle.com/en-us/iaas/Content/File/Tasks/intransitencryption.htm#Using_Intransit_Encryption for more details.


        :param is_encrypted_in_transit: The is_encrypted_in_transit of this CreateOciFssSecurityDetails.
        :type: bool
        """
        self._is_encrypted_in_transit = is_encrypted_in_transit

    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
