diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index c324106bd2ce..1b6320af685a 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -131,7 +131,7 @@ All should have PrivateAssets="All" set so they don't become pacakge dependencies --> - + diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/PiiDetectionSkillMaskingMode.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/PiiDetectionSkillMaskingMode.cs new file mode 100644 index 000000000000..0c6970d3e4d2 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/PiiDetectionSkillMaskingMode.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Search.Documents.Indexes.Models +{ + /// A string indicating what maskingMode to use to mask the personal information detected in the input text. + public readonly partial struct PiiDetectionSkillMaskingMode : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public PiiDetectionSkillMaskingMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "none"; + private const string ReplaceValue = "replace"; + + /// No masking occurs and the maskedText output will not be returned. + public static PiiDetectionSkillMaskingMode None { get; } = new PiiDetectionSkillMaskingMode(NoneValue); + /// Replaces the detected entities with the character given in the maskingCharacter parameter. The character will be repeated to the length of the detected entity so that the offsets will correctly correspond to both the input text as well as the output maskedText. + public static PiiDetectionSkillMaskingMode Replace { get; } = new PiiDetectionSkillMaskingMode(ReplaceValue); + /// Determines if two values are the same. + public static bool operator ==(PiiDetectionSkillMaskingMode left, PiiDetectionSkillMaskingMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PiiDetectionSkillMaskingMode left, PiiDetectionSkillMaskingMode right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator PiiDetectionSkillMaskingMode(string value) => new PiiDetectionSkillMaskingMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PiiDetectionSkillMaskingMode other && Equals(other); + /// + public bool Equals(PiiDetectionSkillMaskingMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +}