// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace zscaler.PulumiPackage.Zia.DLP
{
    /// <summary>
    /// The **zia_dlp_dictionaries** resource allows the creation and management of ZIA DLP dictionaries in the Zscaler Internet Access cloud or via the API.
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using Zia = zscaler.PulumiPackage.Zia;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var example = new Zia.DLP.DLPDictionaries("example", new()
    ///     {
    ///         CustomPhraseMatchType = "MATCH_ALL_CUSTOM_PHRASE_PATTERN_DICTIONARY",
    ///         Description = "Your Description",
    ///         DictionaryType = "PATTERNS_AND_PHRASES",
    ///         Patterns = new[]
    ///         {
    ///             new Zia.DLP.Inputs.DLPDictionariesPatternArgs
    ///             {
    ///                 Action = "PATTERN_COUNT_TYPE_UNIQUE",
    ///                 Pattern = "YourPattern",
    ///             },
    ///         },
    ///         Phrases = new[]
    ///         {
    ///             new Zia.DLP.Inputs.DLPDictionariesPhraseArgs
    ///             {
    ///                 Action = "PHRASE_COUNT_TYPE_ALL",
    ///                 Phrase = "YourPhrase",
    ///             },
    ///         },
    ///     });
    /// 
    /// });
    /// ```
    /// </summary>
    [ZiaResourceType("zia:DLP/dLPDictionaries:DLPDictionaries")]
    public partial class DLPDictionaries : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The DLP confidence threshold. The following values are supported:
        /// </summary>
        [Output("confidenceThreshold")]
        public Output<string?> ConfidenceThreshold { get; private set; } = null!;

        /// <summary>
        /// The DLP custom phrase match type. Supported values are:
        /// </summary>
        [Output("customPhraseMatchType")]
        public Output<string?> CustomPhraseMatchType { get; private set; } = null!;

        /// <summary>
        /// The desciption of the DLP dictionary
        /// </summary>
        [Output("description")]
        public Output<string?> Description { get; private set; } = null!;

        [Output("dictionaryId")]
        public Output<int> DictionaryId { get; private set; } = null!;

        /// <summary>
        /// The DLP dictionary type. The following values are supported:
        /// </summary>
        [Output("dictionaryType")]
        public Output<string?> DictionaryType { get; private set; } = null!;

        /// <summary>
        /// Exact Data Match (EDM) related information for custom DLP dictionaries.
        /// </summary>
        [Output("exactDataMatchDetails")]
        public Output<ImmutableArray<Outputs.DLPDictionariesExactDataMatchDetail>> ExactDataMatchDetails { get; private set; } = null!;

        /// <summary>
        /// List of Indexed Document Match (IDM) profiles and their corresponding match accuracy for custom DLP dictionaries.
        /// </summary>
        [Output("idmProfileMatchAccuracies")]
        public Output<ImmutableArray<Outputs.DLPDictionariesIdmProfileMatchAccuracy>> IdmProfileMatchAccuracies { get; private set; } = null!;

        /// <summary>
        /// The DLP dictionary's name
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// Indicates whether the name is localized or not. This is always set to True for predefined DLP dictionaries.
        /// </summary>
        [Output("nameL10nTag")]
        public Output<bool> NameL10nTag { get; private set; } = null!;

        /// <summary>
        /// List containing the patterns used within a custom DLP dictionary. This attribute is not applicable to predefined DLP dictionaries. Required when `dictionary_type` is `PATTERNS_AND_PHRASES`
        /// </summary>
        [Output("patterns")]
        public Output<ImmutableArray<Outputs.DLPDictionariesPattern>> Patterns { get; private set; } = null!;

        /// <summary>
        /// List containing the phrases used within a custom DLP dictionary. This attribute is not applicable to predefined DLP dictionaries. Required when `dictionary_type` is `PATTERNS_AND_PHRASES`
        /// </summary>
        [Output("phrases")]
        public Output<ImmutableArray<Outputs.DLPDictionariesPhrase>> Phrases { get; private set; } = null!;

        /// <summary>
        /// The DLP dictionary proximity length.
        /// </summary>
        [Output("proximity")]
        public Output<int?> Proximity { get; private set; } = null!;

        /// <summary>
        /// The DLP threshold type. The following values are supported:
        /// </summary>
        [Output("thresholdType")]
        public Output<string> ThresholdType { get; private set; } = null!;


        /// <summary>
        /// Create a DLPDictionaries resource with the given unique name, arguments, and options.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resource</param>
        /// <param name="args">The arguments used to populate this resource's properties</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public DLPDictionaries(string name, DLPDictionariesArgs? args = null, CustomResourceOptions? options = null)
            : base("zia:DLP/dLPDictionaries:DLPDictionaries", name, args ?? new DLPDictionariesArgs(), MakeResourceOptions(options, ""))
        {
        }

        private DLPDictionaries(string name, Input<string> id, DLPDictionariesState? state = null, CustomResourceOptions? options = null)
            : base("zia:DLP/dLPDictionaries:DLPDictionaries", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "github://api.github.com/zscaler",
            };
            var merged = CustomResourceOptions.Merge(defaultOptions, options);
            // Override the ID if one was specified for consistency with other language SDKs.
            merged.Id = id ?? merged.Id;
            return merged;
        }
        /// <summary>
        /// Get an existing DLPDictionaries resource's state with the given name, ID, and optional extra
        /// properties used to qualify the lookup.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resulting resource.</param>
        /// <param name="id">The unique provider ID of the resource to lookup.</param>
        /// <param name="state">Any extra arguments used during the lookup.</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public static DLPDictionaries Get(string name, Input<string> id, DLPDictionariesState? state = null, CustomResourceOptions? options = null)
        {
            return new DLPDictionaries(name, id, state, options);
        }
    }

    public sealed class DLPDictionariesArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The DLP confidence threshold. The following values are supported:
        /// </summary>
        [Input("confidenceThreshold")]
        public Input<string>? ConfidenceThreshold { get; set; }

        /// <summary>
        /// The DLP custom phrase match type. Supported values are:
        /// </summary>
        [Input("customPhraseMatchType")]
        public Input<string>? CustomPhraseMatchType { get; set; }

        /// <summary>
        /// The desciption of the DLP dictionary
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// The DLP dictionary type. The following values are supported:
        /// </summary>
        [Input("dictionaryType")]
        public Input<string>? DictionaryType { get; set; }

        [Input("exactDataMatchDetails")]
        private InputList<Inputs.DLPDictionariesExactDataMatchDetailArgs>? _exactDataMatchDetails;

        /// <summary>
        /// Exact Data Match (EDM) related information for custom DLP dictionaries.
        /// </summary>
        public InputList<Inputs.DLPDictionariesExactDataMatchDetailArgs> ExactDataMatchDetails
        {
            get => _exactDataMatchDetails ?? (_exactDataMatchDetails = new InputList<Inputs.DLPDictionariesExactDataMatchDetailArgs>());
            set => _exactDataMatchDetails = value;
        }

        [Input("idmProfileMatchAccuracies")]
        private InputList<Inputs.DLPDictionariesIdmProfileMatchAccuracyArgs>? _idmProfileMatchAccuracies;

        /// <summary>
        /// List of Indexed Document Match (IDM) profiles and their corresponding match accuracy for custom DLP dictionaries.
        /// </summary>
        public InputList<Inputs.DLPDictionariesIdmProfileMatchAccuracyArgs> IdmProfileMatchAccuracies
        {
            get => _idmProfileMatchAccuracies ?? (_idmProfileMatchAccuracies = new InputList<Inputs.DLPDictionariesIdmProfileMatchAccuracyArgs>());
            set => _idmProfileMatchAccuracies = value;
        }

        /// <summary>
        /// The DLP dictionary's name
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        [Input("patterns")]
        private InputList<Inputs.DLPDictionariesPatternArgs>? _patterns;

        /// <summary>
        /// List containing the patterns used within a custom DLP dictionary. This attribute is not applicable to predefined DLP dictionaries. Required when `dictionary_type` is `PATTERNS_AND_PHRASES`
        /// </summary>
        public InputList<Inputs.DLPDictionariesPatternArgs> Patterns
        {
            get => _patterns ?? (_patterns = new InputList<Inputs.DLPDictionariesPatternArgs>());
            set => _patterns = value;
        }

        [Input("phrases")]
        private InputList<Inputs.DLPDictionariesPhraseArgs>? _phrases;

        /// <summary>
        /// List containing the phrases used within a custom DLP dictionary. This attribute is not applicable to predefined DLP dictionaries. Required when `dictionary_type` is `PATTERNS_AND_PHRASES`
        /// </summary>
        public InputList<Inputs.DLPDictionariesPhraseArgs> Phrases
        {
            get => _phrases ?? (_phrases = new InputList<Inputs.DLPDictionariesPhraseArgs>());
            set => _phrases = value;
        }

        /// <summary>
        /// The DLP dictionary proximity length.
        /// </summary>
        [Input("proximity")]
        public Input<int>? Proximity { get; set; }

        public DLPDictionariesArgs()
        {
        }
        public static new DLPDictionariesArgs Empty => new DLPDictionariesArgs();
    }

    public sealed class DLPDictionariesState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The DLP confidence threshold. The following values are supported:
        /// </summary>
        [Input("confidenceThreshold")]
        public Input<string>? ConfidenceThreshold { get; set; }

        /// <summary>
        /// The DLP custom phrase match type. Supported values are:
        /// </summary>
        [Input("customPhraseMatchType")]
        public Input<string>? CustomPhraseMatchType { get; set; }

        /// <summary>
        /// The desciption of the DLP dictionary
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        [Input("dictionaryId")]
        public Input<int>? DictionaryId { get; set; }

        /// <summary>
        /// The DLP dictionary type. The following values are supported:
        /// </summary>
        [Input("dictionaryType")]
        public Input<string>? DictionaryType { get; set; }

        [Input("exactDataMatchDetails")]
        private InputList<Inputs.DLPDictionariesExactDataMatchDetailGetArgs>? _exactDataMatchDetails;

        /// <summary>
        /// Exact Data Match (EDM) related information for custom DLP dictionaries.
        /// </summary>
        public InputList<Inputs.DLPDictionariesExactDataMatchDetailGetArgs> ExactDataMatchDetails
        {
            get => _exactDataMatchDetails ?? (_exactDataMatchDetails = new InputList<Inputs.DLPDictionariesExactDataMatchDetailGetArgs>());
            set => _exactDataMatchDetails = value;
        }

        [Input("idmProfileMatchAccuracies")]
        private InputList<Inputs.DLPDictionariesIdmProfileMatchAccuracyGetArgs>? _idmProfileMatchAccuracies;

        /// <summary>
        /// List of Indexed Document Match (IDM) profiles and their corresponding match accuracy for custom DLP dictionaries.
        /// </summary>
        public InputList<Inputs.DLPDictionariesIdmProfileMatchAccuracyGetArgs> IdmProfileMatchAccuracies
        {
            get => _idmProfileMatchAccuracies ?? (_idmProfileMatchAccuracies = new InputList<Inputs.DLPDictionariesIdmProfileMatchAccuracyGetArgs>());
            set => _idmProfileMatchAccuracies = value;
        }

        /// <summary>
        /// The DLP dictionary's name
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// Indicates whether the name is localized or not. This is always set to True for predefined DLP dictionaries.
        /// </summary>
        [Input("nameL10nTag")]
        public Input<bool>? NameL10nTag { get; set; }

        [Input("patterns")]
        private InputList<Inputs.DLPDictionariesPatternGetArgs>? _patterns;

        /// <summary>
        /// List containing the patterns used within a custom DLP dictionary. This attribute is not applicable to predefined DLP dictionaries. Required when `dictionary_type` is `PATTERNS_AND_PHRASES`
        /// </summary>
        public InputList<Inputs.DLPDictionariesPatternGetArgs> Patterns
        {
            get => _patterns ?? (_patterns = new InputList<Inputs.DLPDictionariesPatternGetArgs>());
            set => _patterns = value;
        }

        [Input("phrases")]
        private InputList<Inputs.DLPDictionariesPhraseGetArgs>? _phrases;

        /// <summary>
        /// List containing the phrases used within a custom DLP dictionary. This attribute is not applicable to predefined DLP dictionaries. Required when `dictionary_type` is `PATTERNS_AND_PHRASES`
        /// </summary>
        public InputList<Inputs.DLPDictionariesPhraseGetArgs> Phrases
        {
            get => _phrases ?? (_phrases = new InputList<Inputs.DLPDictionariesPhraseGetArgs>());
            set => _phrases = value;
        }

        /// <summary>
        /// The DLP dictionary proximity length.
        /// </summary>
        [Input("proximity")]
        public Input<int>? Proximity { get; set; }

        /// <summary>
        /// The DLP threshold type. The following values are supported:
        /// </summary>
        [Input("thresholdType")]
        public Input<string>? ThresholdType { get; set; }

        public DLPDictionariesState()
        {
        }
        public static new DLPDictionariesState Empty => new DLPDictionariesState();
    }
}
