Skip to content

Commit c232c9c

Browse files
authored
make DocumentSignatureType an extensible enum (Azure#24565)
1 parent c1188fb commit c232c9c

File tree

5 files changed

+69
-43
lines changed

5 files changed

+69
-43
lines changed

sdk/formrecognizer/Azure.AI.FormRecognizer/api/Azure.AI.FormRecognizer.netstandard2.0.cs

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -537,10 +537,23 @@ internal DocumentSelectionMark() { }
537537
public Azure.AI.FormRecognizer.DocumentAnalysis.DocumentSpan Span { get { throw null; } }
538538
public Azure.AI.FormRecognizer.DocumentAnalysis.SelectionMarkState State { get { throw null; } }
539539
}
540-
public enum DocumentSignatureType
540+
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
541+
public readonly partial struct DocumentSignatureType : System.IEquatable<Azure.AI.FormRecognizer.DocumentAnalysis.DocumentSignatureType>
541542
{
542-
Signed = 0,
543-
Unsigned = 1,
543+
private readonly object _dummy;
544+
private readonly int _dummyPrimitive;
545+
public DocumentSignatureType(string value) { throw null; }
546+
public static Azure.AI.FormRecognizer.DocumentAnalysis.DocumentSignatureType Signed { get { throw null; } }
547+
public static Azure.AI.FormRecognizer.DocumentAnalysis.DocumentSignatureType Unsigned { get { throw null; } }
548+
public bool Equals(Azure.AI.FormRecognizer.DocumentAnalysis.DocumentSignatureType other) { throw null; }
549+
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
550+
public override bool Equals(object obj) { throw null; }
551+
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
552+
public override int GetHashCode() { throw null; }
553+
public static bool operator ==(Azure.AI.FormRecognizer.DocumentAnalysis.DocumentSignatureType left, Azure.AI.FormRecognizer.DocumentAnalysis.DocumentSignatureType right) { throw null; }
554+
public static implicit operator Azure.AI.FormRecognizer.DocumentAnalysis.DocumentSignatureType (string value) { throw null; }
555+
public static bool operator !=(Azure.AI.FormRecognizer.DocumentAnalysis.DocumentSignatureType left, Azure.AI.FormRecognizer.DocumentAnalysis.DocumentSignatureType right) { throw null; }
556+
public override string ToString() { throw null; }
544557
}
545558
public partial class DocumentSpan
546559
{

sdk/formrecognizer/Azure.AI.FormRecognizer/src/DocumentSignatureType.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,8 @@ namespace Azure.AI.FormRecognizer.DocumentAnalysis
88
/// <summary>
99
/// The presence of a signature.
1010
/// </summary>
11-
[System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1720:Identifier contains type name")]
1211
[CodeGenModel("DocumentSignatureType")]
13-
public enum DocumentSignatureType
12+
public partial struct DocumentSignatureType
1413
{
15-
/// <summary>
16-
/// Signed.
17-
/// </summary>
18-
Signed,
19-
20-
/// <summary>
21-
/// Unsigned.
22-
/// </summary>
23-
Unsigned
2414
}
2515
}

sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Models/DocumentField.Serialization.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Models/DocumentSignatureType.Serialization.cs

Lines changed: 0 additions & 28 deletions
This file was deleted.

sdk/formrecognizer/Azure.AI.FormRecognizer/src/Generated/Models/DocumentSignatureType.cs

Lines changed: 51 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)