diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/api/Azure.AI.Language.Text.net8.0.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/api/Azure.AI.Language.Text.net8.0.cs index 7a0901bb70a8..7731d68afe7f 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/api/Azure.AI.Language.Text.net8.0.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/api/Azure.AI.Language.Text.net8.0.cs @@ -3,9 +3,9 @@ namespace Azure.AI.Language.Text public partial class AbstractiveSummarizationActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AbstractiveSummarizationActionContent() { } + public string Instruction { get { throw null; } set { } } public bool? LoggingOptOut { get { throw null; } set { } } public string ModelVersion { get { throw null; } set { } } - public string Query { get { throw null; } set { } } public int? SentenceCount { get { throw null; } set { } } public Azure.AI.Language.Text.StringIndexType? StringIndexType { get { throw null; } set { } } public Azure.AI.Language.Text.SummaryLengthBucket? SummaryLength { get { throw null; } set { } } @@ -122,21 +122,10 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class AnalyzeTextDynamicClassificationResult : Azure.AI.Language.Text.AnalyzeTextResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal AnalyzeTextDynamicClassificationResult() { } - public Azure.AI.Language.Text.DynamicClassificationResult Results { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.AnalyzeTextDynamicClassificationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.AnalyzeTextDynamicClassificationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class AnalyzeTextEntitiesResult : Azure.AI.Language.Text.AnalyzeTextResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AnalyzeTextEntitiesResult() { } - public Azure.AI.Language.Text.EntitiesResult Results { get { throw null; } } + public Azure.AI.Language.Text.EntitiesWithMetadataAutoResult Results { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Text.AnalyzeTextEntitiesResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -363,6 +352,27 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public abstract partial class BaseRedactionPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected BaseRedactionPolicy() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.BaseRedactionPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.BaseRedactionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CharacterMaskPolicyType : Azure.AI.Language.Text.BaseRedactionPolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CharacterMaskPolicyType() { } + public Azure.AI.Language.Text.RedactionCharacter? RedactionCharacter { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.CharacterMaskPolicyType System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.CharacterMaskPolicyType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ClassificationActionResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ClassificationActionResult() { } @@ -390,24 +400,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ClassificationType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ClassificationType(string value) { throw null; } - public static Azure.AI.Language.Text.ClassificationType Multi { get { throw null; } } - public static Azure.AI.Language.Text.ClassificationType Single { get { throw null; } } - public bool Equals(Azure.AI.Language.Text.ClassificationType other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.AI.Language.Text.ClassificationType left, Azure.AI.Language.Text.ClassificationType right) { throw null; } - public static implicit operator Azure.AI.Language.Text.ClassificationType (string value) { throw null; } - public static bool operator !=(Azure.AI.Language.Text.ClassificationType left, Azure.AI.Language.Text.ClassificationType right) { throw null; } - public override string ToString() { throw null; } - } public partial class CurrencyMetadata : Azure.AI.Language.Text.BaseMetadata, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal CurrencyMetadata() { } @@ -421,59 +413,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class CustomAbstractiveSummarizationActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public CustomAbstractiveSummarizationActionContent(string projectName, string deploymentName) { } - public string DeploymentName { get { throw null; } } - public bool? LoggingOptOut { get { throw null; } set { } } - public string ProjectName { get { throw null; } } - public int? SentenceCount { get { throw null; } set { } } - public Azure.AI.Language.Text.StringIndexType? StringIndexType { get { throw null; } set { } } - public Azure.AI.Language.Text.SummaryLengthBucket? SummaryLength { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomAbstractiveSummarizationActionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomAbstractiveSummarizationActionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomAbstractiveSummarizationOperationAction : Azure.AI.Language.Text.AnalyzeTextOperationAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public CustomAbstractiveSummarizationOperationAction(Azure.AI.Language.Text.CustomAbstractiveSummarizationActionContent actionContent) { } - public Azure.AI.Language.Text.CustomAbstractiveSummarizationActionContent ActionContent { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomAbstractiveSummarizationOperationAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomAbstractiveSummarizationOperationAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomAbstractiveSummarizationOperationResult : Azure.AI.Language.Text.AnalyzeTextOperationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomAbstractiveSummarizationOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Text.TextActionState)) { } - public Azure.AI.Language.Text.CustomAbstractiveSummarizationResult Results { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomAbstractiveSummarizationOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomAbstractiveSummarizationOperationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomAbstractiveSummarizationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomAbstractiveSummarizationResult() { } - public string DeploymentName { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } - public string ProjectName { get { throw null; } } - public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomAbstractiveSummarizationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomAbstractiveSummarizationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class CustomEntitiesActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public CustomEntitiesActionContent(string projectName, string deploymentName) { } @@ -488,21 +427,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class CustomEntitiesActionResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomEntitiesActionResult() { } - public string DeploymentName { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } - public string ProjectName { get { throw null; } } - public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomEntitiesActionResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomEntitiesActionResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class CustomEntitiesOperationAction : Azure.AI.Language.Text.AnalyzeTextOperationAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public CustomEntitiesOperationAction() { } @@ -514,118 +438,61 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class CustomEntityRecognitionOperationResult : Azure.AI.Language.Text.AnalyzeTextOperationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class CustomEntitiesResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal CustomEntityRecognitionOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Text.TextActionState)) { } - public Azure.AI.Language.Text.CustomEntitiesActionResult Results { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomEntityRecognitionOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomEntityRecognitionOperationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomHealthcareActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public CustomHealthcareActionContent(string projectName, string deploymentName) { } + internal CustomEntitiesResult() { } public string DeploymentName { get { throw null; } } - public bool? LoggingOptOut { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } public string ProjectName { get { throw null; } } - public Azure.AI.Language.Text.StringIndexType? StringIndexType { get { throw null; } set { } } + public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareActionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareActionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Language.Text.CustomEntitiesResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.CustomEntitiesResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class CustomHealthcareActionResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class CustomEntityActionResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal CustomHealthcareActionResult() { } + internal CustomEntityActionResult() { } public Azure.AI.Language.Text.DetectedLanguage DetectedLanguage { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } public string Id { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Relations { get { throw null; } } public Azure.AI.Language.Text.DocumentStatistics Statistics { get { throw null; } } public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareActionResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareActionResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomHealthcareEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomHealthcareEntity() { } - public Azure.AI.Language.Text.HealthcareAssertion Assertion { get { throw null; } } - public Azure.AI.Language.Text.HealthcareEntityCategory Category { get { throw null; } } - public double ConfidenceScore { get { throw null; } } - public System.Collections.Generic.IReadOnlyList EntityComponentInformation { get { throw null; } } - public int Length { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Links { get { throw null; } } - public string Name { get { throw null; } } - public int Offset { get { throw null; } } - public string Subcategory { get { throw null; } } - public string Text { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Language.Text.CustomEntityActionResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.CustomEntityActionResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class CustomHealthcareOperationAction : Azure.AI.Language.Text.AnalyzeTextOperationAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public CustomHealthcareOperationAction() { } - public Azure.AI.Language.Text.CustomHealthcareActionContent ActionContent { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareOperationAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareOperationAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomHealthcareOperationResult : Azure.AI.Language.Text.AnalyzeTextOperationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class CustomEntityRecognitionOperationResult : Azure.AI.Language.Text.AnalyzeTextOperationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal CustomHealthcareOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Text.TextActionState)) { } - public Azure.AI.Language.Text.CustomHealthcareResult Results { get { throw null; } } + internal CustomEntityRecognitionOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Text.TextActionState)) { } + public Azure.AI.Language.Text.CustomEntitiesResult Results { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareOperationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomHealthcareResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomHealthcareResult() { } - public string DeploymentName { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } - public string ProjectName { get { throw null; } } - public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Language.Text.CustomEntityRecognitionOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.CustomEntityRecognitionOperationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class CustomLabelClassificationActionResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class CustomLabelClassificationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal CustomLabelClassificationActionResult() { } + internal CustomLabelClassificationResult() { } public string DeploymentName { get { throw null; } } public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } public string ProjectName { get { throw null; } } public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomLabelClassificationActionResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomLabelClassificationActionResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Language.Text.CustomLabelClassificationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.CustomLabelClassificationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } public partial class CustomMultiLabelClassificationActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -654,7 +521,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class CustomMultiLabelClassificationOperationResult : Azure.AI.Language.Text.AnalyzeTextOperationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal CustomMultiLabelClassificationOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Text.TextActionState)) { } - public Azure.AI.Language.Text.CustomLabelClassificationActionResult Results { get { throw null; } } + public Azure.AI.Language.Text.CustomLabelClassificationResult Results { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Text.CustomMultiLabelClassificationOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -662,89 +529,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class CustomSentenceSentiment : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomSentenceSentiment() { } - public Azure.AI.Language.Text.SentimentConfidenceScores ConfidenceScores { get { throw null; } } - public int Length { get { throw null; } } - public int Offset { get { throw null; } } - public Azure.AI.Language.Text.SentenceSentimentValue Sentiment { get { throw null; } } - public string Text { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentenceSentiment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentenceSentiment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomSentimentAnalysisActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public CustomSentimentAnalysisActionContent(string projectName, string deploymentName) { } - public string DeploymentName { get { throw null; } } - public bool? LoggingOptOut { get { throw null; } set { } } - public string ProjectName { get { throw null; } } - public Azure.AI.Language.Text.StringIndexType? StringIndexType { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisActionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisActionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomSentimentAnalysisOperationAction : Azure.AI.Language.Text.AnalyzeTextOperationAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public CustomSentimentAnalysisOperationAction() { } - public Azure.AI.Language.Text.CustomSentimentAnalysisActionContent ActionContent { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisOperationAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisOperationAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomSentimentAnalysisOperationResult : Azure.AI.Language.Text.AnalyzeTextOperationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomSentimentAnalysisOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Text.TextActionState)) { } - public Azure.AI.Language.Text.CustomSentimentAnalysisResult Results { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisOperationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomSentimentAnalysisResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomSentimentAnalysisResult() { } - public string DeploymentName { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } - public string ProjectName { get { throw null; } } - public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomSentimentAnalysisResultDocument : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomSentimentAnalysisResultDocument() { } - public Azure.AI.Language.Text.SentimentConfidenceScores ConfidenceScores { get { throw null; } } - public Azure.AI.Language.Text.DetectedLanguage DetectedLanguage { get { throw null; } } - public string Id { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Sentences { get { throw null; } } - public Azure.AI.Language.Text.DocumentSentiment Sentiment { get { throw null; } } - public Azure.AI.Language.Text.DocumentStatistics Statistics { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisResultDocument System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisResultDocument System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class CustomSingleLabelClassificationActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public CustomSingleLabelClassificationActionContent(string projectName, string deploymentName) { } @@ -772,7 +556,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class CustomSingleLabelClassificationOperationResult : Azure.AI.Language.Text.AnalyzeTextOperationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal CustomSingleLabelClassificationOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Text.TextActionState)) { } - public Azure.AI.Language.Text.CustomLabelClassificationActionResult Results { get { throw null; } } + public Azure.AI.Language.Text.CustomLabelClassificationResult Results { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Text.CustomSingleLabelClassificationOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -821,8 +605,8 @@ internal DetectedLanguage() { } public double ConfidenceScore { get { throw null; } } public string Iso6391Name { get { throw null; } } public string Name { get { throw null; } } - public Azure.AI.Language.Text.ScriptKind? Script { get { throw null; } } - public Azure.AI.Language.Text.ScriptCode? ScriptCode { get { throw null; } } + public Azure.AI.Language.Text.ScriptCode? ScriptIso15924Code { get { throw null; } } + public Azure.AI.Language.Text.ScriptKind? ScriptName { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Text.DetectedLanguage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -874,48 +658,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class DynamicClassificationActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public DynamicClassificationActionContent(System.Collections.Generic.IEnumerable categories) { } - public System.Collections.Generic.IList Categories { get { throw null; } } - public Azure.AI.Language.Text.ClassificationType? ClassificationType { get { throw null; } set { } } - public bool? LoggingOptOut { get { throw null; } set { } } - public string ModelVersion { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.DynamicClassificationActionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.DynamicClassificationActionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class DynamicClassificationDocumentResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal DynamicClassificationDocumentResult() { } - public System.Collections.Generic.IReadOnlyList Classifications { get { throw null; } } - public string Id { get { throw null; } } - public Azure.AI.Language.Text.DocumentStatistics Statistics { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.DynamicClassificationDocumentResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.DynamicClassificationDocumentResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class DynamicClassificationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal DynamicClassificationResult() { } - public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } - public string ModelVersion { get { throw null; } } - public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.DynamicClassificationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.DynamicClassificationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class EntitiesActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public EntitiesActionContent() { } @@ -933,21 +675,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class EntitiesDocumentResultWithMetadataDetectedLanguage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal EntitiesDocumentResultWithMetadataDetectedLanguage() { } - public Azure.AI.Language.Text.DetectedLanguage DetectedLanguage { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } - public string Id { get { throw null; } } - public Azure.AI.Language.Text.DocumentStatistics Statistics { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.EntitiesDocumentResultWithMetadataDetectedLanguage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.EntitiesDocumentResultWithMetadataDetectedLanguage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class EntitiesOperationAction : Azure.AI.Language.Text.AnalyzeTextOperationAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public EntitiesOperationAction() { } @@ -962,7 +689,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class EntitiesResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal EntitiesResult() { } - public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } public string ModelVersion { get { throw null; } } public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } @@ -973,11 +700,25 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class EntitiesWithMetadataAutoResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EntitiesWithMetadataAutoResult() { } + public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public string ModelVersion { get { throw null; } } + public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.EntitiesWithMetadataAutoResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.EntitiesWithMetadataAutoResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class EntityActionResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal EntityActionResult() { } public Azure.AI.Language.Text.DetectedLanguage DetectedLanguage { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } public string Id { get { throw null; } } public Azure.AI.Language.Text.DocumentStatistics Statistics { get { throw null; } } public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } @@ -988,6 +729,20 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class EntityActionResultWithMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EntityActionResultWithMetadata() { } + public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } + public string Id { get { throw null; } } + public Azure.AI.Language.Text.DocumentStatistics Statistics { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.EntityActionResultWithMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.EntityActionResultWithMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct EntityCategory : System.IEquatable { @@ -1056,16 +811,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.AI.Language.Text.EntityCategory left, Azure.AI.Language.Text.EntityCategory right) { throw null; } public override string ToString() { throw null; } } - public abstract partial class EntityComponentInformation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected EntityComponentInformation() { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.EntityComponentInformation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.EntityComponentInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class EntityInferenceConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public EntityInferenceConfig() { } @@ -1155,6 +900,16 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class EntityMaskPolicyType : Azure.AI.Language.Text.BaseRedactionPolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EntityMaskPolicyType() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.EntityMaskPolicyType System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.EntityMaskPolicyType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public abstract partial class EntityOverlapPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected EntityOverlapPolicy() { } @@ -1767,17 +1522,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class LearnedComponent : Azure.AI.Language.Text.EntityComponentInformation, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal LearnedComponent() { } - public string Value { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.LearnedComponent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.LearnedComponent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class LengthMetadata : Azure.AI.Language.Text.BaseMetadata, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal LengthMetadata() { } @@ -1840,17 +1584,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class ListComponent : Azure.AI.Language.Text.EntityComponentInformation, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal ListComponent() { } - public string Value { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.ListComponent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.ListComponent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class MatchLongestEntityPolicyType : Azure.AI.Language.Text.EntityOverlapPolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MatchLongestEntityPolicyType() { } @@ -1920,6 +1653,16 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class NoMaskPolicyType : Azure.AI.Language.Text.BaseRedactionPolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NoMaskPolicyType() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.NoMaskPolicyType System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.NoMaskPolicyType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct NumberKind : System.IEquatable { @@ -1989,7 +1732,7 @@ public PiiActionContent() { } public bool? LoggingOptOut { get { throw null; } set { } } public string ModelVersion { get { throw null; } set { } } public System.Collections.Generic.IList PiiCategories { get { throw null; } } - public Azure.AI.Language.Text.RedactionCharacter? RedactionCharacter { get { throw null; } set { } } + public Azure.AI.Language.Text.BaseRedactionPolicy RedactionPolicy { get { throw null; } set { } } public Azure.AI.Language.Text.StringIndexType? StringIndexType { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Text.PiiActionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2002,7 +1745,7 @@ public partial class PiiActionResult : System.ClientModel.Primitives.IJsonModel< { internal PiiActionResult() { } public Azure.AI.Language.Text.DetectedLanguage DetectedLanguage { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } public string Id { get { throw null; } } public string RedactedText { get { throw null; } } public Azure.AI.Language.Text.DocumentStatistics Statistics { get { throw null; } } @@ -2408,6 +2151,27 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.AI.Language.Text.PiiDomain left, Azure.AI.Language.Text.PiiDomain right) { throw null; } public override string ToString() { throw null; } } + public partial class PiiEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PiiEntity() { } + public string Category { get { throw null; } } + public double ConfidenceScore { get { throw null; } } + public int Length { get { throw null; } } + public string Mask { get { throw null; } } + public int? MaskLength { get { throw null; } } + public int? MaskOffset { get { throw null; } } + public int Offset { get { throw null; } } + public string Subcategory { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Tags { get { throw null; } } + public string Text { get { throw null; } } + public string Type { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.PiiEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.PiiEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class PiiEntityRecognitionOperationResult : Azure.AI.Language.Text.AnalyzeTextOperationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal PiiEntityRecognitionOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Text.TextActionState)) { } @@ -2444,17 +2208,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class PrebuiltComponent : Azure.AI.Language.Text.EntityComponentInformation, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal PrebuiltComponent() { } - public string Value { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.PrebuiltComponent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.PrebuiltComponent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct RangeInclusivity : System.IEquatable { @@ -2633,6 +2386,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static Azure.AI.Language.Text.ScriptCode Gujr { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Guru { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Hang { get { throw null; } } + public static Azure.AI.Language.Text.ScriptCode Hani { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Hans { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Hant { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Hebr { get { throw null; } } @@ -2642,8 +2396,12 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static Azure.AI.Language.Text.ScriptCode Laoo { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Latn { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Mlym { get { throw null; } } + public static Azure.AI.Language.Text.ScriptCode Mong { get { throw null; } } + public static Azure.AI.Language.Text.ScriptCode Mtei { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Mymr { get { throw null; } } + public static Azure.AI.Language.Text.ScriptCode Olck { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Orya { get { throw null; } } + public static Azure.AI.Language.Text.ScriptCode Shrd { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Sinh { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Taml { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Telu { get { throw null; } } @@ -2677,6 +2435,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static Azure.AI.Language.Text.ScriptKind Gujarati { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Gurmukhi { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Hangul { get { throw null; } } + public static Azure.AI.Language.Text.ScriptKind HanLiteral { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind HanSimplified { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind HanTraditional { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Hebrew { get { throw null; } } @@ -2686,8 +2445,12 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static Azure.AI.Language.Text.ScriptKind Lao { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Latin { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Malayalam { get { throw null; } } + public static Azure.AI.Language.Text.ScriptKind Meitei { get { throw null; } } + public static Azure.AI.Language.Text.ScriptKind Mongolian { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Myanmar { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Odia { get { throw null; } } + public static Azure.AI.Language.Text.ScriptKind Santali { get { throw null; } } + public static Azure.AI.Language.Text.ScriptKind Sharada { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Sinhala { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Tamil { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Telugu { get { throw null; } } @@ -3136,12 +2899,13 @@ public static partial class TextAnalysisClientBuilderExtensions } public partial class TextAnalysisClientOptions : Azure.Core.ClientOptions { - public TextAnalysisClientOptions(Azure.AI.Language.Text.TextAnalysisClientOptions.ServiceVersion version = Azure.AI.Language.Text.TextAnalysisClientOptions.ServiceVersion.V2023_11_15_Preview) { } + public TextAnalysisClientOptions(Azure.AI.Language.Text.TextAnalysisClientOptions.ServiceVersion version = Azure.AI.Language.Text.TextAnalysisClientOptions.ServiceVersion.V2024_11_15_Preview) { } public enum ServiceVersion { V2022_05_01 = 1, V2023_04_01 = 2, - V2023_11_15_Preview = 3, + V2024_11_01 = 3, + V2024_11_15_Preview = 4, } } public static partial class TextAnalysisModelFactory @@ -3151,8 +2915,7 @@ public static partial class TextAnalysisModelFactory public static Azure.AI.Language.Text.AbstractiveSummary AbstractiveSummary(string text = null, System.Collections.Generic.IEnumerable contexts = null) { throw null; } public static Azure.AI.Language.Text.AbstractiveSummaryActionResult AbstractiveSummaryActionResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable summaries = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } public static Azure.AI.Language.Text.AgeMetadata AgeMetadata(double value = 0, Azure.AI.Language.Text.AgeUnit unit = default(Azure.AI.Language.Text.AgeUnit)) { throw null; } - public static Azure.AI.Language.Text.AnalyzeTextDynamicClassificationResult AnalyzeTextDynamicClassificationResult(Azure.AI.Language.Text.DynamicClassificationResult results = null) { throw null; } - public static Azure.AI.Language.Text.AnalyzeTextEntitiesResult AnalyzeTextEntitiesResult(Azure.AI.Language.Text.EntitiesResult results = null) { throw null; } + public static Azure.AI.Language.Text.AnalyzeTextEntitiesResult AnalyzeTextEntitiesResult(Azure.AI.Language.Text.EntitiesWithMetadataAutoResult results = null) { throw null; } public static Azure.AI.Language.Text.AnalyzeTextEntityLinkingResult AnalyzeTextEntityLinkingResult(Azure.AI.Language.Text.EntityLinkingResult results = null) { throw null; } public static Azure.AI.Language.Text.AnalyzeTextError AnalyzeTextError(Azure.AI.Language.Text.AnalyzeTextErrorCode code = default(Azure.AI.Language.Text.AnalyzeTextErrorCode), string message = null, string target = null, System.Collections.Generic.IEnumerable details = null, Azure.AI.Language.Text.InnerErrorModel innererror = null) { throw null; } public static Azure.AI.Language.Text.AnalyzeTextKeyPhraseResult AnalyzeTextKeyPhraseResult(Azure.AI.Language.Text.KeyPhraseResult results = null) { throw null; } @@ -3165,40 +2928,26 @@ public static partial class TextAnalysisModelFactory public static Azure.AI.Language.Text.ClassificationActionResult ClassificationActionResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable @class = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } public static Azure.AI.Language.Text.ClassificationResult ClassificationResult(string category = null, double confidenceScore = 0) { throw null; } public static Azure.AI.Language.Text.CurrencyMetadata CurrencyMetadata(double value = 0, string unit = null, string iso4217 = null) { throw null; } - public static Azure.AI.Language.Text.CustomAbstractiveSummarizationActionContent CustomAbstractiveSummarizationActionContent(int? sentenceCount = default(int?), Azure.AI.Language.Text.StringIndexType? stringIndexType = default(Azure.AI.Language.Text.StringIndexType?), Azure.AI.Language.Text.SummaryLengthBucket? summaryLength = default(Azure.AI.Language.Text.SummaryLengthBucket?), bool? loggingOptOut = default(bool?), string projectName = null, string deploymentName = null) { throw null; } - public static Azure.AI.Language.Text.CustomAbstractiveSummarizationOperationAction CustomAbstractiveSummarizationOperationAction(string name = null, Azure.AI.Language.Text.CustomAbstractiveSummarizationActionContent actionContent = null) { throw null; } - public static Azure.AI.Language.Text.CustomAbstractiveSummarizationOperationResult CustomAbstractiveSummarizationOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomAbstractiveSummarizationResult results = null) { throw null; } - public static Azure.AI.Language.Text.CustomAbstractiveSummarizationResult CustomAbstractiveSummarizationResult(System.Collections.Generic.IEnumerable documents = null, System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string projectName = null, string deploymentName = null) { throw null; } public static Azure.AI.Language.Text.CustomEntitiesActionContent CustomEntitiesActionContent(bool? loggingOptOut = default(bool?), string projectName = null, string deploymentName = null, Azure.AI.Language.Text.StringIndexType? stringIndexType = default(Azure.AI.Language.Text.StringIndexType?)) { throw null; } - public static Azure.AI.Language.Text.CustomEntitiesActionResult CustomEntitiesActionResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string projectName = null, string deploymentName = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } - public static Azure.AI.Language.Text.CustomEntityRecognitionOperationResult CustomEntityRecognitionOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomEntitiesActionResult results = null) { throw null; } - public static Azure.AI.Language.Text.CustomHealthcareActionContent CustomHealthcareActionContent(bool? loggingOptOut = default(bool?), string projectName = null, string deploymentName = null, Azure.AI.Language.Text.StringIndexType? stringIndexType = default(Azure.AI.Language.Text.StringIndexType?)) { throw null; } - public static Azure.AI.Language.Text.CustomHealthcareActionResult CustomHealthcareActionResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable entities = null, System.Collections.Generic.IEnumerable relations = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } - public static Azure.AI.Language.Text.CustomHealthcareEntity CustomHealthcareEntity(string text = null, Azure.AI.Language.Text.HealthcareEntityCategory category = default(Azure.AI.Language.Text.HealthcareEntityCategory), string subcategory = null, int offset = 0, int length = 0, double confidenceScore = 0, Azure.AI.Language.Text.HealthcareAssertion assertion = null, string name = null, System.Collections.Generic.IEnumerable links = null, System.Collections.Generic.IEnumerable entityComponentInformation = null) { throw null; } - public static Azure.AI.Language.Text.CustomHealthcareOperationResult CustomHealthcareOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomHealthcareResult results = null) { throw null; } - public static Azure.AI.Language.Text.CustomHealthcareResult CustomHealthcareResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string projectName = null, string deploymentName = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } - public static Azure.AI.Language.Text.CustomLabelClassificationActionResult CustomLabelClassificationActionResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string projectName = null, string deploymentName = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } + public static Azure.AI.Language.Text.CustomEntitiesResult CustomEntitiesResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string projectName = null, string deploymentName = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } + public static Azure.AI.Language.Text.CustomEntityActionResult CustomEntityActionResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable entities = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } + public static Azure.AI.Language.Text.CustomEntityRecognitionOperationResult CustomEntityRecognitionOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomEntitiesResult results = null) { throw null; } + public static Azure.AI.Language.Text.CustomLabelClassificationResult CustomLabelClassificationResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string projectName = null, string deploymentName = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } public static Azure.AI.Language.Text.CustomMultiLabelClassificationActionContent CustomMultiLabelClassificationActionContent(bool? loggingOptOut = default(bool?), string projectName = null, string deploymentName = null) { throw null; } - public static Azure.AI.Language.Text.CustomMultiLabelClassificationOperationResult CustomMultiLabelClassificationOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomLabelClassificationActionResult results = null) { throw null; } - public static Azure.AI.Language.Text.CustomSentenceSentiment CustomSentenceSentiment(string text = null, Azure.AI.Language.Text.SentenceSentimentValue sentiment = Azure.AI.Language.Text.SentenceSentimentValue.Positive, Azure.AI.Language.Text.SentimentConfidenceScores confidenceScores = null, int offset = 0, int length = 0) { throw null; } - public static Azure.AI.Language.Text.CustomSentimentAnalysisActionContent CustomSentimentAnalysisActionContent(bool? loggingOptOut = default(bool?), string projectName = null, string deploymentName = null, Azure.AI.Language.Text.StringIndexType? stringIndexType = default(Azure.AI.Language.Text.StringIndexType?)) { throw null; } - public static Azure.AI.Language.Text.CustomSentimentAnalysisOperationResult CustomSentimentAnalysisOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomSentimentAnalysisResult results = null) { throw null; } - public static Azure.AI.Language.Text.CustomSentimentAnalysisResult CustomSentimentAnalysisResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string projectName = null, string deploymentName = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } - public static Azure.AI.Language.Text.CustomSentimentAnalysisResultDocument CustomSentimentAnalysisResultDocument(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, Azure.AI.Language.Text.DocumentSentiment sentiment = Azure.AI.Language.Text.DocumentSentiment.Positive, Azure.AI.Language.Text.SentimentConfidenceScores confidenceScores = null, System.Collections.Generic.IEnumerable sentences = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } + public static Azure.AI.Language.Text.CustomMultiLabelClassificationOperationResult CustomMultiLabelClassificationOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomLabelClassificationResult results = null) { throw null; } public static Azure.AI.Language.Text.CustomSingleLabelClassificationActionContent CustomSingleLabelClassificationActionContent(bool? loggingOptOut = default(bool?), string projectName = null, string deploymentName = null) { throw null; } - public static Azure.AI.Language.Text.CustomSingleLabelClassificationOperationResult CustomSingleLabelClassificationOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomLabelClassificationActionResult results = null) { throw null; } + public static Azure.AI.Language.Text.CustomSingleLabelClassificationOperationResult CustomSingleLabelClassificationOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomLabelClassificationResult results = null) { throw null; } public static Azure.AI.Language.Text.DateMetadata DateMetadata(System.Collections.Generic.IEnumerable dates = null) { throw null; } public static Azure.AI.Language.Text.DateTimeMetadata DateTimeMetadata(System.Collections.Generic.IEnumerable dates = null) { throw null; } public static Azure.AI.Language.Text.DateValue DateValue(string timex = null, string value = null, Azure.AI.Language.Text.TemporalModifier? modifier = default(Azure.AI.Language.Text.TemporalModifier?)) { throw null; } - public static Azure.AI.Language.Text.DetectedLanguage DetectedLanguage(string name = null, string iso6391Name = null, double confidenceScore = 0, Azure.AI.Language.Text.ScriptKind? script = default(Azure.AI.Language.Text.ScriptKind?), Azure.AI.Language.Text.ScriptCode? scriptCode = default(Azure.AI.Language.Text.ScriptCode?)) { throw null; } + public static Azure.AI.Language.Text.DetectedLanguage DetectedLanguage(string name = null, string iso6391Name = null, double confidenceScore = 0, Azure.AI.Language.Text.ScriptKind? scriptName = default(Azure.AI.Language.Text.ScriptKind?), Azure.AI.Language.Text.ScriptCode? scriptIso15924Code = default(Azure.AI.Language.Text.ScriptCode?)) { throw null; } public static Azure.AI.Language.Text.DocumentError DocumentError(string id = null, Azure.AI.Language.Text.AnalyzeTextError error = null) { throw null; } public static Azure.AI.Language.Text.DocumentStatistics DocumentStatistics(int charactersCount = 0, int transactionsCount = 0) { throw null; } public static Azure.AI.Language.Text.DocumentWarning DocumentWarning(Azure.AI.Language.Text.WarningCode code = default(Azure.AI.Language.Text.WarningCode), string message = null, string targetRef = null) { throw null; } - public static Azure.AI.Language.Text.DynamicClassificationDocumentResult DynamicClassificationDocumentResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable classifications = null) { throw null; } - public static Azure.AI.Language.Text.DynamicClassificationResult DynamicClassificationResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string modelVersion = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } - public static Azure.AI.Language.Text.EntitiesDocumentResultWithMetadataDetectedLanguage EntitiesDocumentResultWithMetadataDetectedLanguage(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable entities = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } - public static Azure.AI.Language.Text.EntitiesResult EntitiesResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string modelVersion = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } - public static Azure.AI.Language.Text.EntityActionResult EntityActionResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable entities = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } + public static Azure.AI.Language.Text.EntitiesResult EntitiesResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string modelVersion = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } + public static Azure.AI.Language.Text.EntitiesWithMetadataAutoResult EntitiesWithMetadataAutoResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string modelVersion = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } + public static Azure.AI.Language.Text.EntityActionResult EntityActionResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable entities = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } + public static Azure.AI.Language.Text.EntityActionResultWithMetadata EntityActionResultWithMetadata(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable entities = null) { throw null; } public static Azure.AI.Language.Text.EntityLinkingActionResult EntityLinkingActionResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable entities = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } public static Azure.AI.Language.Text.EntityLinkingMatch EntityLinkingMatch(double confidenceScore = 0, string text = null, int offset = 0, int length = 0) { throw null; } public static Azure.AI.Language.Text.EntityLinkingOperationResult EntityLinkingOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.EntityLinkingResult results = null) { throw null; } @@ -3226,20 +2975,18 @@ public static partial class TextAnalysisModelFactory public static Azure.AI.Language.Text.LanguageDetectionDocumentResult LanguageDetectionDocumentResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } public static Azure.AI.Language.Text.LanguageDetectionResult LanguageDetectionResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string modelVersion = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } public static Azure.AI.Language.Text.LanguageInput LanguageInput(string id = null, string text = null, string countryHint = null) { throw null; } - public static Azure.AI.Language.Text.LearnedComponent LearnedComponent(string value = null) { throw null; } public static Azure.AI.Language.Text.LengthMetadata LengthMetadata(double value = 0, Azure.AI.Language.Text.LengthUnit unit = default(Azure.AI.Language.Text.LengthUnit)) { throw null; } public static Azure.AI.Language.Text.LinkedEntity LinkedEntity(string name = null, System.Collections.Generic.IEnumerable matches = null, string language = null, string id = null, string url = null, string dataSource = null, string bingId = null) { throw null; } - public static Azure.AI.Language.Text.ListComponent ListComponent(string value = null) { throw null; } public static Azure.AI.Language.Text.MultiLanguageInput MultiLanguageInput(string id = null, string text = null, string language = null) { throw null; } public static Azure.AI.Language.Text.NamedEntity NamedEntity(string text = null, string category = null, string subcategory = null, int offset = 0, int length = 0, double confidenceScore = 0) { throw null; } public static Azure.AI.Language.Text.NamedEntityWithMetadata NamedEntityWithMetadata(string text = null, string category = null, string subcategory = null, int offset = 0, int length = 0, double confidenceScore = 0, string type = null, System.Collections.Generic.IEnumerable tags = null, Azure.AI.Language.Text.BaseMetadata metadata = null) { throw null; } public static Azure.AI.Language.Text.NumberMetadata NumberMetadata(Azure.AI.Language.Text.NumberKind numberKind = default(Azure.AI.Language.Text.NumberKind), double value = 0) { throw null; } public static Azure.AI.Language.Text.NumericRangeMetadata NumericRangeMetadata(Azure.AI.Language.Text.RangeKind rangeKind = default(Azure.AI.Language.Text.RangeKind), double minimum = 0, double maximum = 0, Azure.AI.Language.Text.RangeInclusivity? rangeInclusivity = default(Azure.AI.Language.Text.RangeInclusivity?)) { throw null; } public static Azure.AI.Language.Text.OrdinalMetadata OrdinalMetadata(string offset = null, Azure.AI.Language.Text.RelativeTo relativeTo = default(Azure.AI.Language.Text.RelativeTo), string value = null) { throw null; } - public static Azure.AI.Language.Text.PiiActionResult PiiActionResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, string redactedText = null, System.Collections.Generic.IEnumerable entities = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } + public static Azure.AI.Language.Text.PiiActionResult PiiActionResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, string redactedText = null, System.Collections.Generic.IEnumerable entities = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } + public static Azure.AI.Language.Text.PiiEntity PiiEntity(string text = null, string category = null, string subcategory = null, int offset = 0, int length = 0, double confidenceScore = 0, string type = null, System.Collections.Generic.IEnumerable tags = null, string mask = null, int? maskOffset = default(int?), int? maskLength = default(int?)) { throw null; } public static Azure.AI.Language.Text.PiiEntityRecognitionOperationResult PiiEntityRecognitionOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.PiiResult results = null) { throw null; } public static Azure.AI.Language.Text.PiiResult PiiResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string modelVersion = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } - public static Azure.AI.Language.Text.PrebuiltComponent PrebuiltComponent(string value = null) { throw null; } public static Azure.AI.Language.Text.RequestStatistics RequestStatistics(int documentsCount = 0, int validDocumentsCount = 0, int erroneousDocumentsCount = 0, long transactionsCount = (long)0) { throw null; } public static Azure.AI.Language.Text.SentenceAssessment SentenceAssessment(Azure.AI.Language.Text.TokenSentiment sentiment = Azure.AI.Language.Text.TokenSentiment.Positive, Azure.AI.Language.Text.TargetConfidenceScoreLabel confidenceScores = null, int offset = 0, int length = 0, string text = null, bool isNegated = false) { throw null; } public static Azure.AI.Language.Text.SentenceSentiment SentenceSentiment(string text = null, Azure.AI.Language.Text.SentenceSentimentValue sentiment = Azure.AI.Language.Text.SentenceSentimentValue.Positive, Azure.AI.Language.Text.SentimentConfidenceScores confidenceScores = null, int offset = 0, int length = 0, System.Collections.Generic.IEnumerable targets = null, System.Collections.Generic.IEnumerable assessments = null) { throw null; } @@ -3261,18 +3008,6 @@ public static partial class TextAnalysisModelFactory public static Azure.AI.Language.Text.VolumeMetadata VolumeMetadata(double value = 0, Azure.AI.Language.Text.VolumeUnit unit = default(Azure.AI.Language.Text.VolumeUnit)) { throw null; } public static Azure.AI.Language.Text.WeightMetadata WeightMetadata(double value = 0, Azure.AI.Language.Text.WeightUnit unit = default(Azure.AI.Language.Text.WeightUnit)) { throw null; } } - public partial class TextDynamicClassificationInput : Azure.AI.Language.Text.AnalyzeTextInput, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public TextDynamicClassificationInput() { } - public Azure.AI.Language.Text.DynamicClassificationActionContent ActionContent { get { throw null; } set { } } - public Azure.AI.Language.Text.MultiLanguageTextInput TextInput { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.TextDynamicClassificationInput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.TextDynamicClassificationInput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class TextEntityLinkingInput : Azure.AI.Language.Text.AnalyzeTextInput, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public TextEntityLinkingInput() { } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/api/Azure.AI.Language.Text.netstandard2.0.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/api/Azure.AI.Language.Text.netstandard2.0.cs index 7a0901bb70a8..7731d68afe7f 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/api/Azure.AI.Language.Text.netstandard2.0.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/api/Azure.AI.Language.Text.netstandard2.0.cs @@ -3,9 +3,9 @@ namespace Azure.AI.Language.Text public partial class AbstractiveSummarizationActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AbstractiveSummarizationActionContent() { } + public string Instruction { get { throw null; } set { } } public bool? LoggingOptOut { get { throw null; } set { } } public string ModelVersion { get { throw null; } set { } } - public string Query { get { throw null; } set { } } public int? SentenceCount { get { throw null; } set { } } public Azure.AI.Language.Text.StringIndexType? StringIndexType { get { throw null; } set { } } public Azure.AI.Language.Text.SummaryLengthBucket? SummaryLength { get { throw null; } set { } } @@ -122,21 +122,10 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class AnalyzeTextDynamicClassificationResult : Azure.AI.Language.Text.AnalyzeTextResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal AnalyzeTextDynamicClassificationResult() { } - public Azure.AI.Language.Text.DynamicClassificationResult Results { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.AnalyzeTextDynamicClassificationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.AnalyzeTextDynamicClassificationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class AnalyzeTextEntitiesResult : Azure.AI.Language.Text.AnalyzeTextResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AnalyzeTextEntitiesResult() { } - public Azure.AI.Language.Text.EntitiesResult Results { get { throw null; } } + public Azure.AI.Language.Text.EntitiesWithMetadataAutoResult Results { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Text.AnalyzeTextEntitiesResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -363,6 +352,27 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public abstract partial class BaseRedactionPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected BaseRedactionPolicy() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.BaseRedactionPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.BaseRedactionPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CharacterMaskPolicyType : Azure.AI.Language.Text.BaseRedactionPolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CharacterMaskPolicyType() { } + public Azure.AI.Language.Text.RedactionCharacter? RedactionCharacter { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.CharacterMaskPolicyType System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.CharacterMaskPolicyType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ClassificationActionResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ClassificationActionResult() { } @@ -390,24 +400,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ClassificationType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ClassificationType(string value) { throw null; } - public static Azure.AI.Language.Text.ClassificationType Multi { get { throw null; } } - public static Azure.AI.Language.Text.ClassificationType Single { get { throw null; } } - public bool Equals(Azure.AI.Language.Text.ClassificationType other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.AI.Language.Text.ClassificationType left, Azure.AI.Language.Text.ClassificationType right) { throw null; } - public static implicit operator Azure.AI.Language.Text.ClassificationType (string value) { throw null; } - public static bool operator !=(Azure.AI.Language.Text.ClassificationType left, Azure.AI.Language.Text.ClassificationType right) { throw null; } - public override string ToString() { throw null; } - } public partial class CurrencyMetadata : Azure.AI.Language.Text.BaseMetadata, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal CurrencyMetadata() { } @@ -421,59 +413,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class CustomAbstractiveSummarizationActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public CustomAbstractiveSummarizationActionContent(string projectName, string deploymentName) { } - public string DeploymentName { get { throw null; } } - public bool? LoggingOptOut { get { throw null; } set { } } - public string ProjectName { get { throw null; } } - public int? SentenceCount { get { throw null; } set { } } - public Azure.AI.Language.Text.StringIndexType? StringIndexType { get { throw null; } set { } } - public Azure.AI.Language.Text.SummaryLengthBucket? SummaryLength { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomAbstractiveSummarizationActionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomAbstractiveSummarizationActionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomAbstractiveSummarizationOperationAction : Azure.AI.Language.Text.AnalyzeTextOperationAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public CustomAbstractiveSummarizationOperationAction(Azure.AI.Language.Text.CustomAbstractiveSummarizationActionContent actionContent) { } - public Azure.AI.Language.Text.CustomAbstractiveSummarizationActionContent ActionContent { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomAbstractiveSummarizationOperationAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomAbstractiveSummarizationOperationAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomAbstractiveSummarizationOperationResult : Azure.AI.Language.Text.AnalyzeTextOperationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomAbstractiveSummarizationOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Text.TextActionState)) { } - public Azure.AI.Language.Text.CustomAbstractiveSummarizationResult Results { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomAbstractiveSummarizationOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomAbstractiveSummarizationOperationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomAbstractiveSummarizationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomAbstractiveSummarizationResult() { } - public string DeploymentName { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } - public string ProjectName { get { throw null; } } - public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomAbstractiveSummarizationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomAbstractiveSummarizationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class CustomEntitiesActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public CustomEntitiesActionContent(string projectName, string deploymentName) { } @@ -488,21 +427,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class CustomEntitiesActionResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomEntitiesActionResult() { } - public string DeploymentName { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } - public string ProjectName { get { throw null; } } - public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomEntitiesActionResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomEntitiesActionResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class CustomEntitiesOperationAction : Azure.AI.Language.Text.AnalyzeTextOperationAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public CustomEntitiesOperationAction() { } @@ -514,118 +438,61 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class CustomEntityRecognitionOperationResult : Azure.AI.Language.Text.AnalyzeTextOperationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class CustomEntitiesResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal CustomEntityRecognitionOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Text.TextActionState)) { } - public Azure.AI.Language.Text.CustomEntitiesActionResult Results { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomEntityRecognitionOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomEntityRecognitionOperationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomHealthcareActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public CustomHealthcareActionContent(string projectName, string deploymentName) { } + internal CustomEntitiesResult() { } public string DeploymentName { get { throw null; } } - public bool? LoggingOptOut { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } public string ProjectName { get { throw null; } } - public Azure.AI.Language.Text.StringIndexType? StringIndexType { get { throw null; } set { } } + public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareActionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareActionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Language.Text.CustomEntitiesResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.CustomEntitiesResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class CustomHealthcareActionResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class CustomEntityActionResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal CustomHealthcareActionResult() { } + internal CustomEntityActionResult() { } public Azure.AI.Language.Text.DetectedLanguage DetectedLanguage { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } public string Id { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Relations { get { throw null; } } public Azure.AI.Language.Text.DocumentStatistics Statistics { get { throw null; } } public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareActionResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareActionResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomHealthcareEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomHealthcareEntity() { } - public Azure.AI.Language.Text.HealthcareAssertion Assertion { get { throw null; } } - public Azure.AI.Language.Text.HealthcareEntityCategory Category { get { throw null; } } - public double ConfidenceScore { get { throw null; } } - public System.Collections.Generic.IReadOnlyList EntityComponentInformation { get { throw null; } } - public int Length { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Links { get { throw null; } } - public string Name { get { throw null; } } - public int Offset { get { throw null; } } - public string Subcategory { get { throw null; } } - public string Text { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Language.Text.CustomEntityActionResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.CustomEntityActionResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class CustomHealthcareOperationAction : Azure.AI.Language.Text.AnalyzeTextOperationAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public CustomHealthcareOperationAction() { } - public Azure.AI.Language.Text.CustomHealthcareActionContent ActionContent { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareOperationAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareOperationAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomHealthcareOperationResult : Azure.AI.Language.Text.AnalyzeTextOperationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class CustomEntityRecognitionOperationResult : Azure.AI.Language.Text.AnalyzeTextOperationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal CustomHealthcareOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Text.TextActionState)) { } - public Azure.AI.Language.Text.CustomHealthcareResult Results { get { throw null; } } + internal CustomEntityRecognitionOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Text.TextActionState)) { } + public Azure.AI.Language.Text.CustomEntitiesResult Results { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareOperationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomHealthcareResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomHealthcareResult() { } - public string DeploymentName { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } - public string ProjectName { get { throw null; } } - public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomHealthcareResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Language.Text.CustomEntityRecognitionOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.CustomEntityRecognitionOperationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class CustomLabelClassificationActionResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class CustomLabelClassificationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal CustomLabelClassificationActionResult() { } + internal CustomLabelClassificationResult() { } public string DeploymentName { get { throw null; } } public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } public string ProjectName { get { throw null; } } public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomLabelClassificationActionResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomLabelClassificationActionResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Language.Text.CustomLabelClassificationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.CustomLabelClassificationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } public partial class CustomMultiLabelClassificationActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -654,7 +521,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class CustomMultiLabelClassificationOperationResult : Azure.AI.Language.Text.AnalyzeTextOperationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal CustomMultiLabelClassificationOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Text.TextActionState)) { } - public Azure.AI.Language.Text.CustomLabelClassificationActionResult Results { get { throw null; } } + public Azure.AI.Language.Text.CustomLabelClassificationResult Results { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Text.CustomMultiLabelClassificationOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -662,89 +529,6 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class CustomSentenceSentiment : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomSentenceSentiment() { } - public Azure.AI.Language.Text.SentimentConfidenceScores ConfidenceScores { get { throw null; } } - public int Length { get { throw null; } } - public int Offset { get { throw null; } } - public Azure.AI.Language.Text.SentenceSentimentValue Sentiment { get { throw null; } } - public string Text { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentenceSentiment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentenceSentiment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomSentimentAnalysisActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public CustomSentimentAnalysisActionContent(string projectName, string deploymentName) { } - public string DeploymentName { get { throw null; } } - public bool? LoggingOptOut { get { throw null; } set { } } - public string ProjectName { get { throw null; } } - public Azure.AI.Language.Text.StringIndexType? StringIndexType { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisActionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisActionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomSentimentAnalysisOperationAction : Azure.AI.Language.Text.AnalyzeTextOperationAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public CustomSentimentAnalysisOperationAction() { } - public Azure.AI.Language.Text.CustomSentimentAnalysisActionContent ActionContent { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisOperationAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisOperationAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomSentimentAnalysisOperationResult : Azure.AI.Language.Text.AnalyzeTextOperationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomSentimentAnalysisOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Text.TextActionState)) { } - public Azure.AI.Language.Text.CustomSentimentAnalysisResult Results { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisOperationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomSentimentAnalysisResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomSentimentAnalysisResult() { } - public string DeploymentName { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } - public string ProjectName { get { throw null; } } - public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CustomSentimentAnalysisResultDocument : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal CustomSentimentAnalysisResultDocument() { } - public Azure.AI.Language.Text.SentimentConfidenceScores ConfidenceScores { get { throw null; } } - public Azure.AI.Language.Text.DetectedLanguage DetectedLanguage { get { throw null; } } - public string Id { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Sentences { get { throw null; } } - public Azure.AI.Language.Text.DocumentSentiment Sentiment { get { throw null; } } - public Azure.AI.Language.Text.DocumentStatistics Statistics { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisResultDocument System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.CustomSentimentAnalysisResultDocument System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class CustomSingleLabelClassificationActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public CustomSingleLabelClassificationActionContent(string projectName, string deploymentName) { } @@ -772,7 +556,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class CustomSingleLabelClassificationOperationResult : Azure.AI.Language.Text.AnalyzeTextOperationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal CustomSingleLabelClassificationOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Text.TextActionState)) { } - public Azure.AI.Language.Text.CustomLabelClassificationActionResult Results { get { throw null; } } + public Azure.AI.Language.Text.CustomLabelClassificationResult Results { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Text.CustomSingleLabelClassificationOperationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -821,8 +605,8 @@ internal DetectedLanguage() { } public double ConfidenceScore { get { throw null; } } public string Iso6391Name { get { throw null; } } public string Name { get { throw null; } } - public Azure.AI.Language.Text.ScriptKind? Script { get { throw null; } } - public Azure.AI.Language.Text.ScriptCode? ScriptCode { get { throw null; } } + public Azure.AI.Language.Text.ScriptCode? ScriptIso15924Code { get { throw null; } } + public Azure.AI.Language.Text.ScriptKind? ScriptName { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Text.DetectedLanguage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -874,48 +658,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class DynamicClassificationActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public DynamicClassificationActionContent(System.Collections.Generic.IEnumerable categories) { } - public System.Collections.Generic.IList Categories { get { throw null; } } - public Azure.AI.Language.Text.ClassificationType? ClassificationType { get { throw null; } set { } } - public bool? LoggingOptOut { get { throw null; } set { } } - public string ModelVersion { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.DynamicClassificationActionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.DynamicClassificationActionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class DynamicClassificationDocumentResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal DynamicClassificationDocumentResult() { } - public System.Collections.Generic.IReadOnlyList Classifications { get { throw null; } } - public string Id { get { throw null; } } - public Azure.AI.Language.Text.DocumentStatistics Statistics { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.DynamicClassificationDocumentResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.DynamicClassificationDocumentResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class DynamicClassificationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal DynamicClassificationResult() { } - public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } - public string ModelVersion { get { throw null; } } - public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.DynamicClassificationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.DynamicClassificationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class EntitiesActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public EntitiesActionContent() { } @@ -933,21 +675,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class EntitiesDocumentResultWithMetadataDetectedLanguage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal EntitiesDocumentResultWithMetadataDetectedLanguage() { } - public Azure.AI.Language.Text.DetectedLanguage DetectedLanguage { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } - public string Id { get { throw null; } } - public Azure.AI.Language.Text.DocumentStatistics Statistics { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.EntitiesDocumentResultWithMetadataDetectedLanguage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.EntitiesDocumentResultWithMetadataDetectedLanguage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class EntitiesOperationAction : Azure.AI.Language.Text.AnalyzeTextOperationAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public EntitiesOperationAction() { } @@ -962,7 +689,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class EntitiesResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal EntitiesResult() { } - public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } public string ModelVersion { get { throw null; } } public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } @@ -973,11 +700,25 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class EntitiesWithMetadataAutoResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EntitiesWithMetadataAutoResult() { } + public System.Collections.Generic.IReadOnlyList Documents { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public string ModelVersion { get { throw null; } } + public Azure.AI.Language.Text.RequestStatistics Statistics { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.EntitiesWithMetadataAutoResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.EntitiesWithMetadataAutoResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class EntityActionResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal EntityActionResult() { } public Azure.AI.Language.Text.DetectedLanguage DetectedLanguage { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } public string Id { get { throw null; } } public Azure.AI.Language.Text.DocumentStatistics Statistics { get { throw null; } } public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } @@ -988,6 +729,20 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class EntityActionResultWithMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EntityActionResultWithMetadata() { } + public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } + public string Id { get { throw null; } } + public Azure.AI.Language.Text.DocumentStatistics Statistics { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Warnings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.EntityActionResultWithMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.EntityActionResultWithMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct EntityCategory : System.IEquatable { @@ -1056,16 +811,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.AI.Language.Text.EntityCategory left, Azure.AI.Language.Text.EntityCategory right) { throw null; } public override string ToString() { throw null; } } - public abstract partial class EntityComponentInformation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected EntityComponentInformation() { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.EntityComponentInformation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.EntityComponentInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class EntityInferenceConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public EntityInferenceConfig() { } @@ -1155,6 +900,16 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class EntityMaskPolicyType : Azure.AI.Language.Text.BaseRedactionPolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EntityMaskPolicyType() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.EntityMaskPolicyType System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.EntityMaskPolicyType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public abstract partial class EntityOverlapPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected EntityOverlapPolicy() { } @@ -1767,17 +1522,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class LearnedComponent : Azure.AI.Language.Text.EntityComponentInformation, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal LearnedComponent() { } - public string Value { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.LearnedComponent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.LearnedComponent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class LengthMetadata : Azure.AI.Language.Text.BaseMetadata, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal LengthMetadata() { } @@ -1840,17 +1584,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class ListComponent : Azure.AI.Language.Text.EntityComponentInformation, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal ListComponent() { } - public string Value { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.ListComponent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.ListComponent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class MatchLongestEntityPolicyType : Azure.AI.Language.Text.EntityOverlapPolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MatchLongestEntityPolicyType() { } @@ -1920,6 +1653,16 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class NoMaskPolicyType : Azure.AI.Language.Text.BaseRedactionPolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NoMaskPolicyType() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.NoMaskPolicyType System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.NoMaskPolicyType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct NumberKind : System.IEquatable { @@ -1989,7 +1732,7 @@ public PiiActionContent() { } public bool? LoggingOptOut { get { throw null; } set { } } public string ModelVersion { get { throw null; } set { } } public System.Collections.Generic.IList PiiCategories { get { throw null; } } - public Azure.AI.Language.Text.RedactionCharacter? RedactionCharacter { get { throw null; } set { } } + public Azure.AI.Language.Text.BaseRedactionPolicy RedactionPolicy { get { throw null; } set { } } public Azure.AI.Language.Text.StringIndexType? StringIndexType { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Text.PiiActionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2002,7 +1745,7 @@ public partial class PiiActionResult : System.ClientModel.Primitives.IJsonModel< { internal PiiActionResult() { } public Azure.AI.Language.Text.DetectedLanguage DetectedLanguage { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } public string Id { get { throw null; } } public string RedactedText { get { throw null; } } public Azure.AI.Language.Text.DocumentStatistics Statistics { get { throw null; } } @@ -2408,6 +2151,27 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.AI.Language.Text.PiiDomain left, Azure.AI.Language.Text.PiiDomain right) { throw null; } public override string ToString() { throw null; } } + public partial class PiiEntity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PiiEntity() { } + public string Category { get { throw null; } } + public double ConfidenceScore { get { throw null; } } + public int Length { get { throw null; } } + public string Mask { get { throw null; } } + public int? MaskLength { get { throw null; } } + public int? MaskOffset { get { throw null; } } + public int Offset { get { throw null; } } + public string Subcategory { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Tags { get { throw null; } } + public string Text { get { throw null; } } + public string Type { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.PiiEntity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Language.Text.PiiEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class PiiEntityRecognitionOperationResult : Azure.AI.Language.Text.AnalyzeTextOperationResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal PiiEntityRecognitionOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Text.TextActionState)) { } @@ -2444,17 +2208,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class PrebuiltComponent : Azure.AI.Language.Text.EntityComponentInformation, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal PrebuiltComponent() { } - public string Value { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.PrebuiltComponent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.PrebuiltComponent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct RangeInclusivity : System.IEquatable { @@ -2633,6 +2386,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static Azure.AI.Language.Text.ScriptCode Gujr { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Guru { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Hang { get { throw null; } } + public static Azure.AI.Language.Text.ScriptCode Hani { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Hans { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Hant { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Hebr { get { throw null; } } @@ -2642,8 +2396,12 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static Azure.AI.Language.Text.ScriptCode Laoo { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Latn { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Mlym { get { throw null; } } + public static Azure.AI.Language.Text.ScriptCode Mong { get { throw null; } } + public static Azure.AI.Language.Text.ScriptCode Mtei { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Mymr { get { throw null; } } + public static Azure.AI.Language.Text.ScriptCode Olck { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Orya { get { throw null; } } + public static Azure.AI.Language.Text.ScriptCode Shrd { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Sinh { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Taml { get { throw null; } } public static Azure.AI.Language.Text.ScriptCode Telu { get { throw null; } } @@ -2677,6 +2435,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static Azure.AI.Language.Text.ScriptKind Gujarati { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Gurmukhi { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Hangul { get { throw null; } } + public static Azure.AI.Language.Text.ScriptKind HanLiteral { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind HanSimplified { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind HanTraditional { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Hebrew { get { throw null; } } @@ -2686,8 +2445,12 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static Azure.AI.Language.Text.ScriptKind Lao { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Latin { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Malayalam { get { throw null; } } + public static Azure.AI.Language.Text.ScriptKind Meitei { get { throw null; } } + public static Azure.AI.Language.Text.ScriptKind Mongolian { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Myanmar { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Odia { get { throw null; } } + public static Azure.AI.Language.Text.ScriptKind Santali { get { throw null; } } + public static Azure.AI.Language.Text.ScriptKind Sharada { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Sinhala { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Tamil { get { throw null; } } public static Azure.AI.Language.Text.ScriptKind Telugu { get { throw null; } } @@ -3136,12 +2899,13 @@ public static partial class TextAnalysisClientBuilderExtensions } public partial class TextAnalysisClientOptions : Azure.Core.ClientOptions { - public TextAnalysisClientOptions(Azure.AI.Language.Text.TextAnalysisClientOptions.ServiceVersion version = Azure.AI.Language.Text.TextAnalysisClientOptions.ServiceVersion.V2023_11_15_Preview) { } + public TextAnalysisClientOptions(Azure.AI.Language.Text.TextAnalysisClientOptions.ServiceVersion version = Azure.AI.Language.Text.TextAnalysisClientOptions.ServiceVersion.V2024_11_15_Preview) { } public enum ServiceVersion { V2022_05_01 = 1, V2023_04_01 = 2, - V2023_11_15_Preview = 3, + V2024_11_01 = 3, + V2024_11_15_Preview = 4, } } public static partial class TextAnalysisModelFactory @@ -3151,8 +2915,7 @@ public static partial class TextAnalysisModelFactory public static Azure.AI.Language.Text.AbstractiveSummary AbstractiveSummary(string text = null, System.Collections.Generic.IEnumerable contexts = null) { throw null; } public static Azure.AI.Language.Text.AbstractiveSummaryActionResult AbstractiveSummaryActionResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable summaries = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } public static Azure.AI.Language.Text.AgeMetadata AgeMetadata(double value = 0, Azure.AI.Language.Text.AgeUnit unit = default(Azure.AI.Language.Text.AgeUnit)) { throw null; } - public static Azure.AI.Language.Text.AnalyzeTextDynamicClassificationResult AnalyzeTextDynamicClassificationResult(Azure.AI.Language.Text.DynamicClassificationResult results = null) { throw null; } - public static Azure.AI.Language.Text.AnalyzeTextEntitiesResult AnalyzeTextEntitiesResult(Azure.AI.Language.Text.EntitiesResult results = null) { throw null; } + public static Azure.AI.Language.Text.AnalyzeTextEntitiesResult AnalyzeTextEntitiesResult(Azure.AI.Language.Text.EntitiesWithMetadataAutoResult results = null) { throw null; } public static Azure.AI.Language.Text.AnalyzeTextEntityLinkingResult AnalyzeTextEntityLinkingResult(Azure.AI.Language.Text.EntityLinkingResult results = null) { throw null; } public static Azure.AI.Language.Text.AnalyzeTextError AnalyzeTextError(Azure.AI.Language.Text.AnalyzeTextErrorCode code = default(Azure.AI.Language.Text.AnalyzeTextErrorCode), string message = null, string target = null, System.Collections.Generic.IEnumerable details = null, Azure.AI.Language.Text.InnerErrorModel innererror = null) { throw null; } public static Azure.AI.Language.Text.AnalyzeTextKeyPhraseResult AnalyzeTextKeyPhraseResult(Azure.AI.Language.Text.KeyPhraseResult results = null) { throw null; } @@ -3165,40 +2928,26 @@ public static partial class TextAnalysisModelFactory public static Azure.AI.Language.Text.ClassificationActionResult ClassificationActionResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable @class = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } public static Azure.AI.Language.Text.ClassificationResult ClassificationResult(string category = null, double confidenceScore = 0) { throw null; } public static Azure.AI.Language.Text.CurrencyMetadata CurrencyMetadata(double value = 0, string unit = null, string iso4217 = null) { throw null; } - public static Azure.AI.Language.Text.CustomAbstractiveSummarizationActionContent CustomAbstractiveSummarizationActionContent(int? sentenceCount = default(int?), Azure.AI.Language.Text.StringIndexType? stringIndexType = default(Azure.AI.Language.Text.StringIndexType?), Azure.AI.Language.Text.SummaryLengthBucket? summaryLength = default(Azure.AI.Language.Text.SummaryLengthBucket?), bool? loggingOptOut = default(bool?), string projectName = null, string deploymentName = null) { throw null; } - public static Azure.AI.Language.Text.CustomAbstractiveSummarizationOperationAction CustomAbstractiveSummarizationOperationAction(string name = null, Azure.AI.Language.Text.CustomAbstractiveSummarizationActionContent actionContent = null) { throw null; } - public static Azure.AI.Language.Text.CustomAbstractiveSummarizationOperationResult CustomAbstractiveSummarizationOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomAbstractiveSummarizationResult results = null) { throw null; } - public static Azure.AI.Language.Text.CustomAbstractiveSummarizationResult CustomAbstractiveSummarizationResult(System.Collections.Generic.IEnumerable documents = null, System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string projectName = null, string deploymentName = null) { throw null; } public static Azure.AI.Language.Text.CustomEntitiesActionContent CustomEntitiesActionContent(bool? loggingOptOut = default(bool?), string projectName = null, string deploymentName = null, Azure.AI.Language.Text.StringIndexType? stringIndexType = default(Azure.AI.Language.Text.StringIndexType?)) { throw null; } - public static Azure.AI.Language.Text.CustomEntitiesActionResult CustomEntitiesActionResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string projectName = null, string deploymentName = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } - public static Azure.AI.Language.Text.CustomEntityRecognitionOperationResult CustomEntityRecognitionOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomEntitiesActionResult results = null) { throw null; } - public static Azure.AI.Language.Text.CustomHealthcareActionContent CustomHealthcareActionContent(bool? loggingOptOut = default(bool?), string projectName = null, string deploymentName = null, Azure.AI.Language.Text.StringIndexType? stringIndexType = default(Azure.AI.Language.Text.StringIndexType?)) { throw null; } - public static Azure.AI.Language.Text.CustomHealthcareActionResult CustomHealthcareActionResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable entities = null, System.Collections.Generic.IEnumerable relations = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } - public static Azure.AI.Language.Text.CustomHealthcareEntity CustomHealthcareEntity(string text = null, Azure.AI.Language.Text.HealthcareEntityCategory category = default(Azure.AI.Language.Text.HealthcareEntityCategory), string subcategory = null, int offset = 0, int length = 0, double confidenceScore = 0, Azure.AI.Language.Text.HealthcareAssertion assertion = null, string name = null, System.Collections.Generic.IEnumerable links = null, System.Collections.Generic.IEnumerable entityComponentInformation = null) { throw null; } - public static Azure.AI.Language.Text.CustomHealthcareOperationResult CustomHealthcareOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomHealthcareResult results = null) { throw null; } - public static Azure.AI.Language.Text.CustomHealthcareResult CustomHealthcareResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string projectName = null, string deploymentName = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } - public static Azure.AI.Language.Text.CustomLabelClassificationActionResult CustomLabelClassificationActionResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string projectName = null, string deploymentName = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } + public static Azure.AI.Language.Text.CustomEntitiesResult CustomEntitiesResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string projectName = null, string deploymentName = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } + public static Azure.AI.Language.Text.CustomEntityActionResult CustomEntityActionResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable entities = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } + public static Azure.AI.Language.Text.CustomEntityRecognitionOperationResult CustomEntityRecognitionOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomEntitiesResult results = null) { throw null; } + public static Azure.AI.Language.Text.CustomLabelClassificationResult CustomLabelClassificationResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string projectName = null, string deploymentName = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } public static Azure.AI.Language.Text.CustomMultiLabelClassificationActionContent CustomMultiLabelClassificationActionContent(bool? loggingOptOut = default(bool?), string projectName = null, string deploymentName = null) { throw null; } - public static Azure.AI.Language.Text.CustomMultiLabelClassificationOperationResult CustomMultiLabelClassificationOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomLabelClassificationActionResult results = null) { throw null; } - public static Azure.AI.Language.Text.CustomSentenceSentiment CustomSentenceSentiment(string text = null, Azure.AI.Language.Text.SentenceSentimentValue sentiment = Azure.AI.Language.Text.SentenceSentimentValue.Positive, Azure.AI.Language.Text.SentimentConfidenceScores confidenceScores = null, int offset = 0, int length = 0) { throw null; } - public static Azure.AI.Language.Text.CustomSentimentAnalysisActionContent CustomSentimentAnalysisActionContent(bool? loggingOptOut = default(bool?), string projectName = null, string deploymentName = null, Azure.AI.Language.Text.StringIndexType? stringIndexType = default(Azure.AI.Language.Text.StringIndexType?)) { throw null; } - public static Azure.AI.Language.Text.CustomSentimentAnalysisOperationResult CustomSentimentAnalysisOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomSentimentAnalysisResult results = null) { throw null; } - public static Azure.AI.Language.Text.CustomSentimentAnalysisResult CustomSentimentAnalysisResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string projectName = null, string deploymentName = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } - public static Azure.AI.Language.Text.CustomSentimentAnalysisResultDocument CustomSentimentAnalysisResultDocument(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, Azure.AI.Language.Text.DocumentSentiment sentiment = Azure.AI.Language.Text.DocumentSentiment.Positive, Azure.AI.Language.Text.SentimentConfidenceScores confidenceScores = null, System.Collections.Generic.IEnumerable sentences = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } + public static Azure.AI.Language.Text.CustomMultiLabelClassificationOperationResult CustomMultiLabelClassificationOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomLabelClassificationResult results = null) { throw null; } public static Azure.AI.Language.Text.CustomSingleLabelClassificationActionContent CustomSingleLabelClassificationActionContent(bool? loggingOptOut = default(bool?), string projectName = null, string deploymentName = null) { throw null; } - public static Azure.AI.Language.Text.CustomSingleLabelClassificationOperationResult CustomSingleLabelClassificationOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomLabelClassificationActionResult results = null) { throw null; } + public static Azure.AI.Language.Text.CustomSingleLabelClassificationOperationResult CustomSingleLabelClassificationOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.CustomLabelClassificationResult results = null) { throw null; } public static Azure.AI.Language.Text.DateMetadata DateMetadata(System.Collections.Generic.IEnumerable dates = null) { throw null; } public static Azure.AI.Language.Text.DateTimeMetadata DateTimeMetadata(System.Collections.Generic.IEnumerable dates = null) { throw null; } public static Azure.AI.Language.Text.DateValue DateValue(string timex = null, string value = null, Azure.AI.Language.Text.TemporalModifier? modifier = default(Azure.AI.Language.Text.TemporalModifier?)) { throw null; } - public static Azure.AI.Language.Text.DetectedLanguage DetectedLanguage(string name = null, string iso6391Name = null, double confidenceScore = 0, Azure.AI.Language.Text.ScriptKind? script = default(Azure.AI.Language.Text.ScriptKind?), Azure.AI.Language.Text.ScriptCode? scriptCode = default(Azure.AI.Language.Text.ScriptCode?)) { throw null; } + public static Azure.AI.Language.Text.DetectedLanguage DetectedLanguage(string name = null, string iso6391Name = null, double confidenceScore = 0, Azure.AI.Language.Text.ScriptKind? scriptName = default(Azure.AI.Language.Text.ScriptKind?), Azure.AI.Language.Text.ScriptCode? scriptIso15924Code = default(Azure.AI.Language.Text.ScriptCode?)) { throw null; } public static Azure.AI.Language.Text.DocumentError DocumentError(string id = null, Azure.AI.Language.Text.AnalyzeTextError error = null) { throw null; } public static Azure.AI.Language.Text.DocumentStatistics DocumentStatistics(int charactersCount = 0, int transactionsCount = 0) { throw null; } public static Azure.AI.Language.Text.DocumentWarning DocumentWarning(Azure.AI.Language.Text.WarningCode code = default(Azure.AI.Language.Text.WarningCode), string message = null, string targetRef = null) { throw null; } - public static Azure.AI.Language.Text.DynamicClassificationDocumentResult DynamicClassificationDocumentResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable classifications = null) { throw null; } - public static Azure.AI.Language.Text.DynamicClassificationResult DynamicClassificationResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string modelVersion = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } - public static Azure.AI.Language.Text.EntitiesDocumentResultWithMetadataDetectedLanguage EntitiesDocumentResultWithMetadataDetectedLanguage(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable entities = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } - public static Azure.AI.Language.Text.EntitiesResult EntitiesResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string modelVersion = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } - public static Azure.AI.Language.Text.EntityActionResult EntityActionResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable entities = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } + public static Azure.AI.Language.Text.EntitiesResult EntitiesResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string modelVersion = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } + public static Azure.AI.Language.Text.EntitiesWithMetadataAutoResult EntitiesWithMetadataAutoResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string modelVersion = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } + public static Azure.AI.Language.Text.EntityActionResult EntityActionResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable entities = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } + public static Azure.AI.Language.Text.EntityActionResultWithMetadata EntityActionResultWithMetadata(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable entities = null) { throw null; } public static Azure.AI.Language.Text.EntityLinkingActionResult EntityLinkingActionResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, System.Collections.Generic.IEnumerable entities = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } public static Azure.AI.Language.Text.EntityLinkingMatch EntityLinkingMatch(double confidenceScore = 0, string text = null, int offset = 0, int length = 0) { throw null; } public static Azure.AI.Language.Text.EntityLinkingOperationResult EntityLinkingOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.EntityLinkingResult results = null) { throw null; } @@ -3226,20 +2975,18 @@ public static partial class TextAnalysisModelFactory public static Azure.AI.Language.Text.LanguageDetectionDocumentResult LanguageDetectionDocumentResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } public static Azure.AI.Language.Text.LanguageDetectionResult LanguageDetectionResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string modelVersion = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } public static Azure.AI.Language.Text.LanguageInput LanguageInput(string id = null, string text = null, string countryHint = null) { throw null; } - public static Azure.AI.Language.Text.LearnedComponent LearnedComponent(string value = null) { throw null; } public static Azure.AI.Language.Text.LengthMetadata LengthMetadata(double value = 0, Azure.AI.Language.Text.LengthUnit unit = default(Azure.AI.Language.Text.LengthUnit)) { throw null; } public static Azure.AI.Language.Text.LinkedEntity LinkedEntity(string name = null, System.Collections.Generic.IEnumerable matches = null, string language = null, string id = null, string url = null, string dataSource = null, string bingId = null) { throw null; } - public static Azure.AI.Language.Text.ListComponent ListComponent(string value = null) { throw null; } public static Azure.AI.Language.Text.MultiLanguageInput MultiLanguageInput(string id = null, string text = null, string language = null) { throw null; } public static Azure.AI.Language.Text.NamedEntity NamedEntity(string text = null, string category = null, string subcategory = null, int offset = 0, int length = 0, double confidenceScore = 0) { throw null; } public static Azure.AI.Language.Text.NamedEntityWithMetadata NamedEntityWithMetadata(string text = null, string category = null, string subcategory = null, int offset = 0, int length = 0, double confidenceScore = 0, string type = null, System.Collections.Generic.IEnumerable tags = null, Azure.AI.Language.Text.BaseMetadata metadata = null) { throw null; } public static Azure.AI.Language.Text.NumberMetadata NumberMetadata(Azure.AI.Language.Text.NumberKind numberKind = default(Azure.AI.Language.Text.NumberKind), double value = 0) { throw null; } public static Azure.AI.Language.Text.NumericRangeMetadata NumericRangeMetadata(Azure.AI.Language.Text.RangeKind rangeKind = default(Azure.AI.Language.Text.RangeKind), double minimum = 0, double maximum = 0, Azure.AI.Language.Text.RangeInclusivity? rangeInclusivity = default(Azure.AI.Language.Text.RangeInclusivity?)) { throw null; } public static Azure.AI.Language.Text.OrdinalMetadata OrdinalMetadata(string offset = null, Azure.AI.Language.Text.RelativeTo relativeTo = default(Azure.AI.Language.Text.RelativeTo), string value = null) { throw null; } - public static Azure.AI.Language.Text.PiiActionResult PiiActionResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, string redactedText = null, System.Collections.Generic.IEnumerable entities = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } + public static Azure.AI.Language.Text.PiiActionResult PiiActionResult(string id = null, System.Collections.Generic.IEnumerable warnings = null, Azure.AI.Language.Text.DocumentStatistics statistics = null, string redactedText = null, System.Collections.Generic.IEnumerable entities = null, Azure.AI.Language.Text.DetectedLanguage detectedLanguage = null) { throw null; } + public static Azure.AI.Language.Text.PiiEntity PiiEntity(string text = null, string category = null, string subcategory = null, int offset = 0, int length = 0, double confidenceScore = 0, string type = null, System.Collections.Generic.IEnumerable tags = null, string mask = null, int? maskOffset = default(int?), int? maskLength = default(int?)) { throw null; } public static Azure.AI.Language.Text.PiiEntityRecognitionOperationResult PiiEntityRecognitionOperationResult(System.DateTimeOffset lastUpdateDateTime = default(System.DateTimeOffset), Azure.AI.Language.Text.TextActionState status = default(Azure.AI.Language.Text.TextActionState), string name = null, Azure.AI.Language.Text.PiiResult results = null) { throw null; } public static Azure.AI.Language.Text.PiiResult PiiResult(System.Collections.Generic.IEnumerable errors = null, Azure.AI.Language.Text.RequestStatistics statistics = null, string modelVersion = null, System.Collections.Generic.IEnumerable documents = null) { throw null; } - public static Azure.AI.Language.Text.PrebuiltComponent PrebuiltComponent(string value = null) { throw null; } public static Azure.AI.Language.Text.RequestStatistics RequestStatistics(int documentsCount = 0, int validDocumentsCount = 0, int erroneousDocumentsCount = 0, long transactionsCount = (long)0) { throw null; } public static Azure.AI.Language.Text.SentenceAssessment SentenceAssessment(Azure.AI.Language.Text.TokenSentiment sentiment = Azure.AI.Language.Text.TokenSentiment.Positive, Azure.AI.Language.Text.TargetConfidenceScoreLabel confidenceScores = null, int offset = 0, int length = 0, string text = null, bool isNegated = false) { throw null; } public static Azure.AI.Language.Text.SentenceSentiment SentenceSentiment(string text = null, Azure.AI.Language.Text.SentenceSentimentValue sentiment = Azure.AI.Language.Text.SentenceSentimentValue.Positive, Azure.AI.Language.Text.SentimentConfidenceScores confidenceScores = null, int offset = 0, int length = 0, System.Collections.Generic.IEnumerable targets = null, System.Collections.Generic.IEnumerable assessments = null) { throw null; } @@ -3261,18 +3008,6 @@ public static partial class TextAnalysisModelFactory public static Azure.AI.Language.Text.VolumeMetadata VolumeMetadata(double value = 0, Azure.AI.Language.Text.VolumeUnit unit = default(Azure.AI.Language.Text.VolumeUnit)) { throw null; } public static Azure.AI.Language.Text.WeightMetadata WeightMetadata(double value = 0, Azure.AI.Language.Text.WeightUnit unit = default(Azure.AI.Language.Text.WeightUnit)) { throw null; } } - public partial class TextDynamicClassificationInput : Azure.AI.Language.Text.AnalyzeTextInput, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public TextDynamicClassificationInput() { } - public Azure.AI.Language.Text.DynamicClassificationActionContent ActionContent { get { throw null; } set { } } - public Azure.AI.Language.Text.MultiLanguageTextInput TextInput { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.TextDynamicClassificationInput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Language.Text.TextDynamicClassificationInput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } public partial class TextEntityLinkingInput : Azure.AI.Language.Text.AnalyzeTextInput, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public TextEntityLinkingInput() { } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AbstractiveSummarizationActionContent.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AbstractiveSummarizationActionContent.Serialization.cs index ae5a8b07f083..2a9e6d143306 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AbstractiveSummarizationActionContent.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AbstractiveSummarizationActionContent.Serialization.cs @@ -59,10 +59,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("summaryLength"u8); writer.WriteStringValue(SummaryLength.Value.ToString()); } - if (Optional.IsDefined(Query)) + if (Optional.IsDefined(Instruction)) { - writer.WritePropertyName("query"u8); - writer.WriteStringValue(Query); + writer.WritePropertyName("instruction"u8); + writer.WriteStringValue(Instruction); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -106,7 +106,7 @@ internal static AbstractiveSummarizationActionContent DeserializeAbstractiveSumm int? sentenceCount = default; StringIndexType? stringIndexType = default; SummaryLengthBucket? summaryLength = default; - string query = default; + string instruction = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -152,9 +152,9 @@ internal static AbstractiveSummarizationActionContent DeserializeAbstractiveSumm summaryLength = new SummaryLengthBucket(property.Value.GetString()); continue; } - if (property.NameEquals("query"u8)) + if (property.NameEquals("instruction"u8)) { - query = property.Value.GetString(); + instruction = property.Value.GetString(); continue; } if (options.Format != "W") @@ -169,7 +169,7 @@ internal static AbstractiveSummarizationActionContent DeserializeAbstractiveSumm sentenceCount, stringIndexType, summaryLength, - query, + instruction, serializedAdditionalRawData); } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AbstractiveSummarizationActionContent.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AbstractiveSummarizationActionContent.cs index 3214056135ad..a6d4cb065674 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AbstractiveSummarizationActionContent.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AbstractiveSummarizationActionContent.cs @@ -56,16 +56,16 @@ public AbstractiveSummarizationActionContent() /// Controls the approximate number of sentences in the output summaries. /// String index type. /// (NOTE: Recommended to use summaryLength over sentenceCount) Controls the approximate length of the output summaries. - /// (Optional) If provided, the query will be used to generate the summary. + /// (Optional) If provided, the query will be used to generate the summary. /// Keeps track of any properties unknown to the library. - internal AbstractiveSummarizationActionContent(bool? loggingOptOut, string modelVersion, int? sentenceCount, StringIndexType? stringIndexType, SummaryLengthBucket? summaryLength, string query, IDictionary serializedAdditionalRawData) + internal AbstractiveSummarizationActionContent(bool? loggingOptOut, string modelVersion, int? sentenceCount, StringIndexType? stringIndexType, SummaryLengthBucket? summaryLength, string instruction, IDictionary serializedAdditionalRawData) { LoggingOptOut = loggingOptOut; ModelVersion = modelVersion; SentenceCount = sentenceCount; StringIndexType = stringIndexType; SummaryLength = summaryLength; - Query = query; + Instruction = instruction; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -80,6 +80,6 @@ internal AbstractiveSummarizationActionContent(bool? loggingOptOut, string model /// (NOTE: Recommended to use summaryLength over sentenceCount) Controls the approximate length of the output summaries. public SummaryLengthBucket? SummaryLength { get; set; } /// (Optional) If provided, the query will be used to generate the summary. - public string Query { get; set; } + public string Instruction { get; set; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextDynamicClassificationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextDynamicClassificationResult.Serialization.cs deleted file mode 100644 index 6ed0d4ba2057..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextDynamicClassificationResult.Serialization.cs +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Language.Text -{ - public partial class AnalyzeTextDynamicClassificationResult : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(AnalyzeTextDynamicClassificationResult)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("results"u8); - writer.WriteObjectValue(Results, options); - } - - AnalyzeTextDynamicClassificationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(AnalyzeTextDynamicClassificationResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAnalyzeTextDynamicClassificationResult(document.RootElement, options); - } - - internal static AnalyzeTextDynamicClassificationResult DeserializeAnalyzeTextDynamicClassificationResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DynamicClassificationResult results = default; - AnalyzeTextResultsKind kind = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("results"u8)) - { - results = DynamicClassificationResult.DeserializeDynamicClassificationResult(property.Value, options); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = new AnalyzeTextResultsKind(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new AnalyzeTextDynamicClassificationResult(kind, serializedAdditionalRawData, results); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(AnalyzeTextDynamicClassificationResult)} does not support writing '{options.Format}' format."); - } - } - - AnalyzeTextDynamicClassificationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeAnalyzeTextDynamicClassificationResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(AnalyzeTextDynamicClassificationResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new AnalyzeTextDynamicClassificationResult FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeAnalyzeTextDynamicClassificationResult(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextDynamicClassificationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextDynamicClassificationResult.cs deleted file mode 100644 index d66c33dadeb5..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextDynamicClassificationResult.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Language.Text -{ - /// Result for Dynamic Classification task. - public partial class AnalyzeTextDynamicClassificationResult : AnalyzeTextResult - { - /// Initializes a new instance of . - /// Results for Dynamic Classification task. - /// is null. - internal AnalyzeTextDynamicClassificationResult(DynamicClassificationResult results) - { - Argument.AssertNotNull(results, nameof(results)); - - Kind = AnalyzeTextResultsKind.DynamicClassificationResults; - Results = results; - } - - /// Initializes a new instance of . - /// The kind of task result. - /// Keeps track of any properties unknown to the library. - /// Results for Dynamic Classification task. - internal AnalyzeTextDynamicClassificationResult(AnalyzeTextResultsKind kind, IDictionary serializedAdditionalRawData, DynamicClassificationResult results) : base(kind, serializedAdditionalRawData) - { - Results = results; - } - - /// Initializes a new instance of for deserialization. - internal AnalyzeTextDynamicClassificationResult() - { - } - - /// Results for Dynamic Classification task. - public DynamicClassificationResult Results { get; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextEntitiesResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextEntitiesResult.Serialization.cs index ad230d1ed166..c52605e55cb0 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextEntitiesResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextEntitiesResult.Serialization.cs @@ -59,7 +59,7 @@ internal static AnalyzeTextEntitiesResult DeserializeAnalyzeTextEntitiesResult(J { return null; } - EntitiesResult results = default; + EntitiesWithMetadataAutoResult results = default; AnalyzeTextResultsKind kind = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -67,7 +67,7 @@ internal static AnalyzeTextEntitiesResult DeserializeAnalyzeTextEntitiesResult(J { if (property.NameEquals("results"u8)) { - results = EntitiesResult.DeserializeEntitiesResult(property.Value, options); + results = EntitiesWithMetadataAutoResult.DeserializeEntitiesWithMetadataAutoResult(property.Value, options); continue; } if (property.NameEquals("kind"u8)) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextEntitiesResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextEntitiesResult.cs index 696dd36427d0..7f710c29b449 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextEntitiesResult.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextEntitiesResult.cs @@ -16,7 +16,7 @@ public partial class AnalyzeTextEntitiesResult : AnalyzeTextResult /// Initializes a new instance of . /// Results for entity recognition. /// is null. - internal AnalyzeTextEntitiesResult(EntitiesResult results) + internal AnalyzeTextEntitiesResult(EntitiesWithMetadataAutoResult results) { Argument.AssertNotNull(results, nameof(results)); @@ -28,7 +28,7 @@ internal AnalyzeTextEntitiesResult(EntitiesResult results) /// The kind of task result. /// Keeps track of any properties unknown to the library. /// Results for entity recognition. - internal AnalyzeTextEntitiesResult(AnalyzeTextResultsKind kind, IDictionary serializedAdditionalRawData, EntitiesResult results) : base(kind, serializedAdditionalRawData) + internal AnalyzeTextEntitiesResult(AnalyzeTextResultsKind kind, IDictionary serializedAdditionalRawData, EntitiesWithMetadataAutoResult results) : base(kind, serializedAdditionalRawData) { Results = results; } @@ -39,6 +39,6 @@ internal AnalyzeTextEntitiesResult() } /// Results for entity recognition. - public EntitiesResult Results { get; } + public EntitiesWithMetadataAutoResult Results { get; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextInput.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextInput.Serialization.cs index bd1955bbbfe7..91995a4e8cc5 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextInput.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextInput.Serialization.cs @@ -77,7 +77,6 @@ internal static AnalyzeTextInput DeserializeAnalyzeTextInput(JsonElement element { switch (discriminator.GetString()) { - case "DynamicClassification": return TextDynamicClassificationInput.DeserializeTextDynamicClassificationInput(element, options); case "EntityLinking": return TextEntityLinkingInput.DeserializeTextEntityLinkingInput(element, options); case "EntityRecognition": return TextEntityRecognitionInput.DeserializeTextEntityRecognitionInput(element, options); case "KeyPhraseExtraction": return TextKeyPhraseExtractionInput.DeserializeTextKeyPhraseExtractionInput(element, options); diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextInput.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextInput.cs index acaec40e815b..79077f47c6be 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextInput.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextInput.cs @@ -13,7 +13,7 @@ namespace Azure.AI.Language.Text /// /// Collection of documents to analyze and a single task to execute. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , and . + /// The available derived classes include , , , , and . /// public abstract partial class AnalyzeTextInput { diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextInputKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextInputKind.cs index 81f50e97dcea..3f682727bfc9 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextInputKind.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextInputKind.cs @@ -28,7 +28,6 @@ public AnalyzeTextInputKind(string value) private const string KeyPhraseExtractionValue = "KeyPhraseExtraction"; private const string LanguageDetectionValue = "LanguageDetection"; private const string EntityLinkingValue = "EntityLinking"; - private const string DynamicClassificationValue = "DynamicClassification"; /// Sentiment analysis task. public static AnalyzeTextInputKind SentimentAnalysis { get; } = new AnalyzeTextInputKind(SentimentAnalysisValue); @@ -42,8 +41,6 @@ public AnalyzeTextInputKind(string value) public static AnalyzeTextInputKind LanguageDetection { get; } = new AnalyzeTextInputKind(LanguageDetectionValue); /// Entity linking task. public static AnalyzeTextInputKind EntityLinking { get; } = new AnalyzeTextInputKind(EntityLinkingValue); - /// Dynamic classification task. - public static AnalyzeTextInputKind DynamicClassification { get; } = new AnalyzeTextInputKind(DynamicClassificationValue); /// Determines if two values are the same. public static bool operator ==(AnalyzeTextInputKind left, AnalyzeTextInputKind right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationAction.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationAction.Serialization.cs index ba2bbe1cfe48..11306ae21fa5 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationAction.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationAction.Serialization.cs @@ -83,11 +83,8 @@ internal static AnalyzeTextOperationAction DeserializeAnalyzeTextOperationAction switch (discriminator.GetString()) { case "AbstractiveSummarization": return AbstractiveSummarizationOperationAction.DeserializeAbstractiveSummarizationOperationAction(element, options); - case "CustomAbstractiveSummarization": return CustomAbstractiveSummarizationOperationAction.DeserializeCustomAbstractiveSummarizationOperationAction(element, options); case "CustomEntityRecognition": return CustomEntitiesOperationAction.DeserializeCustomEntitiesOperationAction(element, options); - case "CustomHealthcare": return CustomHealthcareOperationAction.DeserializeCustomHealthcareOperationAction(element, options); case "CustomMultiLabelClassification": return CustomMultiLabelClassificationOperationAction.DeserializeCustomMultiLabelClassificationOperationAction(element, options); - case "CustomSentimentAnalysis": return CustomSentimentAnalysisOperationAction.DeserializeCustomSentimentAnalysisOperationAction(element, options); case "CustomSingleLabelClassification": return CustomSingleLabelClassificationOperationAction.DeserializeCustomSingleLabelClassificationOperationAction(element, options); case "EntityLinking": return EntityLinkingOperationAction.DeserializeEntityLinkingOperationAction(element, options); case "EntityRecognition": return EntitiesOperationAction.DeserializeEntitiesOperationAction(element, options); diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationAction.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationAction.cs index 6e1be87da3a2..b09215865ddc 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationAction.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationAction.cs @@ -13,7 +13,7 @@ namespace Azure.AI.Language.Text /// /// The long running task to be performed by the service on the input documents. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , and . /// public abstract partial class AnalyzeTextOperationAction { diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationActionKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationActionKind.cs index 85f656e28396..b25f35074218 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationActionKind.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationActionKind.cs @@ -33,9 +33,6 @@ public AnalyzeTextOperationActionKind(string value) private const string CustomMultiLabelClassificationValue = "CustomMultiLabelClassification"; private const string ExtractiveSummarizationValue = "ExtractiveSummarization"; private const string AbstractiveSummarizationValue = "AbstractiveSummarization"; - private const string CustomHealthcareValue = "CustomHealthcare"; - private const string CustomSentimentAnalysisValue = "CustomSentimentAnalysis"; - private const string CustomAbstractiveSummarizationValue = "CustomAbstractiveSummarization"; /// Sentiment analysis task. public static AnalyzeTextOperationActionKind SentimentAnalysis { get; } = new AnalyzeTextOperationActionKind(SentimentAnalysisValue); @@ -59,12 +56,6 @@ public AnalyzeTextOperationActionKind(string value) public static AnalyzeTextOperationActionKind ExtractiveSummarization { get; } = new AnalyzeTextOperationActionKind(ExtractiveSummarizationValue); /// Abstractive summarization task. public static AnalyzeTextOperationActionKind AbstractiveSummarization { get; } = new AnalyzeTextOperationActionKind(AbstractiveSummarizationValue); - /// Custom healthcare task. - public static AnalyzeTextOperationActionKind CustomHealthcare { get; } = new AnalyzeTextOperationActionKind(CustomHealthcareValue); - /// Custom sentiment analysis task. - public static AnalyzeTextOperationActionKind CustomSentimentAnalysis { get; } = new AnalyzeTextOperationActionKind(CustomSentimentAnalysisValue); - /// Custom abstractive summarization task. - public static AnalyzeTextOperationActionKind CustomAbstractiveSummarization { get; } = new AnalyzeTextOperationActionKind(CustomAbstractiveSummarizationValue); /// Determines if two values are the same. public static bool operator ==(AnalyzeTextOperationActionKind left, AnalyzeTextOperationActionKind right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationResult.Serialization.cs index 0a1a9c16e038..e03eb73d4ae7 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationResult.Serialization.cs @@ -87,11 +87,8 @@ internal static AnalyzeTextOperationResult DeserializeAnalyzeTextOperationResult switch (discriminator.GetString()) { case "AbstractiveSummarizationLROResults": return AbstractiveSummarizationOperationResult.DeserializeAbstractiveSummarizationOperationResult(element, options); - case "CustomAbstractiveSummarizationLROResults": return CustomAbstractiveSummarizationOperationResult.DeserializeCustomAbstractiveSummarizationOperationResult(element, options); case "CustomEntityRecognitionLROResults": return CustomEntityRecognitionOperationResult.DeserializeCustomEntityRecognitionOperationResult(element, options); - case "CustomHealthcareLROResults": return CustomHealthcareOperationResult.DeserializeCustomHealthcareOperationResult(element, options); case "CustomMultiLabelClassificationLROResults": return CustomMultiLabelClassificationOperationResult.DeserializeCustomMultiLabelClassificationOperationResult(element, options); - case "CustomSentimentAnalysisLROResults": return CustomSentimentAnalysisOperationResult.DeserializeCustomSentimentAnalysisOperationResult(element, options); case "CustomSingleLabelClassificationLROResults": return CustomSingleLabelClassificationOperationResult.DeserializeCustomSingleLabelClassificationOperationResult(element, options); case "EntityLinkingLROResults": return EntityLinkingOperationResult.DeserializeEntityLinkingOperationResult(element, options); case "EntityRecognitionLROResults": return EntityRecognitionOperationResult.DeserializeEntityRecognitionOperationResult(element, options); diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationResult.cs index 260c0b8689a9..223d4a4fcfb4 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationResult.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationResult.cs @@ -13,7 +13,7 @@ namespace Azure.AI.Language.Text /// /// Contains the AnalyzeText long running operation result object. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , and . /// public abstract partial class AnalyzeTextOperationResult { diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationResultsKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationResultsKind.cs index 7af2d7fe0ee2..49cb8df78e55 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationResultsKind.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextOperationResultsKind.cs @@ -33,9 +33,6 @@ public AnalyzeTextOperationResultsKind(string value) private const string CustomMultiLabelClassificationOperationResultsValue = "CustomMultiLabelClassificationLROResults"; private const string ExtractiveSummarizationOperationResultsValue = "ExtractiveSummarizationLROResults"; private const string AbstractiveSummarizationOperationResultsValue = "AbstractiveSummarizationLROResults"; - private const string CustomHealthcareOperationResultsValue = "CustomHealthcareLROResults"; - private const string CustomSentimentAnalysisOperationResultsValue = "CustomSentimentAnalysisLROResults"; - private const string CustomAbstractiveSummarizationOperationResultsValue = "CustomAbstractiveSummarizationLROResults"; /// Sentiment analysis LRO results. public static AnalyzeTextOperationResultsKind SentimentAnalysisOperationResults { get; } = new AnalyzeTextOperationResultsKind(SentimentAnalysisOperationResultsValue); @@ -59,12 +56,6 @@ public AnalyzeTextOperationResultsKind(string value) public static AnalyzeTextOperationResultsKind ExtractiveSummarizationOperationResults { get; } = new AnalyzeTextOperationResultsKind(ExtractiveSummarizationOperationResultsValue); /// Abstractive summarization LRO results. public static AnalyzeTextOperationResultsKind AbstractiveSummarizationOperationResults { get; } = new AnalyzeTextOperationResultsKind(AbstractiveSummarizationOperationResultsValue); - /// Custom healthcare LRO results. - public static AnalyzeTextOperationResultsKind CustomHealthcareOperationResults { get; } = new AnalyzeTextOperationResultsKind(CustomHealthcareOperationResultsValue); - /// Custom sentiment analysis LRO results. - public static AnalyzeTextOperationResultsKind CustomSentimentAnalysisOperationResults { get; } = new AnalyzeTextOperationResultsKind(CustomSentimentAnalysisOperationResultsValue); - /// Custom abstractive summarization LRO results. - public static AnalyzeTextOperationResultsKind CustomAbstractiveSummarizationOperationResults { get; } = new AnalyzeTextOperationResultsKind(CustomAbstractiveSummarizationOperationResultsValue); /// Determines if two values are the same. public static bool operator ==(AnalyzeTextOperationResultsKind left, AnalyzeTextOperationResultsKind right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextResult.Serialization.cs index c9782bac5ffe..cc06435ba0d4 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextResult.Serialization.cs @@ -77,7 +77,6 @@ internal static AnalyzeTextResult DeserializeAnalyzeTextResult(JsonElement eleme { switch (discriminator.GetString()) { - case "DynamicClassificationResults": return AnalyzeTextDynamicClassificationResult.DeserializeAnalyzeTextDynamicClassificationResult(element, options); case "EntityLinkingResults": return AnalyzeTextEntityLinkingResult.DeserializeAnalyzeTextEntityLinkingResult(element, options); case "EntityRecognitionResults": return AnalyzeTextEntitiesResult.DeserializeAnalyzeTextEntitiesResult(element, options); case "KeyPhraseExtractionResults": return AnalyzeTextKeyPhraseResult.DeserializeAnalyzeTextKeyPhraseResult(element, options); diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextResult.cs index 9820a5ccc0f0..0c13cd559411 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextResult.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextResult.cs @@ -13,7 +13,7 @@ namespace Azure.AI.Language.Text /// /// The result object for the analyze task. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , and . + /// The available derived classes include , , , , and . /// public abstract partial class AnalyzeTextResult { diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextResultsKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextResultsKind.cs index e523ba352fd5..da103b0a1646 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextResultsKind.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextResultsKind.cs @@ -28,7 +28,6 @@ public AnalyzeTextResultsKind(string value) private const string KeyPhraseExtractionResultsValue = "KeyPhraseExtractionResults"; private const string LanguageDetectionResultsValue = "LanguageDetectionResults"; private const string EntityLinkingResultsValue = "EntityLinkingResults"; - private const string DynamicClassificationResultsValue = "DynamicClassificationResults"; /// Sentiment analysis results. public static AnalyzeTextResultsKind SentimentAnalysisResults { get; } = new AnalyzeTextResultsKind(SentimentAnalysisResultsValue); @@ -42,8 +41,6 @@ public AnalyzeTextResultsKind(string value) public static AnalyzeTextResultsKind LanguageDetectionResults { get; } = new AnalyzeTextResultsKind(LanguageDetectionResultsValue); /// Entity linking results. public static AnalyzeTextResultsKind EntityLinkingResults { get; } = new AnalyzeTextResultsKind(EntityLinkingResultsValue); - /// Dynamic classification results. - public static AnalyzeTextResultsKind DynamicClassificationResults { get; } = new AnalyzeTextResultsKind(DynamicClassificationResultsValue); /// Determines if two values are the same. public static bool operator ==(AnalyzeTextResultsKind left, AnalyzeTextResultsKind right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextSubmitJobRequest.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextSubmitJobRequest.cs index 52e82a53852c..3bfb637bfc63 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextSubmitJobRequest.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/AnalyzeTextSubmitJobRequest.cs @@ -51,7 +51,7 @@ internal partial class AnalyzeTextSubmitJobRequest /// /// List of tasks to be performed as part of the LRO. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , and . /// /// or is null. internal AnalyzeTextSubmitJobRequest(MultiLanguageTextInput textInput, IEnumerable actions) @@ -69,7 +69,7 @@ internal AnalyzeTextSubmitJobRequest(MultiLanguageTextInput textInput, IEnumerab /// /// List of tasks to be performed as part of the LRO. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , and . /// /// Default language to use for records requesting automatic language detection. /// Keeps track of any properties unknown to the library. @@ -94,7 +94,7 @@ internal AnalyzeTextSubmitJobRequest() /// /// List of tasks to be performed as part of the LRO. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , and . /// public IReadOnlyList Actions { get; } /// Default language to use for records requesting automatic language detection. diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityComponentInformation.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/BaseRedactionPolicy.Serialization.cs similarity index 53% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityComponentInformation.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/BaseRedactionPolicy.Serialization.cs index 38665062d81a..ededd27adadd 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityComponentInformation.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/BaseRedactionPolicy.Serialization.cs @@ -12,12 +12,12 @@ namespace Azure.AI.Language.Text { - [PersistableModelProxy(typeof(UnknownEntityComponentInformation))] - public partial class EntityComponentInformation : IUtf8JsonSerializable, IJsonModel + [PersistableModelProxy(typeof(UnknownBaseRedactionPolicy))] + public partial class BaseRedactionPolicy : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,14 +28,14 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(EntityComponentInformation)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(BaseRedactionPolicy)} does not support writing '{format}' format."); } - writer.WritePropertyName("entityComponentKind"u8); - writer.WriteStringValue(EntityComponentKind.ToString()); + writer.WritePropertyName("policyKind"u8); + writer.WriteStringValue(PolicyKind.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -53,19 +53,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - EntityComponentInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + BaseRedactionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(EntityComponentInformation)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(BaseRedactionPolicy)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeEntityComponentInformation(document.RootElement, options); + return DeserializeBaseRedactionPolicy(document.RootElement, options); } - internal static EntityComponentInformation DeserializeEntityComponentInformation(JsonElement element, ModelReaderWriterOptions options = null) + internal static BaseRedactionPolicy DeserializeBaseRedactionPolicy(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -73,55 +73,55 @@ internal static EntityComponentInformation DeserializeEntityComponentInformation { return null; } - if (element.TryGetProperty("entityComponentKind", out JsonElement discriminator)) + if (element.TryGetProperty("policyKind", out JsonElement discriminator)) { switch (discriminator.GetString()) { - case "LearnedComponent": return LearnedComponent.DeserializeLearnedComponent(element, options); - case "ListComponent": return ListComponent.DeserializeListComponent(element, options); - case "PrebuiltComponent": return PrebuiltComponent.DeserializePrebuiltComponent(element, options); + case "characterMask": return CharacterMaskPolicyType.DeserializeCharacterMaskPolicyType(element, options); + case "entityMask": return EntityMaskPolicyType.DeserializeEntityMaskPolicyType(element, options); + case "noMask": return NoMaskPolicyType.DeserializeNoMaskPolicyType(element, options); } } - return UnknownEntityComponentInformation.DeserializeUnknownEntityComponentInformation(element, options); + return UnknownBaseRedactionPolicy.DeserializeUnknownBaseRedactionPolicy(element, options); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(EntityComponentInformation)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(BaseRedactionPolicy)} does not support writing '{options.Format}' format."); } } - EntityComponentInformation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + BaseRedactionPolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeEntityComponentInformation(document.RootElement, options); + return DeserializeBaseRedactionPolicy(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(EntityComponentInformation)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(BaseRedactionPolicy)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static EntityComponentInformation FromResponse(Response response) + internal static BaseRedactionPolicy FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeEntityComponentInformation(document.RootElement); + return DeserializeBaseRedactionPolicy(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityComponentInformation.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/BaseRedactionPolicy.cs similarity index 59% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityComponentInformation.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/BaseRedactionPolicy.cs index d0faa0838e2c..658e1f9e4705 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityComponentInformation.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/BaseRedactionPolicy.cs @@ -11,11 +11,11 @@ namespace Azure.AI.Language.Text { /// - /// This object contains information of the detected entity components. The possible component types may expand in the future. Parsing code should handle unexpected values gracefully - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . + /// The abstract base class for RedactionPolicy. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . /// - public abstract partial class EntityComponentInformation + public abstract partial class BaseRedactionPolicy { /// /// Keeps track of any properties unknown to the library. @@ -49,21 +49,21 @@ public abstract partial class EntityComponentInformation /// private protected IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - protected EntityComponentInformation() + /// Initializes a new instance of . + protected BaseRedactionPolicy() { } - /// Initializes a new instance of . - /// Kind of entity component. + /// Initializes a new instance of . + /// The entity RedactionPolicy object kind. /// Keeps track of any properties unknown to the library. - internal EntityComponentInformation(EntityComponentKind entityComponentKind, IDictionary serializedAdditionalRawData) + internal BaseRedactionPolicy(RedactionPolicyKind policyKind, IDictionary serializedAdditionalRawData) { - EntityComponentKind = entityComponentKind; + PolicyKind = policyKind; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Kind of entity component. - internal EntityComponentKind EntityComponentKind { get; set; } + /// The entity RedactionPolicy object kind. + internal RedactionPolicyKind PolicyKind { get; set; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PrebuiltComponent.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CharacterMaskPolicyType.Serialization.cs similarity index 53% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PrebuiltComponent.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CharacterMaskPolicyType.Serialization.cs index cdc53f548a18..1d60c67eee05 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PrebuiltComponent.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CharacterMaskPolicyType.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Language.Text { - public partial class PrebuiltComponent : IUtf8JsonSerializable, IJsonModel + public partial class CharacterMaskPolicyType : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,33 +28,33 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite /// The client options for reading and writing models. protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(PrebuiltComponent)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(CharacterMaskPolicyType)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Value)) + if (Optional.IsDefined(RedactionCharacter)) { - writer.WritePropertyName("value"u8); - writer.WriteStringValue(Value); + writer.WritePropertyName("redactionCharacter"u8); + writer.WriteStringValue(RedactionCharacter.Value.ToString()); } } - PrebuiltComponent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + CharacterMaskPolicyType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(PrebuiltComponent)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(CharacterMaskPolicyType)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializePrebuiltComponent(document.RootElement, options); + return DeserializeCharacterMaskPolicyType(document.RootElement, options); } - internal static PrebuiltComponent DeserializePrebuiltComponent(JsonElement element, ModelReaderWriterOptions options = null) + internal static CharacterMaskPolicyType DeserializeCharacterMaskPolicyType(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -62,20 +62,24 @@ internal static PrebuiltComponent DeserializePrebuiltComponent(JsonElement eleme { return null; } - string value = default; - EntityComponentKind entityComponentKind = default; + RedactionCharacter? redactionCharacter = default; + RedactionPolicyKind policyKind = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("value"u8)) + if (property.NameEquals("redactionCharacter"u8)) { - value = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + redactionCharacter = new RedactionCharacter(property.Value.GetString()); continue; } - if (property.NameEquals("entityComponentKind"u8)) + if (property.NameEquals("policyKind"u8)) { - entityComponentKind = new EntityComponentKind(property.Value.GetString()); + policyKind = new RedactionPolicyKind(property.Value.GetString()); continue; } if (options.Format != "W") @@ -84,46 +88,46 @@ internal static PrebuiltComponent DeserializePrebuiltComponent(JsonElement eleme } } serializedAdditionalRawData = rawDataDictionary; - return new PrebuiltComponent(entityComponentKind, serializedAdditionalRawData, value); + return new CharacterMaskPolicyType(policyKind, serializedAdditionalRawData, redactionCharacter); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(PrebuiltComponent)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(CharacterMaskPolicyType)} does not support writing '{options.Format}' format."); } } - PrebuiltComponent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + CharacterMaskPolicyType IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializePrebuiltComponent(document.RootElement, options); + return DeserializeCharacterMaskPolicyType(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(PrebuiltComponent)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(CharacterMaskPolicyType)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new PrebuiltComponent FromResponse(Response response) + internal static new CharacterMaskPolicyType FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializePrebuiltComponent(document.RootElement); + return DeserializeCharacterMaskPolicyType(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CharacterMaskPolicyType.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CharacterMaskPolicyType.cs new file mode 100644 index 000000000000..1b078201bf57 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CharacterMaskPolicyType.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text +{ + /// Represents the policy of redacting with a redaction character. + public partial class CharacterMaskPolicyType : BaseRedactionPolicy + { + /// Initializes a new instance of . + public CharacterMaskPolicyType() + { + PolicyKind = RedactionPolicyKind.CharacterMask; + } + + /// Initializes a new instance of . + /// The entity RedactionPolicy object kind. + /// Keeps track of any properties unknown to the library. + /// Optional parameter to use a Custom Character to be used for redaction in PII responses. Default character will be * as before. We allow specific ascii characters for redaction. + internal CharacterMaskPolicyType(RedactionPolicyKind policyKind, IDictionary serializedAdditionalRawData, RedactionCharacter? redactionCharacter) : base(policyKind, serializedAdditionalRawData) + { + RedactionCharacter = redactionCharacter; + } + + /// Optional parameter to use a Custom Character to be used for redaction in PII responses. Default character will be * as before. We allow specific ascii characters for redaction. + public RedactionCharacter? RedactionCharacter { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ClassificationType.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ClassificationType.cs deleted file mode 100644 index f61a5f789708..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ClassificationType.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Language.Text -{ - /// Specifies either one or multiple categories per document. Defaults to multi classification which may return more than one class for each document. - public readonly partial struct ClassificationType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ClassificationType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string MultiValue = "Multi"; - private const string SingleValue = "Single"; - - /// Multi selection. - public static ClassificationType Multi { get; } = new ClassificationType(MultiValue); - /// Single selection. - public static ClassificationType Single { get; } = new ClassificationType(SingleValue); - /// Determines if two values are the same. - public static bool operator ==(ClassificationType left, ClassificationType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ClassificationType left, ClassificationType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator ClassificationType(string value) => new ClassificationType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ClassificationType other && Equals(other); - /// - public bool Equals(ClassificationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationActionContent.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationActionContent.Serialization.cs deleted file mode 100644 index a4b6b8ff1942..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationActionContent.Serialization.cs +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Language.Text -{ - public partial class CustomAbstractiveSummarizationActionContent : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomAbstractiveSummarizationActionContent)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(SentenceCount)) - { - writer.WritePropertyName("sentenceCount"u8); - writer.WriteNumberValue(SentenceCount.Value); - } - if (Optional.IsDefined(StringIndexType)) - { - writer.WritePropertyName("stringIndexType"u8); - writer.WriteStringValue(StringIndexType.Value.ToString()); - } - if (Optional.IsDefined(SummaryLength)) - { - writer.WritePropertyName("summaryLength"u8); - writer.WriteStringValue(SummaryLength.Value.ToString()); - } - if (Optional.IsDefined(LoggingOptOut)) - { - writer.WritePropertyName("loggingOptOut"u8); - writer.WriteBooleanValue(LoggingOptOut.Value); - } - writer.WritePropertyName("projectName"u8); - writer.WriteStringValue(ProjectName); - writer.WritePropertyName("deploymentName"u8); - writer.WriteStringValue(DeploymentName); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - CustomAbstractiveSummarizationActionContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomAbstractiveSummarizationActionContent)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomAbstractiveSummarizationActionContent(document.RootElement, options); - } - - internal static CustomAbstractiveSummarizationActionContent DeserializeCustomAbstractiveSummarizationActionContent(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - int? sentenceCount = default; - StringIndexType? stringIndexType = default; - SummaryLengthBucket? summaryLength = default; - bool? loggingOptOut = default; - string projectName = default; - string deploymentName = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("sentenceCount"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sentenceCount = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("stringIndexType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - stringIndexType = new StringIndexType(property.Value.GetString()); - continue; - } - if (property.NameEquals("summaryLength"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - summaryLength = new SummaryLengthBucket(property.Value.GetString()); - continue; - } - if (property.NameEquals("loggingOptOut"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - loggingOptOut = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("projectName"u8)) - { - projectName = property.Value.GetString(); - continue; - } - if (property.NameEquals("deploymentName"u8)) - { - deploymentName = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new CustomAbstractiveSummarizationActionContent( - sentenceCount, - stringIndexType, - summaryLength, - loggingOptOut, - projectName, - deploymentName, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(CustomAbstractiveSummarizationActionContent)} does not support writing '{options.Format}' format."); - } - } - - CustomAbstractiveSummarizationActionContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomAbstractiveSummarizationActionContent(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CustomAbstractiveSummarizationActionContent)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static CustomAbstractiveSummarizationActionContent FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomAbstractiveSummarizationActionContent(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationActionContent.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationActionContent.cs deleted file mode 100644 index 25897ca10c5c..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationActionContent.cs +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Language.Text -{ - /// Supported parameters for the Custom Abstractive Summarization task. - public partial class CustomAbstractiveSummarizationActionContent - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// or is null. - public CustomAbstractiveSummarizationActionContent(string projectName, string deploymentName) - { - Argument.AssertNotNull(projectName, nameof(projectName)); - Argument.AssertNotNull(deploymentName, nameof(deploymentName)); - - ProjectName = projectName; - DeploymentName = deploymentName; - } - - /// Initializes a new instance of . - /// Controls the approximate number of sentences in the output summaries. - /// String index type. - /// (NOTE: Recommended to use summaryLength over sentenceCount) Controls the approximate length of the output summaries. - /// logging opt out. - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// Keeps track of any properties unknown to the library. - internal CustomAbstractiveSummarizationActionContent(int? sentenceCount, StringIndexType? stringIndexType, SummaryLengthBucket? summaryLength, bool? loggingOptOut, string projectName, string deploymentName, IDictionary serializedAdditionalRawData) - { - SentenceCount = sentenceCount; - StringIndexType = stringIndexType; - SummaryLength = summaryLength; - LoggingOptOut = loggingOptOut; - ProjectName = projectName; - DeploymentName = deploymentName; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal CustomAbstractiveSummarizationActionContent() - { - } - - /// Controls the approximate number of sentences in the output summaries. - public int? SentenceCount { get; set; } - /// String index type. - public StringIndexType? StringIndexType { get; set; } - /// (NOTE: Recommended to use summaryLength over sentenceCount) Controls the approximate length of the output summaries. - public SummaryLengthBucket? SummaryLength { get; set; } - /// logging opt out. - public bool? LoggingOptOut { get; set; } - /// This field indicates the project name for the model. - public string ProjectName { get; } - /// This field indicates the deployment name for the model. - public string DeploymentName { get; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationOperationAction.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationOperationAction.Serialization.cs deleted file mode 100644 index f82979a4eaca..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationOperationAction.Serialization.cs +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Language.Text -{ - public partial class CustomAbstractiveSummarizationOperationAction : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomAbstractiveSummarizationOperationAction)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("parameters"u8); - writer.WriteObjectValue(ActionContent, options); - } - - CustomAbstractiveSummarizationOperationAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomAbstractiveSummarizationOperationAction)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomAbstractiveSummarizationOperationAction(document.RootElement, options); - } - - internal static CustomAbstractiveSummarizationOperationAction DeserializeCustomAbstractiveSummarizationOperationAction(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - CustomAbstractiveSummarizationActionContent parameters = default; - string taskName = default; - AnalyzeTextOperationActionKind kind = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("parameters"u8)) - { - parameters = CustomAbstractiveSummarizationActionContent.DeserializeCustomAbstractiveSummarizationActionContent(property.Value, options); - continue; - } - if (property.NameEquals("taskName"u8)) - { - taskName = property.Value.GetString(); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = new AnalyzeTextOperationActionKind(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new CustomAbstractiveSummarizationOperationAction(taskName, kind, serializedAdditionalRawData, parameters); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(CustomAbstractiveSummarizationOperationAction)} does not support writing '{options.Format}' format."); - } - } - - CustomAbstractiveSummarizationOperationAction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomAbstractiveSummarizationOperationAction(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CustomAbstractiveSummarizationOperationAction)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new CustomAbstractiveSummarizationOperationAction FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomAbstractiveSummarizationOperationAction(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationOperationAction.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationOperationAction.cs deleted file mode 100644 index 65e6e32a2312..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationOperationAction.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Language.Text -{ - /// An object representing the task definition for an Custom Abstractive Summarization task. - public partial class CustomAbstractiveSummarizationOperationAction : AnalyzeTextOperationAction - { - /// Initializes a new instance of . - /// Parameters for the Custom Abstractive Summarization task. - /// is null. - public CustomAbstractiveSummarizationOperationAction(CustomAbstractiveSummarizationActionContent actionContent) - { - Argument.AssertNotNull(actionContent, nameof(actionContent)); - - Kind = AnalyzeTextOperationActionKind.CustomAbstractiveSummarization; - ActionContent = actionContent; - } - - /// Initializes a new instance of . - /// task name. - /// The kind of task to perform. - /// Keeps track of any properties unknown to the library. - /// Parameters for the Custom Abstractive Summarization task. - internal CustomAbstractiveSummarizationOperationAction(string name, AnalyzeTextOperationActionKind kind, IDictionary serializedAdditionalRawData, CustomAbstractiveSummarizationActionContent actionContent) : base(name, kind, serializedAdditionalRawData) - { - ActionContent = actionContent; - } - - /// Initializes a new instance of for deserialization. - internal CustomAbstractiveSummarizationOperationAction() - { - } - - /// Parameters for the Custom Abstractive Summarization task. - public CustomAbstractiveSummarizationActionContent ActionContent { get; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationOperationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationOperationResult.Serialization.cs deleted file mode 100644 index a174b02dac83..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationOperationResult.Serialization.cs +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Language.Text -{ - public partial class CustomAbstractiveSummarizationOperationResult : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomAbstractiveSummarizationOperationResult)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("results"u8); - writer.WriteObjectValue(Results, options); - } - - CustomAbstractiveSummarizationOperationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomAbstractiveSummarizationOperationResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomAbstractiveSummarizationOperationResult(document.RootElement, options); - } - - internal static CustomAbstractiveSummarizationOperationResult DeserializeCustomAbstractiveSummarizationOperationResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - CustomAbstractiveSummarizationResult results = default; - DateTimeOffset lastUpdateDateTime = default; - TextActionState status = default; - string taskName = default; - AnalyzeTextOperationResultsKind kind = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("results"u8)) - { - results = CustomAbstractiveSummarizationResult.DeserializeCustomAbstractiveSummarizationResult(property.Value, options); - continue; - } - if (property.NameEquals("lastUpdateDateTime"u8)) - { - lastUpdateDateTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("status"u8)) - { - status = new TextActionState(property.Value.GetString()); - continue; - } - if (property.NameEquals("taskName"u8)) - { - taskName = property.Value.GetString(); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = new AnalyzeTextOperationResultsKind(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new CustomAbstractiveSummarizationOperationResult( - lastUpdateDateTime, - status, - taskName, - kind, - serializedAdditionalRawData, - results); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(CustomAbstractiveSummarizationOperationResult)} does not support writing '{options.Format}' format."); - } - } - - CustomAbstractiveSummarizationOperationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomAbstractiveSummarizationOperationResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CustomAbstractiveSummarizationOperationResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new CustomAbstractiveSummarizationOperationResult FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomAbstractiveSummarizationOperationResult(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationOperationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationOperationResult.cs deleted file mode 100644 index 6e882c50176b..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationOperationResult.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Language.Text -{ - /// An object representing the results for an Custom Abstractive Summarization task. - public partial class CustomAbstractiveSummarizationOperationResult : AnalyzeTextOperationResult - { - /// Initializes a new instance of . - /// The last updated time in UTC for the task. - /// The status of the task at the mentioned last update time. - /// Results of the task. - /// is null. - internal CustomAbstractiveSummarizationOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, CustomAbstractiveSummarizationResult results) : base(lastUpdateDateTime, status) - { - Argument.AssertNotNull(results, nameof(results)); - - Kind = AnalyzeTextOperationResultsKind.CustomAbstractiveSummarizationOperationResults; - Results = results; - } - - /// Initializes a new instance of . - /// The last updated time in UTC for the task. - /// The status of the task at the mentioned last update time. - /// task name. - /// Kind of the task. - /// Keeps track of any properties unknown to the library. - /// Results of the task. - internal CustomAbstractiveSummarizationOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, string name, AnalyzeTextOperationResultsKind kind, IDictionary serializedAdditionalRawData, CustomAbstractiveSummarizationResult results) : base(lastUpdateDateTime, status, name, kind, serializedAdditionalRawData) - { - Results = results; - } - - /// Initializes a new instance of for deserialization. - internal CustomAbstractiveSummarizationOperationResult() - { - } - - /// Results of the task. - public CustomAbstractiveSummarizationResult Results { get; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationResult.Serialization.cs deleted file mode 100644 index 5d77cb712f9f..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationResult.Serialization.cs +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Language.Text -{ - public partial class CustomAbstractiveSummarizationResult : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomAbstractiveSummarizationResult)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("documents"u8); - writer.WriteStartArray(); - foreach (var item in Documents) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - writer.WritePropertyName("errors"u8); - writer.WriteStartArray(); - foreach (var item in Errors) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics, options); - } - writer.WritePropertyName("projectName"u8); - writer.WriteStringValue(ProjectName); - writer.WritePropertyName("deploymentName"u8); - writer.WriteStringValue(DeploymentName); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - CustomAbstractiveSummarizationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomAbstractiveSummarizationResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomAbstractiveSummarizationResult(document.RootElement, options); - } - - internal static CustomAbstractiveSummarizationResult DeserializeCustomAbstractiveSummarizationResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList documents = default; - IReadOnlyList errors = default; - RequestStatistics statistics = default; - string projectName = default; - string deploymentName = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("documents"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(AbstractiveSummaryActionResult.DeserializeAbstractiveSummaryActionResult(item, options)); - } - documents = array; - continue; - } - if (property.NameEquals("errors"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DocumentError.DeserializeDocumentError(item, options)); - } - errors = array; - continue; - } - if (property.NameEquals("statistics"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - statistics = RequestStatistics.DeserializeRequestStatistics(property.Value, options); - continue; - } - if (property.NameEquals("projectName"u8)) - { - projectName = property.Value.GetString(); - continue; - } - if (property.NameEquals("deploymentName"u8)) - { - deploymentName = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new CustomAbstractiveSummarizationResult( - documents, - errors, - statistics, - projectName, - deploymentName, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(CustomAbstractiveSummarizationResult)} does not support writing '{options.Format}' format."); - } - } - - CustomAbstractiveSummarizationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomAbstractiveSummarizationResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CustomAbstractiveSummarizationResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static CustomAbstractiveSummarizationResult FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomAbstractiveSummarizationResult(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationResult.cs deleted file mode 100644 index ecd4baccb173..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomAbstractiveSummarizationResult.cs +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Azure.AI.Language.Text -{ - /// An object representing the custom summarization results of each document. - public partial class CustomAbstractiveSummarizationResult - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// Response by document. - /// Errors by document id. - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// , , or is null. - internal CustomAbstractiveSummarizationResult(IEnumerable documents, IEnumerable errors, string projectName, string deploymentName) - { - Argument.AssertNotNull(documents, nameof(documents)); - Argument.AssertNotNull(errors, nameof(errors)); - Argument.AssertNotNull(projectName, nameof(projectName)); - Argument.AssertNotNull(deploymentName, nameof(deploymentName)); - - Documents = documents.ToList(); - Errors = errors.ToList(); - ProjectName = projectName; - DeploymentName = deploymentName; - } - - /// Initializes a new instance of . - /// Response by document. - /// Errors by document id. - /// if showStats=true was specified in the request this field will contain information about the request payload. - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// Keeps track of any properties unknown to the library. - internal CustomAbstractiveSummarizationResult(IReadOnlyList documents, IReadOnlyList errors, RequestStatistics statistics, string projectName, string deploymentName, IDictionary serializedAdditionalRawData) - { - Documents = documents; - Errors = errors; - Statistics = statistics; - ProjectName = projectName; - DeploymentName = deploymentName; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal CustomAbstractiveSummarizationResult() - { - } - - /// Response by document. - public IReadOnlyList Documents { get; } - /// Errors by document id. - public IReadOnlyList Errors { get; } - /// if showStats=true was specified in the request this field will contain information about the request payload. - public RequestStatistics Statistics { get; } - /// This field indicates the project name for the model. - public string ProjectName { get; } - /// This field indicates the deployment name for the model. - public string DeploymentName { get; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntitiesActionResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntitiesActionResult.Serialization.cs deleted file mode 100644 index 663ec166c845..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntitiesActionResult.Serialization.cs +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Language.Text -{ - public partial class CustomEntitiesActionResult : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomEntitiesActionResult)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("errors"u8); - writer.WriteStartArray(); - foreach (var item in Errors) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics, options); - } - writer.WritePropertyName("projectName"u8); - writer.WriteStringValue(ProjectName); - writer.WritePropertyName("deploymentName"u8); - writer.WriteStringValue(DeploymentName); - writer.WritePropertyName("documents"u8); - writer.WriteStartArray(); - foreach (var item in Documents) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - CustomEntitiesActionResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomEntitiesActionResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomEntitiesActionResult(document.RootElement, options); - } - - internal static CustomEntitiesActionResult DeserializeCustomEntitiesActionResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList errors = default; - RequestStatistics statistics = default; - string projectName = default; - string deploymentName = default; - IReadOnlyList documents = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("errors"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DocumentError.DeserializeDocumentError(item, options)); - } - errors = array; - continue; - } - if (property.NameEquals("statistics"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - statistics = RequestStatistics.DeserializeRequestStatistics(property.Value, options); - continue; - } - if (property.NameEquals("projectName"u8)) - { - projectName = property.Value.GetString(); - continue; - } - if (property.NameEquals("deploymentName"u8)) - { - deploymentName = property.Value.GetString(); - continue; - } - if (property.NameEquals("documents"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(EntityActionResult.DeserializeEntityActionResult(item, options)); - } - documents = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new CustomEntitiesActionResult( - errors, - statistics, - projectName, - deploymentName, - documents, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(CustomEntitiesActionResult)} does not support writing '{options.Format}' format."); - } - } - - CustomEntitiesActionResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomEntitiesActionResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CustomEntitiesActionResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static CustomEntitiesActionResult FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomEntitiesActionResult(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntitiesResult.Serialization.cs similarity index 74% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareResult.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntitiesResult.Serialization.cs index 141af207a73a..b19c86ef160d 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntitiesResult.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Language.Text { - public partial class CustomHealthcareResult : IUtf8JsonSerializable, IJsonModel + public partial class CustomEntitiesResult : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomHealthcareResult)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(CustomEntitiesResult)} does not support writing '{format}' format."); } writer.WritePropertyName("errors"u8); @@ -74,19 +74,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - CustomHealthcareResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + CustomEntitiesResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomHealthcareResult)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(CustomEntitiesResult)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomHealthcareResult(document.RootElement, options); + return DeserializeCustomEntitiesResult(document.RootElement, options); } - internal static CustomHealthcareResult DeserializeCustomHealthcareResult(JsonElement element, ModelReaderWriterOptions options = null) + internal static CustomEntitiesResult DeserializeCustomEntitiesResult(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -98,7 +98,7 @@ internal static CustomHealthcareResult DeserializeCustomHealthcareResult(JsonEle RequestStatistics statistics = default; string projectName = default; string deploymentName = default; - IReadOnlyList documents = default; + IReadOnlyList documents = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -134,10 +134,10 @@ internal static CustomHealthcareResult DeserializeCustomHealthcareResult(JsonEle } if (property.NameEquals("documents"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(CustomHealthcareActionResult.DeserializeCustomHealthcareActionResult(item, options)); + array.Add(CustomEntityActionResult.DeserializeCustomEntityActionResult(item, options)); } documents = array; continue; @@ -148,7 +148,7 @@ internal static CustomHealthcareResult DeserializeCustomHealthcareResult(JsonEle } } serializedAdditionalRawData = rawDataDictionary; - return new CustomHealthcareResult( + return new CustomEntitiesResult( errors, statistics, projectName, @@ -157,43 +157,43 @@ internal static CustomHealthcareResult DeserializeCustomHealthcareResult(JsonEle serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(CustomHealthcareResult)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(CustomEntitiesResult)} does not support writing '{options.Format}' format."); } } - CustomHealthcareResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + CustomEntitiesResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomHealthcareResult(document.RootElement, options); + return DeserializeCustomEntitiesResult(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(CustomHealthcareResult)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(CustomEntitiesResult)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static CustomHealthcareResult FromResponse(Response response) + internal static CustomEntitiesResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomHealthcareResult(document.RootElement); + return DeserializeCustomEntitiesResult(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntitiesActionResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntitiesResult.cs similarity index 83% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntitiesActionResult.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntitiesResult.cs index f4c987c06704..dc0de3b496ee 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntitiesActionResult.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntitiesResult.cs @@ -11,8 +11,8 @@ namespace Azure.AI.Language.Text { - /// Contains the list of detected custom entities result for the documents along with detected language. - public partial class CustomEntitiesActionResult + /// Contains the list of detected custom entities result for the documents. + public partial class CustomEntitiesResult { /// /// Keeps track of any properties unknown to the library. @@ -46,13 +46,13 @@ public partial class CustomEntitiesActionResult /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// Initializes a new instance of . /// Errors by document id. /// This field indicates the project name for the model. /// This field indicates the deployment name for the model. - /// Enumeration of the document results with detected language. + /// Enumeration of the document results. /// , , or is null. - internal CustomEntitiesActionResult(IEnumerable errors, string projectName, string deploymentName, IEnumerable documents) + internal CustomEntitiesResult(IEnumerable errors, string projectName, string deploymentName, IEnumerable documents) { Argument.AssertNotNull(errors, nameof(errors)); Argument.AssertNotNull(projectName, nameof(projectName)); @@ -65,14 +65,14 @@ internal CustomEntitiesActionResult(IEnumerable errors, string pr Documents = documents.ToList(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Errors by document id. /// if showStats=true was specified in the request this field will contain information about the request payload. /// This field indicates the project name for the model. /// This field indicates the deployment name for the model. - /// Enumeration of the document results with detected language. + /// Enumeration of the document results. /// Keeps track of any properties unknown to the library. - internal CustomEntitiesActionResult(IReadOnlyList errors, RequestStatistics statistics, string projectName, string deploymentName, IReadOnlyList documents, IDictionary serializedAdditionalRawData) + internal CustomEntitiesResult(IReadOnlyList errors, RequestStatistics statistics, string projectName, string deploymentName, IReadOnlyList documents, IDictionary serializedAdditionalRawData) { Errors = errors; Statistics = statistics; @@ -82,8 +82,8 @@ internal CustomEntitiesActionResult(IReadOnlyList errors, Request _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal CustomEntitiesActionResult() + /// Initializes a new instance of for deserialization. + internal CustomEntitiesResult() { } @@ -95,7 +95,7 @@ internal CustomEntitiesActionResult() public string ProjectName { get; } /// This field indicates the deployment name for the model. public string DeploymentName { get; } - /// Enumeration of the document results with detected language. - public IReadOnlyList Documents { get; } + /// Enumeration of the document results. + public IReadOnlyList Documents { get; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesDocumentResultWithMetadataDetectedLanguage.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntityActionResult.Serialization.cs similarity index 68% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesDocumentResultWithMetadataDetectedLanguage.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntityActionResult.Serialization.cs index 0bb663429fc6..9cc2a86ef683 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesDocumentResultWithMetadataDetectedLanguage.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntityActionResult.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Language.Text { - public partial class EntitiesDocumentResultWithMetadataDetectedLanguage : IUtf8JsonSerializable, IJsonModel + public partial class CustomEntityActionResult : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8Js /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(EntitiesDocumentResultWithMetadataDetectedLanguage)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(CustomEntityActionResult)} does not support writing '{format}' format."); } writer.WritePropertyName("id"u8); @@ -77,19 +77,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - EntitiesDocumentResultWithMetadataDetectedLanguage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + CustomEntityActionResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(EntitiesDocumentResultWithMetadataDetectedLanguage)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(CustomEntityActionResult)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeEntitiesDocumentResultWithMetadataDetectedLanguage(document.RootElement, options); + return DeserializeCustomEntityActionResult(document.RootElement, options); } - internal static EntitiesDocumentResultWithMetadataDetectedLanguage DeserializeEntitiesDocumentResultWithMetadataDetectedLanguage(JsonElement element, ModelReaderWriterOptions options = null) + internal static CustomEntityActionResult DeserializeCustomEntityActionResult(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -100,7 +100,7 @@ internal static EntitiesDocumentResultWithMetadataDetectedLanguage DeserializeEn string id = default; IReadOnlyList warnings = default; DocumentStatistics statistics = default; - IReadOnlyList entities = default; + IReadOnlyList entities = default; DetectedLanguage detectedLanguage = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -132,10 +132,10 @@ internal static EntitiesDocumentResultWithMetadataDetectedLanguage DeserializeEn } if (property.NameEquals("entities"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(NamedEntityWithMetadata.DeserializeNamedEntityWithMetadata(item, options)); + array.Add(NamedEntity.DeserializeNamedEntity(item, options)); } entities = array; continue; @@ -155,7 +155,7 @@ internal static EntitiesDocumentResultWithMetadataDetectedLanguage DeserializeEn } } serializedAdditionalRawData = rawDataDictionary; - return new EntitiesDocumentResultWithMetadataDetectedLanguage( + return new CustomEntityActionResult( id, warnings, statistics, @@ -164,43 +164,43 @@ internal static EntitiesDocumentResultWithMetadataDetectedLanguage DeserializeEn serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(EntitiesDocumentResultWithMetadataDetectedLanguage)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(CustomEntityActionResult)} does not support writing '{options.Format}' format."); } } - EntitiesDocumentResultWithMetadataDetectedLanguage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + CustomEntityActionResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeEntitiesDocumentResultWithMetadataDetectedLanguage(document.RootElement, options); + return DeserializeCustomEntityActionResult(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(EntitiesDocumentResultWithMetadataDetectedLanguage)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(CustomEntityActionResult)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static EntitiesDocumentResultWithMetadataDetectedLanguage FromResponse(Response response) + internal static CustomEntityActionResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeEntitiesDocumentResultWithMetadataDetectedLanguage(document.RootElement); + return DeserializeCustomEntityActionResult(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesDocumentResultWithMetadataDetectedLanguage.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntityActionResult.cs similarity index 78% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesDocumentResultWithMetadataDetectedLanguage.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntityActionResult.cs index 719cd5270faa..719f65a987d5 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesDocumentResultWithMetadataDetectedLanguage.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntityActionResult.cs @@ -11,8 +11,8 @@ namespace Azure.AI.Language.Text { - /// Contains the entity recognition task result for the document with metadata and detected language. - public partial class EntitiesDocumentResultWithMetadataDetectedLanguage + /// Contains the entity recognition task result for the document with detected language. + public partial class CustomEntityActionResult { /// /// Keeps track of any properties unknown to the library. @@ -46,12 +46,12 @@ public partial class EntitiesDocumentResultWithMetadataDetectedLanguage /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// Initializes a new instance of . /// Unique, non-empty document identifier. /// Warnings encountered while processing document. /// Recognized entities in the document. /// , or is null. - internal EntitiesDocumentResultWithMetadataDetectedLanguage(string id, IEnumerable warnings, IEnumerable entities) + internal CustomEntityActionResult(string id, IEnumerable warnings, IEnumerable entities) { Argument.AssertNotNull(id, nameof(id)); Argument.AssertNotNull(warnings, nameof(warnings)); @@ -62,14 +62,14 @@ internal EntitiesDocumentResultWithMetadataDetectedLanguage(string id, IEnumerab Entities = entities.ToList(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Unique, non-empty document identifier. /// Warnings encountered while processing document. /// if showStats=true was specified in the request this field will contain information about the document payload. /// Recognized entities in the document. /// If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document. /// Keeps track of any properties unknown to the library. - internal EntitiesDocumentResultWithMetadataDetectedLanguage(string id, IReadOnlyList warnings, DocumentStatistics statistics, IReadOnlyList entities, DetectedLanguage detectedLanguage, IDictionary serializedAdditionalRawData) + internal CustomEntityActionResult(string id, IReadOnlyList warnings, DocumentStatistics statistics, IReadOnlyList entities, DetectedLanguage detectedLanguage, IDictionary serializedAdditionalRawData) { Id = id; Warnings = warnings; @@ -79,8 +79,8 @@ internal EntitiesDocumentResultWithMetadataDetectedLanguage(string id, IReadOnly _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal EntitiesDocumentResultWithMetadataDetectedLanguage() + /// Initializes a new instance of for deserialization. + internal CustomEntityActionResult() { } @@ -91,7 +91,7 @@ internal EntitiesDocumentResultWithMetadataDetectedLanguage() /// if showStats=true was specified in the request this field will contain information about the document payload. public DocumentStatistics Statistics { get; } /// Recognized entities in the document. - public IReadOnlyList Entities { get; } + public IReadOnlyList Entities { get; } /// If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document. public DetectedLanguage DetectedLanguage { get; } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntityRecognitionOperationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntityRecognitionOperationResult.Serialization.cs index 9e4dbbc79eec..d8e7709ca902 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntityRecognitionOperationResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntityRecognitionOperationResult.Serialization.cs @@ -59,7 +59,7 @@ internal static CustomEntityRecognitionOperationResult DeserializeCustomEntityRe { return null; } - CustomEntitiesActionResult results = default; + CustomEntitiesResult results = default; DateTimeOffset lastUpdateDateTime = default; TextActionState status = default; string taskName = default; @@ -70,7 +70,7 @@ internal static CustomEntityRecognitionOperationResult DeserializeCustomEntityRe { if (property.NameEquals("results"u8)) { - results = CustomEntitiesActionResult.DeserializeCustomEntitiesActionResult(property.Value, options); + results = CustomEntitiesResult.DeserializeCustomEntitiesResult(property.Value, options); continue; } if (property.NameEquals("lastUpdateDateTime"u8)) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntityRecognitionOperationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntityRecognitionOperationResult.cs index 6507130692f4..b53830703ffc 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntityRecognitionOperationResult.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomEntityRecognitionOperationResult.cs @@ -18,7 +18,7 @@ public partial class CustomEntityRecognitionOperationResult : AnalyzeTextOperati /// The status of the task at the mentioned last update time. /// List of results. /// is null. - internal CustomEntityRecognitionOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, CustomEntitiesActionResult results) : base(lastUpdateDateTime, status) + internal CustomEntityRecognitionOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, CustomEntitiesResult results) : base(lastUpdateDateTime, status) { Argument.AssertNotNull(results, nameof(results)); @@ -33,7 +33,7 @@ internal CustomEntityRecognitionOperationResult(DateTimeOffset lastUpdateDateTim /// Kind of the task. /// Keeps track of any properties unknown to the library. /// List of results. - internal CustomEntityRecognitionOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, string name, AnalyzeTextOperationResultsKind kind, IDictionary serializedAdditionalRawData, CustomEntitiesActionResult results) : base(lastUpdateDateTime, status, name, kind, serializedAdditionalRawData) + internal CustomEntityRecognitionOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, string name, AnalyzeTextOperationResultsKind kind, IDictionary serializedAdditionalRawData, CustomEntitiesResult results) : base(lastUpdateDateTime, status, name, kind, serializedAdditionalRawData) { Results = results; } @@ -44,6 +44,6 @@ internal CustomEntityRecognitionOperationResult() } /// List of results. - public CustomEntitiesActionResult Results { get; } + public CustomEntitiesResult Results { get; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareActionContent.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareActionContent.Serialization.cs deleted file mode 100644 index 3e92247d7a2d..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareActionContent.Serialization.cs +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Language.Text -{ - public partial class CustomHealthcareActionContent : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomHealthcareActionContent)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(LoggingOptOut)) - { - writer.WritePropertyName("loggingOptOut"u8); - writer.WriteBooleanValue(LoggingOptOut.Value); - } - writer.WritePropertyName("projectName"u8); - writer.WriteStringValue(ProjectName); - writer.WritePropertyName("deploymentName"u8); - writer.WriteStringValue(DeploymentName); - if (Optional.IsDefined(StringIndexType)) - { - writer.WritePropertyName("stringIndexType"u8); - writer.WriteStringValue(StringIndexType.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - CustomHealthcareActionContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomHealthcareActionContent)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomHealthcareActionContent(document.RootElement, options); - } - - internal static CustomHealthcareActionContent DeserializeCustomHealthcareActionContent(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - bool? loggingOptOut = default; - string projectName = default; - string deploymentName = default; - StringIndexType? stringIndexType = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("loggingOptOut"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - loggingOptOut = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("projectName"u8)) - { - projectName = property.Value.GetString(); - continue; - } - if (property.NameEquals("deploymentName"u8)) - { - deploymentName = property.Value.GetString(); - continue; - } - if (property.NameEquals("stringIndexType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - stringIndexType = new StringIndexType(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new CustomHealthcareActionContent(loggingOptOut, projectName, deploymentName, stringIndexType, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(CustomHealthcareActionContent)} does not support writing '{options.Format}' format."); - } - } - - CustomHealthcareActionContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomHealthcareActionContent(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CustomHealthcareActionContent)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static CustomHealthcareActionContent FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomHealthcareActionContent(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareActionContent.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareActionContent.cs deleted file mode 100644 index e2d7f93f3c5f..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareActionContent.cs +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Language.Text -{ - /// Supported parameters for a custom Healthcare task. - public partial class CustomHealthcareActionContent - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// or is null. - public CustomHealthcareActionContent(string projectName, string deploymentName) - { - Argument.AssertNotNull(projectName, nameof(projectName)); - Argument.AssertNotNull(deploymentName, nameof(deploymentName)); - - ProjectName = projectName; - DeploymentName = deploymentName; - } - - /// Initializes a new instance of . - /// logging opt out. - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// Optional parameter to provide the string index type used to interpret string offsets. Defaults to TextElements (Graphemes). - /// Keeps track of any properties unknown to the library. - internal CustomHealthcareActionContent(bool? loggingOptOut, string projectName, string deploymentName, StringIndexType? stringIndexType, IDictionary serializedAdditionalRawData) - { - LoggingOptOut = loggingOptOut; - ProjectName = projectName; - DeploymentName = deploymentName; - StringIndexType = stringIndexType; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal CustomHealthcareActionContent() - { - } - - /// logging opt out. - public bool? LoggingOptOut { get; set; } - /// This field indicates the project name for the model. - public string ProjectName { get; } - /// This field indicates the deployment name for the model. - public string DeploymentName { get; } - /// Optional parameter to provide the string index type used to interpret string offsets. Defaults to TextElements (Graphemes). - public StringIndexType? StringIndexType { get; set; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareActionResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareActionResult.Serialization.cs deleted file mode 100644 index c426dc5dd63d..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareActionResult.Serialization.cs +++ /dev/null @@ -1,233 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Language.Text -{ - public partial class CustomHealthcareActionResult : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomHealthcareActionResult)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("warnings"u8); - writer.WriteStartArray(); - foreach (var item in Warnings) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics, options); - } - writer.WritePropertyName("entities"u8); - writer.WriteStartArray(); - foreach (var item in Entities) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - writer.WritePropertyName("relations"u8); - writer.WriteStartArray(); - foreach (var item in Relations) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - if (Optional.IsDefined(DetectedLanguage)) - { - writer.WritePropertyName("detectedLanguage"u8); - writer.WriteObjectValue(DetectedLanguage, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - CustomHealthcareActionResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomHealthcareActionResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomHealthcareActionResult(document.RootElement, options); - } - - internal static CustomHealthcareActionResult DeserializeCustomHealthcareActionResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string id = default; - IReadOnlyList warnings = default; - DocumentStatistics statistics = default; - IReadOnlyList entities = default; - IReadOnlyList relations = default; - DetectedLanguage detectedLanguage = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("warnings"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DocumentWarning.DeserializeDocumentWarning(item, options)); - } - warnings = array; - continue; - } - if (property.NameEquals("statistics"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - statistics = DocumentStatistics.DeserializeDocumentStatistics(property.Value, options); - continue; - } - if (property.NameEquals("entities"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(CustomHealthcareEntity.DeserializeCustomHealthcareEntity(item, options)); - } - entities = array; - continue; - } - if (property.NameEquals("relations"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(HealthcareRelation.DeserializeHealthcareRelation(item, options)); - } - relations = array; - continue; - } - if (property.NameEquals("detectedLanguage"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - detectedLanguage = DetectedLanguage.DeserializeDetectedLanguage(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new CustomHealthcareActionResult( - id, - warnings, - statistics, - entities, - relations, - detectedLanguage, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(CustomHealthcareActionResult)} does not support writing '{options.Format}' format."); - } - } - - CustomHealthcareActionResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomHealthcareActionResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CustomHealthcareActionResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static CustomHealthcareActionResult FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomHealthcareActionResult(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareActionResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareActionResult.cs deleted file mode 100644 index 6543bc91aace..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareActionResult.cs +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Azure.AI.Language.Text -{ - /// Contains the document custom healthcare results with detected language. - public partial class CustomHealthcareActionResult - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// Unique, non-empty document identifier. - /// Warnings encountered while processing document. - /// Healthcare entities. - /// Healthcare entity relations. - /// , , or is null. - internal CustomHealthcareActionResult(string id, IEnumerable warnings, IEnumerable entities, IEnumerable relations) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(warnings, nameof(warnings)); - Argument.AssertNotNull(entities, nameof(entities)); - Argument.AssertNotNull(relations, nameof(relations)); - - Id = id; - Warnings = warnings.ToList(); - Entities = entities.ToList(); - Relations = relations.ToList(); - } - - /// Initializes a new instance of . - /// Unique, non-empty document identifier. - /// Warnings encountered while processing document. - /// if showStats=true was specified in the request this field will contain information about the document payload. - /// Healthcare entities. - /// Healthcare entity relations. - /// If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document. - /// Keeps track of any properties unknown to the library. - internal CustomHealthcareActionResult(string id, IReadOnlyList warnings, DocumentStatistics statistics, IReadOnlyList entities, IReadOnlyList relations, DetectedLanguage detectedLanguage, IDictionary serializedAdditionalRawData) - { - Id = id; - Warnings = warnings; - Statistics = statistics; - Entities = entities; - Relations = relations; - DetectedLanguage = detectedLanguage; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal CustomHealthcareActionResult() - { - } - - /// Unique, non-empty document identifier. - public string Id { get; } - /// Warnings encountered while processing document. - public IReadOnlyList Warnings { get; } - /// if showStats=true was specified in the request this field will contain information about the document payload. - public DocumentStatistics Statistics { get; } - /// Healthcare entities. - public IReadOnlyList Entities { get; } - /// Healthcare entity relations. - public IReadOnlyList Relations { get; } - /// If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document. - public DetectedLanguage DetectedLanguage { get; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareOperationAction.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareOperationAction.Serialization.cs deleted file mode 100644 index d54b17a0b762..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareOperationAction.Serialization.cs +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Language.Text -{ - public partial class CustomHealthcareOperationAction : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomHealthcareOperationAction)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(ActionContent)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteObjectValue(ActionContent, options); - } - } - - CustomHealthcareOperationAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomHealthcareOperationAction)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomHealthcareOperationAction(document.RootElement, options); - } - - internal static CustomHealthcareOperationAction DeserializeCustomHealthcareOperationAction(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - CustomHealthcareActionContent parameters = default; - string taskName = default; - AnalyzeTextOperationActionKind kind = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - parameters = CustomHealthcareActionContent.DeserializeCustomHealthcareActionContent(property.Value, options); - continue; - } - if (property.NameEquals("taskName"u8)) - { - taskName = property.Value.GetString(); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = new AnalyzeTextOperationActionKind(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new CustomHealthcareOperationAction(taskName, kind, serializedAdditionalRawData, parameters); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(CustomHealthcareOperationAction)} does not support writing '{options.Format}' format."); - } - } - - CustomHealthcareOperationAction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomHealthcareOperationAction(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CustomHealthcareOperationAction)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new CustomHealthcareOperationAction FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomHealthcareOperationAction(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareOperationAction.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareOperationAction.cs deleted file mode 100644 index a1c4ad499e73..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareOperationAction.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Language.Text -{ - /// Contains the custom healthcare task definition. - public partial class CustomHealthcareOperationAction : AnalyzeTextOperationAction - { - /// Initializes a new instance of . - public CustomHealthcareOperationAction() - { - Kind = AnalyzeTextOperationActionKind.CustomHealthcare; - } - - /// Initializes a new instance of . - /// task name. - /// The kind of task to perform. - /// Keeps track of any properties unknown to the library. - /// Contains the custom healthcare task parameters. - internal CustomHealthcareOperationAction(string name, AnalyzeTextOperationActionKind kind, IDictionary serializedAdditionalRawData, CustomHealthcareActionContent actionContent) : base(name, kind, serializedAdditionalRawData) - { - ActionContent = actionContent; - } - - /// Contains the custom healthcare task parameters. - public CustomHealthcareActionContent ActionContent { get; set; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareOperationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareOperationResult.Serialization.cs deleted file mode 100644 index 9d514afbcb92..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareOperationResult.Serialization.cs +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Language.Text -{ - public partial class CustomHealthcareOperationResult : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomHealthcareOperationResult)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("results"u8); - writer.WriteObjectValue(Results, options); - } - - CustomHealthcareOperationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomHealthcareOperationResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomHealthcareOperationResult(document.RootElement, options); - } - - internal static CustomHealthcareOperationResult DeserializeCustomHealthcareOperationResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - CustomHealthcareResult results = default; - DateTimeOffset lastUpdateDateTime = default; - TextActionState status = default; - string taskName = default; - AnalyzeTextOperationResultsKind kind = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("results"u8)) - { - results = CustomHealthcareResult.DeserializeCustomHealthcareResult(property.Value, options); - continue; - } - if (property.NameEquals("lastUpdateDateTime"u8)) - { - lastUpdateDateTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("status"u8)) - { - status = new TextActionState(property.Value.GetString()); - continue; - } - if (property.NameEquals("taskName"u8)) - { - taskName = property.Value.GetString(); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = new AnalyzeTextOperationResultsKind(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new CustomHealthcareOperationResult( - lastUpdateDateTime, - status, - taskName, - kind, - serializedAdditionalRawData, - results); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(CustomHealthcareOperationResult)} does not support writing '{options.Format}' format."); - } - } - - CustomHealthcareOperationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomHealthcareOperationResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CustomHealthcareOperationResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new CustomHealthcareOperationResult FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomHealthcareOperationResult(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareOperationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareOperationResult.cs deleted file mode 100644 index af608625031b..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareOperationResult.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Language.Text -{ - /// Contains the custom healthcare job result. - public partial class CustomHealthcareOperationResult : AnalyzeTextOperationResult - { - /// Initializes a new instance of . - /// The last updated time in UTC for the task. - /// The status of the task at the mentioned last update time. - /// Contains the list of document results. - /// is null. - internal CustomHealthcareOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, CustomHealthcareResult results) : base(lastUpdateDateTime, status) - { - Argument.AssertNotNull(results, nameof(results)); - - Kind = AnalyzeTextOperationResultsKind.CustomHealthcareOperationResults; - Results = results; - } - - /// Initializes a new instance of . - /// The last updated time in UTC for the task. - /// The status of the task at the mentioned last update time. - /// task name. - /// Kind of the task. - /// Keeps track of any properties unknown to the library. - /// Contains the list of document results. - internal CustomHealthcareOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, string name, AnalyzeTextOperationResultsKind kind, IDictionary serializedAdditionalRawData, CustomHealthcareResult results) : base(lastUpdateDateTime, status, name, kind, serializedAdditionalRawData) - { - Results = results; - } - - /// Initializes a new instance of for deserialization. - internal CustomHealthcareOperationResult() - { - } - - /// Contains the list of document results. - public CustomHealthcareResult Results { get; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareResult.cs deleted file mode 100644 index e79fcfece476..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareResult.cs +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Azure.AI.Language.Text -{ - /// Contains the custom healthcare result for the request. - public partial class CustomHealthcareResult - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// Errors by document id. - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// List of custom healthcare results for the document. - /// , , or is null. - internal CustomHealthcareResult(IEnumerable errors, string projectName, string deploymentName, IEnumerable documents) - { - Argument.AssertNotNull(errors, nameof(errors)); - Argument.AssertNotNull(projectName, nameof(projectName)); - Argument.AssertNotNull(deploymentName, nameof(deploymentName)); - Argument.AssertNotNull(documents, nameof(documents)); - - Errors = errors.ToList(); - ProjectName = projectName; - DeploymentName = deploymentName; - Documents = documents.ToList(); - } - - /// Initializes a new instance of . - /// Errors by document id. - /// if showStats=true was specified in the request this field will contain information about the request payload. - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// List of custom healthcare results for the document. - /// Keeps track of any properties unknown to the library. - internal CustomHealthcareResult(IReadOnlyList errors, RequestStatistics statistics, string projectName, string deploymentName, IReadOnlyList documents, IDictionary serializedAdditionalRawData) - { - Errors = errors; - Statistics = statistics; - ProjectName = projectName; - DeploymentName = deploymentName; - Documents = documents; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal CustomHealthcareResult() - { - } - - /// Errors by document id. - public IReadOnlyList Errors { get; } - /// if showStats=true was specified in the request this field will contain information about the request payload. - public RequestStatistics Statistics { get; } - /// This field indicates the project name for the model. - public string ProjectName { get; } - /// This field indicates the deployment name for the model. - public string DeploymentName { get; } - /// List of custom healthcare results for the document. - public IReadOnlyList Documents { get; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomLabelClassificationActionResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomLabelClassificationResult.Serialization.cs similarity index 75% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomLabelClassificationActionResult.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomLabelClassificationResult.Serialization.cs index f32ba7a2607b..12337330632a 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomLabelClassificationActionResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomLabelClassificationResult.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Language.Text { - public partial class CustomLabelClassificationActionResult : IUtf8JsonSerializable, IJsonModel + public partial class CustomLabelClassificationResult : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writ /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomLabelClassificationActionResult)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(CustomLabelClassificationResult)} does not support writing '{format}' format."); } writer.WritePropertyName("errors"u8); @@ -74,19 +74,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - CustomLabelClassificationActionResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + CustomLabelClassificationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomLabelClassificationActionResult)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(CustomLabelClassificationResult)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomLabelClassificationActionResult(document.RootElement, options); + return DeserializeCustomLabelClassificationResult(document.RootElement, options); } - internal static CustomLabelClassificationActionResult DeserializeCustomLabelClassificationActionResult(JsonElement element, ModelReaderWriterOptions options = null) + internal static CustomLabelClassificationResult DeserializeCustomLabelClassificationResult(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -148,7 +148,7 @@ internal static CustomLabelClassificationActionResult DeserializeCustomLabelClas } } serializedAdditionalRawData = rawDataDictionary; - return new CustomLabelClassificationActionResult( + return new CustomLabelClassificationResult( errors, statistics, projectName, @@ -157,43 +157,43 @@ internal static CustomLabelClassificationActionResult DeserializeCustomLabelClas serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(CustomLabelClassificationActionResult)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(CustomLabelClassificationResult)} does not support writing '{options.Format}' format."); } } - CustomLabelClassificationActionResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + CustomLabelClassificationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomLabelClassificationActionResult(document.RootElement, options); + return DeserializeCustomLabelClassificationResult(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(CustomLabelClassificationActionResult)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(CustomLabelClassificationResult)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static CustomLabelClassificationActionResult FromResponse(Response response) + internal static CustomLabelClassificationResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomLabelClassificationActionResult(document.RootElement); + return DeserializeCustomLabelClassificationResult(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomLabelClassificationActionResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomLabelClassificationResult.cs similarity index 83% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomLabelClassificationActionResult.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomLabelClassificationResult.cs index be06d2b035fe..b88ada7b09e8 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomLabelClassificationActionResult.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomLabelClassificationResult.cs @@ -11,8 +11,8 @@ namespace Azure.AI.Language.Text { - /// Contains the custom label classification with detected language results. - public partial class CustomLabelClassificationActionResult + /// Contains the custom label classification results. + public partial class CustomLabelClassificationResult { /// /// Keeps track of any properties unknown to the library. @@ -46,13 +46,13 @@ public partial class CustomLabelClassificationActionResult /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// Initializes a new instance of . /// Errors by document id. /// This field indicates the project name for the model. /// This field indicates the deployment name for the model. /// Response by document. /// , , or is null. - internal CustomLabelClassificationActionResult(IEnumerable errors, string projectName, string deploymentName, IEnumerable documents) + internal CustomLabelClassificationResult(IEnumerable errors, string projectName, string deploymentName, IEnumerable documents) { Argument.AssertNotNull(errors, nameof(errors)); Argument.AssertNotNull(projectName, nameof(projectName)); @@ -65,14 +65,14 @@ internal CustomLabelClassificationActionResult(IEnumerable errors Documents = documents.ToList(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Errors by document id. /// if showStats=true was specified in the request this field will contain information about the request payload. /// This field indicates the project name for the model. /// This field indicates the deployment name for the model. /// Response by document. /// Keeps track of any properties unknown to the library. - internal CustomLabelClassificationActionResult(IReadOnlyList errors, RequestStatistics statistics, string projectName, string deploymentName, IReadOnlyList documents, IDictionary serializedAdditionalRawData) + internal CustomLabelClassificationResult(IReadOnlyList errors, RequestStatistics statistics, string projectName, string deploymentName, IReadOnlyList documents, IDictionary serializedAdditionalRawData) { Errors = errors; Statistics = statistics; @@ -82,8 +82,8 @@ internal CustomLabelClassificationActionResult(IReadOnlyList erro _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal CustomLabelClassificationActionResult() + /// Initializes a new instance of for deserialization. + internal CustomLabelClassificationResult() { } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomMultiLabelClassificationOperationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomMultiLabelClassificationOperationResult.Serialization.cs index 7c55c154577e..759ff49f5c17 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomMultiLabelClassificationOperationResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomMultiLabelClassificationOperationResult.Serialization.cs @@ -59,7 +59,7 @@ internal static CustomMultiLabelClassificationOperationResult DeserializeCustomM { return null; } - CustomLabelClassificationActionResult results = default; + CustomLabelClassificationResult results = default; DateTimeOffset lastUpdateDateTime = default; TextActionState status = default; string taskName = default; @@ -70,7 +70,7 @@ internal static CustomMultiLabelClassificationOperationResult DeserializeCustomM { if (property.NameEquals("results"u8)) { - results = CustomLabelClassificationActionResult.DeserializeCustomLabelClassificationActionResult(property.Value, options); + results = CustomLabelClassificationResult.DeserializeCustomLabelClassificationResult(property.Value, options); continue; } if (property.NameEquals("lastUpdateDateTime"u8)) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomMultiLabelClassificationOperationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomMultiLabelClassificationOperationResult.cs index ef2fd7798612..89d10a35d9a0 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomMultiLabelClassificationOperationResult.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomMultiLabelClassificationOperationResult.cs @@ -18,7 +18,7 @@ public partial class CustomMultiLabelClassificationOperationResult : AnalyzeText /// The status of the task at the mentioned last update time. /// List of results. /// is null. - internal CustomMultiLabelClassificationOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, CustomLabelClassificationActionResult results) : base(lastUpdateDateTime, status) + internal CustomMultiLabelClassificationOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, CustomLabelClassificationResult results) : base(lastUpdateDateTime, status) { Argument.AssertNotNull(results, nameof(results)); @@ -33,7 +33,7 @@ internal CustomMultiLabelClassificationOperationResult(DateTimeOffset lastUpdate /// Kind of the task. /// Keeps track of any properties unknown to the library. /// List of results. - internal CustomMultiLabelClassificationOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, string name, AnalyzeTextOperationResultsKind kind, IDictionary serializedAdditionalRawData, CustomLabelClassificationActionResult results) : base(lastUpdateDateTime, status, name, kind, serializedAdditionalRawData) + internal CustomMultiLabelClassificationOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, string name, AnalyzeTextOperationResultsKind kind, IDictionary serializedAdditionalRawData, CustomLabelClassificationResult results) : base(lastUpdateDateTime, status, name, kind, serializedAdditionalRawData) { Results = results; } @@ -44,6 +44,6 @@ internal CustomMultiLabelClassificationOperationResult() } /// List of results. - public CustomLabelClassificationActionResult Results { get; } + public CustomLabelClassificationResult Results { get; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentenceSentiment.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentenceSentiment.Serialization.cs deleted file mode 100644 index 6159763405a5..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentenceSentiment.Serialization.cs +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Language.Text -{ - public partial class CustomSentenceSentiment : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomSentenceSentiment)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("text"u8); - writer.WriteStringValue(Text); - writer.WritePropertyName("sentiment"u8); - writer.WriteStringValue(Sentiment.ToSerialString()); - writer.WritePropertyName("confidenceScores"u8); - writer.WriteObjectValue(ConfidenceScores, options); - writer.WritePropertyName("offset"u8); - writer.WriteNumberValue(Offset); - writer.WritePropertyName("length"u8); - writer.WriteNumberValue(Length); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - CustomSentenceSentiment IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomSentenceSentiment)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomSentenceSentiment(document.RootElement, options); - } - - internal static CustomSentenceSentiment DeserializeCustomSentenceSentiment(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string text = default; - SentenceSentimentValue sentiment = default; - SentimentConfidenceScores confidenceScores = default; - int offset = default; - int length = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("text"u8)) - { - text = property.Value.GetString(); - continue; - } - if (property.NameEquals("sentiment"u8)) - { - sentiment = property.Value.GetString().ToSentenceSentimentValue(); - continue; - } - if (property.NameEquals("confidenceScores"u8)) - { - confidenceScores = SentimentConfidenceScores.DeserializeSentimentConfidenceScores(property.Value, options); - continue; - } - if (property.NameEquals("offset"u8)) - { - offset = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("length"u8)) - { - length = property.Value.GetInt32(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new CustomSentenceSentiment( - text, - sentiment, - confidenceScores, - offset, - length, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(CustomSentenceSentiment)} does not support writing '{options.Format}' format."); - } - } - - CustomSentenceSentiment IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomSentenceSentiment(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CustomSentenceSentiment)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static CustomSentenceSentiment FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomSentenceSentiment(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentenceSentiment.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentenceSentiment.cs deleted file mode 100644 index a52f147e2e37..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentenceSentiment.cs +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Language.Text -{ - /// A document's sentence custom sentiment. - public partial class CustomSentenceSentiment - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// The sentence text. - /// The predicted Sentiment for the sentence. - /// The sentiment confidence score between 0 and 1 for the sentence for all classes. - /// The target offset from the start of the sentence. - /// The length of the target. - /// or is null. - internal CustomSentenceSentiment(string text, SentenceSentimentValue sentiment, SentimentConfidenceScores confidenceScores, int offset, int length) - { - Argument.AssertNotNull(text, nameof(text)); - Argument.AssertNotNull(confidenceScores, nameof(confidenceScores)); - - Text = text; - Sentiment = sentiment; - ConfidenceScores = confidenceScores; - Offset = offset; - Length = length; - } - - /// Initializes a new instance of . - /// The sentence text. - /// The predicted Sentiment for the sentence. - /// The sentiment confidence score between 0 and 1 for the sentence for all classes. - /// The target offset from the start of the sentence. - /// The length of the target. - /// Keeps track of any properties unknown to the library. - internal CustomSentenceSentiment(string text, SentenceSentimentValue sentiment, SentimentConfidenceScores confidenceScores, int offset, int length, IDictionary serializedAdditionalRawData) - { - Text = text; - Sentiment = sentiment; - ConfidenceScores = confidenceScores; - Offset = offset; - Length = length; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal CustomSentenceSentiment() - { - } - - /// The sentence text. - public string Text { get; } - /// The predicted Sentiment for the sentence. - public SentenceSentimentValue Sentiment { get; } - /// The sentiment confidence score between 0 and 1 for the sentence for all classes. - public SentimentConfidenceScores ConfidenceScores { get; } - /// The target offset from the start of the sentence. - public int Offset { get; } - /// The length of the target. - public int Length { get; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisActionContent.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisActionContent.Serialization.cs deleted file mode 100644 index e462a6282017..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisActionContent.Serialization.cs +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Language.Text -{ - public partial class CustomSentimentAnalysisActionContent : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomSentimentAnalysisActionContent)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(LoggingOptOut)) - { - writer.WritePropertyName("loggingOptOut"u8); - writer.WriteBooleanValue(LoggingOptOut.Value); - } - writer.WritePropertyName("projectName"u8); - writer.WriteStringValue(ProjectName); - writer.WritePropertyName("deploymentName"u8); - writer.WriteStringValue(DeploymentName); - if (Optional.IsDefined(StringIndexType)) - { - writer.WritePropertyName("stringIndexType"u8); - writer.WriteStringValue(StringIndexType.Value.ToString()); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - CustomSentimentAnalysisActionContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomSentimentAnalysisActionContent)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomSentimentAnalysisActionContent(document.RootElement, options); - } - - internal static CustomSentimentAnalysisActionContent DeserializeCustomSentimentAnalysisActionContent(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - bool? loggingOptOut = default; - string projectName = default; - string deploymentName = default; - StringIndexType? stringIndexType = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("loggingOptOut"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - loggingOptOut = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("projectName"u8)) - { - projectName = property.Value.GetString(); - continue; - } - if (property.NameEquals("deploymentName"u8)) - { - deploymentName = property.Value.GetString(); - continue; - } - if (property.NameEquals("stringIndexType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - stringIndexType = new StringIndexType(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new CustomSentimentAnalysisActionContent(loggingOptOut, projectName, deploymentName, stringIndexType, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(CustomSentimentAnalysisActionContent)} does not support writing '{options.Format}' format."); - } - } - - CustomSentimentAnalysisActionContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomSentimentAnalysisActionContent(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CustomSentimentAnalysisActionContent)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static CustomSentimentAnalysisActionContent FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomSentimentAnalysisActionContent(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisActionContent.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisActionContent.cs deleted file mode 100644 index c5ab770779f8..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisActionContent.cs +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Language.Text -{ - /// Supported parameters for a Custom Sentiment Analysis task. - public partial class CustomSentimentAnalysisActionContent - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// or is null. - public CustomSentimentAnalysisActionContent(string projectName, string deploymentName) - { - Argument.AssertNotNull(projectName, nameof(projectName)); - Argument.AssertNotNull(deploymentName, nameof(deploymentName)); - - ProjectName = projectName; - DeploymentName = deploymentName; - } - - /// Initializes a new instance of . - /// logging opt out. - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// Specifies the method used to interpret string offsets. - /// Keeps track of any properties unknown to the library. - internal CustomSentimentAnalysisActionContent(bool? loggingOptOut, string projectName, string deploymentName, StringIndexType? stringIndexType, IDictionary serializedAdditionalRawData) - { - LoggingOptOut = loggingOptOut; - ProjectName = projectName; - DeploymentName = deploymentName; - StringIndexType = stringIndexType; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal CustomSentimentAnalysisActionContent() - { - } - - /// logging opt out. - public bool? LoggingOptOut { get; set; } - /// This field indicates the project name for the model. - public string ProjectName { get; } - /// This field indicates the deployment name for the model. - public string DeploymentName { get; } - /// Specifies the method used to interpret string offsets. - public StringIndexType? StringIndexType { get; set; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisOperationAction.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisOperationAction.Serialization.cs deleted file mode 100644 index 2f506a1d2118..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisOperationAction.Serialization.cs +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Language.Text -{ - public partial class CustomSentimentAnalysisOperationAction : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomSentimentAnalysisOperationAction)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(ActionContent)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteObjectValue(ActionContent, options); - } - } - - CustomSentimentAnalysisOperationAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomSentimentAnalysisOperationAction)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomSentimentAnalysisOperationAction(document.RootElement, options); - } - - internal static CustomSentimentAnalysisOperationAction DeserializeCustomSentimentAnalysisOperationAction(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - CustomSentimentAnalysisActionContent parameters = default; - string taskName = default; - AnalyzeTextOperationActionKind kind = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - parameters = CustomSentimentAnalysisActionContent.DeserializeCustomSentimentAnalysisActionContent(property.Value, options); - continue; - } - if (property.NameEquals("taskName"u8)) - { - taskName = property.Value.GetString(); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = new AnalyzeTextOperationActionKind(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new CustomSentimentAnalysisOperationAction(taskName, kind, serializedAdditionalRawData, parameters); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(CustomSentimentAnalysisOperationAction)} does not support writing '{options.Format}' format."); - } - } - - CustomSentimentAnalysisOperationAction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomSentimentAnalysisOperationAction(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CustomSentimentAnalysisOperationAction)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new CustomSentimentAnalysisOperationAction FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomSentimentAnalysisOperationAction(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisOperationAction.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisOperationAction.cs deleted file mode 100644 index 7268d704b104..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisOperationAction.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Language.Text -{ - /// Use custom models to ease the process of sentiment analysis from documents like product reviews. - public partial class CustomSentimentAnalysisOperationAction : AnalyzeTextOperationAction - { - /// Initializes a new instance of . - public CustomSentimentAnalysisOperationAction() - { - Kind = AnalyzeTextOperationActionKind.CustomSentimentAnalysis; - } - - /// Initializes a new instance of . - /// task name. - /// The kind of task to perform. - /// Keeps track of any properties unknown to the library. - /// Custom Sentiment Analysis task parameters. - internal CustomSentimentAnalysisOperationAction(string name, AnalyzeTextOperationActionKind kind, IDictionary serializedAdditionalRawData, CustomSentimentAnalysisActionContent actionContent) : base(name, kind, serializedAdditionalRawData) - { - ActionContent = actionContent; - } - - /// Custom Sentiment Analysis task parameters. - public CustomSentimentAnalysisActionContent ActionContent { get; set; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisOperationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisOperationResult.Serialization.cs deleted file mode 100644 index b44cfe65b3ef..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisOperationResult.Serialization.cs +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Language.Text -{ - public partial class CustomSentimentAnalysisOperationResult : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomSentimentAnalysisOperationResult)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("results"u8); - writer.WriteObjectValue(Results, options); - } - - CustomSentimentAnalysisOperationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomSentimentAnalysisOperationResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomSentimentAnalysisOperationResult(document.RootElement, options); - } - - internal static CustomSentimentAnalysisOperationResult DeserializeCustomSentimentAnalysisOperationResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - CustomSentimentAnalysisResult results = default; - DateTimeOffset lastUpdateDateTime = default; - TextActionState status = default; - string taskName = default; - AnalyzeTextOperationResultsKind kind = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("results"u8)) - { - results = CustomSentimentAnalysisResult.DeserializeCustomSentimentAnalysisResult(property.Value, options); - continue; - } - if (property.NameEquals("lastUpdateDateTime"u8)) - { - lastUpdateDateTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("status"u8)) - { - status = new TextActionState(property.Value.GetString()); - continue; - } - if (property.NameEquals("taskName"u8)) - { - taskName = property.Value.GetString(); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = new AnalyzeTextOperationResultsKind(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new CustomSentimentAnalysisOperationResult( - lastUpdateDateTime, - status, - taskName, - kind, - serializedAdditionalRawData, - results); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(CustomSentimentAnalysisOperationResult)} does not support writing '{options.Format}' format."); - } - } - - CustomSentimentAnalysisOperationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomSentimentAnalysisOperationResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CustomSentimentAnalysisOperationResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new CustomSentimentAnalysisOperationResult FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomSentimentAnalysisOperationResult(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisOperationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisOperationResult.cs deleted file mode 100644 index 1da5737b50fb..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisOperationResult.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Language.Text -{ - /// Custom Sentiment Analysis Analyze Text long tunning operation result object. - public partial class CustomSentimentAnalysisOperationResult : AnalyzeTextOperationResult - { - /// Initializes a new instance of . - /// The last updated time in UTC for the task. - /// The status of the task at the mentioned last update time. - /// Results of the task. - /// is null. - internal CustomSentimentAnalysisOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, CustomSentimentAnalysisResult results) : base(lastUpdateDateTime, status) - { - Argument.AssertNotNull(results, nameof(results)); - - Kind = AnalyzeTextOperationResultsKind.CustomSentimentAnalysisOperationResults; - Results = results; - } - - /// Initializes a new instance of . - /// The last updated time in UTC for the task. - /// The status of the task at the mentioned last update time. - /// task name. - /// Kind of the task. - /// Keeps track of any properties unknown to the library. - /// Results of the task. - internal CustomSentimentAnalysisOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, string name, AnalyzeTextOperationResultsKind kind, IDictionary serializedAdditionalRawData, CustomSentimentAnalysisResult results) : base(lastUpdateDateTime, status, name, kind, serializedAdditionalRawData) - { - Results = results; - } - - /// Initializes a new instance of for deserialization. - internal CustomSentimentAnalysisOperationResult() - { - } - - /// Results of the task. - public CustomSentimentAnalysisResult Results { get; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisResult.Serialization.cs deleted file mode 100644 index a9e170af6c6f..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisResult.Serialization.cs +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Language.Text -{ - public partial class CustomSentimentAnalysisResult : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomSentimentAnalysisResult)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("errors"u8); - writer.WriteStartArray(); - foreach (var item in Errors) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics, options); - } - writer.WritePropertyName("projectName"u8); - writer.WriteStringValue(ProjectName); - writer.WritePropertyName("deploymentName"u8); - writer.WriteStringValue(DeploymentName); - writer.WritePropertyName("documents"u8); - writer.WriteStartArray(); - foreach (var item in Documents) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - CustomSentimentAnalysisResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomSentimentAnalysisResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomSentimentAnalysisResult(document.RootElement, options); - } - - internal static CustomSentimentAnalysisResult DeserializeCustomSentimentAnalysisResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList errors = default; - RequestStatistics statistics = default; - string projectName = default; - string deploymentName = default; - IReadOnlyList documents = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("errors"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DocumentError.DeserializeDocumentError(item, options)); - } - errors = array; - continue; - } - if (property.NameEquals("statistics"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - statistics = RequestStatistics.DeserializeRequestStatistics(property.Value, options); - continue; - } - if (property.NameEquals("projectName"u8)) - { - projectName = property.Value.GetString(); - continue; - } - if (property.NameEquals("deploymentName"u8)) - { - deploymentName = property.Value.GetString(); - continue; - } - if (property.NameEquals("documents"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(CustomSentimentAnalysisResultDocument.DeserializeCustomSentimentAnalysisResultDocument(item, options)); - } - documents = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new CustomSentimentAnalysisResult( - errors, - statistics, - projectName, - deploymentName, - documents, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(CustomSentimentAnalysisResult)} does not support writing '{options.Format}' format."); - } - } - - CustomSentimentAnalysisResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomSentimentAnalysisResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CustomSentimentAnalysisResult)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static CustomSentimentAnalysisResult FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomSentimentAnalysisResult(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisResult.cs deleted file mode 100644 index f725b8b09f1c..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisResult.cs +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Azure.AI.Language.Text -{ - /// Custom Sentiment analysis results for the input documents. - public partial class CustomSentimentAnalysisResult - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// Errors by document id. - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// The custom sentiment analysis results for each document in the input. - /// , , or is null. - internal CustomSentimentAnalysisResult(IEnumerable errors, string projectName, string deploymentName, IEnumerable documents) - { - Argument.AssertNotNull(errors, nameof(errors)); - Argument.AssertNotNull(projectName, nameof(projectName)); - Argument.AssertNotNull(deploymentName, nameof(deploymentName)); - Argument.AssertNotNull(documents, nameof(documents)); - - Errors = errors.ToList(); - ProjectName = projectName; - DeploymentName = deploymentName; - Documents = documents.ToList(); - } - - /// Initializes a new instance of . - /// Errors by document id. - /// if showStats=true was specified in the request this field will contain information about the request payload. - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// The custom sentiment analysis results for each document in the input. - /// Keeps track of any properties unknown to the library. - internal CustomSentimentAnalysisResult(IReadOnlyList errors, RequestStatistics statistics, string projectName, string deploymentName, IReadOnlyList documents, IDictionary serializedAdditionalRawData) - { - Errors = errors; - Statistics = statistics; - ProjectName = projectName; - DeploymentName = deploymentName; - Documents = documents; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal CustomSentimentAnalysisResult() - { - } - - /// Errors by document id. - public IReadOnlyList Errors { get; } - /// if showStats=true was specified in the request this field will contain information about the request payload. - public RequestStatistics Statistics { get; } - /// This field indicates the project name for the model. - public string ProjectName { get; } - /// This field indicates the deployment name for the model. - public string DeploymentName { get; } - /// The custom sentiment analysis results for each document in the input. - public IReadOnlyList Documents { get; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisResultDocument.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisResultDocument.Serialization.cs deleted file mode 100644 index 26e1d09c569c..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisResultDocument.Serialization.cs +++ /dev/null @@ -1,232 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Language.Text -{ - public partial class CustomSentimentAnalysisResultDocument : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomSentimentAnalysisResultDocument)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("warnings"u8); - writer.WriteStartArray(); - foreach (var item in Warnings) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Statistics)) - { - writer.WritePropertyName("statistics"u8); - writer.WriteObjectValue(Statistics, options); - } - writer.WritePropertyName("sentiment"u8); - writer.WriteStringValue(Sentiment.ToSerialString()); - writer.WritePropertyName("confidenceScores"u8); - writer.WriteObjectValue(ConfidenceScores, options); - writer.WritePropertyName("sentences"u8); - writer.WriteStartArray(); - foreach (var item in Sentences) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - if (Optional.IsDefined(DetectedLanguage)) - { - writer.WritePropertyName("detectedLanguage"u8); - writer.WriteObjectValue(DetectedLanguage, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - CustomSentimentAnalysisResultDocument IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(CustomSentimentAnalysisResultDocument)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomSentimentAnalysisResultDocument(document.RootElement, options); - } - - internal static CustomSentimentAnalysisResultDocument DeserializeCustomSentimentAnalysisResultDocument(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string id = default; - IReadOnlyList warnings = default; - DocumentStatistics statistics = default; - DocumentSentiment sentiment = default; - SentimentConfidenceScores confidenceScores = default; - IReadOnlyList sentences = default; - DetectedLanguage detectedLanguage = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("warnings"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DocumentWarning.DeserializeDocumentWarning(item, options)); - } - warnings = array; - continue; - } - if (property.NameEquals("statistics"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - statistics = DocumentStatistics.DeserializeDocumentStatistics(property.Value, options); - continue; - } - if (property.NameEquals("sentiment"u8)) - { - sentiment = property.Value.GetString().ToDocumentSentiment(); - continue; - } - if (property.NameEquals("confidenceScores"u8)) - { - confidenceScores = SentimentConfidenceScores.DeserializeSentimentConfidenceScores(property.Value, options); - continue; - } - if (property.NameEquals("sentences"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(CustomSentenceSentiment.DeserializeCustomSentenceSentiment(item, options)); - } - sentences = array; - continue; - } - if (property.NameEquals("detectedLanguage"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - detectedLanguage = DetectedLanguage.DeserializeDetectedLanguage(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new CustomSentimentAnalysisResultDocument( - id, - warnings, - statistics, - sentiment, - confidenceScores, - sentences, - detectedLanguage, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(CustomSentimentAnalysisResultDocument)} does not support writing '{options.Format}' format."); - } - } - - CustomSentimentAnalysisResultDocument IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomSentimentAnalysisResultDocument(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CustomSentimentAnalysisResultDocument)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static CustomSentimentAnalysisResultDocument FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomSentimentAnalysisResultDocument(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisResultDocument.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisResultDocument.cs deleted file mode 100644 index 17b9a6602492..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSentimentAnalysisResultDocument.cs +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Azure.AI.Language.Text -{ - /// Custom Sentiment analysis result for a specific document. - public partial class CustomSentimentAnalysisResultDocument - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// Unique, non-empty document identifier. - /// Warnings encountered while processing document. - /// Predicted sentiment for document (Negative, Neutral, Positive, or Mixed). - /// The sentiment confidence score between 0 and 1 for the sentence for all classes. - /// The document's sentences sentiment. - /// , , or is null. - internal CustomSentimentAnalysisResultDocument(string id, IEnumerable warnings, DocumentSentiment sentiment, SentimentConfidenceScores confidenceScores, IEnumerable sentences) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(warnings, nameof(warnings)); - Argument.AssertNotNull(confidenceScores, nameof(confidenceScores)); - Argument.AssertNotNull(sentences, nameof(sentences)); - - Id = id; - Warnings = warnings.ToList(); - Sentiment = sentiment; - ConfidenceScores = confidenceScores; - Sentences = sentences.ToList(); - } - - /// Initializes a new instance of . - /// Unique, non-empty document identifier. - /// Warnings encountered while processing document. - /// if showStats=true was specified in the request this field will contain information about the document payload. - /// Predicted sentiment for document (Negative, Neutral, Positive, or Mixed). - /// The sentiment confidence score between 0 and 1 for the sentence for all classes. - /// The document's sentences sentiment. - /// If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document. - /// Keeps track of any properties unknown to the library. - internal CustomSentimentAnalysisResultDocument(string id, IReadOnlyList warnings, DocumentStatistics statistics, DocumentSentiment sentiment, SentimentConfidenceScores confidenceScores, IReadOnlyList sentences, DetectedLanguage detectedLanguage, IDictionary serializedAdditionalRawData) - { - Id = id; - Warnings = warnings; - Statistics = statistics; - Sentiment = sentiment; - ConfidenceScores = confidenceScores; - Sentences = sentences; - DetectedLanguage = detectedLanguage; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal CustomSentimentAnalysisResultDocument() - { - } - - /// Unique, non-empty document identifier. - public string Id { get; } - /// Warnings encountered while processing document. - public IReadOnlyList Warnings { get; } - /// if showStats=true was specified in the request this field will contain information about the document payload. - public DocumentStatistics Statistics { get; } - /// Predicted sentiment for document (Negative, Neutral, Positive, or Mixed). - public DocumentSentiment Sentiment { get; } - /// The sentiment confidence score between 0 and 1 for the sentence for all classes. - public SentimentConfidenceScores ConfidenceScores { get; } - /// The document's sentences sentiment. - public IReadOnlyList Sentences { get; } - /// If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document. - public DetectedLanguage DetectedLanguage { get; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSingleLabelClassificationOperationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSingleLabelClassificationOperationResult.Serialization.cs index 17042c6ef615..0874c3f9ba71 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSingleLabelClassificationOperationResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSingleLabelClassificationOperationResult.Serialization.cs @@ -59,7 +59,7 @@ internal static CustomSingleLabelClassificationOperationResult DeserializeCustom { return null; } - CustomLabelClassificationActionResult results = default; + CustomLabelClassificationResult results = default; DateTimeOffset lastUpdateDateTime = default; TextActionState status = default; string taskName = default; @@ -70,7 +70,7 @@ internal static CustomSingleLabelClassificationOperationResult DeserializeCustom { if (property.NameEquals("results"u8)) { - results = CustomLabelClassificationActionResult.DeserializeCustomLabelClassificationActionResult(property.Value, options); + results = CustomLabelClassificationResult.DeserializeCustomLabelClassificationResult(property.Value, options); continue; } if (property.NameEquals("lastUpdateDateTime"u8)) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSingleLabelClassificationOperationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSingleLabelClassificationOperationResult.cs index c191cced3d0d..4e58093ed4b5 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSingleLabelClassificationOperationResult.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomSingleLabelClassificationOperationResult.cs @@ -18,7 +18,7 @@ public partial class CustomSingleLabelClassificationOperationResult : AnalyzeTex /// The status of the task at the mentioned last update time. /// List of results. /// is null. - internal CustomSingleLabelClassificationOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, CustomLabelClassificationActionResult results) : base(lastUpdateDateTime, status) + internal CustomSingleLabelClassificationOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, CustomLabelClassificationResult results) : base(lastUpdateDateTime, status) { Argument.AssertNotNull(results, nameof(results)); @@ -33,7 +33,7 @@ internal CustomSingleLabelClassificationOperationResult(DateTimeOffset lastUpdat /// Kind of the task. /// Keeps track of any properties unknown to the library. /// List of results. - internal CustomSingleLabelClassificationOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, string name, AnalyzeTextOperationResultsKind kind, IDictionary serializedAdditionalRawData, CustomLabelClassificationActionResult results) : base(lastUpdateDateTime, status, name, kind, serializedAdditionalRawData) + internal CustomSingleLabelClassificationOperationResult(DateTimeOffset lastUpdateDateTime, TextActionState status, string name, AnalyzeTextOperationResultsKind kind, IDictionary serializedAdditionalRawData, CustomLabelClassificationResult results) : base(lastUpdateDateTime, status, name, kind, serializedAdditionalRawData) { Results = results; } @@ -44,6 +44,6 @@ internal CustomSingleLabelClassificationOperationResult() } /// List of results. - public CustomLabelClassificationActionResult Results { get; } + public CustomLabelClassificationResult Results { get; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DetectedLanguage.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DetectedLanguage.Serialization.cs index e56bb77f7d92..9ec63a590914 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DetectedLanguage.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DetectedLanguage.Serialization.cs @@ -40,15 +40,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(Iso6391Name); writer.WritePropertyName("confidenceScore"u8); writer.WriteNumberValue(ConfidenceScore); - if (Optional.IsDefined(Script)) + if (Optional.IsDefined(ScriptName)) { - writer.WritePropertyName("script"u8); - writer.WriteStringValue(Script.Value.ToString()); + writer.WritePropertyName("scriptName"u8); + writer.WriteStringValue(ScriptName.Value.ToString()); } - if (Optional.IsDefined(ScriptCode)) + if (Optional.IsDefined(ScriptIso15924Code)) { - writer.WritePropertyName("scriptCode"u8); - writer.WriteStringValue(ScriptCode.Value.ToString()); + writer.WritePropertyName("scriptIso15924Code"u8); + writer.WriteStringValue(ScriptIso15924Code.Value.ToString()); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -90,8 +90,8 @@ internal static DetectedLanguage DeserializeDetectedLanguage(JsonElement element string name = default; string iso6391Name = default; double confidenceScore = default; - ScriptKind? script = default; - ScriptCode? scriptCode = default; + ScriptKind? scriptName = default; + ScriptCode? scriptIso15924Code = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -111,22 +111,22 @@ internal static DetectedLanguage DeserializeDetectedLanguage(JsonElement element confidenceScore = property.Value.GetDouble(); continue; } - if (property.NameEquals("script"u8)) + if (property.NameEquals("scriptName"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - script = new ScriptKind(property.Value.GetString()); + scriptName = new ScriptKind(property.Value.GetString()); continue; } - if (property.NameEquals("scriptCode"u8)) + if (property.NameEquals("scriptIso15924Code"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - scriptCode = new ScriptCode(property.Value.GetString()); + scriptIso15924Code = new ScriptCode(property.Value.GetString()); continue; } if (options.Format != "W") @@ -139,8 +139,8 @@ internal static DetectedLanguage DeserializeDetectedLanguage(JsonElement element name, iso6391Name, confidenceScore, - script, - scriptCode, + scriptName, + scriptIso15924Code, serializedAdditionalRawData); } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DetectedLanguage.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DetectedLanguage.cs index b7b5598047aa..914edf38c323 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DetectedLanguage.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DetectedLanguage.cs @@ -64,16 +64,16 @@ internal DetectedLanguage(string name, string iso6391Name, double confidenceScor /// Long name of a detected language (e.g. English, French). /// A two letter representation of the detected language according to the ISO 639-1 standard (e.g. en, fr). /// A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true. - /// Identifies the script of the input document. - /// Identifies the script of the input document. + /// Identifies the script name of the input document according to the ISO 15924 standard. + /// Identifies the script code of the input document according to the ISO 15924 standard. /// Keeps track of any properties unknown to the library. - internal DetectedLanguage(string name, string iso6391Name, double confidenceScore, ScriptKind? script, ScriptCode? scriptCode, IDictionary serializedAdditionalRawData) + internal DetectedLanguage(string name, string iso6391Name, double confidenceScore, ScriptKind? scriptName, ScriptCode? scriptIso15924Code, IDictionary serializedAdditionalRawData) { Name = name; Iso6391Name = iso6391Name; ConfidenceScore = confidenceScore; - Script = script; - ScriptCode = scriptCode; + ScriptName = scriptName; + ScriptIso15924Code = scriptIso15924Code; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -88,9 +88,9 @@ internal DetectedLanguage() public string Iso6391Name { get; } /// A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true. public double ConfidenceScore { get; } - /// Identifies the script of the input document. - public ScriptKind? Script { get; } - /// Identifies the script of the input document. - public ScriptCode? ScriptCode { get; } + /// Identifies the script name of the input document according to the ISO 15924 standard. + public ScriptKind? ScriptName { get; } + /// Identifies the script code of the input document according to the ISO 15924 standard. + public ScriptCode? ScriptIso15924Code { get; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/Docs/TextAnalysisClient.xml b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/Docs/TextAnalysisClient.xml index cbd007ade805..9f9295f90d52 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/Docs/TextAnalysisClient.xml +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/Docs/TextAnalysisClient.xml @@ -9,32 +9,6 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); -AnalyzeTextInput analyzeTextInput = new TextDynamicClassificationInput -{ - TextInput = new MultiLanguageTextInput - { - MultiLanguageInputs = {new MultiLanguageInput("1", "The WHO is issuing a warning about Monkey Pox.") - { - Language = "en", - }, new MultiLanguageInput("2", "Mo Salah plays in Liverpool FC in England.") - { - Language = "en", - }}, - }, - ActionContent = new DynamicClassificationActionContent(new string[] { "Health", "Politics", "Music", "Sports" }) - { - ModelVersion = "latest", - ClassificationType = ClassificationType.Multi, - }, -}; -Response response = await client.AnalyzeTextAsync(analyzeTextInput); -]]> -This sample shows how to call AnalyzeTextAsync. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - AnalyzeTextInput analyzeTextInput = new TextEntityLinkingInput { TextInput = new MultiLanguageTextInput @@ -274,13 +248,7 @@ AnalyzeTextInput analyzeTextInput = new TextPiiEntitiesRecognitionInput { TextInput = new MultiLanguageTextInput { - MultiLanguageInputs = {new MultiLanguageInput("1", "My SSN is 859-98-0987") - { - Language = "en", - }, new MultiLanguageInput("2", "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.") - { - Language = "en", - }, new MultiLanguageInput("3", "Is 998.214.865-68 your Brazilian CPF number?") + MultiLanguageInputs = {new MultiLanguageInput("1", "My name is John Doe My phone number is 424 878 9192") { Language = "en", }}, @@ -288,7 +256,7 @@ AnalyzeTextInput analyzeTextInput = new TextPiiEntitiesRecognitionInput ActionContent = new PiiActionContent { ModelVersion = "latest", - RedactionCharacter = RedactionCharacter.Minus, + RedactionPolicy = new EntityMaskPolicyType(), }, }; Response response = await client.AnalyzeTextAsync(analyzeTextInput); @@ -317,6 +285,10 @@ AnalyzeTextInput analyzeTextInput = new TextPiiEntitiesRecognitionInput ActionContent = new PiiActionContent { ModelVersion = "latest", + RedactionPolicy = new CharacterMaskPolicyType + { + RedactionCharacter = RedactionCharacter.Minus, + }, }, }; Response response = await client.AnalyzeTextAsync(analyzeTextInput); @@ -327,51 +299,53 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); -AnalyzeTextInput analyzeTextInput = new TextSentimentAnalysisInput +AnalyzeTextInput analyzeTextInput = new TextPiiEntitiesRecognitionInput { TextInput = new MultiLanguageTextInput { - MultiLanguageInputs = {new MultiLanguageInput("1", "Great atmosphere. Close to plenty of restaurants, hotels, and transit! Staff are friendly and helpful.") + MultiLanguageInputs = {new MultiLanguageInput("1", "My SSN is 859-98-0987") + { + Language = "en", + }, new MultiLanguageInput("2", "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.") + { + Language = "en", + }, new MultiLanguageInput("3", "Is 998.214.865-68 your Brazilian CPF number?") { Language = "en", }}, }, - ActionContent = new SentimentAnalysisActionContent + ActionContent = new PiiActionContent { ModelVersion = "latest", }, }; Response response = await client.AnalyzeTextAsync(analyzeTextInput); -]]> - - - -This sample shows how to call AnalyzeText. +]]> +This sample shows how to call AnalyzeTextAsync. "); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); -AnalyzeTextInput analyzeTextInput = new TextDynamicClassificationInput +AnalyzeTextInput analyzeTextInput = new TextSentimentAnalysisInput { TextInput = new MultiLanguageTextInput { - MultiLanguageInputs = {new MultiLanguageInput("1", "The WHO is issuing a warning about Monkey Pox.") - { - Language = "en", - }, new MultiLanguageInput("2", "Mo Salah plays in Liverpool FC in England.") + MultiLanguageInputs = {new MultiLanguageInput("1", "Great atmosphere. Close to plenty of restaurants, hotels, and transit! Staff are friendly and helpful.") { Language = "en", }}, }, - ActionContent = new DynamicClassificationActionContent(new string[] { "Health", "Politics", "Music", "Sports" }) + ActionContent = new SentimentAnalysisActionContent { ModelVersion = "latest", - ClassificationType = ClassificationType.Multi, }, }; -Response response = client.AnalyzeText(analyzeTextInput); -]]> +Response response = await client.AnalyzeTextAsync(analyzeTextInput); +]]> + + + This sample shows how to call AnalyzeText. "); @@ -613,6 +587,29 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); +AnalyzeTextInput analyzeTextInput = new TextPiiEntitiesRecognitionInput +{ + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "My name is John Doe My phone number is 424 878 9192") + { + Language = "en", + }}, + }, + ActionContent = new PiiActionContent + { + ModelVersion = "latest", + RedactionPolicy = new EntityMaskPolicyType(), + }, +}; +Response response = client.AnalyzeText(analyzeTextInput); +]]> +This sample shows how to call AnalyzeText. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + AnalyzeTextInput analyzeTextInput = new TextPiiEntitiesRecognitionInput { TextInput = new MultiLanguageTextInput @@ -631,7 +628,10 @@ AnalyzeTextInput analyzeTextInput = new TextPiiEntitiesRecognitionInput ActionContent = new PiiActionContent { ModelVersion = "latest", - RedactionCharacter = RedactionCharacter.Minus, + RedactionPolicy = new CharacterMaskPolicyType + { + RedactionCharacter = RedactionCharacter.Minus, + }, }, }; Response response = client.AnalyzeText(analyzeTextInput); @@ -695,51 +695,6 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); -using RequestContent content = RequestContent.Create(new -{ - kind = "DynamicClassification", - parameters = new - { - categories = new object[] - { - "Health", - "Politics", - "Music", - "Sports" - }, - classificationType = "Multi", - modelVersion = "latest", - }, - analysisInput = new - { - documents = new object[] - { - new - { - id = "1", - language = "en", - text = "The WHO is issuing a warning about Monkey Pox.", - }, - new - { - id = "2", - language = "en", - text = "Mo Salah plays in Liverpool FC in England.", - } - }, - }, -}); -Response response = await client.AnalyzeTextAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("kind").ToString()); -]]> -This sample shows how to call AnalyzeTextAsync and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - using RequestContent content = RequestContent.Create(new { kind = "EntityLinking", @@ -1127,7 +1082,10 @@ using RequestContent content = RequestContent.Create(new parameters = new { modelVersion = "latest", - redactionCharacter = "-", + redactionPolicy = new + { + policyKind = "entityMask", + }, }, analysisInput = new { @@ -1137,19 +1095,7 @@ using RequestContent content = RequestContent.Create(new { id = "1", language = "en", - text = "My SSN is 859-98-0987", - }, - new - { - id = "2", - language = "en", - text = "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", - }, - new - { - id = "3", - language = "en", - text = "Is 998.214.865-68 your Brazilian CPF number?", + text = "My name is John Doe My phone number is 424 878 9192", } }, }, @@ -1171,6 +1117,11 @@ using RequestContent content = RequestContent.Create(new parameters = new { modelVersion = "latest", + redactionPolicy = new + { + policyKind = "characterMask", + redactionCharacter = "-", + }, }, analysisInput = new { @@ -1210,7 +1161,7 @@ TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - kind = "SentimentAnalysis", + kind = "PiiEntityRecognition", parameters = new { modelVersion = "latest", @@ -1223,7 +1174,19 @@ using RequestContent content = RequestContent.Create(new { id = "1", language = "en", - text = "Great atmosphere. Close to plenty of restaurants, hotels, and transit! Staff are friendly and helpful.", + text = "My SSN is 859-98-0987", + }, + new + { + id = "2", + language = "en", + text = "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", + }, + new + { + id = "3", + language = "en", + text = "Is 998.214.865-68 your Brazilian CPF number?", } }, }, @@ -1232,11 +1195,8 @@ Response response = await client.AnalyzeTextAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); -]]> - - - -This sample shows how to call AnalyzeText and parse the result. +]]> +This sample shows how to call AnalyzeTextAsync and parse the result. "); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -1244,17 +1204,9 @@ TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - kind = "DynamicClassification", + kind = "SentimentAnalysis", parameters = new { - categories = new object[] - { - "Health", - "Politics", - "Music", - "Sports" - }, - classificationType = "Multi", modelVersion = "latest", }, analysisInput = new @@ -1265,22 +1217,19 @@ using RequestContent content = RequestContent.Create(new { id = "1", language = "en", - text = "The WHO is issuing a warning about Monkey Pox.", - }, - new - { - id = "2", - language = "en", - text = "Mo Salah plays in Liverpool FC in England.", + text = "Great atmosphere. Close to plenty of restaurants, hotels, and transit! Staff are friendly and helpful.", } }, }, }); -Response response = client.AnalyzeText(content); +Response response = await client.AnalyzeTextAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("kind").ToString()); -]]> +]]> + + + This sample shows how to call AnalyzeText and parse the result. "); @@ -1674,7 +1623,46 @@ using RequestContent content = RequestContent.Create(new parameters = new { modelVersion = "latest", - redactionCharacter = "-", + redactionPolicy = new + { + policyKind = "entityMask", + }, + }, + analysisInput = new + { + documents = new object[] + { + new + { + id = "1", + language = "en", + text = "My name is John Doe My phone number is 424 878 9192", + } + }, + }, +}); +Response response = client.AnalyzeText(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("kind").ToString()); +]]> +This sample shows how to call AnalyzeText and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + kind = "PiiEntityRecognition", + parameters = new + { + modelVersion = "latest", + redactionPolicy = new + { + policyKind = "characterMask", + redactionCharacter = "-", + }, }, analysisInput = new { @@ -1813,22 +1801,6 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); -Response response = await client.AnalyzeTextOperationStatusAsync(Guid.Parse("1780194a-e9c1-4298-b0d4-fdc59ba818a0")); -]]> -This sample shows how to call AnalyzeTextOperationStatusAsync. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - -Response response = await client.AnalyzeTextOperationStatusAsync(Guid.Parse("29fe5bb0-83ae-4f86-85d6-775534dcd2d4")); -]]> -This sample shows how to call AnalyzeTextOperationStatusAsync. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - Response response = await client.AnalyzeTextOperationStatusAsync(Guid.Parse("15e4a46b-62e2-4386-8d36-9c2a92bb45dd")); ]]> This sample shows how to call AnalyzeTextOperationStatusAsync. @@ -1872,22 +1844,6 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); -Response response = client.AnalyzeTextOperationStatus(Guid.Parse("1780194a-e9c1-4298-b0d4-fdc59ba818a0")); -]]> -This sample shows how to call AnalyzeTextOperationStatus. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - -Response response = client.AnalyzeTextOperationStatus(Guid.Parse("29fe5bb0-83ae-4f86-85d6-775534dcd2d4")); -]]> -This sample shows how to call AnalyzeTextOperationStatus. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - Response response = client.AnalyzeTextOperationStatus(Guid.Parse("15e4a46b-62e2-4386-8d36-9c2a92bb45dd")); ]]> This sample shows how to call AnalyzeTextOperationStatus. @@ -1961,7 +1917,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); -Response response = await client.AnalyzeTextOperationStatusAsync(Guid.Parse("1780194a-e9c1-4298-b0d4-fdc59ba818a0"), null, null, null, null); +Response response = await client.AnalyzeTextOperationStatusAsync(Guid.Parse("15e4a46b-62e2-4386-8d36-9c2a92bb45dd"), null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -1979,7 +1935,7 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); -Response response = await client.AnalyzeTextOperationStatusAsync(Guid.Parse("29fe5bb0-83ae-4f86-85d6-775534dcd2d4"), null, null, null, null); +Response response = await client.AnalyzeTextOperationStatusAsync(Guid.Parse("1780194a-e9c1-4298-b0d4-fdc59ba818a0"), null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -1990,14 +1946,17 @@ Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString( Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); -]]> -This sample shows how to call AnalyzeTextOperationStatusAsync and parse the result. +]]> + + + +This sample shows how to call AnalyzeTextOperationStatus and parse the result. "); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); -Response response = await client.AnalyzeTextOperationStatusAsync(Guid.Parse("15e4a46b-62e2-4386-8d36-9c2a92bb45dd"), null, null, null, null); +Response response = client.AnalyzeTextOperationStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -2009,34 +1968,13 @@ Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); ]]> -This sample shows how to call AnalyzeTextOperationStatusAsync and parse the result. +This sample shows how to call AnalyzeTextOperationStatus and parse the result. "); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); -Response response = await client.AnalyzeTextOperationStatusAsync(Guid.Parse("1780194a-e9c1-4298-b0d4-fdc59ba818a0"), null, null, null, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("jobId").ToString()); -Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); -Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString()); -Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); -Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); -Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); -]]> - - - -This sample shows how to call AnalyzeTextOperationStatus and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - -Response response = client.AnalyzeTextOperationStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), null, null, null, null); +Response response = client.AnalyzeTextOperationStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("createdDateTime").ToString()); @@ -2072,60 +2010,6 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); -Response response = client.AnalyzeTextOperationStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), null, null, null, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("jobId").ToString()); -Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); -Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString()); -Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); -Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); -Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); -]]> -This sample shows how to call AnalyzeTextOperationStatus and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - -Response response = client.AnalyzeTextOperationStatus(Guid.Parse("1780194a-e9c1-4298-b0d4-fdc59ba818a0"), null, null, null, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("jobId").ToString()); -Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); -Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString()); -Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); -Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); -Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); -]]> -This sample shows how to call AnalyzeTextOperationStatus and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - -Response response = client.AnalyzeTextOperationStatus(Guid.Parse("29fe5bb0-83ae-4f86-85d6-775534dcd2d4"), null, null, null, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("createdDateTime").ToString()); -Console.WriteLine(result.GetProperty("jobId").ToString()); -Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); -Console.WriteLine(result.GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString()); -Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); -Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); -Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); -]]> -This sample shows how to call AnalyzeTextOperationStatus and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - Response response = client.AnalyzeTextOperationStatus(Guid.Parse("15e4a46b-62e2-4386-8d36-9c2a92bb45dd"), null, null, null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -2178,7 +2062,8 @@ Operation operation = await client.AnalyzeTextSubmitOperationAsync(WaitUntil.Com { ActionContent = new AbstractiveSummarizationActionContent { - SentenceCount = 1, + SummaryLength = SummaryLengthBucket.Medium, + Instruction = "XYZ-code", }, Name = "Document Abstractive Summarization Task 1", } @@ -2192,28 +2077,20 @@ TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); MultiLanguageTextInput textInput = new MultiLanguageTextInput { - MultiLanguageInputs = {new MultiLanguageInput("1", "I had a wonderful trip to Seattle last week.") - { - Language = "en", - }, new MultiLanguageInput("2", "I'm flying to NYC tomorrow. See you there.") + MultiLanguageInputs = {new MultiLanguageInput("1", "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks.") { Language = "en", }}, }; Operation operation = await client.AnalyzeTextSubmitOperationAsync(WaitUntil.Completed, textInput, new AnalyzeTextOperationAction[] { - new EntitiesOperationAction + new AbstractiveSummarizationOperationAction { - ActionContent = new EntitiesActionContent + ActionContent = new AbstractiveSummarizationActionContent { - ModelVersion = "latest", + SentenceCount = 1, }, - Name = "Recognize Entities", - }, - new CustomEntitiesOperationAction - { - ActionContent = new CustomEntitiesActionContent("MyProject", "MyDeployment"), - Name = "Recognize US Regions", + Name = "Document Abstractive Summarization Task 1", } }); ]]> @@ -2225,58 +2102,28 @@ TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); MultiLanguageTextInput textInput = new MultiLanguageTextInput { - MultiLanguageInputs = {new MultiLanguageInput("1", "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks.") + MultiLanguageInputs = {new MultiLanguageInput("1", "I had a wonderful trip to Seattle last week.") { Language = "en", - }}, -}; -Operation operation = await client.AnalyzeTextSubmitOperationAsync(WaitUntil.Completed, textInput, new AnalyzeTextOperationAction[] -{ - new CustomAbstractiveSummarizationOperationAction(new CustomAbstractiveSummarizationActionContent("my_project", "my_deployment")) - { - Name = "Custom Document Abstractive Summarization Task 1", - } -}); -]]> -This sample shows how to call AnalyzeTextSubmitOperationAsync. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - -MultiLanguageTextInput textInput = new MultiLanguageTextInput -{ - MultiLanguageInputs = {new MultiLanguageInput("1", "Prescribed 100mg ibuprofen, taken twice daily.") + }, new MultiLanguageInput("2", "I'm flying to NYC tomorrow. See you there.") { Language = "en", }}, }; Operation operation = await client.AnalyzeTextSubmitOperationAsync(WaitUntil.Completed, textInput, new AnalyzeTextOperationAction[] { - new CustomHealthcareOperationAction - { - ActionContent = new CustomHealthcareActionContent("{PROJECT-NAME}", "{DEPLOYMENT-NAME}"), - } -}); -]]> -This sample shows how to call AnalyzeTextSubmitOperationAsync. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - -MultiLanguageTextInput textInput = new MultiLanguageTextInput -{ - MultiLanguageInputs = {new MultiLanguageInput("1", "The food is great. But the service is bad.") + new EntitiesOperationAction { - Language = "en", - }}, -}; -Operation operation = await client.AnalyzeTextSubmitOperationAsync(WaitUntil.Completed, textInput, new AnalyzeTextOperationAction[] -{ - new CustomSentimentAnalysisOperationAction + ActionContent = new EntitiesActionContent + { + ModelVersion = "latest", + }, + Name = "Recognize Entities", + }, + new CustomEntitiesOperationAction { - ActionContent = new CustomSentimentAnalysisActionContent("{PROJECT-NAME}", "{DEPLOYMENT-NAME}"), + ActionContent = new CustomEntitiesActionContent("MyProject", "MyDeployment"), + Name = "Recognize US Regions", } }); ]]> @@ -2352,7 +2199,8 @@ Operation operation = client.AnalyzeTextSubmitOperation(WaitUntil.Completed, tex { ActionContent = new AbstractiveSummarizationActionContent { - SentenceCount = 1, + SummaryLength = SummaryLengthBucket.Medium, + Instruction = "XYZ-code", }, Name = "Document Abstractive Summarization Task 1", } @@ -2366,28 +2214,20 @@ TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); MultiLanguageTextInput textInput = new MultiLanguageTextInput { - MultiLanguageInputs = {new MultiLanguageInput("1", "I had a wonderful trip to Seattle last week.") - { - Language = "en", - }, new MultiLanguageInput("2", "I'm flying to NYC tomorrow. See you there.") + MultiLanguageInputs = {new MultiLanguageInput("1", "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks.") { Language = "en", }}, }; Operation operation = client.AnalyzeTextSubmitOperation(WaitUntil.Completed, textInput, new AnalyzeTextOperationAction[] { - new EntitiesOperationAction + new AbstractiveSummarizationOperationAction { - ActionContent = new EntitiesActionContent + ActionContent = new AbstractiveSummarizationActionContent { - ModelVersion = "latest", + SentenceCount = 1, }, - Name = "Recognize Entities", - }, - new CustomEntitiesOperationAction - { - ActionContent = new CustomEntitiesActionContent("MyProject", "MyDeployment"), - Name = "Recognize US Regions", + Name = "Document Abstractive Summarization Task 1", } }); ]]> @@ -2399,58 +2239,28 @@ TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); MultiLanguageTextInput textInput = new MultiLanguageTextInput { - MultiLanguageInputs = {new MultiLanguageInput("1", "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks.") + MultiLanguageInputs = {new MultiLanguageInput("1", "I had a wonderful trip to Seattle last week.") { Language = "en", - }}, -}; -Operation operation = client.AnalyzeTextSubmitOperation(WaitUntil.Completed, textInput, new AnalyzeTextOperationAction[] -{ - new CustomAbstractiveSummarizationOperationAction(new CustomAbstractiveSummarizationActionContent("my_project", "my_deployment")) - { - Name = "Custom Document Abstractive Summarization Task 1", - } -}); -]]> -This sample shows how to call AnalyzeTextSubmitOperation. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - -MultiLanguageTextInput textInput = new MultiLanguageTextInput -{ - MultiLanguageInputs = {new MultiLanguageInput("1", "Prescribed 100mg ibuprofen, taken twice daily.") + }, new MultiLanguageInput("2", "I'm flying to NYC tomorrow. See you there.") { Language = "en", }}, }; Operation operation = client.AnalyzeTextSubmitOperation(WaitUntil.Completed, textInput, new AnalyzeTextOperationAction[] { - new CustomHealthcareOperationAction - { - ActionContent = new CustomHealthcareActionContent("{PROJECT-NAME}", "{DEPLOYMENT-NAME}"), - } -}); -]]> -This sample shows how to call AnalyzeTextSubmitOperation. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - -MultiLanguageTextInput textInput = new MultiLanguageTextInput -{ - MultiLanguageInputs = {new MultiLanguageInput("1", "The food is great. But the service is bad.") + new EntitiesOperationAction { - Language = "en", - }}, -}; -Operation operation = client.AnalyzeTextSubmitOperation(WaitUntil.Completed, textInput, new AnalyzeTextOperationAction[] -{ - new CustomSentimentAnalysisOperationAction + ActionContent = new EntitiesActionContent + { + ModelVersion = "latest", + }, + Name = "Recognize Entities", + }, + new CustomEntitiesOperationAction { - ActionContent = new CustomSentimentAnalysisActionContent("{PROJECT-NAME}", "{DEPLOYMENT-NAME}"), + ActionContent = new CustomEntitiesActionContent("MyProject", "MyDeployment"), + Name = "Recognize US Regions", } }); ]]> @@ -2536,7 +2346,8 @@ using RequestContent content = RequestContent.Create(new taskName = "Document Abstractive Summarization Task 1", parameters = new { - sentenceCount = 1, + summaryLength = "medium", + instruction = "XYZ-code", }, } }, @@ -2551,7 +2362,7 @@ TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - displayName = "Extracting Location & US Region", + displayName = "Document Abstractive Summarization Task Example", analysisInput = new { documents = new object[] @@ -2560,13 +2371,7 @@ using RequestContent content = RequestContent.Create(new { id = "1", language = "en", - text = "I had a wonderful trip to Seattle last week.", - }, - new - { - id = "2", - language = "en", - text = "I'm flying to NYC tomorrow. See you there.", + text = "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks.", } }, }, @@ -2574,21 +2379,11 @@ using RequestContent content = RequestContent.Create(new { new { - kind = "EntityRecognition", - taskName = "Recognize Entities", - parameters = new - { - modelVersion = "latest", - }, - }, - new - { - kind = "CustomEntityRecognition", - taskName = "Recognize US Regions", + kind = "AbstractiveSummarization", + taskName = "Document Abstractive Summarization Task 1", parameters = new { - projectName = "MyProject", - deploymentName = "MyDeployment", + sentenceCount = 1, }, } }, @@ -2603,7 +2398,7 @@ TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - displayName = "Document Custom Abstractive Summarization Task Example", + displayName = "Extracting Location & US Region", analysisInput = new { documents = new object[] @@ -2612,43 +2407,13 @@ using RequestContent content = RequestContent.Create(new { id = "1", language = "en", - text = "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks.", - } - }, - }, - tasks = new object[] - { - new - { - kind = "CustomAbstractiveSummarization", - taskName = "Custom Document Abstractive Summarization Task 1", - parameters = new - { - projectName = "my_project", - deploymentName = "my_deployment", + text = "I had a wonderful trip to Seattle last week.", }, - } - }, -}); -Operation operation = await client.AnalyzeTextSubmitOperationAsync(WaitUntil.Completed, content); -]]> -This sample shows how to call AnalyzeTextSubmitOperationAsync. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - analysisInput = new - { - documents = new object[] - { new { - text = "Prescribed 100mg ibuprofen, taken twice daily.", - id = "1", + id = "2", language = "en", + text = "I'm flying to NYC tomorrow. See you there.", } }, }, @@ -2656,46 +2421,21 @@ using RequestContent content = RequestContent.Create(new { new { - kind = "CustomHealthcare", + kind = "EntityRecognition", + taskName = "Recognize Entities", parameters = new { - projectName = "{PROJECT-NAME}", - deploymentName = "{DEPLOYMENT-NAME}", + modelVersion = "latest", }, - } - }, -}); -Operation operation = await client.AnalyzeTextSubmitOperationAsync(WaitUntil.Completed, content); -]]> -This sample shows how to call AnalyzeTextSubmitOperationAsync. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - analysisInput = new - { - documents = new object[] - { - new - { - text = "The food is great. But the service is bad.", - id = "1", - language = "en", - } }, - }, - tasks = new object[] - { new { - kind = "CustomSentimentAnalysis", + kind = "CustomEntityRecognition", + taskName = "Recognize US Regions", parameters = new { - projectName = "{PROJECT-NAME}", - deploymentName = "{DEPLOYMENT-NAME}", + projectName = "MyProject", + deploymentName = "MyDeployment", }, } }, @@ -2804,7 +2544,8 @@ using RequestContent content = RequestContent.Create(new taskName = "Document Abstractive Summarization Task 1", parameters = new { - sentenceCount = 1, + summaryLength = "medium", + instruction = "XYZ-code", }, } }, @@ -2819,7 +2560,7 @@ TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - displayName = "Extracting Location & US Region", + displayName = "Document Abstractive Summarization Task Example", analysisInput = new { documents = new object[] @@ -2828,13 +2569,7 @@ using RequestContent content = RequestContent.Create(new { id = "1", language = "en", - text = "I had a wonderful trip to Seattle last week.", - }, - new - { - id = "2", - language = "en", - text = "I'm flying to NYC tomorrow. See you there.", + text = "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks.", } }, }, @@ -2842,21 +2577,11 @@ using RequestContent content = RequestContent.Create(new { new { - kind = "EntityRecognition", - taskName = "Recognize Entities", - parameters = new - { - modelVersion = "latest", - }, - }, - new - { - kind = "CustomEntityRecognition", - taskName = "Recognize US Regions", + kind = "AbstractiveSummarization", + taskName = "Document Abstractive Summarization Task 1", parameters = new { - projectName = "MyProject", - deploymentName = "MyDeployment", + sentenceCount = 1, }, } }, @@ -2871,7 +2596,7 @@ TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { - displayName = "Document Custom Abstractive Summarization Task Example", + displayName = "Extracting Location & US Region", analysisInput = new { documents = new object[] @@ -2880,43 +2605,13 @@ using RequestContent content = RequestContent.Create(new { id = "1", language = "en", - text = "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks.", - } - }, - }, - tasks = new object[] - { - new - { - kind = "CustomAbstractiveSummarization", - taskName = "Custom Document Abstractive Summarization Task 1", - parameters = new - { - projectName = "my_project", - deploymentName = "my_deployment", + text = "I had a wonderful trip to Seattle last week.", }, - } - }, -}); -Operation operation = client.AnalyzeTextSubmitOperation(WaitUntil.Completed, content); -]]> -This sample shows how to call AnalyzeTextSubmitOperation. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - analysisInput = new - { - documents = new object[] - { new { - text = "Prescribed 100mg ibuprofen, taken twice daily.", - id = "1", + id = "2", language = "en", + text = "I'm flying to NYC tomorrow. See you there.", } }, }, @@ -2924,46 +2619,21 @@ using RequestContent content = RequestContent.Create(new { new { - kind = "CustomHealthcare", + kind = "EntityRecognition", + taskName = "Recognize Entities", parameters = new { - projectName = "{PROJECT-NAME}", - deploymentName = "{DEPLOYMENT-NAME}", + modelVersion = "latest", }, - } - }, -}); -Operation operation = client.AnalyzeTextSubmitOperation(WaitUntil.Completed, content); -]]> -This sample shows how to call AnalyzeTextSubmitOperation. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - analysisInput = new - { - documents = new object[] - { - new - { - text = "The food is great. But the service is bad.", - id = "1", - language = "en", - } }, - }, - tasks = new object[] - { new { - kind = "CustomSentimentAnalysis", + kind = "CustomEntityRecognition", + taskName = "Recognize US Regions", parameters = new { - projectName = "{PROJECT-NAME}", - deploymentName = "{DEPLOYMENT-NAME}", + projectName = "MyProject", + deploymentName = "MyDeployment", }, } }, diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationActionContent.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationActionContent.Serialization.cs deleted file mode 100644 index 74f43285ba8b..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationActionContent.Serialization.cs +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Language.Text -{ - public partial class DynamicClassificationActionContent : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(DynamicClassificationActionContent)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(LoggingOptOut)) - { - writer.WritePropertyName("loggingOptOut"u8); - writer.WriteBooleanValue(LoggingOptOut.Value); - } - if (Optional.IsDefined(ModelVersion)) - { - writer.WritePropertyName("modelVersion"u8); - writer.WriteStringValue(ModelVersion); - } - if (Optional.IsDefined(ClassificationType)) - { - writer.WritePropertyName("classificationType"u8); - writer.WriteStringValue(ClassificationType.Value.ToString()); - } - writer.WritePropertyName("categories"u8); - writer.WriteStartArray(); - foreach (var item in Categories) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - DynamicClassificationActionContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(DynamicClassificationActionContent)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeDynamicClassificationActionContent(document.RootElement, options); - } - - internal static DynamicClassificationActionContent DeserializeDynamicClassificationActionContent(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - bool? loggingOptOut = default; - string modelVersion = default; - ClassificationType? classificationType = default; - IList categories = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("loggingOptOut"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - loggingOptOut = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("modelVersion"u8)) - { - modelVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("classificationType"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - classificationType = new ClassificationType(property.Value.GetString()); - continue; - } - if (property.NameEquals("categories"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - categories = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new DynamicClassificationActionContent(loggingOptOut, modelVersion, classificationType, categories, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(DynamicClassificationActionContent)} does not support writing '{options.Format}' format."); - } - } - - DynamicClassificationActionContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeDynamicClassificationActionContent(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(DynamicClassificationActionContent)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static DynamicClassificationActionContent FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeDynamicClassificationActionContent(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationActionContent.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationActionContent.cs deleted file mode 100644 index c786cfccc30f..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationActionContent.cs +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Azure.AI.Language.Text -{ - /// Supported parameters for a Dynamic Classification task. - public partial class DynamicClassificationActionContent - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// a list of categories to which input is classified to. - /// is null. - public DynamicClassificationActionContent(IEnumerable categories) - { - Argument.AssertNotNull(categories, nameof(categories)); - - Categories = categories.ToList(); - } - - /// Initializes a new instance of . - /// logging opt out. - /// model version. - /// Specifies either one or multiple categories per document. Defaults to multi classification which may return more than one class for each document. - /// a list of categories to which input is classified to. - /// Keeps track of any properties unknown to the library. - internal DynamicClassificationActionContent(bool? loggingOptOut, string modelVersion, ClassificationType? classificationType, IList categories, IDictionary serializedAdditionalRawData) - { - LoggingOptOut = loggingOptOut; - ModelVersion = modelVersion; - ClassificationType = classificationType; - Categories = categories; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal DynamicClassificationActionContent() - { - } - - /// logging opt out. - public bool? LoggingOptOut { get; set; } - /// model version. - public string ModelVersion { get; set; } - /// Specifies either one or multiple categories per document. Defaults to multi classification which may return more than one class for each document. - public ClassificationType? ClassificationType { get; set; } - /// a list of categories to which input is classified to. - public IList Categories { get; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesResult.Serialization.cs index 1138f92b9341..fd065d017edf 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesResult.Serialization.cs @@ -95,7 +95,7 @@ internal static EntitiesResult DeserializeEntitiesResult(JsonElement element, Mo IReadOnlyList errors = default; RequestStatistics statistics = default; string modelVersion = default; - IReadOnlyList documents = default; + IReadOnlyList documents = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -126,10 +126,10 @@ internal static EntitiesResult DeserializeEntitiesResult(JsonElement element, Mo } if (property.NameEquals("documents"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(EntitiesDocumentResultWithMetadataDetectedLanguage.DeserializeEntitiesDocumentResultWithMetadataDetectedLanguage(item, options)); + array.Add(EntityActionResultWithMetadata.DeserializeEntityActionResultWithMetadata(item, options)); } documents = array; continue; diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesResult.cs index cef0b80c969c..3454cd591f99 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesResult.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesResult.cs @@ -51,7 +51,7 @@ public partial class EntitiesResult /// This field indicates which model is used for scoring. /// Response by document. /// , or is null. - internal EntitiesResult(IEnumerable errors, string modelVersion, IEnumerable documents) + internal EntitiesResult(IEnumerable errors, string modelVersion, IEnumerable documents) { Argument.AssertNotNull(errors, nameof(errors)); Argument.AssertNotNull(modelVersion, nameof(modelVersion)); @@ -68,7 +68,7 @@ internal EntitiesResult(IEnumerable errors, string modelVersion, /// This field indicates which model is used for scoring. /// Response by document. /// Keeps track of any properties unknown to the library. - internal EntitiesResult(IReadOnlyList errors, RequestStatistics statistics, string modelVersion, IReadOnlyList documents, IDictionary serializedAdditionalRawData) + internal EntitiesResult(IReadOnlyList errors, RequestStatistics statistics, string modelVersion, IReadOnlyList documents, IDictionary serializedAdditionalRawData) { Errors = errors; Statistics = statistics; @@ -89,6 +89,6 @@ internal EntitiesResult() /// This field indicates which model is used for scoring. public string ModelVersion { get; } /// Response by document. - public IReadOnlyList Documents { get; } + public IReadOnlyList Documents { get; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesWithMetadataAutoResult.Serialization.cs similarity index 69% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationResult.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesWithMetadataAutoResult.Serialization.cs index f35a77a7bd7f..388cbaabbd72 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesWithMetadataAutoResult.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Language.Text { - public partial class DynamicClassificationResult : IUtf8JsonSerializable, IJsonModel + public partial class EntitiesWithMetadataAutoResult : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(DynamicClassificationResult)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(EntitiesWithMetadataAutoResult)} does not support writing '{format}' format."); } writer.WritePropertyName("errors"u8); @@ -72,19 +72,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - DynamicClassificationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + EntitiesWithMetadataAutoResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(DynamicClassificationResult)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(EntitiesWithMetadataAutoResult)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeDynamicClassificationResult(document.RootElement, options); + return DeserializeEntitiesWithMetadataAutoResult(document.RootElement, options); } - internal static DynamicClassificationResult DeserializeDynamicClassificationResult(JsonElement element, ModelReaderWriterOptions options = null) + internal static EntitiesWithMetadataAutoResult DeserializeEntitiesWithMetadataAutoResult(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -95,7 +95,7 @@ internal static DynamicClassificationResult DeserializeDynamicClassificationResu IReadOnlyList errors = default; RequestStatistics statistics = default; string modelVersion = default; - IReadOnlyList documents = default; + IReadOnlyList documents = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -126,10 +126,10 @@ internal static DynamicClassificationResult DeserializeDynamicClassificationResu } if (property.NameEquals("documents"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(DynamicClassificationDocumentResult.DeserializeDynamicClassificationDocumentResult(item, options)); + array.Add(EntityActionResult.DeserializeEntityActionResult(item, options)); } documents = array; continue; @@ -140,46 +140,46 @@ internal static DynamicClassificationResult DeserializeDynamicClassificationResu } } serializedAdditionalRawData = rawDataDictionary; - return new DynamicClassificationResult(errors, statistics, modelVersion, documents, serializedAdditionalRawData); + return new EntitiesWithMetadataAutoResult(errors, statistics, modelVersion, documents, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(DynamicClassificationResult)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(EntitiesWithMetadataAutoResult)} does not support writing '{options.Format}' format."); } } - DynamicClassificationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + EntitiesWithMetadataAutoResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeDynamicClassificationResult(document.RootElement, options); + return DeserializeEntitiesWithMetadataAutoResult(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(DynamicClassificationResult)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(EntitiesWithMetadataAutoResult)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static DynamicClassificationResult FromResponse(Response response) + internal static EntitiesWithMetadataAutoResult FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeDynamicClassificationResult(document.RootElement); + return DeserializeEntitiesWithMetadataAutoResult(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesWithMetadataAutoResult.cs similarity index 78% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationResult.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesWithMetadataAutoResult.cs index 2bbb92c5e53d..27aa81560562 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationResult.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntitiesWithMetadataAutoResult.cs @@ -11,8 +11,8 @@ namespace Azure.AI.Language.Text { - /// Contains the Dynamic Classification result. - public partial class DynamicClassificationResult + /// Contains the entity recognition task result. + public partial class EntitiesWithMetadataAutoResult { /// /// Keeps track of any properties unknown to the library. @@ -46,12 +46,12 @@ public partial class DynamicClassificationResult /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// Initializes a new instance of . /// Errors by document id. /// This field indicates which model is used for scoring. /// Response by document. /// , or is null. - internal DynamicClassificationResult(IEnumerable errors, string modelVersion, IEnumerable documents) + internal EntitiesWithMetadataAutoResult(IEnumerable errors, string modelVersion, IEnumerable documents) { Argument.AssertNotNull(errors, nameof(errors)); Argument.AssertNotNull(modelVersion, nameof(modelVersion)); @@ -62,13 +62,13 @@ internal DynamicClassificationResult(IEnumerable errors, string m Documents = documents.ToList(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Errors by document id. /// if showStats=true was specified in the request this field will contain information about the request payload. /// This field indicates which model is used for scoring. /// Response by document. /// Keeps track of any properties unknown to the library. - internal DynamicClassificationResult(IReadOnlyList errors, RequestStatistics statistics, string modelVersion, IReadOnlyList documents, IDictionary serializedAdditionalRawData) + internal EntitiesWithMetadataAutoResult(IReadOnlyList errors, RequestStatistics statistics, string modelVersion, IReadOnlyList documents, IDictionary serializedAdditionalRawData) { Errors = errors; Statistics = statistics; @@ -77,8 +77,8 @@ internal DynamicClassificationResult(IReadOnlyList errors, Reques _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal DynamicClassificationResult() + /// Initializes a new instance of for deserialization. + internal EntitiesWithMetadataAutoResult() { } @@ -89,6 +89,6 @@ internal DynamicClassificationResult() /// This field indicates which model is used for scoring. public string ModelVersion { get; } /// Response by document. - public IReadOnlyList Documents { get; } + public IReadOnlyList Documents { get; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityActionResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityActionResult.Serialization.cs index 423e7df17d5c..ceba4afd14ba 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityActionResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityActionResult.Serialization.cs @@ -100,7 +100,7 @@ internal static EntityActionResult DeserializeEntityActionResult(JsonElement ele string id = default; IReadOnlyList warnings = default; DocumentStatistics statistics = default; - IReadOnlyList entities = default; + IReadOnlyList entities = default; DetectedLanguage detectedLanguage = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -132,10 +132,10 @@ internal static EntityActionResult DeserializeEntityActionResult(JsonElement ele } if (property.NameEquals("entities"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(NamedEntity.DeserializeNamedEntity(item, options)); + array.Add(NamedEntityWithMetadata.DeserializeNamedEntityWithMetadata(item, options)); } entities = array; continue; diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityActionResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityActionResult.cs index ca4242d15ba3..00c127c302c7 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityActionResult.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityActionResult.cs @@ -11,7 +11,7 @@ namespace Azure.AI.Language.Text { - /// Contains the entity recognition task result for the document with detected language. + /// Contains the entity recognition task result for the document with metadata and detected language. public partial class EntityActionResult { /// @@ -51,7 +51,7 @@ public partial class EntityActionResult /// Warnings encountered while processing document. /// Recognized entities in the document. /// , or is null. - internal EntityActionResult(string id, IEnumerable warnings, IEnumerable entities) + internal EntityActionResult(string id, IEnumerable warnings, IEnumerable entities) { Argument.AssertNotNull(id, nameof(id)); Argument.AssertNotNull(warnings, nameof(warnings)); @@ -69,7 +69,7 @@ internal EntityActionResult(string id, IEnumerable warnings, IE /// Recognized entities in the document. /// If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document. /// Keeps track of any properties unknown to the library. - internal EntityActionResult(string id, IReadOnlyList warnings, DocumentStatistics statistics, IReadOnlyList entities, DetectedLanguage detectedLanguage, IDictionary serializedAdditionalRawData) + internal EntityActionResult(string id, IReadOnlyList warnings, DocumentStatistics statistics, IReadOnlyList entities, DetectedLanguage detectedLanguage, IDictionary serializedAdditionalRawData) { Id = id; Warnings = warnings; @@ -91,7 +91,7 @@ internal EntityActionResult() /// if showStats=true was specified in the request this field will contain information about the document payload. public DocumentStatistics Statistics { get; } /// Recognized entities in the document. - public IReadOnlyList Entities { get; } + public IReadOnlyList Entities { get; } /// If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document. public DetectedLanguage DetectedLanguage { get; } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationDocumentResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityActionResultWithMetadata.Serialization.cs similarity index 65% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationDocumentResult.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityActionResultWithMetadata.Serialization.cs index 462872384733..ff64d5a84d05 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationDocumentResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityActionResultWithMetadata.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Language.Text { - public partial class DynamicClassificationDocumentResult : IUtf8JsonSerializable, IJsonModel + public partial class EntityActionResultWithMetadata : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(DynamicClassificationDocumentResult)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(EntityActionResultWithMetadata)} does not support writing '{format}' format."); } writer.WritePropertyName("id"u8); @@ -48,9 +48,9 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("statistics"u8); writer.WriteObjectValue(Statistics, options); } - writer.WritePropertyName("classifications"u8); + writer.WritePropertyName("entities"u8); writer.WriteStartArray(); - foreach (var item in Classifications) + foreach (var item in Entities) { writer.WriteObjectValue(item, options); } @@ -72,19 +72,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - DynamicClassificationDocumentResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + EntityActionResultWithMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(DynamicClassificationDocumentResult)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(EntityActionResultWithMetadata)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeDynamicClassificationDocumentResult(document.RootElement, options); + return DeserializeEntityActionResultWithMetadata(document.RootElement, options); } - internal static DynamicClassificationDocumentResult DeserializeDynamicClassificationDocumentResult(JsonElement element, ModelReaderWriterOptions options = null) + internal static EntityActionResultWithMetadata DeserializeEntityActionResultWithMetadata(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -95,7 +95,7 @@ internal static DynamicClassificationDocumentResult DeserializeDynamicClassifica string id = default; IReadOnlyList warnings = default; DocumentStatistics statistics = default; - IReadOnlyList classifications = default; + IReadOnlyList entities = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -124,14 +124,14 @@ internal static DynamicClassificationDocumentResult DeserializeDynamicClassifica statistics = DocumentStatistics.DeserializeDocumentStatistics(property.Value, options); continue; } - if (property.NameEquals("classifications"u8)) + if (property.NameEquals("entities"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(ClassificationResult.DeserializeClassificationResult(item, options)); + array.Add(NamedEntityWithMetadata.DeserializeNamedEntityWithMetadata(item, options)); } - classifications = array; + entities = array; continue; } if (options.Format != "W") @@ -140,46 +140,46 @@ internal static DynamicClassificationDocumentResult DeserializeDynamicClassifica } } serializedAdditionalRawData = rawDataDictionary; - return new DynamicClassificationDocumentResult(id, warnings, statistics, classifications, serializedAdditionalRawData); + return new EntityActionResultWithMetadata(id, warnings, statistics, entities, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(DynamicClassificationDocumentResult)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(EntityActionResultWithMetadata)} does not support writing '{options.Format}' format."); } } - DynamicClassificationDocumentResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + EntityActionResultWithMetadata IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeDynamicClassificationDocumentResult(document.RootElement, options); + return DeserializeEntityActionResultWithMetadata(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(DynamicClassificationDocumentResult)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(EntityActionResultWithMetadata)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static DynamicClassificationDocumentResult FromResponse(Response response) + internal static EntityActionResultWithMetadata FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeDynamicClassificationDocumentResult(document.RootElement); + return DeserializeEntityActionResultWithMetadata(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationDocumentResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityActionResultWithMetadata.cs similarity index 67% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationDocumentResult.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityActionResultWithMetadata.cs index dcd6f4daef44..da206ba84fb5 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/DynamicClassificationDocumentResult.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityActionResultWithMetadata.cs @@ -11,8 +11,8 @@ namespace Azure.AI.Language.Text { - /// Contains the Dynamic Classification document result. - public partial class DynamicClassificationDocumentResult + /// Entity documents result with metadata. + public partial class EntityActionResultWithMetadata { /// /// Keeps track of any properties unknown to the library. @@ -46,39 +46,39 @@ public partial class DynamicClassificationDocumentResult /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// Initializes a new instance of . /// Unique, non-empty document identifier. /// Warnings encountered while processing document. - /// Array of classification results. - /// , or is null. - internal DynamicClassificationDocumentResult(string id, IEnumerable warnings, IEnumerable classifications) + /// Recognized entities in the document. + /// , or is null. + internal EntityActionResultWithMetadata(string id, IEnumerable warnings, IEnumerable entities) { Argument.AssertNotNull(id, nameof(id)); Argument.AssertNotNull(warnings, nameof(warnings)); - Argument.AssertNotNull(classifications, nameof(classifications)); + Argument.AssertNotNull(entities, nameof(entities)); Id = id; Warnings = warnings.ToList(); - Classifications = classifications.ToList(); + Entities = entities.ToList(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Unique, non-empty document identifier. /// Warnings encountered while processing document. /// if showStats=true was specified in the request this field will contain information about the document payload. - /// Array of classification results. + /// Recognized entities in the document. /// Keeps track of any properties unknown to the library. - internal DynamicClassificationDocumentResult(string id, IReadOnlyList warnings, DocumentStatistics statistics, IReadOnlyList classifications, IDictionary serializedAdditionalRawData) + internal EntityActionResultWithMetadata(string id, IReadOnlyList warnings, DocumentStatistics statistics, IReadOnlyList entities, IDictionary serializedAdditionalRawData) { Id = id; Warnings = warnings; Statistics = statistics; - Classifications = classifications; + Entities = entities; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal DynamicClassificationDocumentResult() + /// Initializes a new instance of for deserialization. + internal EntityActionResultWithMetadata() { } @@ -88,7 +88,7 @@ internal DynamicClassificationDocumentResult() public IReadOnlyList Warnings { get; } /// if showStats=true was specified in the request this field will contain information about the document payload. public DocumentStatistics Statistics { get; } - /// Array of classification results. - public IReadOnlyList Classifications { get; } + /// Recognized entities in the document. + public IReadOnlyList Entities { get; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityComponentKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityComponentKind.cs deleted file mode 100644 index 71668dddfd1a..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityComponentKind.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Language.Text -{ - /// Kind of entity components supported. - internal readonly partial struct EntityComponentKind : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public EntityComponentKind(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string PrebuiltComponentValue = "PrebuiltComponent"; - private const string LearnedComponentValue = "LearnedComponent"; - private const string ListComponentValue = "ListComponent"; - - /// Prebuilt component. - public static EntityComponentKind PrebuiltComponent { get; } = new EntityComponentKind(PrebuiltComponentValue); - /// Learned component. - public static EntityComponentKind LearnedComponent { get; } = new EntityComponentKind(LearnedComponentValue); - /// List component. - public static EntityComponentKind ListComponent { get; } = new EntityComponentKind(ListComponentValue); - /// Determines if two values are the same. - public static bool operator ==(EntityComponentKind left, EntityComponentKind right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(EntityComponentKind left, EntityComponentKind right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator EntityComponentKind(string value) => new EntityComponentKind(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is EntityComponentKind other && Equals(other); - /// - public bool Equals(EntityComponentKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/UnknownEntityComponentInformation.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityMaskPolicyType.Serialization.cs similarity index 57% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/UnknownEntityComponentInformation.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityMaskPolicyType.Serialization.cs index 66f57eb2a87b..ac1da62b2e10 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/UnknownEntityComponentInformation.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityMaskPolicyType.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Language.Text { - internal partial class UnknownEntityComponentInformation : IUtf8JsonSerializable, IJsonModel + public partial class EntityMaskPolicyType : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,28 +28,28 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe /// The client options for reading and writing models. protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(EntityComponentInformation)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(EntityMaskPolicyType)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); } - EntityComponentInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + EntityMaskPolicyType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(EntityComponentInformation)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(EntityMaskPolicyType)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeEntityComponentInformation(document.RootElement, options); + return DeserializeEntityMaskPolicyType(document.RootElement, options); } - internal static UnknownEntityComponentInformation DeserializeUnknownEntityComponentInformation(JsonElement element, ModelReaderWriterOptions options = null) + internal static EntityMaskPolicyType DeserializeEntityMaskPolicyType(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -57,14 +57,14 @@ internal static UnknownEntityComponentInformation DeserializeUnknownEntityCompon { return null; } - EntityComponentKind entityComponentKind = "Unknown"; + RedactionPolicyKind policyKind = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("entityComponentKind"u8)) + if (property.NameEquals("policyKind"u8)) { - entityComponentKind = new EntityComponentKind(property.Value.GetString()); + policyKind = new RedactionPolicyKind(property.Value.GetString()); continue; } if (options.Format != "W") @@ -73,53 +73,53 @@ internal static UnknownEntityComponentInformation DeserializeUnknownEntityCompon } } serializedAdditionalRawData = rawDataDictionary; - return new UnknownEntityComponentInformation(entityComponentKind, serializedAdditionalRawData); + return new EntityMaskPolicyType(policyKind, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(EntityComponentInformation)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(EntityMaskPolicyType)} does not support writing '{options.Format}' format."); } } - EntityComponentInformation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + EntityMaskPolicyType IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeEntityComponentInformation(document.RootElement, options); + return DeserializeEntityMaskPolicyType(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(EntityComponentInformation)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(EntityMaskPolicyType)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new UnknownEntityComponentInformation FromResponse(Response response) + internal static new EntityMaskPolicyType FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeUnknownEntityComponentInformation(document.RootElement); + return DeserializeEntityMaskPolicyType(document.RootElement); } /// Convert into a . internal override RequestContent ToRequestContent() { var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); return content; } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityMaskPolicyType.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityMaskPolicyType.cs new file mode 100644 index 000000000000..2f16c95093e8 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/EntityMaskPolicyType.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text +{ + /// Represents the policy of redacting PII with the entity type. + public partial class EntityMaskPolicyType : BaseRedactionPolicy + { + /// Initializes a new instance of . + public EntityMaskPolicyType() + { + PolicyKind = RedactionPolicyKind.EntityMask; + } + + /// Initializes a new instance of . + /// The entity RedactionPolicy object kind. + /// Keeps track of any properties unknown to the library. + internal EntityMaskPolicyType(RedactionPolicyKind policyKind, IDictionary serializedAdditionalRawData) : base(policyKind, serializedAdditionalRawData) + { + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/LearnedComponent.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/LearnedComponent.cs deleted file mode 100644 index b4309c19fe53..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/LearnedComponent.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Language.Text -{ - /// This object contains information of the learned component of the detected entity. - public partial class LearnedComponent : EntityComponentInformation - { - /// Initializes a new instance of . - internal LearnedComponent() - { - EntityComponentKind = EntityComponentKind.LearnedComponent; - } - - /// Initializes a new instance of . - /// Kind of entity component. - /// Keeps track of any properties unknown to the library. - /// The learned component of an extracted entity type. - internal LearnedComponent(EntityComponentKind entityComponentKind, IDictionary serializedAdditionalRawData, string value) : base(entityComponentKind, serializedAdditionalRawData) - { - Value = value; - } - - /// The learned component of an extracted entity type. - public string Value { get; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ListComponent.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ListComponent.cs deleted file mode 100644 index d6f13e89e85e..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ListComponent.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Language.Text -{ - /// This object contains information of the list component of the detected entity. - public partial class ListComponent : EntityComponentInformation - { - /// Initializes a new instance of . - internal ListComponent() - { - EntityComponentKind = EntityComponentKind.ListComponent; - } - - /// Initializes a new instance of . - /// Kind of entity component. - /// Keeps track of any properties unknown to the library. - /// The list key of an extracted entity type. - internal ListComponent(EntityComponentKind entityComponentKind, IDictionary serializedAdditionalRawData, string value) : base(entityComponentKind, serializedAdditionalRawData) - { - Value = value; - } - - /// The list key of an extracted entity type. - public string Value { get; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/NamedEntityWithMetadata.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/NamedEntityWithMetadata.Serialization.cs index c1ae7d426497..80133332b83f 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/NamedEntityWithMetadata.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/NamedEntityWithMetadata.Serialization.cs @@ -49,15 +49,21 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNumberValue(Length); writer.WritePropertyName("confidenceScore"u8); writer.WriteNumberValue(ConfidenceScore); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - writer.WritePropertyName("tags"u8); - writer.WriteStartArray(); - foreach (var item in Tags) + if (Optional.IsDefined(Type)) { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartArray(); + foreach (var item in Tags) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (Optional.IsDefined(Metadata)) { writer.WritePropertyName("metadata"u8); @@ -150,6 +156,10 @@ internal static NamedEntityWithMetadata DeserializeNamedEntityWithMetadata(JsonE } if (property.NameEquals("tags"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -181,7 +191,7 @@ internal static NamedEntityWithMetadata DeserializeNamedEntityWithMetadata(JsonE length, confidenceScore, type, - tags, + tags ?? new ChangeTrackingList(), metadata, serializedAdditionalRawData); } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/NamedEntityWithMetadata.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/NamedEntityWithMetadata.cs index 61cfe57317d5..8b6a0b3cfec7 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/NamedEntityWithMetadata.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/NamedEntityWithMetadata.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.AI.Language.Text { @@ -52,23 +51,18 @@ public partial class NamedEntityWithMetadata /// Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned. /// Length for the entity text. Use of different 'stringIndexType' values can affect the length returned. /// Confidence score between 0 and 1 of the extracted entity. - /// An entity type is the lowest (or finest) granularity at which the entity has been detected. The type maps to the specific metadata attributes associated with the entity detected. - /// List of entity tags. Tags are to express some similarities/affinity between entities. - /// , , or is null. - internal NamedEntityWithMetadata(string text, string category, int offset, int length, double confidenceScore, string type, IEnumerable tags) + /// or is null. + internal NamedEntityWithMetadata(string text, string category, int offset, int length, double confidenceScore) { Argument.AssertNotNull(text, nameof(text)); Argument.AssertNotNull(category, nameof(category)); - Argument.AssertNotNull(type, nameof(type)); - Argument.AssertNotNull(tags, nameof(tags)); Text = text; Category = category; Offset = offset; Length = length; ConfidenceScore = confidenceScore; - Type = type; - Tags = tags.ToList(); + Tags = new ChangeTrackingList(); } /// Initializes a new instance of . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/LearnedComponent.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/NoMaskPolicyType.Serialization.cs similarity index 62% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/LearnedComponent.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/NoMaskPolicyType.Serialization.cs index 13f35d298ae2..35dfdd62a487 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/LearnedComponent.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/NoMaskPolicyType.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Language.Text { - public partial class LearnedComponent : IUtf8JsonSerializable, IJsonModel + public partial class NoMaskPolicyType : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,33 +28,28 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriter /// The client options for reading and writing models. protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(LearnedComponent)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(NoMaskPolicyType)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Value)) - { - writer.WritePropertyName("value"u8); - writer.WriteStringValue(Value); - } } - LearnedComponent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + NoMaskPolicyType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(LearnedComponent)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(NoMaskPolicyType)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeLearnedComponent(document.RootElement, options); + return DeserializeNoMaskPolicyType(document.RootElement, options); } - internal static LearnedComponent DeserializeLearnedComponent(JsonElement element, ModelReaderWriterOptions options = null) + internal static NoMaskPolicyType DeserializeNoMaskPolicyType(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -62,20 +57,14 @@ internal static LearnedComponent DeserializeLearnedComponent(JsonElement element { return null; } - string value = default; - EntityComponentKind entityComponentKind = default; + RedactionPolicyKind policyKind = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("value"u8)) - { - value = property.Value.GetString(); - continue; - } - if (property.NameEquals("entityComponentKind"u8)) + if (property.NameEquals("policyKind"u8)) { - entityComponentKind = new EntityComponentKind(property.Value.GetString()); + policyKind = new RedactionPolicyKind(property.Value.GetString()); continue; } if (options.Format != "W") @@ -84,46 +73,46 @@ internal static LearnedComponent DeserializeLearnedComponent(JsonElement element } } serializedAdditionalRawData = rawDataDictionary; - return new LearnedComponent(entityComponentKind, serializedAdditionalRawData, value); + return new NoMaskPolicyType(policyKind, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(LearnedComponent)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(NoMaskPolicyType)} does not support writing '{options.Format}' format."); } } - LearnedComponent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + NoMaskPolicyType IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeLearnedComponent(document.RootElement, options); + return DeserializeNoMaskPolicyType(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(LearnedComponent)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(NoMaskPolicyType)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new LearnedComponent FromResponse(Response response) + internal static new NoMaskPolicyType FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeLearnedComponent(document.RootElement); + return DeserializeNoMaskPolicyType(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/NoMaskPolicyType.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/NoMaskPolicyType.cs new file mode 100644 index 000000000000..41ac586ad1cb --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/NoMaskPolicyType.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text +{ + /// Represents the policy of not redacting found PII. + public partial class NoMaskPolicyType : BaseRedactionPolicy + { + /// Initializes a new instance of . + public NoMaskPolicyType() + { + PolicyKind = RedactionPolicyKind.NoMask; + } + + /// Initializes a new instance of . + /// The entity RedactionPolicy object kind. + /// Keeps track of any properties unknown to the library. + internal NoMaskPolicyType(RedactionPolicyKind policyKind, IDictionary serializedAdditionalRawData) : base(policyKind, serializedAdditionalRawData) + { + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiActionContent.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiActionContent.Serialization.cs index 29c01556180a..d1533e25a7dd 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiActionContent.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiActionContent.Serialization.cs @@ -74,10 +74,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsDefined(RedactionCharacter)) + if (Optional.IsDefined(RedactionPolicy)) { - writer.WritePropertyName("redactionCharacter"u8); - writer.WriteStringValue(RedactionCharacter.Value.ToString()); + writer.WritePropertyName("redactionPolicy"u8); + writer.WriteObjectValue(RedactionPolicy, options); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -122,7 +122,7 @@ internal static PiiActionContent DeserializePiiActionContent(JsonElement element IList piiCategories = default; StringIndexType? stringIndexType = default; IList excludePiiCategories = default; - RedactionCharacter? redactionCharacter = default; + BaseRedactionPolicy redactionPolicy = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -187,13 +187,13 @@ internal static PiiActionContent DeserializePiiActionContent(JsonElement element excludePiiCategories = array; continue; } - if (property.NameEquals("redactionCharacter"u8)) + if (property.NameEquals("redactionPolicy"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - redactionCharacter = new RedactionCharacter(property.Value.GetString()); + redactionPolicy = BaseRedactionPolicy.DeserializeBaseRedactionPolicy(property.Value, options); continue; } if (options.Format != "W") @@ -209,7 +209,7 @@ internal static PiiActionContent DeserializePiiActionContent(JsonElement element piiCategories ?? new ChangeTrackingList(), stringIndexType, excludePiiCategories ?? new ChangeTrackingList(), - redactionCharacter, + redactionPolicy, serializedAdditionalRawData); } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiActionContent.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiActionContent.cs index 5fdce1559484..f87442aa7201 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiActionContent.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiActionContent.cs @@ -59,9 +59,13 @@ public PiiActionContent() /// Enumeration of PII categories to be returned in the response. /// StringIndexType to be used for analysis. /// Enumeration of PII categories to be excluded in the response. - /// Character to be used for redaction. Default in '*'. + /// + /// RedactionPolicy to be used on the input. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// /// Keeps track of any properties unknown to the library. - internal PiiActionContent(bool? loggingOptOut, string modelVersion, PiiDomain? domain, IList piiCategories, StringIndexType? stringIndexType, IList excludePiiCategories, RedactionCharacter? redactionCharacter, IDictionary serializedAdditionalRawData) + internal PiiActionContent(bool? loggingOptOut, string modelVersion, PiiDomain? domain, IList piiCategories, StringIndexType? stringIndexType, IList excludePiiCategories, BaseRedactionPolicy redactionPolicy, IDictionary serializedAdditionalRawData) { LoggingOptOut = loggingOptOut; ModelVersion = modelVersion; @@ -69,7 +73,7 @@ internal PiiActionContent(bool? loggingOptOut, string modelVersion, PiiDomain? d PiiCategories = piiCategories; StringIndexType = stringIndexType; ExcludePiiCategories = excludePiiCategories; - RedactionCharacter = redactionCharacter; + RedactionPolicy = redactionPolicy; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -85,7 +89,11 @@ internal PiiActionContent(bool? loggingOptOut, string modelVersion, PiiDomain? d public StringIndexType? StringIndexType { get; set; } /// Enumeration of PII categories to be excluded in the response. public IList ExcludePiiCategories { get; } - /// Character to be used for redaction. Default in '*'. - public RedactionCharacter? RedactionCharacter { get; set; } + /// + /// RedactionPolicy to be used on the input. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public BaseRedactionPolicy RedactionPolicy { get; set; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiActionResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiActionResult.Serialization.cs index 4e53776765b5..1204f88445b8 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiActionResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiActionResult.Serialization.cs @@ -103,7 +103,7 @@ internal static PiiActionResult DeserializePiiActionResult(JsonElement element, IReadOnlyList warnings = default; DocumentStatistics statistics = default; string redactedText = default; - IReadOnlyList entities = default; + IReadOnlyList entities = default; DetectedLanguage detectedLanguage = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -140,10 +140,10 @@ internal static PiiActionResult DeserializePiiActionResult(JsonElement element, } if (property.NameEquals("entities"u8)) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(NamedEntity.DeserializeNamedEntity(item, options)); + array.Add(PiiEntity.DeserializePiiEntity(item, options)); } entities = array; continue; diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiActionResult.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiActionResult.cs index 6c86b7ef74a9..12a713ef3704 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiActionResult.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiActionResult.cs @@ -52,7 +52,7 @@ public partial class PiiActionResult /// Returns redacted text. /// Recognized entities in the document. /// , , or is null. - internal PiiActionResult(string id, IEnumerable warnings, string redactedText, IEnumerable entities) + internal PiiActionResult(string id, IEnumerable warnings, string redactedText, IEnumerable entities) { Argument.AssertNotNull(id, nameof(id)); Argument.AssertNotNull(warnings, nameof(warnings)); @@ -73,7 +73,7 @@ internal PiiActionResult(string id, IEnumerable warnings, strin /// Recognized entities in the document. /// If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document. /// Keeps track of any properties unknown to the library. - internal PiiActionResult(string id, IReadOnlyList warnings, DocumentStatistics statistics, string redactedText, IReadOnlyList entities, DetectedLanguage detectedLanguage, IDictionary serializedAdditionalRawData) + internal PiiActionResult(string id, IReadOnlyList warnings, DocumentStatistics statistics, string redactedText, IReadOnlyList entities, DetectedLanguage detectedLanguage, IDictionary serializedAdditionalRawData) { Id = id; Warnings = warnings; @@ -98,7 +98,7 @@ internal PiiActionResult() /// Returns redacted text. public string RedactedText { get; } /// Recognized entities in the document. - public IReadOnlyList Entities { get; } + public IReadOnlyList Entities { get; } /// If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document. public DetectedLanguage DetectedLanguage { get; } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareEntity.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiEntity.Serialization.cs similarity index 60% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareEntity.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiEntity.Serialization.cs index 9d796618c9c0..9792ea204ed2 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareEntity.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiEntity.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Language.Text { - public partial class CustomHealthcareEntity : IUtf8JsonSerializable, IJsonModel + public partial class PiiEntity : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,16 +28,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomHealthcareEntity)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(PiiEntity)} does not support writing '{format}' format."); } writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); writer.WritePropertyName("category"u8); - writer.WriteStringValue(Category.ToString()); + writer.WriteStringValue(Category); if (Optional.IsDefined(Subcategory)) { writer.WritePropertyName("subcategory"u8); @@ -49,35 +49,35 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNumberValue(Length); writer.WritePropertyName("confidenceScore"u8); writer.WriteNumberValue(ConfidenceScore); - if (Optional.IsDefined(Assertion)) + if (Optional.IsDefined(Type)) { - writer.WritePropertyName("assertion"u8); - writer.WriteObjectValue(Assertion, options); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); } - if (Optional.IsDefined(Name)) + if (Optional.IsCollectionDefined(Tags)) { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsCollectionDefined(Links)) - { - writer.WritePropertyName("links"u8); + writer.WritePropertyName("tags"u8); writer.WriteStartArray(); - foreach (var item in Links) + foreach (var item in Tags) { writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(EntityComponentInformation)) + if (Optional.IsDefined(Mask)) { - writer.WritePropertyName("entityComponentInformation"u8); - writer.WriteStartArray(); - foreach (var item in EntityComponentInformation) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WritePropertyName("mask"u8); + writer.WriteStringValue(Mask); + } + if (Optional.IsDefined(MaskOffset)) + { + writer.WritePropertyName("maskOffset"u8); + writer.WriteNumberValue(MaskOffset.Value); + } + if (Optional.IsDefined(MaskLength)) + { + writer.WritePropertyName("maskLength"u8); + writer.WriteNumberValue(MaskLength.Value); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -96,19 +96,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - CustomHealthcareEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + PiiEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(CustomHealthcareEntity)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(PiiEntity)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCustomHealthcareEntity(document.RootElement, options); + return DeserializePiiEntity(document.RootElement, options); } - internal static CustomHealthcareEntity DeserializeCustomHealthcareEntity(JsonElement element, ModelReaderWriterOptions options = null) + internal static PiiEntity DeserializePiiEntity(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -117,15 +117,16 @@ internal static CustomHealthcareEntity DeserializeCustomHealthcareEntity(JsonEle return null; } string text = default; - HealthcareEntityCategory category = default; + string category = default; string subcategory = default; int offset = default; int length = default; double confidenceScore = default; - HealthcareAssertion assertion = default; - string name = default; - IReadOnlyList links = default; - IReadOnlyList entityComponentInformation = default; + string type = default; + IReadOnlyList tags = default; + string mask = default; + int? maskOffset = default; + int? maskLength = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -137,7 +138,7 @@ internal static CustomHealthcareEntity DeserializeCustomHealthcareEntity(JsonEle } if (property.NameEquals("category"u8)) { - category = new HealthcareEntityCategory(property.Value.GetString()); + category = property.Value.GetString(); continue; } if (property.NameEquals("subcategory"u8)) @@ -160,46 +161,46 @@ internal static CustomHealthcareEntity DeserializeCustomHealthcareEntity(JsonEle confidenceScore = property.Value.GetDouble(); continue; } - if (property.NameEquals("assertion"u8)) + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - assertion = HealthcareAssertion.DeserializeHealthcareAssertion(property.Value, options); + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(EntityTag.DeserializeEntityTag(item, options)); + } + tags = array; continue; } - if (property.NameEquals("name"u8)) + if (property.NameEquals("mask"u8)) { - name = property.Value.GetString(); + mask = property.Value.GetString(); continue; } - if (property.NameEquals("links"u8)) + if (property.NameEquals("maskOffset"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(HealthcareEntityLink.DeserializeHealthcareEntityLink(item, options)); - } - links = array; + maskOffset = property.Value.GetInt32(); continue; } - if (property.NameEquals("entityComponentInformation"u8)) + if (property.NameEquals("maskLength"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(Language.Text.EntityComponentInformation.DeserializeEntityComponentInformation(item, options)); - } - entityComponentInformation = array; + maskLength = property.Value.GetInt32(); continue; } if (options.Format != "W") @@ -208,57 +209,58 @@ internal static CustomHealthcareEntity DeserializeCustomHealthcareEntity(JsonEle } } serializedAdditionalRawData = rawDataDictionary; - return new CustomHealthcareEntity( + return new PiiEntity( text, category, subcategory, offset, length, confidenceScore, - assertion, - name, - links ?? new ChangeTrackingList(), - entityComponentInformation ?? new ChangeTrackingList(), + type, + tags ?? new ChangeTrackingList(), + mask, + maskOffset, + maskLength, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(CustomHealthcareEntity)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(PiiEntity)} does not support writing '{options.Format}' format."); } } - CustomHealthcareEntity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + PiiEntity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeCustomHealthcareEntity(document.RootElement, options); + return DeserializePiiEntity(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(CustomHealthcareEntity)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(PiiEntity)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static CustomHealthcareEntity FromResponse(Response response) + internal static PiiEntity FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeCustomHealthcareEntity(document.RootElement); + return DeserializePiiEntity(document.RootElement); } /// Convert into a . diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareEntity.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiEntity.cs similarity index 52% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareEntity.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiEntity.cs index a3237f18d8e0..0e9ed2738251 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/CustomHealthcareEntity.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PiiEntity.cs @@ -10,8 +10,8 @@ namespace Azure.AI.Language.Text { - /// Contains the custom healthcare entity. - public partial class CustomHealthcareEntity + /// Entity object with tags. + public partial class PiiEntity { /// /// Keeps track of any properties unknown to the library. @@ -45,43 +45,40 @@ public partial class CustomHealthcareEntity /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . + /// Initializes a new instance of . /// Entity text as appears in the request. - /// Healthcare Entity Category. + /// Entity type. /// Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned. /// Length for the entity text. Use of different 'stringIndexType' values can affect the length returned. /// Confidence score between 0 and 1 of the extracted entity. - /// is null. - internal CustomHealthcareEntity(string text, HealthcareEntityCategory category, int offset, int length, double confidenceScore) + /// or is null. + internal PiiEntity(string text, string category, int offset, int length, double confidenceScore) { Argument.AssertNotNull(text, nameof(text)); + Argument.AssertNotNull(category, nameof(category)); Text = text; Category = category; Offset = offset; Length = length; ConfidenceScore = confidenceScore; - Links = new ChangeTrackingList(); - EntityComponentInformation = new ChangeTrackingList(); + Tags = new ChangeTrackingList(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Entity text as appears in the request. - /// Healthcare Entity Category. + /// Entity type. /// (Optional) Entity sub type. /// Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned. /// Length for the entity text. Use of different 'stringIndexType' values can affect the length returned. /// Confidence score between 0 and 1 of the extracted entity. - /// Assertion of the entity. - /// Preferred name for the entity. Example: 'histologically' would have a 'name' of 'histologic'. - /// Entity references in known data sources. - /// - /// (Optional) Entity component information listing fired components of the extracted entity. This object only applies for custom healthcare. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// + /// An entity type is the lowest (or finest) granularity at which the entity has been detected. The type maps to the specific metadata attributes associated with the entity detected. + /// List of entity tags. Tags are to express some similarities/affinity between entities. + /// Optional field which will be returned only when using the redaction policy kind “MaskWithEntityType”. This field will contain the exact mask text used to mask the PII entity in the original text. + /// Start position of masked text in the redacted text when using the redaction policy kind “MaskWithEntityType”. + /// The length of the masked text. Will be present when using the redaction policy kind “MaskWithEntityType”. /// Keeps track of any properties unknown to the library. - internal CustomHealthcareEntity(string text, HealthcareEntityCategory category, string subcategory, int offset, int length, double confidenceScore, HealthcareAssertion assertion, string name, IReadOnlyList links, IReadOnlyList entityComponentInformation, IDictionary serializedAdditionalRawData) + internal PiiEntity(string text, string category, string subcategory, int offset, int length, double confidenceScore, string type, IReadOnlyList tags, string mask, int? maskOffset, int? maskLength, IDictionary serializedAdditionalRawData) { Text = text; Category = category; @@ -89,22 +86,23 @@ internal CustomHealthcareEntity(string text, HealthcareEntityCategory category, Offset = offset; Length = length; ConfidenceScore = confidenceScore; - Assertion = assertion; - Name = name; - Links = links; - EntityComponentInformation = entityComponentInformation; + Type = type; + Tags = tags; + Mask = mask; + MaskOffset = maskOffset; + MaskLength = maskLength; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal CustomHealthcareEntity() + /// Initializes a new instance of for deserialization. + internal PiiEntity() { } /// Entity text as appears in the request. public string Text { get; } - /// Healthcare Entity Category. - public HealthcareEntityCategory Category { get; } + /// Entity type. + public string Category { get; } /// (Optional) Entity sub type. public string Subcategory { get; } /// Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned. @@ -113,17 +111,15 @@ internal CustomHealthcareEntity() public int Length { get; } /// Confidence score between 0 and 1 of the extracted entity. public double ConfidenceScore { get; } - /// Assertion of the entity. - public HealthcareAssertion Assertion { get; } - /// Preferred name for the entity. Example: 'histologically' would have a 'name' of 'histologic'. - public string Name { get; } - /// Entity references in known data sources. - public IReadOnlyList Links { get; } - /// - /// (Optional) Entity component information listing fired components of the extracted entity. This object only applies for custom healthcare. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - public IReadOnlyList EntityComponentInformation { get; } + /// An entity type is the lowest (or finest) granularity at which the entity has been detected. The type maps to the specific metadata attributes associated with the entity detected. + public string Type { get; } + /// List of entity tags. Tags are to express some similarities/affinity between entities. + public IReadOnlyList Tags { get; } + /// Optional field which will be returned only when using the redaction policy kind “MaskWithEntityType”. This field will contain the exact mask text used to mask the PII entity in the original text. + public string Mask { get; } + /// Start position of masked text in the redacted text when using the redaction policy kind “MaskWithEntityType”. + public int? MaskOffset { get; } + /// The length of the masked text. Will be present when using the redaction policy kind “MaskWithEntityType”. + public int? MaskLength { get; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PrebuiltComponent.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PrebuiltComponent.cs deleted file mode 100644 index 0e8e9abf1f38..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/PrebuiltComponent.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Language.Text -{ - /// This object contains information of the prebuilt component of the detected entity. - public partial class PrebuiltComponent : EntityComponentInformation - { - /// Initializes a new instance of . - internal PrebuiltComponent() - { - EntityComponentKind = EntityComponentKind.PrebuiltComponent; - } - - /// Initializes a new instance of . - /// Kind of entity component. - /// Keeps track of any properties unknown to the library. - /// The prebuilt component of an extracted entity type. - internal PrebuiltComponent(EntityComponentKind entityComponentKind, IDictionary serializedAdditionalRawData, string value) : base(entityComponentKind, serializedAdditionalRawData) - { - Value = value; - } - - /// The prebuilt component of an extracted entity type. - public string Value { get; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/RedactionPolicyKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/RedactionPolicyKind.cs new file mode 100644 index 000000000000..6fc733cd2a20 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/RedactionPolicyKind.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Language.Text +{ + /// Kinds of redaction policies supported. + internal readonly partial struct RedactionPolicyKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RedactionPolicyKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoMaskValue = "noMask"; + private const string CharacterMaskValue = "characterMask"; + private const string EntityMaskValue = "entityMask"; + + /// Do not redact detected entities. + public static RedactionPolicyKind NoMask { get; } = new RedactionPolicyKind(NoMaskValue); + /// React detected entities with redaction character. + public static RedactionPolicyKind CharacterMask { get; } = new RedactionPolicyKind(CharacterMaskValue); + /// Redact detected entities with entity type. + public static RedactionPolicyKind EntityMask { get; } = new RedactionPolicyKind(EntityMaskValue); + /// Determines if two values are the same. + public static bool operator ==(RedactionPolicyKind left, RedactionPolicyKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RedactionPolicyKind left, RedactionPolicyKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator RedactionPolicyKind(string value) => new RedactionPolicyKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RedactionPolicyKind other && Equals(other); + /// + public bool Equals(RedactionPolicyKind other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ScriptCode.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ScriptCode.cs index 7e60f50f2d88..48a9185e44af 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ScriptCode.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ScriptCode.cs @@ -34,6 +34,7 @@ public ScriptCode(string value) private const string GujrValue = "Gujr"; private const string GuruValue = "Guru"; private const string HangValue = "Hang"; + private const string HaniValue = "Hani"; private const string HansValue = "Hans"; private const string HantValue = "Hant"; private const string HebrValue = "Hebr"; @@ -43,9 +44,13 @@ public ScriptCode(string value) private const string LaooValue = "Laoo"; private const string LatnValue = "Latn"; private const string MlymValue = "Mlym"; + private const string MongValue = "Mong"; + private const string MteiValue = "Mtei"; private const string MymrValue = "Mymr"; + private const string OlckValue = "Olck"; private const string OryaValue = "Orya"; private const string SinhValue = "Sinh"; + private const string ShrdValue = "Shrd"; private const string TamlValue = "Taml"; private const string TeluValue = "Telu"; private const string ThaaValue = "Thaa"; @@ -76,6 +81,8 @@ public ScriptCode(string value) public static ScriptCode Guru { get; } = new ScriptCode(GuruValue); /// Script code for the Hangul script. public static ScriptCode Hang { get; } = new ScriptCode(HangValue); + /// Script code for the HanLiteral script. + public static ScriptCode Hani { get; } = new ScriptCode(HaniValue); /// Script code for the HanSimplified script. public static ScriptCode Hans { get; } = new ScriptCode(HansValue); /// Script code for the HanTraditional script. @@ -94,12 +101,20 @@ public ScriptCode(string value) public static ScriptCode Latn { get; } = new ScriptCode(LatnValue); /// Script code for the Malayalam script. public static ScriptCode Mlym { get; } = new ScriptCode(MlymValue); + /// Script code for the Mongolian script. + public static ScriptCode Mong { get; } = new ScriptCode(MongValue); + /// Script code for the Meitei script. + public static ScriptCode Mtei { get; } = new ScriptCode(MteiValue); /// Script code for the Myanmar script. public static ScriptCode Mymr { get; } = new ScriptCode(MymrValue); + /// Script code for the Santali script. + public static ScriptCode Olck { get; } = new ScriptCode(OlckValue); /// Script code for the Odia script. public static ScriptCode Orya { get; } = new ScriptCode(OryaValue); /// Script code for the Sinhala script. public static ScriptCode Sinh { get; } = new ScriptCode(SinhValue); + /// Script code for the Sharada script. + public static ScriptCode Shrd { get; } = new ScriptCode(ShrdValue); /// Script code for the Tamil script. public static ScriptCode Taml { get; } = new ScriptCode(TamlValue); /// Script code for the Telugu script. diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ScriptKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ScriptKind.cs index 75e88027f757..fb4476a9af65 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ScriptKind.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ScriptKind.cs @@ -34,6 +34,7 @@ public ScriptKind(string value) private const string GujaratiValue = "Gujarati"; private const string GurmukhiValue = "Gurmukhi"; private const string HangulValue = "Hangul"; + private const string HanLiteralValue = "HanLiteral"; private const string HanSimplifiedValue = "HanSimplified"; private const string HanTraditionalValue = "HanTraditional"; private const string HebrewValue = "Hebrew"; @@ -43,8 +44,12 @@ public ScriptKind(string value) private const string LaoValue = "Lao"; private const string LatinValue = "Latin"; private const string MalayalamValue = "Malayalam"; + private const string MeiteiValue = "Meitei"; + private const string MongolianValue = "Mongolian"; private const string MyanmarValue = "Myanmar"; private const string OdiaValue = "Odia"; + private const string SantaliValue = "Santali"; + private const string SharadaValue = "Sharada"; private const string SinhalaValue = "Sinhala"; private const string TamilValue = "Tamil"; private const string TeluguValue = "Telugu"; @@ -76,6 +81,8 @@ public ScriptKind(string value) public static ScriptKind Gurmukhi { get; } = new ScriptKind(GurmukhiValue); /// Script name for the Hangul script. public static ScriptKind Hangul { get; } = new ScriptKind(HangulValue); + /// Script name for the HanLiteral script. + public static ScriptKind HanLiteral { get; } = new ScriptKind(HanLiteralValue); /// Script name for the HanSimplified script. public static ScriptKind HanSimplified { get; } = new ScriptKind(HanSimplifiedValue); /// Script name for the HanTraditional script. @@ -94,10 +101,18 @@ public ScriptKind(string value) public static ScriptKind Latin { get; } = new ScriptKind(LatinValue); /// Script name for the Malayalam script. public static ScriptKind Malayalam { get; } = new ScriptKind(MalayalamValue); + /// Script name for the Meitei script. + public static ScriptKind Meitei { get; } = new ScriptKind(MeiteiValue); + /// Script name for the Mongolian script. + public static ScriptKind Mongolian { get; } = new ScriptKind(MongolianValue); /// Script name for the Myanmar script. public static ScriptKind Myanmar { get; } = new ScriptKind(MyanmarValue); /// Script name for the Odia script. public static ScriptKind Odia { get; } = new ScriptKind(OdiaValue); + /// Script name for the Santali script. + public static ScriptKind Santali { get; } = new ScriptKind(SantaliValue); + /// Script name for the Sharada script. + public static ScriptKind Sharada { get; } = new ScriptKind(SharadaValue); /// Script name for the Sinhala script. public static ScriptKind Sinhala { get; } = new ScriptKind(SinhalaValue); /// Script name for the Tamil script. diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextActions.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextActions.cs index ddd7ff50c503..54e44707209c 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextActions.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextActions.cs @@ -67,7 +67,7 @@ internal TextActions(int completed, int failed, int inProgress, int total) /// /// Enumerable of Analyze text job results. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , and . /// /// Keeps track of any properties unknown to the library. internal TextActions(int completed, int failed, int inProgress, int total, IReadOnlyList items, IDictionary serializedAdditionalRawData) @@ -96,7 +96,7 @@ internal TextActions() /// /// Enumerable of Analyze text job results. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , and . /// public IReadOnlyList Items { get; } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextAnalysisClient.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextAnalysisClient.cs index 50a2b4d7e0b7..aea5acc66092 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextAnalysisClient.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextAnalysisClient.cs @@ -16,7 +16,7 @@ namespace Azure.AI.Language.Text { // Data plane generated client. - /// The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction, language detection and question answering. Further documentation can be found in <a href=\"https://docs.microsoft.com/azure/cognitive-services/language-service/overview\">https://docs.microsoft.com/azure/cognitive-services/language-service/overview</a>.0. + /// The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction, language detection and question answering. Further documentation can be found in <a href=\"https://learn.microsoft.com/azure/cognitive-services/language-service/overview\">https://learn.microsoft.com/azure/cognitive-services/language-service/overview</a>.0. public partial class TextAnalysisClient { private const string AuthorizationHeader = "Ocp-Apim-Subscription-Key"; diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextAnalysisClientOptions.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextAnalysisClientOptions.cs index b6d48331233c..501497ceaa75 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextAnalysisClientOptions.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextAnalysisClientOptions.cs @@ -13,7 +13,7 @@ namespace Azure.AI.Language.Text /// Client options for TextAnalysisClient. public partial class TextAnalysisClientOptions : ClientOptions { - private const ServiceVersion LatestVersion = ServiceVersion.V2023_11_15_Preview; + private const ServiceVersion LatestVersion = ServiceVersion.V2024_11_15_Preview; /// The version of the service to use. public enum ServiceVersion @@ -22,8 +22,10 @@ public enum ServiceVersion V2022_05_01 = 1, /// Service version "2023-04-01". V2023_04_01 = 2, - /// Service version "2023-11-15-preview". - V2023_11_15_Preview = 3, + /// Service version "2024-11-01". + V2024_11_01 = 3, + /// Service version "2024-11-15-preview". + V2024_11_15_Preview = 4, } internal string Version { get; } @@ -35,7 +37,8 @@ public TextAnalysisClientOptions(ServiceVersion version = LatestVersion) { ServiceVersion.V2022_05_01 => "2022-05-01", ServiceVersion.V2023_04_01 => "2023-04-01", - ServiceVersion.V2023_11_15_Preview => "2023-11-15-preview", + ServiceVersion.V2024_11_01 => "2024-11-01", + ServiceVersion.V2024_11_15_Preview => "2024-11-15-preview", _ => throw new NotSupportedException() }; } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextAnalysisModelFactory.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextAnalysisModelFactory.cs index 56c98363bd41..faf6d35b8c80 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextAnalysisModelFactory.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextAnalysisModelFactory.cs @@ -34,26 +34,26 @@ public static LanguageInput LanguageInput(string id = null, string text = null, return new LanguageInput(id, text, countryHint, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Results for Dynamic Classification task. - /// A new instance for mocking. - public static AnalyzeTextDynamicClassificationResult AnalyzeTextDynamicClassificationResult(DynamicClassificationResult results = null) + /// Initializes a new instance of . + /// Entity linking result. + /// A new instance for mocking. + public static AnalyzeTextEntityLinkingResult AnalyzeTextEntityLinkingResult(EntityLinkingResult results = null) { - return new AnalyzeTextDynamicClassificationResult(AnalyzeTextResultsKind.DynamicClassificationResults, serializedAdditionalRawData: null, results); + return new AnalyzeTextEntityLinkingResult(AnalyzeTextResultsKind.EntityLinkingResults, serializedAdditionalRawData: null, results); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Errors by document id. /// if showStats=true was specified in the request this field will contain information about the request payload. /// This field indicates which model is used for scoring. /// Response by document. - /// A new instance for mocking. - public static DynamicClassificationResult DynamicClassificationResult(IEnumerable errors = null, RequestStatistics statistics = null, string modelVersion = null, IEnumerable documents = null) + /// A new instance for mocking. + public static EntityLinkingResult EntityLinkingResult(IEnumerable errors = null, RequestStatistics statistics = null, string modelVersion = null, IEnumerable documents = null) { errors ??= new List(); - documents ??= new List(); + documents ??= new List(); - return new DynamicClassificationResult(errors?.ToList(), statistics, modelVersion, documents?.ToList(), serializedAdditionalRawData: null); + return new EntityLinkingResult(errors?.ToList(), statistics, modelVersion, documents?.ToList(), serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -116,18 +116,25 @@ public static RequestStatistics RequestStatistics(int documentsCount = default, return new RequestStatistics(documentsCount, validDocumentsCount, erroneousDocumentsCount, transactionsCount, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Unique, non-empty document identifier. /// Warnings encountered while processing document. /// if showStats=true was specified in the request this field will contain information about the document payload. - /// Array of classification results. - /// A new instance for mocking. - public static DynamicClassificationDocumentResult DynamicClassificationDocumentResult(string id = null, IEnumerable warnings = null, DocumentStatistics statistics = null, IEnumerable classifications = null) + /// Recognized well known entities in the document. + /// If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document. + /// A new instance for mocking. + public static EntityLinkingActionResult EntityLinkingActionResult(string id = null, IEnumerable warnings = null, DocumentStatistics statistics = null, IEnumerable entities = null, DetectedLanguage detectedLanguage = null) { warnings ??= new List(); - classifications ??= new List(); + entities ??= new List(); - return new DynamicClassificationDocumentResult(id, warnings?.ToList(), statistics, classifications?.ToList(), serializedAdditionalRawData: null); + return new EntityLinkingActionResult( + id, + warnings?.ToList(), + statistics, + entities?.ToList(), + detectedLanguage, + serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -149,58 +156,6 @@ public static DocumentStatistics DocumentStatistics(int charactersCount = defaul return new DocumentStatistics(charactersCount, transactionsCount, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Classification type. - /// Confidence score between 0 and 1 of the recognized class. - /// A new instance for mocking. - public static ClassificationResult ClassificationResult(string category = null, double confidenceScore = default) - { - return new ClassificationResult(category, confidenceScore, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Entity linking result. - /// A new instance for mocking. - public static AnalyzeTextEntityLinkingResult AnalyzeTextEntityLinkingResult(EntityLinkingResult results = null) - { - return new AnalyzeTextEntityLinkingResult(AnalyzeTextResultsKind.EntityLinkingResults, serializedAdditionalRawData: null, results); - } - - /// Initializes a new instance of . - /// Errors by document id. - /// if showStats=true was specified in the request this field will contain information about the request payload. - /// This field indicates which model is used for scoring. - /// Response by document. - /// A new instance for mocking. - public static EntityLinkingResult EntityLinkingResult(IEnumerable errors = null, RequestStatistics statistics = null, string modelVersion = null, IEnumerable documents = null) - { - errors ??= new List(); - documents ??= new List(); - - return new EntityLinkingResult(errors?.ToList(), statistics, modelVersion, documents?.ToList(), serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Unique, non-empty document identifier. - /// Warnings encountered while processing document. - /// if showStats=true was specified in the request this field will contain information about the document payload. - /// Recognized well known entities in the document. - /// If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document. - /// A new instance for mocking. - public static EntityLinkingActionResult EntityLinkingActionResult(string id = null, IEnumerable warnings = null, DocumentStatistics statistics = null, IEnumerable entities = null, DetectedLanguage detectedLanguage = null) - { - warnings ??= new List(); - entities ??= new List(); - - return new EntityLinkingActionResult( - id, - warnings?.ToList(), - statistics, - entities?.ToList(), - detectedLanguage, - serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// Entity Linking formal name. /// List of instances this entity appears in the text. @@ -240,55 +195,55 @@ public static EntityLinkingMatch EntityLinkingMatch(double confidenceScore = def /// Long name of a detected language (e.g. English, French). /// A two letter representation of the detected language according to the ISO 639-1 standard (e.g. en, fr). /// A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true. - /// Identifies the script of the input document. - /// Identifies the script of the input document. + /// Identifies the script name of the input document according to the ISO 15924 standard. + /// Identifies the script code of the input document according to the ISO 15924 standard. /// A new instance for mocking. - public static DetectedLanguage DetectedLanguage(string name = null, string iso6391Name = null, double confidenceScore = default, ScriptKind? script = null, ScriptCode? scriptCode = null) + public static DetectedLanguage DetectedLanguage(string name = null, string iso6391Name = null, double confidenceScore = default, ScriptKind? scriptName = null, ScriptCode? scriptIso15924Code = null) { return new DetectedLanguage( name, iso6391Name, confidenceScore, - script, - scriptCode, + scriptName, + scriptIso15924Code, serializedAdditionalRawData: null); } /// Initializes a new instance of . /// Results for entity recognition. /// A new instance for mocking. - public static AnalyzeTextEntitiesResult AnalyzeTextEntitiesResult(EntitiesResult results = null) + public static AnalyzeTextEntitiesResult AnalyzeTextEntitiesResult(EntitiesWithMetadataAutoResult results = null) { return new AnalyzeTextEntitiesResult(AnalyzeTextResultsKind.EntityRecognitionResults, serializedAdditionalRawData: null, results); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Errors by document id. /// if showStats=true was specified in the request this field will contain information about the request payload. /// This field indicates which model is used for scoring. /// Response by document. - /// A new instance for mocking. - public static EntitiesResult EntitiesResult(IEnumerable errors = null, RequestStatistics statistics = null, string modelVersion = null, IEnumerable documents = null) + /// A new instance for mocking. + public static EntitiesWithMetadataAutoResult EntitiesWithMetadataAutoResult(IEnumerable errors = null, RequestStatistics statistics = null, string modelVersion = null, IEnumerable documents = null) { errors ??= new List(); - documents ??= new List(); + documents ??= new List(); - return new EntitiesResult(errors?.ToList(), statistics, modelVersion, documents?.ToList(), serializedAdditionalRawData: null); + return new EntitiesWithMetadataAutoResult(errors?.ToList(), statistics, modelVersion, documents?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Unique, non-empty document identifier. /// Warnings encountered while processing document. /// if showStats=true was specified in the request this field will contain information about the document payload. /// Recognized entities in the document. /// If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document. - /// A new instance for mocking. - public static EntitiesDocumentResultWithMetadataDetectedLanguage EntitiesDocumentResultWithMetadataDetectedLanguage(string id = null, IEnumerable warnings = null, DocumentStatistics statistics = null, IEnumerable entities = null, DetectedLanguage detectedLanguage = null) + /// A new instance for mocking. + public static EntityActionResult EntityActionResult(string id = null, IEnumerable warnings = null, DocumentStatistics statistics = null, IEnumerable entities = null, DetectedLanguage detectedLanguage = null) { warnings ??= new List(); entities ??= new List(); - return new EntitiesDocumentResultWithMetadataDetectedLanguage( + return new EntityActionResult( id, warnings?.ToList(), statistics, @@ -642,10 +597,10 @@ public static PiiResult PiiResult(IEnumerable errors = null, Requ /// Recognized entities in the document. /// If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document. /// A new instance for mocking. - public static PiiActionResult PiiActionResult(string id = null, IEnumerable warnings = null, DocumentStatistics statistics = null, string redactedText = null, IEnumerable entities = null, DetectedLanguage detectedLanguage = null) + public static PiiActionResult PiiActionResult(string id = null, IEnumerable warnings = null, DocumentStatistics statistics = null, string redactedText = null, IEnumerable entities = null, DetectedLanguage detectedLanguage = null) { warnings ??= new List(); - entities ??= new List(); + entities ??= new List(); return new PiiActionResult( id, @@ -657,23 +612,35 @@ public static PiiActionResult PiiActionResult(string id = null, IEnumerable Initializes a new instance of . + /// Initializes a new instance of . /// Entity text as appears in the request. /// Entity type. /// (Optional) Entity sub type. /// Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned. /// Length for the entity text. Use of different 'stringIndexType' values can affect the length returned. /// Confidence score between 0 and 1 of the extracted entity. - /// A new instance for mocking. - public static NamedEntity NamedEntity(string text = null, string category = null, string subcategory = null, int offset = default, int length = default, double confidenceScore = default) + /// An entity type is the lowest (or finest) granularity at which the entity has been detected. The type maps to the specific metadata attributes associated with the entity detected. + /// List of entity tags. Tags are to express some similarities/affinity between entities. + /// Optional field which will be returned only when using the redaction policy kind “MaskWithEntityType”. This field will contain the exact mask text used to mask the PII entity in the original text. + /// Start position of masked text in the redacted text when using the redaction policy kind “MaskWithEntityType”. + /// The length of the masked text. Will be present when using the redaction policy kind “MaskWithEntityType”. + /// A new instance for mocking. + public static PiiEntity PiiEntity(string text = null, string category = null, string subcategory = null, int offset = default, int length = default, double confidenceScore = default, string type = null, IEnumerable tags = null, string mask = null, int? maskOffset = null, int? maskLength = null) { - return new NamedEntity( + tags ??= new List(); + + return new PiiEntity( text, category, subcategory, offset, length, confidenceScore, + type, + tags?.ToList(), + mask, + maskOffset, + maskLength, serializedAdditionalRawData: null); } @@ -857,7 +824,7 @@ public static AnalyzeTextOperationState AnalyzeTextOperationState(string display /// /// Enumerable of Analyze text job results. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , , , , , , , , and . + /// The available derived classes include , , , , , , , , , and . /// /// A new instance for mocking. public static TextActions TextActions(int completed = default, int failed = default, int inProgress = default, int total = default, IEnumerable items = null) @@ -890,7 +857,7 @@ public static AnalyzeTextOperationResult AnalyzeTextOperationResult(DateTimeOffs /// task name. /// List of results. /// A new instance for mocking. - public static CustomEntityRecognitionOperationResult CustomEntityRecognitionOperationResult(DateTimeOffset lastUpdateDateTime = default, TextActionState status = default, string name = null, CustomEntitiesActionResult results = null) + public static CustomEntityRecognitionOperationResult CustomEntityRecognitionOperationResult(DateTimeOffset lastUpdateDateTime = default, TextActionState status = default, string name = null, CustomEntitiesResult results = null) { return new CustomEntityRecognitionOperationResult( lastUpdateDateTime, @@ -901,19 +868,19 @@ public static CustomEntityRecognitionOperationResult CustomEntityRecognitionOper results); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Errors by document id. /// if showStats=true was specified in the request this field will contain information about the request payload. /// This field indicates the project name for the model. /// This field indicates the deployment name for the model. - /// Enumeration of the document results with detected language. - /// A new instance for mocking. - public static CustomEntitiesActionResult CustomEntitiesActionResult(IEnumerable errors = null, RequestStatistics statistics = null, string projectName = null, string deploymentName = null, IEnumerable documents = null) + /// Enumeration of the document results. + /// A new instance for mocking. + public static CustomEntitiesResult CustomEntitiesResult(IEnumerable errors = null, RequestStatistics statistics = null, string projectName = null, string deploymentName = null, IEnumerable documents = null) { errors ??= new List(); - documents ??= new List(); + documents ??= new List(); - return new CustomEntitiesActionResult( + return new CustomEntitiesResult( errors?.ToList(), statistics, projectName, @@ -922,19 +889,19 @@ public static CustomEntitiesActionResult CustomEntitiesActionResult(IEnumerable< serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Unique, non-empty document identifier. /// Warnings encountered while processing document. /// if showStats=true was specified in the request this field will contain information about the document payload. /// Recognized entities in the document. /// If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document. - /// A new instance for mocking. - public static EntityActionResult EntityActionResult(string id = null, IEnumerable warnings = null, DocumentStatistics statistics = null, IEnumerable entities = null, DetectedLanguage detectedLanguage = null) + /// A new instance for mocking. + public static CustomEntityActionResult CustomEntityActionResult(string id = null, IEnumerable warnings = null, DocumentStatistics statistics = null, IEnumerable entities = null, DetectedLanguage detectedLanguage = null) { warnings ??= new List(); entities ??= new List(); - return new EntityActionResult( + return new CustomEntityActionResult( id, warnings?.ToList(), statistics, @@ -943,13 +910,33 @@ public static EntityActionResult EntityActionResult(string id = null, IEnumerabl serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// Entity text as appears in the request. + /// Entity type. + /// (Optional) Entity sub type. + /// Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned. + /// Length for the entity text. Use of different 'stringIndexType' values can affect the length returned. + /// Confidence score between 0 and 1 of the extracted entity. + /// A new instance for mocking. + public static NamedEntity NamedEntity(string text = null, string category = null, string subcategory = null, int offset = default, int length = default, double confidenceScore = default) + { + return new NamedEntity( + text, + category, + subcategory, + offset, + length, + confidenceScore, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The last updated time in UTC for the task. /// The status of the task at the mentioned last update time. /// task name. /// List of results. /// A new instance for mocking. - public static CustomSingleLabelClassificationOperationResult CustomSingleLabelClassificationOperationResult(DateTimeOffset lastUpdateDateTime = default, TextActionState status = default, string name = null, CustomLabelClassificationActionResult results = null) + public static CustomSingleLabelClassificationOperationResult CustomSingleLabelClassificationOperationResult(DateTimeOffset lastUpdateDateTime = default, TextActionState status = default, string name = null, CustomLabelClassificationResult results = null) { return new CustomSingleLabelClassificationOperationResult( lastUpdateDateTime, @@ -960,19 +947,19 @@ public static CustomSingleLabelClassificationOperationResult CustomSingleLabelCl results); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Errors by document id. /// if showStats=true was specified in the request this field will contain information about the request payload. /// This field indicates the project name for the model. /// This field indicates the deployment name for the model. /// Response by document. - /// A new instance for mocking. - public static CustomLabelClassificationActionResult CustomLabelClassificationActionResult(IEnumerable errors = null, RequestStatistics statistics = null, string projectName = null, string deploymentName = null, IEnumerable documents = null) + /// A new instance for mocking. + public static CustomLabelClassificationResult CustomLabelClassificationResult(IEnumerable errors = null, RequestStatistics statistics = null, string projectName = null, string deploymentName = null, IEnumerable documents = null) { errors ??= new List(); documents ??= new List(); - return new CustomLabelClassificationActionResult( + return new CustomLabelClassificationResult( errors?.ToList(), statistics, projectName, @@ -1002,13 +989,22 @@ public static ClassificationActionResult ClassificationActionResult(string id = serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// Classification type. + /// Confidence score between 0 and 1 of the recognized class. + /// A new instance for mocking. + public static ClassificationResult ClassificationResult(string category = null, double confidenceScore = default) + { + return new ClassificationResult(category, confidenceScore, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The last updated time in UTC for the task. /// The status of the task at the mentioned last update time. /// task name. /// List of results. /// A new instance for mocking. - public static CustomMultiLabelClassificationOperationResult CustomMultiLabelClassificationOperationResult(DateTimeOffset lastUpdateDateTime = default, TextActionState status = default, string name = null, CustomLabelClassificationActionResult results = null) + public static CustomMultiLabelClassificationOperationResult CustomMultiLabelClassificationOperationResult(DateTimeOffset lastUpdateDateTime = default, TextActionState status = default, string name = null, CustomLabelClassificationResult results = null) { return new CustomMultiLabelClassificationOperationResult( lastUpdateDateTime, @@ -1053,6 +1049,34 @@ public static EntityRecognitionOperationResult EntityRecognitionOperationResult( results); } + /// Initializes a new instance of . + /// Errors by document id. + /// if showStats=true was specified in the request this field will contain information about the request payload. + /// This field indicates which model is used for scoring. + /// Response by document. + /// A new instance for mocking. + public static EntitiesResult EntitiesResult(IEnumerable errors = null, RequestStatistics statistics = null, string modelVersion = null, IEnumerable documents = null) + { + errors ??= new List(); + documents ??= new List(); + + return new EntitiesResult(errors?.ToList(), statistics, modelVersion, documents?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Unique, non-empty document identifier. + /// Warnings encountered while processing document. + /// if showStats=true was specified in the request this field will contain information about the document payload. + /// Recognized entities in the document. + /// A new instance for mocking. + public static EntityActionResultWithMetadata EntityActionResultWithMetadata(string id = null, IEnumerable warnings = null, DocumentStatistics statistics = null, IEnumerable entities = null) + { + warnings ??= new List(); + entities ??= new List(); + + return new EntityActionResultWithMetadata(id, warnings?.ToList(), statistics, entities?.ToList(), serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The last updated time in UTC for the task. /// The status of the task at the mentioned last update time. @@ -1240,87 +1264,6 @@ public static SentimentOperationResult SentimentOperationResult(DateTimeOffset l results); } - /// Initializes a new instance of . - /// The last updated time in UTC for the task. - /// The status of the task at the mentioned last update time. - /// task name. - /// Results of the task. - /// A new instance for mocking. - public static CustomSentimentAnalysisOperationResult CustomSentimentAnalysisOperationResult(DateTimeOffset lastUpdateDateTime = default, TextActionState status = default, string name = null, CustomSentimentAnalysisResult results = null) - { - return new CustomSentimentAnalysisOperationResult( - lastUpdateDateTime, - status, - name, - AnalyzeTextOperationResultsKind.CustomSentimentAnalysisOperationResults, - serializedAdditionalRawData: null, - results); - } - - /// Initializes a new instance of . - /// Errors by document id. - /// if showStats=true was specified in the request this field will contain information about the request payload. - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// The custom sentiment analysis results for each document in the input. - /// A new instance for mocking. - public static CustomSentimentAnalysisResult CustomSentimentAnalysisResult(IEnumerable errors = null, RequestStatistics statistics = null, string projectName = null, string deploymentName = null, IEnumerable documents = null) - { - errors ??= new List(); - documents ??= new List(); - - return new CustomSentimentAnalysisResult( - errors?.ToList(), - statistics, - projectName, - deploymentName, - documents?.ToList(), - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Unique, non-empty document identifier. - /// Warnings encountered while processing document. - /// if showStats=true was specified in the request this field will contain information about the document payload. - /// Predicted sentiment for document (Negative, Neutral, Positive, or Mixed). - /// The sentiment confidence score between 0 and 1 for the sentence for all classes. - /// The document's sentences sentiment. - /// If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document. - /// A new instance for mocking. - public static CustomSentimentAnalysisResultDocument CustomSentimentAnalysisResultDocument(string id = null, IEnumerable warnings = null, DocumentStatistics statistics = null, DocumentSentiment sentiment = default, SentimentConfidenceScores confidenceScores = null, IEnumerable sentences = null, DetectedLanguage detectedLanguage = null) - { - warnings ??= new List(); - sentences ??= new List(); - - return new CustomSentimentAnalysisResultDocument( - id, - warnings?.ToList(), - statistics, - sentiment, - confidenceScores, - sentences?.ToList(), - detectedLanguage, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The sentence text. - /// The predicted Sentiment for the sentence. - /// The sentiment confidence score between 0 and 1 for the sentence for all classes. - /// The target offset from the start of the sentence. - /// The length of the target. - /// A new instance for mocking. - public static CustomSentenceSentiment CustomSentenceSentiment(string text = null, SentenceSentimentValue sentiment = default, SentimentConfidenceScores confidenceScores = null, int offset = default, int length = default) - { - return new CustomSentenceSentiment( - text, - sentiment, - confidenceScores, - offset, - length, - serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The last updated time in UTC for the task. /// The status of the task at the mentioned last update time. @@ -1456,165 +1399,6 @@ public static SummaryContext SummaryContext(int offset = default, int length = d return new SummaryContext(offset, length, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The last updated time in UTC for the task. - /// The status of the task at the mentioned last update time. - /// task name. - /// Results of the task. - /// A new instance for mocking. - public static CustomAbstractiveSummarizationOperationResult CustomAbstractiveSummarizationOperationResult(DateTimeOffset lastUpdateDateTime = default, TextActionState status = default, string name = null, CustomAbstractiveSummarizationResult results = null) - { - return new CustomAbstractiveSummarizationOperationResult( - lastUpdateDateTime, - status, - name, - AnalyzeTextOperationResultsKind.CustomAbstractiveSummarizationOperationResults, - serializedAdditionalRawData: null, - results); - } - - /// Initializes a new instance of . - /// Response by document. - /// Errors by document id. - /// if showStats=true was specified in the request this field will contain information about the request payload. - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// A new instance for mocking. - public static CustomAbstractiveSummarizationResult CustomAbstractiveSummarizationResult(IEnumerable documents = null, IEnumerable errors = null, RequestStatistics statistics = null, string projectName = null, string deploymentName = null) - { - documents ??= new List(); - errors ??= new List(); - - return new CustomAbstractiveSummarizationResult( - documents?.ToList(), - errors?.ToList(), - statistics, - projectName, - deploymentName, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The last updated time in UTC for the task. - /// The status of the task at the mentioned last update time. - /// task name. - /// Contains the list of document results. - /// A new instance for mocking. - public static CustomHealthcareOperationResult CustomHealthcareOperationResult(DateTimeOffset lastUpdateDateTime = default, TextActionState status = default, string name = null, CustomHealthcareResult results = null) - { - return new CustomHealthcareOperationResult( - lastUpdateDateTime, - status, - name, - AnalyzeTextOperationResultsKind.CustomHealthcareOperationResults, - serializedAdditionalRawData: null, - results); - } - - /// Initializes a new instance of . - /// Errors by document id. - /// if showStats=true was specified in the request this field will contain information about the request payload. - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// List of custom healthcare results for the document. - /// A new instance for mocking. - public static CustomHealthcareResult CustomHealthcareResult(IEnumerable errors = null, RequestStatistics statistics = null, string projectName = null, string deploymentName = null, IEnumerable documents = null) - { - errors ??= new List(); - documents ??= new List(); - - return new CustomHealthcareResult( - errors?.ToList(), - statistics, - projectName, - deploymentName, - documents?.ToList(), - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Unique, non-empty document identifier. - /// Warnings encountered while processing document. - /// if showStats=true was specified in the request this field will contain information about the document payload. - /// Healthcare entities. - /// Healthcare entity relations. - /// If 'language' is set to 'auto' for the document in the request this field will contain a 2 letter ISO 639-1 representation of the language detected for this document. - /// A new instance for mocking. - public static CustomHealthcareActionResult CustomHealthcareActionResult(string id = null, IEnumerable warnings = null, DocumentStatistics statistics = null, IEnumerable entities = null, IEnumerable relations = null, DetectedLanguage detectedLanguage = null) - { - warnings ??= new List(); - entities ??= new List(); - relations ??= new List(); - - return new CustomHealthcareActionResult( - id, - warnings?.ToList(), - statistics, - entities?.ToList(), - relations?.ToList(), - detectedLanguage, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Entity text as appears in the request. - /// Healthcare Entity Category. - /// (Optional) Entity sub type. - /// Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned. - /// Length for the entity text. Use of different 'stringIndexType' values can affect the length returned. - /// Confidence score between 0 and 1 of the extracted entity. - /// Assertion of the entity. - /// Preferred name for the entity. Example: 'histologically' would have a 'name' of 'histologic'. - /// Entity references in known data sources. - /// - /// (Optional) Entity component information listing fired components of the extracted entity. This object only applies for custom healthcare. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , and . - /// - /// A new instance for mocking. - public static CustomHealthcareEntity CustomHealthcareEntity(string text = null, HealthcareEntityCategory category = default, string subcategory = null, int offset = default, int length = default, double confidenceScore = default, HealthcareAssertion assertion = null, string name = null, IEnumerable links = null, IEnumerable entityComponentInformation = null) - { - links ??= new List(); - entityComponentInformation ??= new List(); - - return new CustomHealthcareEntity( - text, - category, - subcategory, - offset, - length, - confidenceScore, - assertion, - name, - links?.ToList(), - entityComponentInformation?.ToList(), - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The prebuilt component of an extracted entity type. - /// A new instance for mocking. - public static PrebuiltComponent PrebuiltComponent(string value = null) - { - return new PrebuiltComponent(EntityComponentKind.PrebuiltComponent, serializedAdditionalRawData: null, value); - } - - /// Initializes a new instance of . - /// The learned component of an extracted entity type. - /// A new instance for mocking. - public static LearnedComponent LearnedComponent(string value = null) - { - return new LearnedComponent(EntityComponentKind.LearnedComponent, serializedAdditionalRawData: null, value); - } - - /// Initializes a new instance of . - /// The list key of an extracted entity type. - /// A new instance for mocking. - public static ListComponent ListComponent(string value = null) - { - return new ListComponent(EntityComponentKind.ListComponent, serializedAdditionalRawData: null, value); - } - /// Initializes a new instance of . /// logging opt out. /// This field indicates the project name for the model. @@ -1645,56 +1429,5 @@ public static CustomMultiLabelClassificationActionContent CustomMultiLabelClassi { return new CustomMultiLabelClassificationActionContent(loggingOptOut, projectName, deploymentName, serializedAdditionalRawData: null); } - - /// Initializes a new instance of . - /// logging opt out. - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// Specifies the method used to interpret string offsets. - /// A new instance for mocking. - public static CustomSentimentAnalysisActionContent CustomSentimentAnalysisActionContent(bool? loggingOptOut = null, string projectName = null, string deploymentName = null, StringIndexType? stringIndexType = null) - { - return new CustomSentimentAnalysisActionContent(loggingOptOut, projectName, deploymentName, stringIndexType, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// task name. - /// Parameters for the Custom Abstractive Summarization task. - /// A new instance for mocking. - public static CustomAbstractiveSummarizationOperationAction CustomAbstractiveSummarizationOperationAction(string name = null, CustomAbstractiveSummarizationActionContent actionContent = null) - { - return new CustomAbstractiveSummarizationOperationAction(name, AnalyzeTextOperationActionKind.CustomAbstractiveSummarization, serializedAdditionalRawData: null, actionContent); - } - - /// Initializes a new instance of . - /// Controls the approximate number of sentences in the output summaries. - /// String index type. - /// (NOTE: Recommended to use summaryLength over sentenceCount) Controls the approximate length of the output summaries. - /// logging opt out. - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// A new instance for mocking. - public static CustomAbstractiveSummarizationActionContent CustomAbstractiveSummarizationActionContent(int? sentenceCount = null, StringIndexType? stringIndexType = null, SummaryLengthBucket? summaryLength = null, bool? loggingOptOut = null, string projectName = null, string deploymentName = null) - { - return new CustomAbstractiveSummarizationActionContent( - sentenceCount, - stringIndexType, - summaryLength, - loggingOptOut, - projectName, - deploymentName, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// logging opt out. - /// This field indicates the project name for the model. - /// This field indicates the deployment name for the model. - /// Optional parameter to provide the string index type used to interpret string offsets. Defaults to TextElements (Graphemes). - /// A new instance for mocking. - public static CustomHealthcareActionContent CustomHealthcareActionContent(bool? loggingOptOut = null, string projectName = null, string deploymentName = null, StringIndexType? stringIndexType = null) - { - return new CustomHealthcareActionContent(loggingOptOut, projectName, deploymentName, stringIndexType, serializedAdditionalRawData: null); - } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextDynamicClassificationInput.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextDynamicClassificationInput.Serialization.cs deleted file mode 100644 index 6996da068b41..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextDynamicClassificationInput.Serialization.cs +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Language.Text -{ - public partial class TextDynamicClassificationInput : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(TextDynamicClassificationInput)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(TextInput)) - { - writer.WritePropertyName("analysisInput"u8); - writer.WriteObjectValue(TextInput, options); - } - if (Optional.IsDefined(ActionContent)) - { - writer.WritePropertyName("parameters"u8); - writer.WriteObjectValue(ActionContent, options); - } - } - - TextDynamicClassificationInput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(TextDynamicClassificationInput)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeTextDynamicClassificationInput(document.RootElement, options); - } - - internal static TextDynamicClassificationInput DeserializeTextDynamicClassificationInput(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - MultiLanguageTextInput analysisInput = default; - DynamicClassificationActionContent parameters = default; - AnalyzeTextInputKind kind = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("analysisInput"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - analysisInput = MultiLanguageTextInput.DeserializeMultiLanguageTextInput(property.Value, options); - continue; - } - if (property.NameEquals("parameters"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - parameters = DynamicClassificationActionContent.DeserializeDynamicClassificationActionContent(property.Value, options); - continue; - } - if (property.NameEquals("kind"u8)) - { - kind = new AnalyzeTextInputKind(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new TextDynamicClassificationInput(kind, serializedAdditionalRawData, analysisInput, parameters); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options); - default: - throw new FormatException($"The model {nameof(TextDynamicClassificationInput)} does not support writing '{options.Format}' format."); - } - } - - TextDynamicClassificationInput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data); - return DeserializeTextDynamicClassificationInput(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(TextDynamicClassificationInput)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new TextDynamicClassificationInput FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content); - return DeserializeTextDynamicClassificationInput(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextDynamicClassificationInput.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextDynamicClassificationInput.cs deleted file mode 100644 index ebe95188402a..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/TextDynamicClassificationInput.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Language.Text -{ - /// Contains the analyze text dynamic classifications input. - public partial class TextDynamicClassificationInput : AnalyzeTextInput - { - /// Initializes a new instance of . - public TextDynamicClassificationInput() - { - Kind = AnalyzeTextInputKind.DynamicClassification; - } - - /// Initializes a new instance of . - /// The kind of task to perform. - /// Keeps track of any properties unknown to the library. - /// Input to be analyzed. - /// Task parameters. - internal TextDynamicClassificationInput(AnalyzeTextInputKind kind, IDictionary serializedAdditionalRawData, MultiLanguageTextInput textInput, DynamicClassificationActionContent actionContent) : base(kind, serializedAdditionalRawData) - { - TextInput = textInput; - ActionContent = actionContent; - } - - /// Input to be analyzed. - public MultiLanguageTextInput TextInput { get; set; } - /// Task parameters. - public DynamicClassificationActionContent ActionContent { get; set; } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ListComponent.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/UnknownBaseRedactionPolicy.Serialization.cs similarity index 54% rename from sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ListComponent.Serialization.cs rename to sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/UnknownBaseRedactionPolicy.Serialization.cs index ee0ac06a51de..7c1bd0e58598 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/ListComponent.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/UnknownBaseRedactionPolicy.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Language.Text { - public partial class ListComponent : IUtf8JsonSerializable, IJsonModel + internal partial class UnknownBaseRedactionPolicy : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,33 +28,28 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt /// The client options for reading and writing models. protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ListComponent)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(BaseRedactionPolicy)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Value)) - { - writer.WritePropertyName("value"u8); - writer.WriteStringValue(Value); - } } - ListComponent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + BaseRedactionPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(ListComponent)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(BaseRedactionPolicy)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeListComponent(document.RootElement, options); + return DeserializeBaseRedactionPolicy(document.RootElement, options); } - internal static ListComponent DeserializeListComponent(JsonElement element, ModelReaderWriterOptions options = null) + internal static UnknownBaseRedactionPolicy DeserializeUnknownBaseRedactionPolicy(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -62,20 +57,14 @@ internal static ListComponent DeserializeListComponent(JsonElement element, Mode { return null; } - string value = default; - EntityComponentKind entityComponentKind = default; + RedactionPolicyKind policyKind = "Unknown"; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("value"u8)) - { - value = property.Value.GetString(); - continue; - } - if (property.NameEquals("entityComponentKind"u8)) + if (property.NameEquals("policyKind"u8)) { - entityComponentKind = new EntityComponentKind(property.Value.GetString()); + policyKind = new RedactionPolicyKind(property.Value.GetString()); continue; } if (options.Format != "W") @@ -84,53 +73,53 @@ internal static ListComponent DeserializeListComponent(JsonElement element, Mode } } serializedAdditionalRawData = rawDataDictionary; - return new ListComponent(entityComponentKind, serializedAdditionalRawData, value); + return new UnknownBaseRedactionPolicy(policyKind, serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options); default: - throw new FormatException($"The model {nameof(ListComponent)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(BaseRedactionPolicy)} does not support writing '{options.Format}' format."); } } - ListComponent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + BaseRedactionPolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data); - return DeserializeListComponent(document.RootElement, options); + return DeserializeBaseRedactionPolicy(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(ListComponent)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(BaseRedactionPolicy)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static new ListComponent FromResponse(Response response) + internal static new UnknownBaseRedactionPolicy FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content); - return DeserializeListComponent(document.RootElement); + return DeserializeUnknownBaseRedactionPolicy(document.RootElement); } /// Convert into a . internal override RequestContent ToRequestContent() { var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); return content; } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/UnknownBaseRedactionPolicy.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/UnknownBaseRedactionPolicy.cs new file mode 100644 index 000000000000..4abd33011f14 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/UnknownBaseRedactionPolicy.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Text +{ + /// Unknown version of BaseRedactionPolicy. + internal partial class UnknownBaseRedactionPolicy : BaseRedactionPolicy + { + /// Initializes a new instance of . + /// The entity RedactionPolicy object kind. + /// Keeps track of any properties unknown to the library. + internal UnknownBaseRedactionPolicy(RedactionPolicyKind policyKind, IDictionary serializedAdditionalRawData) : base(policyKind, serializedAdditionalRawData) + { + } + + /// Initializes a new instance of for deserialization. + internal UnknownBaseRedactionPolicy() + { + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/UnknownEntityComponentInformation.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/UnknownEntityComponentInformation.cs deleted file mode 100644 index 626786867c52..000000000000 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/src/Generated/UnknownEntityComponentInformation.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Language.Text -{ - /// Unknown version of EntityComponentInformation. - internal partial class UnknownEntityComponentInformation : EntityComponentInformation - { - /// Initializes a new instance of . - /// Kind of entity component. - /// Keeps track of any properties unknown to the library. - internal UnknownEntityComponentInformation(EntityComponentKind entityComponentKind, IDictionary serializedAdditionalRawData) : base(entityComponentKind, serializedAdditionalRawData) - { - } - - /// Initializes a new instance of for deserialization. - internal UnknownEntityComponentInformation() - { - } - } -} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/tests/Generated/Samples/Samples_TextAnalysisClient.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text/tests/Generated/Samples/Samples_TextAnalysisClient.cs index 710acbfa64e1..a4e549e2c636 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/tests/Generated/Samples/Samples_TextAnalysisClient.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/tests/Generated/Samples/Samples_TextAnalysisClient.cs @@ -16,160 +16,6 @@ namespace Azure.AI.Language.Text.Samples { public partial class Samples_TextAnalysisClient { - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Text_AnalyzeText_SuccessfulDynamicClassificationRequest() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - kind = "DynamicClassification", - parameters = new - { - categories = new object[] - { -"Health", -"Politics", -"Music", -"Sports" - }, - classificationType = "Multi", - modelVersion = "latest", - }, - analysisInput = new - { - documents = new object[] - { -new -{ -id = "1", -language = "en", -text = "The WHO is issuing a warning about Monkey Pox.", -}, -new -{ -id = "2", -language = "en", -text = "Mo Salah plays in Liverpool FC in England.", -} - }, - }, - }); - Response response = client.AnalyzeText(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Text_AnalyzeText_SuccessfulDynamicClassificationRequest_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - kind = "DynamicClassification", - parameters = new - { - categories = new object[] - { -"Health", -"Politics", -"Music", -"Sports" - }, - classificationType = "Multi", - modelVersion = "latest", - }, - analysisInput = new - { - documents = new object[] - { -new -{ -id = "1", -language = "en", -text = "The WHO is issuing a warning about Monkey Pox.", -}, -new -{ -id = "2", -language = "en", -text = "Mo Salah plays in Liverpool FC in England.", -} - }, - }, - }); - Response response = await client.AnalyzeTextAsync(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("kind").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Text_AnalyzeText_SuccessfulDynamicClassificationRequest_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - AnalyzeTextInput analyzeTextInput = new TextDynamicClassificationInput - { - TextInput = new MultiLanguageTextInput - { - MultiLanguageInputs = {new MultiLanguageInput("1", "The WHO is issuing a warning about Monkey Pox.") -{ -Language = "en", -}, new MultiLanguageInput("2", "Mo Salah plays in Liverpool FC in England.") -{ -Language = "en", -}}, - }, - ActionContent = new DynamicClassificationActionContent(new string[] { "Health", "Politics", "Music", "Sports" }) - { - ModelVersion = "latest", - ClassificationType = ClassificationType.Multi, - }, - }; - Response response = client.AnalyzeText(analyzeTextInput); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Text_AnalyzeText_SuccessfulDynamicClassificationRequest_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - AnalyzeTextInput analyzeTextInput = new TextDynamicClassificationInput - { - TextInput = new MultiLanguageTextInput - { - MultiLanguageInputs = {new MultiLanguageInput("1", "The WHO is issuing a warning about Monkey Pox.") -{ -Language = "en", -}, new MultiLanguageInput("2", "Mo Salah plays in Liverpool FC in England.") -{ -Language = "en", -}}, - }, - ActionContent = new DynamicClassificationActionContent(new string[] { "Health", "Politics", "Music", "Sports" }) - { - ModelVersion = "latest", - ClassificationType = ClassificationType.Multi, - }, - }; - Response response = await client.AnalyzeTextAsync(analyzeTextInput); - } - [Test] [Ignore("Only validating compilation of examples")] public void Example_Text_AnalyzeText_SuccessfulEntityLinkingRequest() @@ -1512,7 +1358,135 @@ public async Task Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionExclusi [Test] [Ignore("Only validating compilation of examples")] - public void Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRedactionRequest() + public void Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionMaskedEntitiesRequest() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + kind = "PiiEntityRecognition", + parameters = new + { + modelVersion = "latest", + redactionPolicy = new + { + policyKind = "entityMask", + }, + }, + analysisInput = new + { + documents = new object[] + { +new +{ +id = "1", +language = "en", +text = "My name is John Doe My phone number is 424 878 9192", +} + }, + }, + }); + Response response = client.AnalyzeText(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionMaskedEntitiesRequest_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + kind = "PiiEntityRecognition", + parameters = new + { + modelVersion = "latest", + redactionPolicy = new + { + policyKind = "entityMask", + }, + }, + analysisInput = new + { + documents = new object[] + { +new +{ +id = "1", +language = "en", +text = "My name is John Doe My phone number is 424 878 9192", +} + }, + }, + }); + Response response = await client.AnalyzeTextAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("kind").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionMaskedEntitiesRequest_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + AnalyzeTextInput analyzeTextInput = new TextPiiEntitiesRecognitionInput + { + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "My name is John Doe My phone number is 424 878 9192") +{ +Language = "en", +}}, + }, + ActionContent = new PiiActionContent + { + ModelVersion = "latest", + RedactionPolicy = new EntityMaskPolicyType(), + }, + }; + Response response = client.AnalyzeText(analyzeTextInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionMaskedEntitiesRequest_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); + + AnalyzeTextInput analyzeTextInput = new TextPiiEntitiesRecognitionInput + { + TextInput = new MultiLanguageTextInput + { + MultiLanguageInputs = {new MultiLanguageInput("1", "My name is John Doe My phone number is 424 878 9192") +{ +Language = "en", +}}, + }, + ActionContent = new PiiActionContent + { + ModelVersion = "latest", + RedactionPolicy = new EntityMaskPolicyType(), + }, + }; + Response response = await client.AnalyzeTextAsync(analyzeTextInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRedactionPolicyRequest() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -1524,7 +1498,11 @@ public void Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRedactionRequ parameters = new { modelVersion = "latest", - redactionCharacter = "-", + redactionPolicy = new + { + policyKind = "characterMask", + redactionCharacter = "-", + }, }, analysisInput = new { @@ -1559,7 +1537,7 @@ public void Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRedactionRequ [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRedactionRequest_Async() + public async Task Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRedactionPolicyRequest_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -1571,7 +1549,11 @@ public async Task Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRedacti parameters = new { modelVersion = "latest", - redactionCharacter = "-", + redactionPolicy = new + { + policyKind = "characterMask", + redactionCharacter = "-", + }, }, analysisInput = new { @@ -1606,7 +1588,7 @@ public async Task Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRedacti [Test] [Ignore("Only validating compilation of examples")] - public void Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRedactionRequest_Convenience() + public void Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRedactionPolicyRequest_Convenience() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -1630,7 +1612,10 @@ public void Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRedactionRequ ActionContent = new PiiActionContent { ModelVersion = "latest", - RedactionCharacter = RedactionCharacter.Minus, + RedactionPolicy = new CharacterMaskPolicyType + { + RedactionCharacter = RedactionCharacter.Minus, + }, }, }; Response response = client.AnalyzeText(analyzeTextInput); @@ -1638,7 +1623,7 @@ public void Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRedactionRequ [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRedactionRequest_Convenience_Async() + public async Task Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRedactionPolicyRequest_Convenience_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -1662,7 +1647,10 @@ public async Task Example_Text_AnalyzeText_SuccessfulPiiEntityRecognitionRedacti ActionContent = new PiiActionContent { ModelVersion = "latest", - RedactionCharacter = RedactionCharacter.Minus, + RedactionPolicy = new CharacterMaskPolicyType + { + RedactionCharacter = RedactionCharacter.Minus, + }, }, }; Response response = await client.AnalyzeTextAsync(analyzeTextInput); @@ -1942,7 +1930,7 @@ public async Task Example_Text_AnalyzeText_SuccessfulSentimentAnalysisRequest_Co [Test] [Ignore("Only validating compilation of examples")] - public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAbstractiveSummarizationTaskResult() + public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAbstractiveSummarizationSummaryLengthPromptTaskResult() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -1963,7 +1951,7 @@ public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAbs [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAbstractiveSummarizationTaskResult_Async() + public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAbstractiveSummarizationSummaryLengthPromptTaskResult_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -1984,7 +1972,7 @@ public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_Success [Test] [Ignore("Only validating compilation of examples")] - public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAbstractiveSummarizationTaskResult_Convenience() + public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAbstractiveSummarizationSummaryLengthPromptTaskResult_Convenience() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -1995,7 +1983,7 @@ public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAbs [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAbstractiveSummarizationTaskResult_Convenience_Async() + public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAbstractiveSummarizationSummaryLengthPromptTaskResult_Convenience_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2006,7 +1994,7 @@ public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_Success [Test] [Ignore("Only validating compilation of examples")] - public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest() + public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAbstractiveSummarizationTaskResult() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2027,7 +2015,7 @@ public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAna [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest_Async() + public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAbstractiveSummarizationTaskResult_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2048,7 +2036,7 @@ public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_Success [Test] [Ignore("Only validating compilation of examples")] - public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest_Convenience() + public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAbstractiveSummarizationTaskResult_Convenience() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2059,7 +2047,7 @@ public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAna [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest_Convenience_Async() + public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAbstractiveSummarizationTaskResult_Convenience_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2070,7 +2058,7 @@ public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_Success [Test] [Ignore("Only validating compilation of examples")] - public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulCustomAbstractiveSummarizationTaskResult() + public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2091,7 +2079,7 @@ public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulCus [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulCustomAbstractiveSummarizationTaskResult_Async() + public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2112,7 +2100,7 @@ public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_Success [Test] [Ignore("Only validating compilation of examples")] - public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulCustomAbstractiveSummarizationTaskResult_Convenience() + public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest_Convenience() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2123,7 +2111,7 @@ public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulCus [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulCustomAbstractiveSummarizationTaskResult_Convenience_Async() + public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulAnalyzeTextJobsMultipleTaskStatusRequest_Convenience_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2132,134 +2120,6 @@ public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_Success Response response = await client.AnalyzeTextOperationStatusAsync(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); } - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulCustomHealthcareTaskStatusRequest() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - Response response = client.AnalyzeTextOperationStatus(Guid.Parse("1780194a-e9c1-4298-b0d4-fdc59ba818a0"), null, null, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("jobId").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString()); - Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); - Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); - Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulCustomHealthcareTaskStatusRequest_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - Response response = await client.AnalyzeTextOperationStatusAsync(Guid.Parse("1780194a-e9c1-4298-b0d4-fdc59ba818a0"), null, null, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("jobId").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString()); - Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); - Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); - Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulCustomHealthcareTaskStatusRequest_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - Response response = client.AnalyzeTextOperationStatus(Guid.Parse("1780194a-e9c1-4298-b0d4-fdc59ba818a0")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulCustomHealthcareTaskStatusRequest_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - Response response = await client.AnalyzeTextOperationStatusAsync(Guid.Parse("1780194a-e9c1-4298-b0d4-fdc59ba818a0")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulCustomSentimentAnalysisTaskStatusRequest() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - Response response = client.AnalyzeTextOperationStatus(Guid.Parse("29fe5bb0-83ae-4f86-85d6-775534dcd2d4"), null, null, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("jobId").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString()); - Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); - Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); - Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulCustomSentimentAnalysisTaskStatusRequest_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - Response response = await client.AnalyzeTextOperationStatusAsync(Guid.Parse("29fe5bb0-83ae-4f86-85d6-775534dcd2d4"), null, null, null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("createdDateTime").ToString()); - Console.WriteLine(result.GetProperty("jobId").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedDateTime").ToString()); - Console.WriteLine(result.GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("tasks").GetProperty("completed").ToString()); - Console.WriteLine(result.GetProperty("tasks").GetProperty("failed").ToString()); - Console.WriteLine(result.GetProperty("tasks").GetProperty("inProgress").ToString()); - Console.WriteLine(result.GetProperty("tasks").GetProperty("total").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulCustomSentimentAnalysisTaskStatusRequest_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - Response response = client.AnalyzeTextOperationStatus(Guid.Parse("29fe5bb0-83ae-4f86-85d6-775534dcd2d4")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulCustomSentimentAnalysisTaskStatusRequest_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - Response response = await client.AnalyzeTextOperationStatusAsync(Guid.Parse("29fe5bb0-83ae-4f86-85d6-775534dcd2d4")); - } - [Test] [Ignore("Only validating compilation of examples")] public void Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_SuccessfulHealthcareDocumentTypeTaskStatusRequest() @@ -2390,7 +2250,7 @@ public async Task Example_AnalyzeTextJobState_AnalyzeTextOperationStatus_Success [Test] [Ignore("Only validating compilation of examples")] - public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveSummarizationTaskSubmit() + public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveSummarizationSummaryLengthPromptTaskSubmit() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2419,7 +2279,8 @@ public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveSummari taskName = "Document Abstractive Summarization Task 1", parameters = new { -sentenceCount = 1, +summaryLength = "medium", +instruction = "XYZ-code", }, } }, @@ -2429,7 +2290,7 @@ public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveSummari [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveSummarizationTaskSubmit_Async() + public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveSummarizationSummaryLengthPromptTaskSubmit_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2458,7 +2319,8 @@ public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveS taskName = "Document Abstractive Summarization Task 1", parameters = new { -sentenceCount = 1, +summaryLength = "medium", +instruction = "XYZ-code", }, } }, @@ -2468,7 +2330,7 @@ public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveS [Test] [Ignore("Only validating compilation of examples")] - public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveSummarizationTaskSubmit_Convenience() + public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveSummarizationSummaryLengthPromptTaskSubmit_Convenience() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2487,7 +2349,8 @@ public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveSummari { ActionContent = new AbstractiveSummarizationActionContent { -SentenceCount = 1, +SummaryLength = SummaryLengthBucket.Medium, +Instruction = "XYZ-code", }, Name = "Document Abstractive Summarization Task 1", } @@ -2496,7 +2359,7 @@ public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveSummari [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveSummarizationTaskSubmit_Convenience_Async() + public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveSummarizationSummaryLengthPromptTaskSubmit_Convenience_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2515,7 +2378,8 @@ public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveS { ActionContent = new AbstractiveSummarizationActionContent { -SentenceCount = 1, +SummaryLength = SummaryLengthBucket.Medium, +Instruction = "XYZ-code", }, Name = "Document Abstractive Summarization Task 1", } @@ -2524,7 +2388,7 @@ public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveS [Test] [Ignore("Only validating compilation of examples")] - public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest() + public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveSummarizationTaskSubmit() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2532,7 +2396,7 @@ public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJobsMul using RequestContent content = RequestContent.Create(new { - displayName = "Extracting Location & US Region", + displayName = "Document Abstractive Summarization Task Example", analysisInput = new { documents = new object[] @@ -2541,13 +2405,7 @@ public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJobsMul { id = "1", language = "en", -text = "I had a wonderful trip to Seattle last week.", -}, -new -{ -id = "2", -language = "en", -text = "I'm flying to NYC tomorrow. See you there.", +text = "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks.", } }, }, @@ -2555,21 +2413,11 @@ public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJobsMul { new { -kind = "EntityRecognition", -taskName = "Recognize Entities", -parameters = new -{ -modelVersion = "latest", -}, -}, -new -{ -kind = "CustomEntityRecognition", -taskName = "Recognize US Regions", +kind = "AbstractiveSummarization", +taskName = "Document Abstractive Summarization Task 1", parameters = new { -projectName = "MyProject", -deploymentName = "MyDeployment", +sentenceCount = 1, }, } }, @@ -2579,7 +2427,7 @@ public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJobsMul [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest_Async() + public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveSummarizationTaskSubmit_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2587,7 +2435,7 @@ public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJ using RequestContent content = RequestContent.Create(new { - displayName = "Extracting Location & US Region", + displayName = "Document Abstractive Summarization Task Example", analysisInput = new { documents = new object[] @@ -2596,13 +2444,7 @@ public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJ { id = "1", language = "en", -text = "I had a wonderful trip to Seattle last week.", -}, -new -{ -id = "2", -language = "en", -text = "I'm flying to NYC tomorrow. See you there.", +text = "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks.", } }, }, @@ -2610,21 +2452,11 @@ public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJ { new { -kind = "EntityRecognition", -taskName = "Recognize Entities", -parameters = new -{ -modelVersion = "latest", -}, -}, -new -{ -kind = "CustomEntityRecognition", -taskName = "Recognize US Regions", +kind = "AbstractiveSummarization", +taskName = "Document Abstractive Summarization Task 1", parameters = new { -projectName = "MyProject", -deploymentName = "MyDeployment", +sentenceCount = 1, }, } }, @@ -2634,7 +2466,7 @@ public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJ [Test] [Ignore("Only validating compilation of examples")] - public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest_Convenience() + public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveSummarizationTaskSubmit_Convenience() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2642,35 +2474,27 @@ public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJobsMul MultiLanguageTextInput textInput = new MultiLanguageTextInput { - MultiLanguageInputs = {new MultiLanguageInput("1", "I had a wonderful trip to Seattle last week.") -{ -Language = "en", -}, new MultiLanguageInput("2", "I'm flying to NYC tomorrow. See you there.") + MultiLanguageInputs = {new MultiLanguageInput("1", "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks.") { Language = "en", }}, }; Operation operation = client.AnalyzeTextSubmitOperation(WaitUntil.Completed, textInput, new AnalyzeTextOperationAction[] { -new EntitiesOperationAction +new AbstractiveSummarizationOperationAction { -ActionContent = new EntitiesActionContent +ActionContent = new AbstractiveSummarizationActionContent { -ModelVersion = "latest", -}, -Name = "Recognize Entities", +SentenceCount = 1, }, -new CustomEntitiesOperationAction -{ -ActionContent = new CustomEntitiesActionContent("MyProject", "MyDeployment"), -Name = "Recognize US Regions", +Name = "Document Abstractive Summarization Task 1", } }); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest_Convenience_Async() + public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAbstractiveSummarizationTaskSubmit_Convenience_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2678,35 +2502,27 @@ public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJ MultiLanguageTextInput textInput = new MultiLanguageTextInput { - MultiLanguageInputs = {new MultiLanguageInput("1", "I had a wonderful trip to Seattle last week.") -{ -Language = "en", -}, new MultiLanguageInput("2", "I'm flying to NYC tomorrow. See you there.") + MultiLanguageInputs = {new MultiLanguageInput("1", "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks.") { Language = "en", }}, }; Operation operation = await client.AnalyzeTextSubmitOperationAsync(WaitUntil.Completed, textInput, new AnalyzeTextOperationAction[] { -new EntitiesOperationAction +new AbstractiveSummarizationOperationAction { -ActionContent = new EntitiesActionContent +ActionContent = new AbstractiveSummarizationActionContent { -ModelVersion = "latest", -}, -Name = "Recognize Entities", +SentenceCount = 1, }, -new CustomEntitiesOperationAction -{ -ActionContent = new CustomEntitiesActionContent("MyProject", "MyDeployment"), -Name = "Recognize US Regions", +Name = "Document Abstractive Summarization Task 1", } }); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomAbstractiveSummarizationTaskSubmit() + public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2714,7 +2530,7 @@ public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomAbstractiveS using RequestContent content = RequestContent.Create(new { - displayName = "Document Custom Abstractive Summarization Task Example", + displayName = "Extracting Location & US Region", analysisInput = new { documents = new object[] @@ -2723,47 +2539,13 @@ public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomAbstractiveS { id = "1", language = "en", -text = "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks.", -} - }, - }, - tasks = new object[] - { -new -{ -kind = "CustomAbstractiveSummarization", -taskName = "Custom Document Abstractive Summarization Task 1", -parameters = new -{ -projectName = "my_project", -deploymentName = "my_deployment", +text = "I had a wonderful trip to Seattle last week.", }, -} - }, - }); - Operation operation = client.AnalyzeTextSubmitOperation(WaitUntil.Completed, content); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomAbstractiveSummarizationTaskSubmit_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - displayName = "Document Custom Abstractive Summarization Task Example", - analysisInput = new - { - documents = new object[] - { new { -id = "1", +id = "2", language = "en", -text = "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks.", +text = "I'm flying to NYC tomorrow. See you there.", } }, }, @@ -2771,98 +2553,21 @@ public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomAbstra { new { -kind = "CustomAbstractiveSummarization", -taskName = "Custom Document Abstractive Summarization Task 1", +kind = "EntityRecognition", +taskName = "Recognize Entities", parameters = new { -projectName = "my_project", -deploymentName = "my_deployment", +modelVersion = "latest", +}, }, -} - }, - }); - Operation operation = await client.AnalyzeTextSubmitOperationAsync(WaitUntil.Completed, content); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomAbstractiveSummarizationTaskSubmit_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - MultiLanguageTextInput textInput = new MultiLanguageTextInput - { - MultiLanguageInputs = {new MultiLanguageInput("1", "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks.") -{ -Language = "en", -}}, - }; - Operation operation = client.AnalyzeTextSubmitOperation(WaitUntil.Completed, textInput, new AnalyzeTextOperationAction[] - { -new CustomAbstractiveSummarizationOperationAction(new CustomAbstractiveSummarizationActionContent("my_project", "my_deployment")) -{ -Name = "Custom Document Abstractive Summarization Task 1", -} - }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomAbstractiveSummarizationTaskSubmit_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - MultiLanguageTextInput textInput = new MultiLanguageTextInput - { - MultiLanguageInputs = {new MultiLanguageInput("1", "At Microsoft, we have been on a quest to advance AI beyond existing techniques, by taking a more holistic, human-centric approach to learning and understanding. As Chief Technology Officer of Azure AI Cognitive Services, I have been working with a team of amazing scientists and engineers to turn this quest into a reality. In my role, I enjoy a unique perspective in viewing the relationship among three attributes of human cognition: monolingual text (X), audio or visual sensory signals, (Y) and multilingual (Z). At the intersection of all three, there is magic—what we call XYZ-code as illustrated in Figure 1—a joint representation to create more powerful AI that can speak, hear, see, and understand humans better. We believe XYZ-code will enable us to fulfill our long-term vision: cross-domain transfer learning, spanning modalities and languages. The goal is to have pre-trained models that can jointly learn representations to support a broad range of downstream AI tasks, much in the way humans do today. Over the past five years, we have achieved human performance on benchmarks in conversational speech recognition, machine translation, conversational question answering, machine reading comprehension, and image captioning. These five breakthroughs provided us with strong signals toward our more ambitious aspiration to produce a leap in AI capabilities, achieving multi-sensory and multilingual learning that is closer in line with how humans learn and understand. I believe the joint XYZ-code is a foundational component of this aspiration, if grounded with external knowledge sources in the downstream AI tasks.") -{ -Language = "en", -}}, - }; - Operation operation = await client.AnalyzeTextSubmitOperationAsync(WaitUntil.Completed, textInput, new AnalyzeTextOperationAction[] - { -new CustomAbstractiveSummarizationOperationAction(new CustomAbstractiveSummarizationActionContent("my_project", "my_deployment")) -{ -Name = "Custom Document Abstractive Summarization Task 1", -} - }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomHealthcarePostRequest() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - analysisInput = new - { - documents = new object[] - { -new -{ -text = "Prescribed 100mg ibuprofen, taken twice daily.", -id = "1", -language = "en", -} - }, - }, - tasks = new object[] - { new { -kind = "CustomHealthcare", +kind = "CustomEntityRecognition", +taskName = "Recognize US Regions", parameters = new { -projectName = "{PROJECT-NAME}", -deploymentName = "{DEPLOYMENT-NAME}", +projectName = "MyProject", +deploymentName = "MyDeployment", }, } }, @@ -2872,7 +2577,7 @@ public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomHealthcarePo [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomHealthcarePostRequest_Async() + public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -2880,101 +2585,22 @@ public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomHealth using RequestContent content = RequestContent.Create(new { + displayName = "Extracting Location & US Region", analysisInput = new { documents = new object[] { new { -text = "Prescribed 100mg ibuprofen, taken twice daily.", id = "1", language = "en", -} - }, - }, - tasks = new object[] - { -new -{ -kind = "CustomHealthcare", -parameters = new -{ -projectName = "{PROJECT-NAME}", -deploymentName = "{DEPLOYMENT-NAME}", +text = "I had a wonderful trip to Seattle last week.", }, -} - }, - }); - Operation operation = await client.AnalyzeTextSubmitOperationAsync(WaitUntil.Completed, content); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomHealthcarePostRequest_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - MultiLanguageTextInput textInput = new MultiLanguageTextInput - { - MultiLanguageInputs = {new MultiLanguageInput("1", "Prescribed 100mg ibuprofen, taken twice daily.") -{ -Language = "en", -}}, - }; - Operation operation = client.AnalyzeTextSubmitOperation(WaitUntil.Completed, textInput, new AnalyzeTextOperationAction[] - { -new CustomHealthcareOperationAction -{ -ActionContent = new CustomHealthcareActionContent("{PROJECT-NAME}", "{DEPLOYMENT-NAME}"), -} - }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomHealthcarePostRequest_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - MultiLanguageTextInput textInput = new MultiLanguageTextInput - { - MultiLanguageInputs = {new MultiLanguageInput("1", "Prescribed 100mg ibuprofen, taken twice daily.") -{ -Language = "en", -}}, - }; - Operation operation = await client.AnalyzeTextSubmitOperationAsync(WaitUntil.Completed, textInput, new AnalyzeTextOperationAction[] - { -new CustomHealthcareOperationAction -{ -ActionContent = new CustomHealthcareActionContent("{PROJECT-NAME}", "{DEPLOYMENT-NAME}"), -} - }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomSentimentAnalysisTaskSubmit() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - analysisInput = new - { - documents = new object[] - { new { -text = "The food is great. But the service is bad.", -id = "1", +id = "2", language = "en", +text = "I'm flying to NYC tomorrow. See you there.", } }, }, @@ -2982,49 +2608,21 @@ public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomSentimentAna { new { -kind = "CustomSentimentAnalysis", +kind = "EntityRecognition", +taskName = "Recognize Entities", parameters = new { -projectName = "{PROJECT-NAME}", -deploymentName = "{DEPLOYMENT-NAME}", +modelVersion = "latest", +}, }, -} - }, - }); - Operation operation = client.AnalyzeTextSubmitOperation(WaitUntil.Completed, content); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomSentimentAnalysisTaskSubmit_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - TextAnalysisClient client = new TextAnalysisClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - analysisInput = new - { - documents = new object[] - { -new -{ -text = "The food is great. But the service is bad.", -id = "1", -language = "en", -} - }, - }, - tasks = new object[] - { new { -kind = "CustomSentimentAnalysis", +kind = "CustomEntityRecognition", +taskName = "Recognize US Regions", parameters = new { -projectName = "{PROJECT-NAME}", -deploymentName = "{DEPLOYMENT-NAME}", +projectName = "MyProject", +deploymentName = "MyDeployment", }, } }, @@ -3034,7 +2632,7 @@ public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomSentim [Test] [Ignore("Only validating compilation of examples")] - public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomSentimentAnalysisTaskSubmit_Convenience() + public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest_Convenience() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -3042,23 +2640,35 @@ public void Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomSentimentAna MultiLanguageTextInput textInput = new MultiLanguageTextInput { - MultiLanguageInputs = {new MultiLanguageInput("1", "The food is great. But the service is bad.") + MultiLanguageInputs = {new MultiLanguageInput("1", "I had a wonderful trip to Seattle last week.") +{ +Language = "en", +}, new MultiLanguageInput("2", "I'm flying to NYC tomorrow. See you there.") { Language = "en", }}, }; Operation operation = client.AnalyzeTextSubmitOperation(WaitUntil.Completed, textInput, new AnalyzeTextOperationAction[] { -new CustomSentimentAnalysisOperationAction +new EntitiesOperationAction { -ActionContent = new CustomSentimentAnalysisActionContent("{PROJECT-NAME}", "{DEPLOYMENT-NAME}"), +ActionContent = new EntitiesActionContent +{ +ModelVersion = "latest", +}, +Name = "Recognize Entities", +}, +new CustomEntitiesOperationAction +{ +ActionContent = new CustomEntitiesActionContent("MyProject", "MyDeployment"), +Name = "Recognize US Regions", } }); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomSentimentAnalysisTaskSubmit_Convenience_Async() + public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulAnalyzeTextJobsMultipleTaskSubmitRequest_Convenience_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -3066,16 +2676,28 @@ public async Task Example_Text_AnalyzeTextSubmitOperation_SuccessfulCustomSentim MultiLanguageTextInput textInput = new MultiLanguageTextInput { - MultiLanguageInputs = {new MultiLanguageInput("1", "The food is great. But the service is bad.") + MultiLanguageInputs = {new MultiLanguageInput("1", "I had a wonderful trip to Seattle last week.") +{ +Language = "en", +}, new MultiLanguageInput("2", "I'm flying to NYC tomorrow. See you there.") { Language = "en", }}, }; Operation operation = await client.AnalyzeTextSubmitOperationAsync(WaitUntil.Completed, textInput, new AnalyzeTextOperationAction[] { -new CustomSentimentAnalysisOperationAction +new EntitiesOperationAction +{ +ActionContent = new EntitiesActionContent { -ActionContent = new CustomSentimentAnalysisActionContent("{PROJECT-NAME}", "{DEPLOYMENT-NAME}"), +ModelVersion = "latest", +}, +Name = "Recognize Entities", +}, +new CustomEntitiesOperationAction +{ +ActionContent = new CustomEntitiesActionContent("MyProject", "MyDeployment"), +Name = "Recognize US Regions", } }); } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text/tsp-location.yaml b/sdk/cognitivelanguage/Azure.AI.Language.Text/tsp-location.yaml index 15f09d913224..302ad12ebd4c 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text/tsp-location.yaml +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text/tsp-location.yaml @@ -1,4 +1,4 @@ -repo: Azure/azure-rest-api-specs -commit: 21c2852d62ccc3abe9cc3800c989c6826f8363dc directory: specification/cognitiveservices/Language.AnalyzeText - +commit: aac5dffe1b95fd4806ba687a35285e142d8b97eb +repo: Azure/azure-rest-api-specs +additionalDirectories: