// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.gcp.dataloss.outputs;

import com.pulumi.core.annotations.CustomType;
import com.pulumi.gcp.dataloss.outputs.PreventionInspectTemplateInspectConfigCustomInfoType;
import com.pulumi.gcp.dataloss.outputs.PreventionInspectTemplateInspectConfigInfoType;
import com.pulumi.gcp.dataloss.outputs.PreventionInspectTemplateInspectConfigLimits;
import com.pulumi.gcp.dataloss.outputs.PreventionInspectTemplateInspectConfigRuleSet;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class PreventionInspectTemplateInspectConfig {
    /**
     * @return List of options defining data content to scan. If empty, text, images, and other content will be included.
     * Each value may be one of: `CONTENT_TEXT`, `CONTENT_IMAGE`.
     * 
     */
    private @Nullable List<String> contentOptions;
    /**
     * @return Custom info types to be used. See https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
     * Structure is documented below.
     * 
     */
    private @Nullable List<PreventionInspectTemplateInspectConfigCustomInfoType> customInfoTypes;
    /**
     * @return When true, excludes type information of the findings.
     * 
     */
    private @Nullable Boolean excludeInfoTypes;
    /**
     * @return When true, a contextual quote from the data that triggered a finding is included in the response.
     * 
     */
    private @Nullable Boolean includeQuote;
    /**
     * @return Restricts what infoTypes to look for. The values must correspond to InfoType values returned by infoTypes.list
     * or listed at https://cloud.google.com/dlp/docs/infotypes-reference.
     * When no InfoTypes or CustomInfoTypes are specified in a request, the system may automatically choose what detectors to run.
     * By default this may be all types, but may change over time as detectors are updated.
     * Structure is documented below.
     * 
     */
    private @Nullable List<PreventionInspectTemplateInspectConfigInfoType> infoTypes;
    /**
     * @return Configuration to control the number of findings returned.
     * Structure is documented below.
     * 
     */
    private @Nullable PreventionInspectTemplateInspectConfigLimits limits;
    /**
     * @return Only returns findings equal or above this threshold. See https://cloud.google.com/dlp/docs/likelihood for more info
     * Default value is `POSSIBLE`.
     * Possible values are: `VERY_UNLIKELY`, `UNLIKELY`, `POSSIBLE`, `LIKELY`, `VERY_LIKELY`.
     * 
     */
    private @Nullable String minLikelihood;
    /**
     * @return Set of rules to apply to the findings for this InspectConfig. Exclusion rules, contained in the set are executed in the end,
     * other rules are executed in the order they are specified for each info type.
     * Structure is documented below.
     * 
     */
    private @Nullable List<PreventionInspectTemplateInspectConfigRuleSet> ruleSets;

    private PreventionInspectTemplateInspectConfig() {}
    /**
     * @return List of options defining data content to scan. If empty, text, images, and other content will be included.
     * Each value may be one of: `CONTENT_TEXT`, `CONTENT_IMAGE`.
     * 
     */
    public List<String> contentOptions() {
        return this.contentOptions == null ? List.of() : this.contentOptions;
    }
    /**
     * @return Custom info types to be used. See https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
     * Structure is documented below.
     * 
     */
    public List<PreventionInspectTemplateInspectConfigCustomInfoType> customInfoTypes() {
        return this.customInfoTypes == null ? List.of() : this.customInfoTypes;
    }
    /**
     * @return When true, excludes type information of the findings.
     * 
     */
    public Optional<Boolean> excludeInfoTypes() {
        return Optional.ofNullable(this.excludeInfoTypes);
    }
    /**
     * @return When true, a contextual quote from the data that triggered a finding is included in the response.
     * 
     */
    public Optional<Boolean> includeQuote() {
        return Optional.ofNullable(this.includeQuote);
    }
    /**
     * @return Restricts what infoTypes to look for. The values must correspond to InfoType values returned by infoTypes.list
     * or listed at https://cloud.google.com/dlp/docs/infotypes-reference.
     * When no InfoTypes or CustomInfoTypes are specified in a request, the system may automatically choose what detectors to run.
     * By default this may be all types, but may change over time as detectors are updated.
     * Structure is documented below.
     * 
     */
    public List<PreventionInspectTemplateInspectConfigInfoType> infoTypes() {
        return this.infoTypes == null ? List.of() : this.infoTypes;
    }
    /**
     * @return Configuration to control the number of findings returned.
     * Structure is documented below.
     * 
     */
    public Optional<PreventionInspectTemplateInspectConfigLimits> limits() {
        return Optional.ofNullable(this.limits);
    }
    /**
     * @return Only returns findings equal or above this threshold. See https://cloud.google.com/dlp/docs/likelihood for more info
     * Default value is `POSSIBLE`.
     * Possible values are: `VERY_UNLIKELY`, `UNLIKELY`, `POSSIBLE`, `LIKELY`, `VERY_LIKELY`.
     * 
     */
    public Optional<String> minLikelihood() {
        return Optional.ofNullable(this.minLikelihood);
    }
    /**
     * @return Set of rules to apply to the findings for this InspectConfig. Exclusion rules, contained in the set are executed in the end,
     * other rules are executed in the order they are specified for each info type.
     * Structure is documented below.
     * 
     */
    public List<PreventionInspectTemplateInspectConfigRuleSet> ruleSets() {
        return this.ruleSets == null ? List.of() : this.ruleSets;
    }

    public static Builder builder() {
        return new Builder();
    }

    public static Builder builder(PreventionInspectTemplateInspectConfig defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable List<String> contentOptions;
        private @Nullable List<PreventionInspectTemplateInspectConfigCustomInfoType> customInfoTypes;
        private @Nullable Boolean excludeInfoTypes;
        private @Nullable Boolean includeQuote;
        private @Nullable List<PreventionInspectTemplateInspectConfigInfoType> infoTypes;
        private @Nullable PreventionInspectTemplateInspectConfigLimits limits;
        private @Nullable String minLikelihood;
        private @Nullable List<PreventionInspectTemplateInspectConfigRuleSet> ruleSets;
        public Builder() {}
        public Builder(PreventionInspectTemplateInspectConfig defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.contentOptions = defaults.contentOptions;
    	      this.customInfoTypes = defaults.customInfoTypes;
    	      this.excludeInfoTypes = defaults.excludeInfoTypes;
    	      this.includeQuote = defaults.includeQuote;
    	      this.infoTypes = defaults.infoTypes;
    	      this.limits = defaults.limits;
    	      this.minLikelihood = defaults.minLikelihood;
    	      this.ruleSets = defaults.ruleSets;
        }

        @CustomType.Setter
        public Builder contentOptions(@Nullable List<String> contentOptions) {
            this.contentOptions = contentOptions;
            return this;
        }
        public Builder contentOptions(String... contentOptions) {
            return contentOptions(List.of(contentOptions));
        }
        @CustomType.Setter
        public Builder customInfoTypes(@Nullable List<PreventionInspectTemplateInspectConfigCustomInfoType> customInfoTypes) {
            this.customInfoTypes = customInfoTypes;
            return this;
        }
        public Builder customInfoTypes(PreventionInspectTemplateInspectConfigCustomInfoType... customInfoTypes) {
            return customInfoTypes(List.of(customInfoTypes));
        }
        @CustomType.Setter
        public Builder excludeInfoTypes(@Nullable Boolean excludeInfoTypes) {
            this.excludeInfoTypes = excludeInfoTypes;
            return this;
        }
        @CustomType.Setter
        public Builder includeQuote(@Nullable Boolean includeQuote) {
            this.includeQuote = includeQuote;
            return this;
        }
        @CustomType.Setter
        public Builder infoTypes(@Nullable List<PreventionInspectTemplateInspectConfigInfoType> infoTypes) {
            this.infoTypes = infoTypes;
            return this;
        }
        public Builder infoTypes(PreventionInspectTemplateInspectConfigInfoType... infoTypes) {
            return infoTypes(List.of(infoTypes));
        }
        @CustomType.Setter
        public Builder limits(@Nullable PreventionInspectTemplateInspectConfigLimits limits) {
            this.limits = limits;
            return this;
        }
        @CustomType.Setter
        public Builder minLikelihood(@Nullable String minLikelihood) {
            this.minLikelihood = minLikelihood;
            return this;
        }
        @CustomType.Setter
        public Builder ruleSets(@Nullable List<PreventionInspectTemplateInspectConfigRuleSet> ruleSets) {
            this.ruleSets = ruleSets;
            return this;
        }
        public Builder ruleSets(PreventionInspectTemplateInspectConfigRuleSet... ruleSets) {
            return ruleSets(List.of(ruleSets));
        }
        public PreventionInspectTemplateInspectConfig build() {
            final var o = new PreventionInspectTemplateInspectConfig();
            o.contentOptions = contentOptions;
            o.customInfoTypes = customInfoTypes;
            o.excludeInfoTypes = excludeInfoTypes;
            o.includeQuote = includeQuote;
            o.infoTypes = infoTypes;
            o.limits = limits;
            o.minLikelihood = minLikelihood;
            o.ruleSets = ruleSets;
            return o;
        }
    }
}
