# coding: utf-8
# Copyright (c) 2016, 2023, 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 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 CreateMaskingColumnDetails(object):
    """
    Details to create a new masking column. You can use this to add a parent column only.
    It automatically adds the child columns from the associated sensitive data model or
    target database. If you provide the sensitiveTypeId attribute but not the maskingFormats
    attribute, it automatically assigns the default masking format associated with the
    specified sensitive type. Alternatively, if you provide the maskingFormats attribute,
    the specified masking formats are assigned to the column.

    Using the maskingFormats attribute, you can assign one or more masking formats to a
    column. You can specify a condition as part of each masking format. It enables you
    to do <a href=\"https://docs.oracle.com/en/cloud/paas/data-safe/udscs/conditional-masking.html\">conditional masking</a>
    so that you can mask the column data values differently using different masking formats
    and the associated conditions. A masking format can have one or more format entries.
    The combined output of all the format entries is used for masking. It provides the
    flexibility to define a masking format that can generate different parts of a data
    value separately and then combine them to get the final data value for masking.

    You can use the maskingColumnGroup attribute to group the columns that you would like
    to mask together. It enables you to do
    <a href=\"https://docs.oracle.com/en/cloud/paas/data-safe/udscs/group-masking1.html#GUID-755056B9-9540-48C0-9491-262A44A85037\">group or compound masking</a>
    that ensures that the masked data across the columns in a group continue to retain
    the same logical relationship.
    """

    #: A constant which can be used with the object_type property of a CreateMaskingColumnDetails.
    #: This constant has a value of "TABLE"
    OBJECT_TYPE_TABLE = "TABLE"

    #: A constant which can be used with the object_type property of a CreateMaskingColumnDetails.
    #: This constant has a value of "EDITIONING_VIEW"
    OBJECT_TYPE_EDITIONING_VIEW = "EDITIONING_VIEW"

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

        :param schema_name:
            The value to assign to the schema_name property of this CreateMaskingColumnDetails.
        :type schema_name: str

        :param object_name:
            The value to assign to the object_name property of this CreateMaskingColumnDetails.
        :type object_name: str

        :param object_type:
            The value to assign to the object_type property of this CreateMaskingColumnDetails.
            Allowed values for this property are: "TABLE", "EDITIONING_VIEW"
        :type object_type: str

        :param column_name:
            The value to assign to the column_name property of this CreateMaskingColumnDetails.
        :type column_name: str

        :param masking_column_group:
            The value to assign to the masking_column_group property of this CreateMaskingColumnDetails.
        :type masking_column_group: str

        :param sensitive_type_id:
            The value to assign to the sensitive_type_id property of this CreateMaskingColumnDetails.
        :type sensitive_type_id: str

        :param is_masking_enabled:
            The value to assign to the is_masking_enabled property of this CreateMaskingColumnDetails.
        :type is_masking_enabled: bool

        :param masking_formats:
            The value to assign to the masking_formats property of this CreateMaskingColumnDetails.
        :type masking_formats: list[oci.data_safe.models.MaskingFormat]

        """
        self.swagger_types = {
            'schema_name': 'str',
            'object_name': 'str',
            'object_type': 'str',
            'column_name': 'str',
            'masking_column_group': 'str',
            'sensitive_type_id': 'str',
            'is_masking_enabled': 'bool',
            'masking_formats': 'list[MaskingFormat]'
        }

        self.attribute_map = {
            'schema_name': 'schemaName',
            'object_name': 'objectName',
            'object_type': 'objectType',
            'column_name': 'columnName',
            'masking_column_group': 'maskingColumnGroup',
            'sensitive_type_id': 'sensitiveTypeId',
            'is_masking_enabled': 'isMaskingEnabled',
            'masking_formats': 'maskingFormats'
        }

        self._schema_name = None
        self._object_name = None
        self._object_type = None
        self._column_name = None
        self._masking_column_group = None
        self._sensitive_type_id = None
        self._is_masking_enabled = None
        self._masking_formats = None

    @property
    def schema_name(self):
        """
        **[Required]** Gets the schema_name of this CreateMaskingColumnDetails.
        The name of the schema that contains the database column. This attribute cannot be updated for an existing masking column.


        :return: The schema_name of this CreateMaskingColumnDetails.
        :rtype: str
        """
        return self._schema_name

    @schema_name.setter
    def schema_name(self, schema_name):
        """
        Sets the schema_name of this CreateMaskingColumnDetails.
        The name of the schema that contains the database column. This attribute cannot be updated for an existing masking column.


        :param schema_name: The schema_name of this CreateMaskingColumnDetails.
        :type: str
        """
        self._schema_name = schema_name

    @property
    def object_name(self):
        """
        **[Required]** Gets the object_name of this CreateMaskingColumnDetails.
        The name of the object (table or editioning view) that contains the database column. This attribute cannot be updated for an existing masking column.


        :return: The object_name of this CreateMaskingColumnDetails.
        :rtype: str
        """
        return self._object_name

    @object_name.setter
    def object_name(self, object_name):
        """
        Sets the object_name of this CreateMaskingColumnDetails.
        The name of the object (table or editioning view) that contains the database column. This attribute cannot be updated for an existing masking column.


        :param object_name: The object_name of this CreateMaskingColumnDetails.
        :type: str
        """
        self._object_name = object_name

    @property
    def object_type(self):
        """
        Gets the object_type of this CreateMaskingColumnDetails.
        The type of the object that contains the database column.

        Allowed values for this property are: "TABLE", "EDITIONING_VIEW"


        :return: The object_type of this CreateMaskingColumnDetails.
        :rtype: str
        """
        return self._object_type

    @object_type.setter
    def object_type(self, object_type):
        """
        Sets the object_type of this CreateMaskingColumnDetails.
        The type of the object that contains the database column.


        :param object_type: The object_type of this CreateMaskingColumnDetails.
        :type: str
        """
        allowed_values = ["TABLE", "EDITIONING_VIEW"]
        if not value_allowed_none_or_none_sentinel(object_type, allowed_values):
            raise ValueError(
                "Invalid value for `object_type`, must be None or one of {0}"
                .format(allowed_values)
            )
        self._object_type = object_type

    @property
    def column_name(self):
        """
        **[Required]** Gets the column_name of this CreateMaskingColumnDetails.
        The name of the database column. This attribute cannot be updated for an existing
         masking column. Note that the same name is used for the masking column. There
         is no separate displayName attribute for the masking column.


        :return: The column_name of this CreateMaskingColumnDetails.
        :rtype: str
        """
        return self._column_name

    @column_name.setter
    def column_name(self, column_name):
        """
        Sets the column_name of this CreateMaskingColumnDetails.
        The name of the database column. This attribute cannot be updated for an existing
         masking column. Note that the same name is used for the masking column. There
         is no separate displayName attribute for the masking column.


        :param column_name: The column_name of this CreateMaskingColumnDetails.
        :type: str
        """
        self._column_name = column_name

    @property
    def masking_column_group(self):
        """
        Gets the masking_column_group of this CreateMaskingColumnDetails.
        The group of the masking column. It's a masking group identifier and can be any string
        of acceptable length. All the columns in a group are masked together to ensure that
        the masked data across these columns continue to retain the same logical relationship.
        For more details, check
        <a href=https://docs.oracle.com/en/cloud/paas/data-safe/udscs/group-masking1.html#GUID-755056B9-9540-48C0-9491-262A44A85037>Group Masking in the Data Safe documentation.</a>


        :return: The masking_column_group of this CreateMaskingColumnDetails.
        :rtype: str
        """
        return self._masking_column_group

    @masking_column_group.setter
    def masking_column_group(self, masking_column_group):
        """
        Sets the masking_column_group of this CreateMaskingColumnDetails.
        The group of the masking column. It's a masking group identifier and can be any string
        of acceptable length. All the columns in a group are masked together to ensure that
        the masked data across these columns continue to retain the same logical relationship.
        For more details, check
        <a href=https://docs.oracle.com/en/cloud/paas/data-safe/udscs/group-masking1.html#GUID-755056B9-9540-48C0-9491-262A44A85037>Group Masking in the Data Safe documentation.</a>


        :param masking_column_group: The masking_column_group of this CreateMaskingColumnDetails.
        :type: str
        """
        self._masking_column_group = masking_column_group

    @property
    def sensitive_type_id(self):
        """
        Gets the sensitive_type_id of this CreateMaskingColumnDetails.
        The OCID of the sensitive type to be associated with the masking column. Note that
        if the maskingFormats attribute isn't provided while creating a masking column,
        the default masking format associated with the specified sensitive type is assigned
        to the masking column.


        :return: The sensitive_type_id of this CreateMaskingColumnDetails.
        :rtype: str
        """
        return self._sensitive_type_id

    @sensitive_type_id.setter
    def sensitive_type_id(self, sensitive_type_id):
        """
        Sets the sensitive_type_id of this CreateMaskingColumnDetails.
        The OCID of the sensitive type to be associated with the masking column. Note that
        if the maskingFormats attribute isn't provided while creating a masking column,
        the default masking format associated with the specified sensitive type is assigned
        to the masking column.


        :param sensitive_type_id: The sensitive_type_id of this CreateMaskingColumnDetails.
        :type: str
        """
        self._sensitive_type_id = sensitive_type_id

    @property
    def is_masking_enabled(self):
        """
        Gets the is_masking_enabled of this CreateMaskingColumnDetails.
        Indicates if data masking is enabled for the masking column. Set it to false if
        you don't want to mask the column.


        :return: The is_masking_enabled of this CreateMaskingColumnDetails.
        :rtype: bool
        """
        return self._is_masking_enabled

    @is_masking_enabled.setter
    def is_masking_enabled(self, is_masking_enabled):
        """
        Sets the is_masking_enabled of this CreateMaskingColumnDetails.
        Indicates if data masking is enabled for the masking column. Set it to false if
        you don't want to mask the column.


        :param is_masking_enabled: The is_masking_enabled of this CreateMaskingColumnDetails.
        :type: bool
        """
        self._is_masking_enabled = is_masking_enabled

    @property
    def masking_formats(self):
        """
        Gets the masking_formats of this CreateMaskingColumnDetails.
        The masking formats to be assigned to the masking column. You can specify a condition
        as part of each masking format. It enables you to do
        <a href=\"https://docs.oracle.com/en/cloud/paas/data-safe/udscs/conditional-masking.html\">conditional masking</a>
        so that you can mask the column data values differently using different masking
        formats and the associated conditions. A masking format can have one or more format
        entries. The combined output of all the format entries is used for masking. It
        provides the flexibility to define a masking format that can generate different parts
        of a data value separately and then combine them to get the final data value for masking.


        :return: The masking_formats of this CreateMaskingColumnDetails.
        :rtype: list[oci.data_safe.models.MaskingFormat]
        """
        return self._masking_formats

    @masking_formats.setter
    def masking_formats(self, masking_formats):
        """
        Sets the masking_formats of this CreateMaskingColumnDetails.
        The masking formats to be assigned to the masking column. You can specify a condition
        as part of each masking format. It enables you to do
        <a href=\"https://docs.oracle.com/en/cloud/paas/data-safe/udscs/conditional-masking.html\">conditional masking</a>
        so that you can mask the column data values differently using different masking
        formats and the associated conditions. A masking format can have one or more format
        entries. The combined output of all the format entries is used for masking. It
        provides the flexibility to define a masking format that can generate different parts
        of a data value separately and then combine them to get the final data value for masking.


        :param masking_formats: The masking_formats of this CreateMaskingColumnDetails.
        :type: list[oci.data_safe.models.MaskingFormat]
        """
        self._masking_formats = masking_formats

    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
