PiiDetectionSkill.java
- // Copyright (c) Microsoft Corporation. All rights reserved.
- // Licensed under the MIT License.
- //
- // Code generated by Microsoft (R) AutoRest Code Generator.
- // Changes may cause incorrect behavior and will be lost if the code is
- // regenerated.
- package com.azure.search.documents.indexes.models;
- import com.azure.core.annotation.Fluent;
- import com.fasterxml.jackson.annotation.JsonCreator;
- import com.fasterxml.jackson.annotation.JsonProperty;
- import com.fasterxml.jackson.annotation.JsonTypeId;
- import com.fasterxml.jackson.annotation.JsonTypeInfo;
- import com.fasterxml.jackson.annotation.JsonTypeName;
- import java.util.List;
- /**
- * Using the Text Analytics API, extracts personal information from an input text and gives you the option of masking
- * it.
- */
- @JsonTypeInfo(
- use = JsonTypeInfo.Id.NAME,
- include = JsonTypeInfo.As.EXISTING_PROPERTY,
- property = "@odata.type",
- visible = true)
- @JsonTypeName("#Microsoft.Skills.Text.PIIDetectionSkill")
- @Fluent
- public final class PiiDetectionSkill extends SearchIndexerSkill {
- /*
- * Identifies the concrete type of the skill.
- */
- @JsonTypeId
- @JsonProperty(value = "@odata.type", required = true)
- private String odataType = "#Microsoft.Skills.Text.PIIDetectionSkill";
- /*
- * A value indicating which language code to use. Default is en.
- */
- @JsonProperty(value = "defaultLanguageCode")
- private String defaultLanguageCode;
- /*
- * A value between 0 and 1 that be used to only include entities whose
- * confidence score is greater than the value specified. If not set
- * (default), or if explicitly set to null, all entities will be included.
- */
- @JsonProperty(value = "minimumPrecision")
- private Double minimumPrecision;
- /*
- * A parameter that provides various ways to mask the personal information
- * detected in the input text. Default is 'none'.
- */
- @JsonProperty(value = "maskingMode")
- private PiiDetectionSkillMaskingMode maskingMode;
- /*
- * The character used to mask the text if the maskingMode parameter is set
- * to replace. Default is '*'.
- */
- @JsonProperty(value = "maskingCharacter")
- private String maskingCharacter;
- /*
- * The version of the model to use when calling the Text Analytics service.
- * It will default to the latest available when not specified. We recommend
- * you do not specify this value unless absolutely necessary.
- */
- @JsonProperty(value = "modelVersion")
- private String modelVersion;
- /*
- * A list of PII entity categories that should be extracted and masked.
- */
- @JsonProperty(value = "piiCategories")
- private List<String> piiCategories;
- /*
- * If specified, will set the PII domain to include only a subset of the
- * entity categories. Possible values include: 'phi', 'none'. Default is
- * 'none'.
- */
- @JsonProperty(value = "domain")
- private String domain;
- /**
- * Creates an instance of PiiDetectionSkill class.
- *
- * @param inputs the inputs value to set.
- * @param outputs the outputs value to set.
- */
- @JsonCreator
- public PiiDetectionSkill(
- @JsonProperty(value = "inputs", required = true) List<InputFieldMappingEntry> inputs,
- @JsonProperty(value = "outputs", required = true) List<OutputFieldMappingEntry> outputs) {
- super(inputs, outputs);
- }
- /**
- * Get the defaultLanguageCode property: A value indicating which language code to use. Default is en.
- *
- * @return the defaultLanguageCode value.
- */
- public String getDefaultLanguageCode() {
- return this.defaultLanguageCode;
- }
- /**
- * Set the defaultLanguageCode property: A value indicating which language code to use. Default is en.
- *
- * @param defaultLanguageCode the defaultLanguageCode value to set.
- * @return the PiiDetectionSkill object itself.
- */
- public PiiDetectionSkill setDefaultLanguageCode(String defaultLanguageCode) {
- this.defaultLanguageCode = defaultLanguageCode;
- return this;
- }
- /**
- * Get the minimumPrecision property: A value between 0 and 1 that be used to only include entities whose confidence
- * score is greater than the value specified. If not set (default), or if explicitly set to null, all entities will
- * be included.
- *
- * @return the minimumPrecision value.
- */
- public Double getMinimumPrecision() {
- return this.minimumPrecision;
- }
- /**
- * Set the minimumPrecision property: A value between 0 and 1 that be used to only include entities whose confidence
- * score is greater than the value specified. If not set (default), or if explicitly set to null, all entities will
- * be included.
- *
- * @param minimumPrecision the minimumPrecision value to set.
- * @return the PiiDetectionSkill object itself.
- */
- public PiiDetectionSkill setMinimumPrecision(Double minimumPrecision) {
- this.minimumPrecision = minimumPrecision;
- return this;
- }
- /**
- * Get the maskingMode property: A parameter that provides various ways to mask the personal information detected in
- * the input text. Default is 'none'.
- *
- * @return the maskingMode value.
- */
- public PiiDetectionSkillMaskingMode getMaskingMode() {
- return this.maskingMode;
- }
- /**
- * Set the maskingMode property: A parameter that provides various ways to mask the personal information detected in
- * the input text. Default is 'none'.
- *
- * @param maskingMode the maskingMode value to set.
- * @return the PiiDetectionSkill object itself.
- */
- public PiiDetectionSkill setMaskingMode(PiiDetectionSkillMaskingMode maskingMode) {
- this.maskingMode = maskingMode;
- return this;
- }
- /**
- * Get the maskingCharacter property: The character used to mask the text if the maskingMode parameter is set to
- * replace. Default is '*'.
- *
- * @return the maskingCharacter value.
- */
- public String getMaskingCharacter() {
- return this.maskingCharacter;
- }
- /**
- * Set the maskingCharacter property: The character used to mask the text if the maskingMode parameter is set to
- * replace. Default is '*'.
- *
- * @param maskingCharacter the maskingCharacter value to set.
- * @return the PiiDetectionSkill object itself.
- */
- public PiiDetectionSkill setMaskingCharacter(String maskingCharacter) {
- this.maskingCharacter = maskingCharacter;
- return this;
- }
- /**
- * Get the modelVersion property: The version of the model to use when calling the Text Analytics service. It will
- * default to the latest available when not specified. We recommend you do not specify this value unless absolutely
- * necessary.
- *
- * @return the modelVersion value.
- */
- public String getModelVersion() {
- return this.modelVersion;
- }
- /**
- * Set the modelVersion property: The version of the model to use when calling the Text Analytics service. It will
- * default to the latest available when not specified. We recommend you do not specify this value unless absolutely
- * necessary.
- *
- * @param modelVersion the modelVersion value to set.
- * @return the PiiDetectionSkill object itself.
- */
- public PiiDetectionSkill setModelVersion(String modelVersion) {
- this.modelVersion = modelVersion;
- return this;
- }
- /**
- * Get the piiCategories property: A list of PII entity categories that should be extracted and masked.
- *
- * @return the piiCategories value.
- */
- public List<String> getPiiCategories() {
- return this.piiCategories;
- }
- /**
- * Set the piiCategories property: A list of PII entity categories that should be extracted and masked.
- *
- * @param piiCategories the piiCategories value to set.
- * @return the PiiDetectionSkill object itself.
- */
- public PiiDetectionSkill setPiiCategories(List<String> piiCategories) {
- this.piiCategories = piiCategories;
- return this;
- }
- /**
- * Get the domain property: If specified, will set the PII domain to include only a subset of the entity categories.
- * Possible values include: 'phi', 'none'. Default is 'none'.
- *
- * @return the domain value.
- */
- public String getDomain() {
- return this.domain;
- }
- /**
- * Set the domain property: If specified, will set the PII domain to include only a subset of the entity categories.
- * Possible values include: 'phi', 'none'. Default is 'none'.
- *
- * @param domain the domain value to set.
- * @return the PiiDetectionSkill object itself.
- */
- public PiiDetectionSkill setDomain(String domain) {
- this.domain = domain;
- return this;
- }
- }