diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/api/Azure.AI.Language.Conversations.netstandard2.0.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/api/Azure.AI.Language.Conversations.netstandard2.0.cs index 2a590fb10e78..31de08f8e87c 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/api/Azure.AI.Language.Conversations.netstandard2.0.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/api/Azure.AI.Language.Conversations.netstandard2.0.cs @@ -30,13 +30,14 @@ public ConversationAnalysisClient(System.Uri endpoint, Azure.Core.TokenCredentia } public partial class ConversationsClientOptions : Azure.Core.ClientOptions { - public ConversationsClientOptions(Azure.AI.Language.Conversations.ConversationsClientOptions.ServiceVersion version = Azure.AI.Language.Conversations.ConversationsClientOptions.ServiceVersion.V2024_05_15_Preview) { } + public ConversationsClientOptions(Azure.AI.Language.Conversations.ConversationsClientOptions.ServiceVersion version = Azure.AI.Language.Conversations.ConversationsClientOptions.ServiceVersion.V2024_11_15_Preview) { } public enum ServiceVersion { V2022_05_01 = 1, V2023_04_01 = 2, V2024_05_01 = 3, - V2024_05_15_Preview = 4, + V2024_11_01 = 4, + V2024_11_15_Preview = 5, } } public static partial class ConversationsModelFactory @@ -89,7 +90,7 @@ public static partial class ConversationsModelFactory public static Azure.AI.Language.Conversations.Models.ListKey ListKey(string key = null) { throw null; } public static Azure.AI.Language.Conversations.Models.LuisResult LuisResult(System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } public static Azure.AI.Language.Conversations.Models.LuisTargetIntentResult LuisTargetIntentResult(string apiVersion = null, double confidence = 0, Azure.AI.Language.Conversations.Models.LuisResult result = null) { throw null; } - public static Azure.AI.Language.Conversations.Models.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.Conversations.Models.NamedEntity NamedEntity(string text = null, string category = null, string subcategory = null, int offset = 0, int length = 0, double confidenceScore = 0, string mask = null, int? maskOffset = default(int?), int? maskLength = default(int?)) { throw null; } public static Azure.AI.Language.Conversations.Models.NoneLinkedTargetIntentResult NoneLinkedTargetIntentResult(string apiVersion = null, double confidence = 0, Azure.AI.Language.Conversations.Models.ConversationResult result = null) { throw null; } public static Azure.AI.Language.Conversations.Models.NumberResolution NumberResolution(Azure.AI.Language.Conversations.Models.NumberKind numberKind = default(Azure.AI.Language.Conversations.Models.NumberKind), double value = 0) { throw null; } public static Azure.AI.Language.Conversations.Models.NumericRangeResolution NumericRangeResolution(Azure.AI.Language.Conversations.Models.RangeKind rangeKind = default(Azure.AI.Language.Conversations.Models.RangeKind), double minimum = 0, double maximum = 0) { throw null; } @@ -200,7 +201,6 @@ public partial class AgeResolution : Azure.AI.Language.Conversations.Models.Reso internal AgeResolution() { } public Azure.AI.Language.Conversations.Models.AgeUnit Unit { get { throw null; } } public double Value { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.AgeResolution 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.Conversations.Models.AgeResolution System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -232,7 +232,6 @@ public abstract partial class AnalysisConfig : System.ClientModel.Primitives.IJs { protected AnalysisConfig() { } public string ApiVersion { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.AnalysisConfig 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.Conversations.Models.AnalysisConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -242,7 +241,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public abstract partial class AnalyzeConversationActionResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected AnalyzeConversationActionResult() { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.AnalyzeConversationActionResult 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.Conversations.Models.AnalyzeConversationActionResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -252,7 +250,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public abstract partial class AnalyzeConversationInput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected AnalyzeConversationInput() { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.AnalyzeConversationInput 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.Conversations.Models.AnalyzeConversationInput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -263,7 +260,6 @@ public abstract partial class AnalyzeConversationOperationAction : System.Client { protected AnalyzeConversationOperationAction() { } public string Name { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.AnalyzeConversationOperationAction 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.Conversations.Models.AnalyzeConversationOperationAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -276,7 +272,6 @@ public AnalyzeConversationOperationInput(Azure.AI.Language.Conversations.Models. public System.Collections.Generic.IList Actions { get { throw null; } } public Azure.AI.Language.Conversations.Models.MultiLanguageConversationInput ConversationInput { get { throw null; } } public string DisplayName { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.AnalyzeConversationOperationInput 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.Conversations.Models.AnalyzeConversationOperationInput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -289,7 +284,6 @@ protected AnalyzeConversationOperationResult(System.DateTimeOffset lastUpdateDat public System.DateTimeOffset LastUpdateDateTime { get { throw null; } } public string Name { get { throw null; } } public Azure.AI.Language.Conversations.Models.ConversationActionState Status { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.AnalyzeConversationOperationResult 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.Conversations.Models.AnalyzeConversationOperationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -309,7 +303,6 @@ internal AnalyzeConversationOperationState() { } public string NextLink { get { throw null; } } public Azure.AI.Language.Conversations.Models.ConversationRequestStatistics Statistics { get { throw null; } } public Azure.AI.Language.Conversations.Models.ConversationActionState Status { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.AnalyzeConversationOperationState 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.Conversations.Models.AnalyzeConversationOperationState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -322,7 +315,6 @@ internal AnalyzeConversationResult() { } public string DetectedLanguage { get { throw null; } } public Azure.AI.Language.Conversations.Models.PredictionBase Prediction { get { throw null; } } public string Query { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.AnalyzeConversationResult 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.Conversations.Models.AnalyzeConversationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -336,7 +328,6 @@ internal AnswerSpan() { } public int? Length { get { throw null; } } public int? Offset { 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.Conversations.Models.AnswerSpan 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.Conversations.Models.AnswerSpan System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -347,7 +338,6 @@ public partial class AnswersResult : System.ClientModel.Primitives.IJsonModel Answers { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.AnswersResult 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.Conversations.Models.AnswersResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -359,7 +349,6 @@ public partial class AreaResolution : Azure.AI.Language.Conversations.Models.Res internal AreaResolution() { } public Azure.AI.Language.Conversations.Models.AreaUnit Unit { get { throw null; } } public double Value { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.AreaResolution 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.Conversations.Models.AreaResolution System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -400,29 +389,45 @@ public partial class AudioTiming : 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.Conversations.Models.AudioTiming 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 BaseRedactionPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected BaseRedactionPolicy() { } + Azure.AI.Language.Conversations.Models.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.Conversations.Models.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 BooleanResolution : Azure.AI.Language.Conversations.Models.ResolutionBase, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal BooleanResolution() { } public bool Value { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.BooleanResolution 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.Conversations.Models.BooleanResolution 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.Conversations.Models.BaseRedactionPolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CharacterMaskPolicyType() { } + public Azure.AI.Language.Conversations.Models.RedactionCharacter? RedactionCharacter { get { throw null; } set { } } + Azure.AI.Language.Conversations.Models.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.Conversations.Models.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 ConversationActionResult : Azure.AI.Language.Conversations.Models.AnalyzeConversationActionResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ConversationActionResult() { } public Azure.AI.Language.Conversations.Models.AnalyzeConversationResult Result { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.ConversationActionResult 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.Conversations.Models.ConversationActionResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -437,7 +442,6 @@ internal ConversationActions() { } public int InProgress { get { throw null; } } public System.Collections.Generic.IReadOnlyList Items { get { throw null; } } public int Total { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.ConversationActions 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.Conversations.Models.ConversationActions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -474,7 +478,6 @@ internal ConversationalPiiResult() { } public string Id { get { throw null; } } public Azure.AI.Language.Conversations.Models.ConversationStatistics 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.Conversations.Models.ConversationalPiiResult 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.Conversations.Models.ConversationalPiiResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -485,7 +488,6 @@ public partial class ConversationAnalysisInput : System.ClientModel.Primitives.I { public ConversationAnalysisInput(Azure.AI.Language.Conversations.Models.TextConversationItem conversationItem) { } public Azure.AI.Language.Conversations.Models.TextConversationItem ConversationItem { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.ConversationAnalysisInput 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.Conversations.Models.ConversationAnalysisInput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -498,7 +500,6 @@ public ConversationCallingConfig() { } public bool? IsLoggingEnabled { get { throw null; } set { } } public string Language { get { throw null; } set { } } public bool? Verbose { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.ConversationCallingConfig 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.Conversations.Models.ConversationCallingConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -509,7 +510,6 @@ public partial class ConversationConfig : Azure.AI.Language.Conversations.Models { public ConversationConfig() { } public Azure.AI.Language.Conversations.Models.ConversationCallingConfig CallingOptions { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.ConversationConfig 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.Conversations.Models.ConversationConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -545,7 +545,6 @@ internal ConversationEntity() { } public int Offset { get { throw null; } } public System.Collections.Generic.IReadOnlyList Resolutions { 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.Conversations.Models.ConversationEntity 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.Conversations.Models.ConversationEntity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -555,7 +554,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public abstract partial class ConversationEntityExtraInformation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected ConversationEntityExtraInformation() { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.ConversationEntityExtraInformation 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.Conversations.Models.ConversationEntityExtraInformation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -570,7 +568,6 @@ internal ConversationError() { } public Azure.AI.Language.Conversations.Models.InnerErrorModel Innererror { get { throw null; } } public string Message { get { throw null; } } public string Target { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.ConversationError 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.Conversations.Models.ConversationError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -617,7 +614,6 @@ protected ConversationInput(string id, string language) { } public Azure.AI.Language.Conversations.Models.ConversationDomain? Domain { get { throw null; } set { } } public string Id { get { throw null; } } public string Language { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.ConversationInput 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.Conversations.Models.ConversationInput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -629,7 +625,6 @@ public partial class ConversationIntent : System.ClientModel.Primitives.IJsonMod internal ConversationIntent() { } public string Category { get { throw null; } } public float Confidence { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.ConversationIntent 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.Conversations.Models.ConversationIntent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -641,7 +636,6 @@ public partial class ConversationItemLevelTiming : System.ClientModel.Primitives public ConversationItemLevelTiming() { } public long? Duration { get { throw null; } set { } } public long? Offset { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.ConversationItemLevelTiming 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.Conversations.Models.ConversationItemLevelTiming System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -658,7 +652,6 @@ public ConversationLanguageUnderstandingActionContent(string projectName, string public Azure.AI.Language.Conversations.Models.StringIndexType? StringIndexType { get { throw null; } set { } } public System.Collections.Generic.IDictionary TargetProjectParameters { get { throw null; } } public bool? Verbose { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.ConversationLanguageUnderstandingActionContent 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.Conversations.Models.ConversationLanguageUnderstandingActionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -670,7 +663,6 @@ public partial class ConversationLanguageUnderstandingInput : Azure.AI.Language. public ConversationLanguageUnderstandingInput(Azure.AI.Language.Conversations.Models.ConversationAnalysisInput conversationInput, Azure.AI.Language.Conversations.Models.ConversationLanguageUnderstandingActionContent actionContent) { } public Azure.AI.Language.Conversations.Models.ConversationLanguageUnderstandingActionContent ActionContent { get { throw null; } } public Azure.AI.Language.Conversations.Models.ConversationAnalysisInput ConversationInput { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.ConversationLanguageUnderstandingInput 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.Conversations.Models.ConversationLanguageUnderstandingInput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -686,8 +678,8 @@ public ConversationPiiActionContent() { } public System.Collections.Generic.IList PiiCategories { get { throw null; } } public bool? RedactAudioTiming { get { throw null; } set { } } public Azure.AI.Language.Conversations.Models.RedactionCharacter? RedactionCharacter { get { throw null; } set { } } + public Azure.AI.Language.Conversations.Models.BaseRedactionPolicy RedactionPolicy { get { throw null; } set { } } public Azure.AI.Language.Conversations.Models.TranscriptContentType? RedactionSource { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.ConversationPiiActionContent 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.Conversations.Models.ConversationPiiActionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -749,7 +741,6 @@ internal ConversationPiiItemResult() { } public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } public string Id { get { throw null; } } public Azure.AI.Language.Conversations.Models.RedactedTranscriptContent RedactedContent { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.ConversationPiiItemResult 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.Conversations.Models.ConversationPiiItemResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -760,7 +751,6 @@ public partial class ConversationPiiOperationResult : Azure.AI.Language.Conversa { internal ConversationPiiOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Conversations.Models.ConversationActionState)) { } public Azure.AI.Language.Conversations.Models.ConversationPiiResults Results { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.ConversationPiiOperationResult 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.Conversations.Models.ConversationPiiOperationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -774,7 +764,6 @@ internal ConversationPiiResults() { } public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } public string ModelVersion { get { throw null; } } public Azure.AI.Language.Conversations.Models.RequestStatistics Statistics { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.ConversationPiiResults 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.Conversations.Models.ConversationPiiResults System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -786,7 +775,6 @@ public partial class ConversationPrediction : Azure.AI.Language.Conversations.Mo internal ConversationPrediction() { } public System.Collections.Generic.IReadOnlyList Entities { get { throw null; } } public System.Collections.Generic.IReadOnlyList Intents { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.ConversationPrediction 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.Conversations.Models.ConversationPrediction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -803,7 +791,6 @@ internal ConversationRequestStatistics() { } public long TransactionsCount { get { throw null; } } public int ValidConversationsCount { get { throw null; } } public int ValidDocumentsCount { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.ConversationRequestStatistics 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.Conversations.Models.ConversationRequestStatistics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -816,7 +803,6 @@ internal ConversationResult() { } public string DetectedLanguage { get { throw null; } } public Azure.AI.Language.Conversations.Models.ConversationPrediction Prediction { get { throw null; } } public string Query { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.ConversationResult 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.Conversations.Models.ConversationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -830,7 +816,6 @@ internal ConversationsSummaryResult() { } public Azure.AI.Language.Conversations.Models.ConversationStatistics Statistics { get { throw null; } } public System.Collections.Generic.IReadOnlyList Summaries { 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.Conversations.Models.ConversationsSummaryResult 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.Conversations.Models.ConversationsSummaryResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -841,7 +826,6 @@ public partial class ConversationStatistics : System.ClientModel.Primitives.IJso { internal ConversationStatistics() { } public int TransactionsCount { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.ConversationStatistics 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.Conversations.Models.ConversationStatistics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -851,13 +835,13 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class ConversationSummarizationActionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ConversationSummarizationActionContent(System.Collections.Generic.IEnumerable summaryAspects) { } + public string Instruction { get { throw null; } set { } } public bool? LoggingOptOut { get { throw null; } set { } } public string ModelVersion { get { throw null; } set { } } public int? SentenceCount { get { throw null; } set { } } public Azure.AI.Language.Conversations.Models.StringIndexType? StringIndexType { get { throw null; } set { } } public System.Collections.Generic.IList SummaryAspects { get { throw null; } } public Azure.AI.Language.Conversations.Models.SummaryLengthBucket? SummaryLength { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.ConversationSummarizationActionContent 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.Conversations.Models.ConversationSummarizationActionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -868,7 +852,6 @@ public partial class ConversationTargetIntentResult : Azure.AI.Language.Conversa { internal ConversationTargetIntentResult() : base (default(double)) { } public Azure.AI.Language.Conversations.Models.ConversationResult Result { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.ConversationTargetIntentResult 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.Conversations.Models.ConversationTargetIntentResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -881,7 +864,6 @@ internal CurrencyResolution() { } public string Iso4217 { get { throw null; } } public string Unit { get { throw null; } } public double Value { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.CurrencyResolution 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.Conversations.Models.CurrencyResolution System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -898,7 +880,6 @@ public CustomConversationSummarizationActionContent(string projectName, string d public Azure.AI.Language.Conversations.Models.StringIndexType? StringIndexType { get { throw null; } set { } } public System.Collections.Generic.IList SummaryAspects { get { throw null; } } public Azure.AI.Language.Conversations.Models.SummaryLengthBucket? SummaryLength { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.CustomConversationSummarizationActionContent 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.Conversations.Models.CustomConversationSummarizationActionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -909,7 +890,6 @@ public partial class CustomSummarizationOperationAction : Azure.AI.Language.Conv { public CustomSummarizationOperationAction() { } public Azure.AI.Language.Conversations.Models.CustomConversationSummarizationActionContent ActionContent { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.CustomSummarizationOperationAction 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.Conversations.Models.CustomSummarizationOperationAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -920,7 +900,6 @@ public partial class CustomSummarizationOperationResult : Azure.AI.Language.Conv { internal CustomSummarizationOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Conversations.Models.ConversationActionState)) { } public Azure.AI.Language.Conversations.Models.CustomSummaryResult Results { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.CustomSummarizationOperationResult 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.Conversations.Models.CustomSummarizationOperationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -935,7 +914,6 @@ internal CustomSummaryResult() { } public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } public string ProjectName { get { throw null; } } public Azure.AI.Language.Conversations.Models.RequestStatistics Statistics { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.CustomSummaryResult 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.Conversations.Models.CustomSummaryResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -949,7 +927,6 @@ internal DateTimeResolution() { } public Azure.AI.Language.Conversations.Models.TemporalModifier? Modifier { get { throw null; } } public string Timex { get { throw null; } } public string Value { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.DateTimeResolution 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.Conversations.Models.DateTimeResolution System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -982,19 +959,26 @@ public partial class DocumentError : 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.Conversations.Models.DocumentError 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 EntityMaskTypePolicyType : Azure.AI.Language.Conversations.Models.BaseRedactionPolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EntityMaskTypePolicyType() { } + Azure.AI.Language.Conversations.Models.EntityMaskTypePolicyType 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.Conversations.Models.EntityMaskTypePolicyType 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 EntitySubtype : Azure.AI.Language.Conversations.Models.ConversationEntityExtraInformation, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal EntitySubtype() { } public System.Collections.Generic.IReadOnlyList Tags { get { throw null; } } public string Value { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.EntitySubtype 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.Conversations.Models.EntitySubtype System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1006,7 +990,6 @@ public partial class EntityTag : 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.Conversations.Models.EntityTag System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1018,7 +1001,6 @@ public partial class InformationResolution : Azure.AI.Language.Conversations.Mod internal InformationResolution() { } public Azure.AI.Language.Conversations.Models.InformationUnit Unit { get { throw null; } } public double Value { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.InformationResolution 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.Conversations.Models.InformationResolution System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1092,7 +1074,6 @@ internal InnerErrorModel() { } public Azure.AI.Language.Conversations.Models.InnerErrorModel Innererror { get { throw null; } } public string Message { get { throw null; } } public string Target { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.InnerErrorModel 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.Conversations.Models.InnerErrorModel System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1123,7 +1104,6 @@ internal InputWarning() { } public string Code { get { throw null; } } public string Message { get { throw null; } } public string TargetRef { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.InputWarning 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.Conversations.Models.InputWarning System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1136,7 +1116,6 @@ internal ItemizedSummaryContext() { } public string ConversationItemId { get { throw null; } } public int Length { get { throw null; } } public int Offset { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.ItemizedSummaryContext 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.Conversations.Models.ItemizedSummaryContext System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1154,7 +1133,6 @@ internal KnowledgeBaseAnswer() { } public System.Collections.Generic.IReadOnlyList Questions { get { throw null; } } public Azure.AI.Language.Conversations.Models.AnswerSpan ShortAnswer { get { throw null; } } public string Source { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.KnowledgeBaseAnswer 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.Conversations.Models.KnowledgeBaseAnswer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1166,7 +1144,6 @@ public partial class KnowledgeBaseAnswerContext : System.ClientModel.Primitives. public KnowledgeBaseAnswerContext(int previousQnaId) { } public int PreviousQnaId { get { throw null; } } public string PreviousQuestion { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.KnowledgeBaseAnswerContext 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.Conversations.Models.KnowledgeBaseAnswerContext System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1178,7 +1155,6 @@ public partial class KnowledgeBaseAnswerDialog : System.ClientModel.Primitives.I internal KnowledgeBaseAnswerDialog() { } public bool? IsContextOnly { get { throw null; } } public System.Collections.Generic.IReadOnlyList Prompts { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.KnowledgeBaseAnswerDialog 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.Conversations.Models.KnowledgeBaseAnswerDialog System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1191,7 +1167,6 @@ internal KnowledgeBaseAnswerPrompt() { } public int? DisplayOrder { get { throw null; } } public string DisplayText { get { throw null; } } public int? QnaId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.KnowledgeBaseAnswerPrompt 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.Conversations.Models.KnowledgeBaseAnswerPrompt System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1203,7 +1178,6 @@ public partial class LengthResolution : Azure.AI.Language.Conversations.Models.R internal LengthResolution() { } public Azure.AI.Language.Conversations.Models.LengthUnit Unit { get { throw null; } } public double Value { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.LengthResolution 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.Conversations.Models.LengthResolution System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1247,7 +1221,6 @@ public partial class ListKey : Azure.AI.Language.Conversations.Models.Conversati { internal ListKey() { } public string Key { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.ListKey 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.Conversations.Models.ListKey System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1281,7 +1254,6 @@ public LuisCallingConfig() { } public bool? SpellCheck { get { throw null; } set { } } public int? TimezoneOffset { get { throw null; } set { } } public bool? Verbose { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.LuisCallingConfig 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.Conversations.Models.LuisCallingConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1293,7 +1265,6 @@ public partial class LuisConfig : Azure.AI.Language.Conversations.Models.Analysi public LuisConfig() { } public Azure.AI.Language.Conversations.Models.LuisCallingConfig CallingOptions { get { throw null; } set { } } public string Query { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.LuisConfig 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.Conversations.Models.LuisConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1304,7 +1275,6 @@ public partial class LuisResult : System.ClientModel.Primitives.IJsonModel AdditionalProperties { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.LuisResult 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.Conversations.Models.LuisResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1315,7 +1285,6 @@ public partial class LuisTargetIntentResult : Azure.AI.Language.Conversations.Mo { internal LuisTargetIntentResult() : base (default(double)) { } public Azure.AI.Language.Conversations.Models.LuisResult Result { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.LuisTargetIntentResult 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.Conversations.Models.LuisTargetIntentResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1327,7 +1296,6 @@ public partial class MetadataFilter : System.ClientModel.Primitives.IJsonModel Metadata { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.MetadataFilter 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.Conversations.Models.MetadataFilter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1339,7 +1307,6 @@ public partial class MetadataRecord : 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.Conversations.Models.MetadataRecord System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1350,7 +1317,6 @@ public partial class MultiLanguageConversationInput : System.ClientModel.Primiti { public MultiLanguageConversationInput(System.Collections.Generic.IEnumerable conversations) { } public System.Collections.Generic.IList Conversations { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.MultiLanguageConversationInput 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.Conversations.Models.MultiLanguageConversationInput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1363,21 +1329,31 @@ internal NamedEntity() { } 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 string Text { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.NamedEntity 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.Conversations.Models.NamedEntity 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 NoMaskPolicyType : Azure.AI.Language.Conversations.Models.BaseRedactionPolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public NoMaskPolicyType() { } + Azure.AI.Language.Conversations.Models.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.Conversations.Models.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; } + } public partial class NoneLinkedTargetIntentResult : Azure.AI.Language.Conversations.Models.TargetIntentResult, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal NoneLinkedTargetIntentResult() : base (default(double)) { } public Azure.AI.Language.Conversations.Models.ConversationResult Result { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.NoneLinkedTargetIntentResult 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.Conversations.Models.NoneLinkedTargetIntentResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1411,7 +1387,6 @@ public partial class NumberResolution : Azure.AI.Language.Conversations.Models.R internal NumberResolution() { } public Azure.AI.Language.Conversations.Models.NumberKind NumberKind { get { throw null; } } public double Value { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.NumberResolution 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.Conversations.Models.NumberResolution System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1424,7 +1399,6 @@ internal NumericRangeResolution() { } public double Maximum { get { throw null; } } public double Minimum { get { throw null; } } public Azure.AI.Language.Conversations.Models.RangeKind RangeKind { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.NumericRangeResolution 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.Conversations.Models.NumericRangeResolution System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1435,7 +1409,6 @@ public partial class OrchestrationPrediction : Azure.AI.Language.Conversations.M { internal OrchestrationPrediction() { } public System.Collections.Generic.IReadOnlyDictionary Intents { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.OrchestrationPrediction 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.Conversations.Models.OrchestrationPrediction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1448,7 +1421,6 @@ internal OrdinalResolution() { } public string Offset { get { throw null; } } public Azure.AI.Language.Conversations.Models.RelativeTo RelativeTo { get { throw null; } } public string Value { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.OrdinalResolution 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.Conversations.Models.OrdinalResolution System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1478,7 +1450,6 @@ public partial class PiiOperationAction : Azure.AI.Language.Conversations.Models { public PiiOperationAction() { } public Azure.AI.Language.Conversations.Models.ConversationPiiActionContent ActionContent { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.PiiOperationAction 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.Conversations.Models.PiiOperationAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1489,7 +1460,6 @@ public abstract partial class PredictionBase : System.ClientModel.Primitives.IJs { protected PredictionBase() { } public string TopIntent { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.PredictionBase 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.Conversations.Models.PredictionBase System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1502,7 +1472,6 @@ public QueryFilters() { } public Azure.AI.Language.Conversations.Models.LogicalOperationKind? LogicalOperation { get { throw null; } set { } } public Azure.AI.Language.Conversations.Models.MetadataFilter MetadataFilter { get { throw null; } set { } } public System.Collections.Generic.IList SourceFilter { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.QueryFilters 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.Conversations.Models.QueryFilters System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1513,7 +1482,6 @@ public partial class QuestionAnsweringConfig : Azure.AI.Language.Conversations.M { public QuestionAnsweringConfig() { } public Azure.AI.Language.Conversations.Models.QuestionAnswersConfig CallingOptions { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.QuestionAnsweringConfig 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.Conversations.Models.QuestionAnsweringConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1524,7 +1492,6 @@ public partial class QuestionAnsweringTargetIntentResult : Azure.AI.Language.Con { internal QuestionAnsweringTargetIntentResult() : base (default(double)) { } public Azure.AI.Language.Conversations.Models.AnswersResult Result { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.QuestionAnsweringTargetIntentResult 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.Conversations.Models.QuestionAnsweringTargetIntentResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1544,7 +1511,6 @@ public QuestionAnswersConfig() { } public Azure.AI.Language.Conversations.Models.ShortAnswerConfig ShortAnswerOptions { get { throw null; } set { } } public int? Top { get { throw null; } set { } } public string UserId { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.QuestionAnswersConfig 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.Conversations.Models.QuestionAnswersConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1603,7 +1569,6 @@ internal RedactedTranscriptContent() { } public string Lexical { get { throw null; } } public string MaskedInverseTextNormalized { 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.Conversations.Models.RedactedTranscriptContent 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.Conversations.Models.RedactedTranscriptContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1645,7 +1610,6 @@ public partial class RegexKey : Azure.AI.Language.Conversations.Models.Conversat internal RegexKey() { } public string Key { get { throw null; } } public string RegexPattern { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.RegexKey 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.Conversations.Models.RegexKey System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1678,7 +1642,6 @@ internal RequestStatistics() { } public int ErroneousDocumentsCount { get { throw null; } } public long TransactionsCount { get { throw null; } } public int ValidDocumentsCount { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.RequestStatistics 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.Conversations.Models.RequestStatistics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1688,7 +1651,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public abstract partial class ResolutionBase : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected ResolutionBase() { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.ResolutionBase 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.Conversations.Models.ResolutionBase System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1701,7 +1663,6 @@ public ShortAnswerConfig() { } public double? ConfidenceThreshold { get { throw null; } set { } } public bool? Enable { get { throw null; } set { } } public int? Top { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.ShortAnswerConfig 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.Conversations.Models.ShortAnswerConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1713,7 +1674,6 @@ public partial class SpeedResolution : Azure.AI.Language.Conversations.Models.Re internal SpeedResolution() { } public Azure.AI.Language.Conversations.Models.SpeedUnit Unit { get { throw null; } } public double Value { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.SpeedResolution 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.Conversations.Models.SpeedResolution System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1773,7 +1733,6 @@ public partial class SummarizationOperationAction : Azure.AI.Language.Conversati { public SummarizationOperationAction() { } public Azure.AI.Language.Conversations.Models.ConversationSummarizationActionContent ActionContent { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.SummarizationOperationAction 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.Conversations.Models.SummarizationOperationAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1784,7 +1743,6 @@ public partial class SummarizationOperationResult : Azure.AI.Language.Conversati { internal SummarizationOperationResult() : base (default(System.DateTimeOffset), default(Azure.AI.Language.Conversations.Models.ConversationActionState)) { } public Azure.AI.Language.Conversations.Models.SummaryResult Results { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.SummarizationOperationResult 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.Conversations.Models.SummarizationOperationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1839,7 +1797,6 @@ internal SummaryResult() { } public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } public string ModelVersion { get { throw null; } } public Azure.AI.Language.Conversations.Models.RequestStatistics Statistics { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.SummaryResult 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.Conversations.Models.SummaryResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1852,7 +1809,6 @@ internal SummaryResultItem() { } public string Aspect { get { throw null; } } public System.Collections.Generic.IReadOnlyList Contexts { 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.Conversations.Models.SummaryResultItem 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.Conversations.Models.SummaryResultItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1864,7 +1820,6 @@ public abstract partial class TargetIntentResult : System.ClientModel.Primitives protected TargetIntentResult(double confidence) { } public string ApiVersion { get { throw null; } } public double Confidence { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.TargetIntentResult 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.Conversations.Models.TargetIntentResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1876,7 +1831,6 @@ public partial class TemperatureResolution : Azure.AI.Language.Conversations.Mod internal TemperatureResolution() { } public Azure.AI.Language.Conversations.Models.TemperatureUnit Unit { get { throw null; } } public double Value { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.TemperatureResolution 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.Conversations.Models.TemperatureResolution System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1946,7 +1900,6 @@ internal TemporalSpanResolution() { } public string End { get { throw null; } } public Azure.AI.Language.Conversations.Models.TemporalModifier? Modifier { get { throw null; } } public string Timex { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.TemporalSpanResolution 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.Conversations.Models.TemporalSpanResolution System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1957,7 +1910,6 @@ public partial class TextConversation : Azure.AI.Language.Conversations.Models.C { public TextConversation(string id, string language, System.Collections.Generic.IEnumerable conversationItems) : base (default(string), default(string)) { } public System.Collections.Generic.IList ConversationItems { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.TextConversation 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.Conversations.Models.TextConversation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1973,7 +1925,6 @@ public TextConversationItem(string id, string participantId, string text) { } public string ParticipantId { get { throw null; } } public Azure.AI.Language.Conversations.Models.ParticipantRole? Role { get { throw null; } set { } } public string Text { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.TextConversationItem 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.Conversations.Models.TextConversationItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2004,7 +1955,6 @@ public partial class TranscriptConversation : Azure.AI.Language.Conversations.Mo { public TranscriptConversation(string id, string language, System.Collections.Generic.IEnumerable conversationItems) : base (default(string), default(string)) { } public System.Collections.Generic.IList ConversationItems { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.TranscriptConversation 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.Conversations.Models.TranscriptConversation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2025,7 +1975,6 @@ public TranscriptConversationItem(string id, string participantId, string invers public Azure.AI.Language.Conversations.Models.ParticipantRole? Role { get { throw null; } set { } } public string Text { get { throw null; } } public System.Collections.Generic.IList WordLevelTimings { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.TranscriptConversationItem 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.Conversations.Models.TranscriptConversationItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2037,7 +1986,6 @@ public partial class VolumeResolution : Azure.AI.Language.Conversations.Models.R internal VolumeResolution() { } public Azure.AI.Language.Conversations.Models.VolumeUnit Unit { get { throw null; } } public double Value { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.VolumeResolution 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.Conversations.Models.VolumeResolution System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2093,7 +2041,6 @@ public partial class WeightResolution : Azure.AI.Language.Conversations.Models.R internal WeightResolution() { } public Azure.AI.Language.Conversations.Models.WeightUnit Unit { get { throw null; } } public double Value { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.WeightResolution 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.Conversations.Models.WeightResolution System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2138,7 +2085,6 @@ public WordLevelTiming() { } public long? Duration { get { throw null; } set { } } public long? Offset { get { throw null; } set { } } public string Word { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Language.Conversations.Models.WordLevelTiming 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.Conversations.Models.WordLevelTiming System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/ConversationsClientOptions.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/ConversationsClientOptions.cs index 87f2eba66e91..d44da9f8c426 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/ConversationsClientOptions.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/ConversationsClientOptions.cs @@ -13,7 +13,7 @@ namespace Azure.AI.Language.Conversations /// Client options for ConversationAnalysisClient. public partial class ConversationsClientOptions : ClientOptions { - private const ServiceVersion LatestVersion = ServiceVersion.V2024_05_15_Preview; + private const ServiceVersion LatestVersion = ServiceVersion.V2024_11_15_Preview; /// The version of the service to use. public enum ServiceVersion @@ -24,8 +24,10 @@ public enum ServiceVersion V2023_04_01 = 2, /// Service version "2024-05-01". V2024_05_01 = 3, - /// Service version "2024-05-15-preview". - V2024_05_15_Preview = 4, + /// Service version "2024-11-01". + V2024_11_01 = 4, + /// Service version "2024-11-15-preview". + V2024_11_15_Preview = 5, } internal string Version { get; } @@ -38,7 +40,8 @@ public ConversationsClientOptions(ServiceVersion version = LatestVersion) ServiceVersion.V2022_05_01 => "2022-05-01", ServiceVersion.V2023_04_01 => "2023-04-01", ServiceVersion.V2024_05_01 => "2024-05-01", - ServiceVersion.V2024_05_15_Preview => "2024-05-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.Conversations/src/Generated/ConversationsModelFactory.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/ConversationsModelFactory.cs index ade8de3ca4ea..a7eecdef77c4 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/ConversationsModelFactory.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/ConversationsModelFactory.cs @@ -384,36 +384,6 @@ public static TargetIntentResult TargetIntentResult(string targetProjectKind = n return new UnknownTargetIntentResult(targetProjectKind == null ? default : new TargetProjectKind(targetProjectKind), apiVersion, confidence, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The API version used to call a target service. - /// The prediction score and it ranges from 0.0 to 1.0. - /// The actual response from a Conversation project. - /// A new instance for mocking. - public static NoneLinkedTargetIntentResult NoneLinkedTargetIntentResult(string apiVersion = null, double confidence = default, ConversationResult result = null) - { - return new NoneLinkedTargetIntentResult(TargetProjectKind.NonLinked, apiVersion, confidence, serializedAdditionalRawData: null, result); - } - - /// Initializes a new instance of . - /// The same query given in request. - /// The detected language from the query in BCP 47 language representation. - /// The predicted result for the query. - /// A new instance for mocking. - public static ConversationResult ConversationResult(string query = null, string detectedLanguage = null, ConversationPrediction prediction = null) - { - return new ConversationResult(query, detectedLanguage, prediction, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The API version used to call a target service. - /// The prediction score and it ranges from 0.0 to 1.0. - /// The actual response from a Conversation project. - /// A new instance for mocking. - public static ConversationTargetIntentResult ConversationTargetIntentResult(string apiVersion = null, double confidence = default, ConversationResult result = null) - { - return new ConversationTargetIntentResult(TargetProjectKind.Conversation, apiVersion, confidence, serializedAdditionalRawData: null, result); - } - /// Initializes a new instance of . /// The API version used to call a target service. /// The prediction score and it ranges from 0.0 to 1.0. @@ -513,6 +483,36 @@ public static AnswerSpan AnswerSpan(string text = null, double? confidenceScore return new AnswerSpan(text, confidenceScore, offset, length, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The API version used to call a target service. + /// The prediction score and it ranges from 0.0 to 1.0. + /// The actual response from a Conversation project. + /// A new instance for mocking. + public static NoneLinkedTargetIntentResult NoneLinkedTargetIntentResult(string apiVersion = null, double confidence = default, ConversationResult result = null) + { + return new NoneLinkedTargetIntentResult(TargetProjectKind.NonLinked, apiVersion, confidence, serializedAdditionalRawData: null, result); + } + + /// Initializes a new instance of . + /// The same query given in request. + /// The detected language from the query in BCP 47 language representation. + /// The predicted result for the query. + /// A new instance for mocking. + public static ConversationResult ConversationResult(string query = null, string detectedLanguage = null, ConversationPrediction prediction = null) + { + return new ConversationResult(query, detectedLanguage, prediction, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The API version used to call a target service. + /// The prediction score and it ranges from 0.0 to 1.0. + /// The actual response from a Conversation project. + /// A new instance for mocking. + public static ConversationTargetIntentResult ConversationTargetIntentResult(string apiVersion = null, double confidence = default, ConversationResult result = null) + { + return new ConversationTargetIntentResult(TargetProjectKind.Conversation, apiVersion, confidence, serializedAdditionalRawData: null, result); + } + /// Initializes a new instance of . /// One of a server-defined set of error codes. /// A human-readable representation of the error. @@ -618,35 +618,89 @@ public static AnalyzeConversationOperationResult AnalyzeConversationOperationRes return new UnknownAnalyzeConversationOperationResult(lastUpdateDateTime, status, name, kind == null ? default : new AnalyzeConversationOperationResultsKind(kind), serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// 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. - /// A new instance for mocking. - public static ConversationPiiOperationResult ConversationPiiOperationResult(DateTimeOffset lastUpdateDateTime = default, ConversationActionState status = default, string name = null, ConversationPiiResults results = null) + /// A new instance for mocking. + public static SummarizationOperationResult SummarizationOperationResult(DateTimeOffset lastUpdateDateTime = default, ConversationActionState status = default, string name = null, SummaryResult results = null) { - return new ConversationPiiOperationResult( + return new SummarizationOperationResult( lastUpdateDateTime, status, name, - AnalyzeConversationOperationResultsKind.PiiOperationResults, + AnalyzeConversationOperationResultsKind.SummarizationOperationResults, serializedAdditionalRawData: null, results); } - /// Initializes a new instance of . + /// Initializes a new instance of . + /// array of conversations. /// Errors by document id. /// statistics. /// This field indicates which model is used for scoring. - /// array of conversations. - /// A new instance for mocking. - public static ConversationPiiResults ConversationPiiResults(IEnumerable errors = null, RequestStatistics statistics = null, string modelVersion = null, IEnumerable conversations = null) + /// A new instance for mocking. + public static SummaryResult SummaryResult(IEnumerable conversations = null, IEnumerable errors = null, RequestStatistics statistics = null, string modelVersion = null) { + conversations ??= new List(); errors ??= new List(); - conversations ??= new List(); - return new ConversationPiiResults(errors?.ToList(), statistics, modelVersion, conversations?.ToList(), serializedAdditionalRawData: null); + return new SummaryResult(conversations?.ToList(), errors?.ToList(), statistics, modelVersion, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Unique, non-empty conversation identifier. + /// Warnings encountered in processing the document. + /// If showStats=true was specified in the request this field will contain information about the conversation payload. + /// array of summaries. + /// A new instance for mocking. + public static ConversationsSummaryResult ConversationsSummaryResult(string id = null, IEnumerable warnings = null, ConversationStatistics statistics = null, IEnumerable summaries = null) + { + warnings ??= new List(); + summaries ??= new List(); + + return new ConversationsSummaryResult(id, warnings?.ToList(), statistics, summaries?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Warning code. + /// Warning message. + /// A JSON pointer reference indicating the target object. + /// A new instance for mocking. + public static InputWarning InputWarning(string code = null, string message = null, string targetRef = null) + { + return new InputWarning(code, message, targetRef, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Number of text units for the request. + /// A new instance for mocking. + public static ConversationStatistics ConversationStatistics(int transactionsCount = default) + { + return new ConversationStatistics(transactionsCount, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// aspect. + /// text. + /// Context list of the summary. + /// A new instance for mocking. + public static SummaryResultItem SummaryResultItem(string aspect = null, string text = null, IEnumerable contexts = null) + { + contexts ??= new List(); + + return new SummaryResultItem(aspect, text, contexts?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Start position for the context. Use of different 'stringIndexType' values can affect the offset returned. + /// The length of the context. Use of different 'stringIndexType' values can affect the length returned. + /// Reference to the ID of ConversationItem. + /// A new instance for mocking. + public static ItemizedSummaryContext ItemizedSummaryContext(int offset = default, int length = default, string conversationItemId = null) + { + return new ItemizedSummaryContext(offset, length, conversationItemId, serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -669,6 +723,75 @@ public static RequestStatistics RequestStatistics(int documentsCount = default, return new RequestStatistics(documentsCount, validDocumentsCount, erroneousDocumentsCount, transactionsCount, 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. + /// Custom Summary Result. + /// A new instance for mocking. + public static CustomSummarizationOperationResult CustomSummarizationOperationResult(DateTimeOffset lastUpdateDateTime = default, ConversationActionState status = default, string name = null, CustomSummaryResult results = null) + { + return new CustomSummarizationOperationResult( + lastUpdateDateTime, + status, + name, + AnalyzeConversationOperationResultsKind.CustomSummarizationOperationResults, + serializedAdditionalRawData: null, + results); + } + + /// Initializes a new instance of . + /// array of conversations. + /// 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 CustomSummaryResult CustomSummaryResult(IEnumerable conversations = null, IEnumerable errors = null, RequestStatistics statistics = null, string projectName = null, string deploymentName = null) + { + conversations ??= new List(); + errors ??= new List(); + + return new CustomSummaryResult( + conversations?.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. + /// results. + /// A new instance for mocking. + public static ConversationPiiOperationResult ConversationPiiOperationResult(DateTimeOffset lastUpdateDateTime = default, ConversationActionState status = default, string name = null, ConversationPiiResults results = null) + { + return new ConversationPiiOperationResult( + lastUpdateDateTime, + status, + name, + AnalyzeConversationOperationResultsKind.PiiOperationResults, + serializedAdditionalRawData: null, + results); + } + + /// Initializes a new instance of . + /// Errors by document id. + /// statistics. + /// This field indicates which model is used for scoring. + /// array of conversations. + /// A new instance for mocking. + public static ConversationPiiResults ConversationPiiResults(IEnumerable errors = null, RequestStatistics statistics = null, string modelVersion = null, IEnumerable conversations = null) + { + errors ??= new List(); + conversations ??= new List(); + + return new ConversationPiiResults(errors?.ToList(), statistics, modelVersion, conversations?.ToList(), serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// Unique, non-empty conversation identifier. /// Warnings encountered in processing the document. @@ -683,24 +806,6 @@ public static ConversationalPiiResult ConversationalPiiResult(string id = null, return new ConversationalPiiResult(id, warnings?.ToList(), statistics, conversationItems?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Warning code. - /// Warning message. - /// A JSON pointer reference indicating the target object. - /// A new instance for mocking. - public static InputWarning InputWarning(string code = null, string message = null, string targetRef = null) - { - return new InputWarning(code, message, targetRef, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Number of text units for the request. - /// A new instance for mocking. - public static ConversationStatistics ConversationStatistics(int transactionsCount = default) - { - return new ConversationStatistics(transactionsCount, serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// Id of the result. /// Transcript content response that the service generates, with all necessary personally identifiable information redacted. @@ -749,8 +854,11 @@ public static AudioTiming AudioTiming(long? offset = null, long? duration = null /// 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. + /// Exact mask text to mask the PII entity. + /// Offset of the mask text. + /// Length of the mask text. /// 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) + public static NamedEntity NamedEntity(string text = null, string category = null, string subcategory = null, int offset = default, int length = default, double confidenceScore = default, string mask = null, int? maskOffset = null, int? maskLength = null) { return new NamedEntity( text, @@ -759,111 +867,9 @@ public static NamedEntity NamedEntity(string text = null, string category = null 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. - /// results. - /// A new instance for mocking. - public static SummarizationOperationResult SummarizationOperationResult(DateTimeOffset lastUpdateDateTime = default, ConversationActionState status = default, string name = null, SummaryResult results = null) - { - return new SummarizationOperationResult( - lastUpdateDateTime, - status, - name, - AnalyzeConversationOperationResultsKind.SummarizationOperationResults, - serializedAdditionalRawData: null, - results); - } - - /// Initializes a new instance of . - /// array of conversations. - /// Errors by document id. - /// statistics. - /// This field indicates which model is used for scoring. - /// A new instance for mocking. - public static SummaryResult SummaryResult(IEnumerable conversations = null, IEnumerable errors = null, RequestStatistics statistics = null, string modelVersion = null) - { - conversations ??= new List(); - errors ??= new List(); - - return new SummaryResult(conversations?.ToList(), errors?.ToList(), statistics, modelVersion, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Unique, non-empty conversation identifier. - /// Warnings encountered in processing the document. - /// If showStats=true was specified in the request this field will contain information about the conversation payload. - /// array of summaries. - /// A new instance for mocking. - public static ConversationsSummaryResult ConversationsSummaryResult(string id = null, IEnumerable warnings = null, ConversationStatistics statistics = null, IEnumerable summaries = null) - { - warnings ??= new List(); - summaries ??= new List(); - - return new ConversationsSummaryResult(id, warnings?.ToList(), statistics, summaries?.ToList(), serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// aspect. - /// text. - /// Context list of the summary. - /// A new instance for mocking. - public static SummaryResultItem SummaryResultItem(string aspect = null, string text = null, IEnumerable contexts = null) - { - contexts ??= new List(); - - return new SummaryResultItem(aspect, text, contexts?.ToList(), serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Start position for the context. Use of different 'stringIndexType' values can affect the offset returned. - /// The length of the context. Use of different 'stringIndexType' values can affect the length returned. - /// Reference to the ID of ConversationItem. - /// A new instance for mocking. - public static ItemizedSummaryContext ItemizedSummaryContext(int offset = default, int length = default, string conversationItemId = null) - { - return new ItemizedSummaryContext(offset, length, conversationItemId, 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. - /// Custom Summary Result. - /// A new instance for mocking. - public static CustomSummarizationOperationResult CustomSummarizationOperationResult(DateTimeOffset lastUpdateDateTime = default, ConversationActionState status = default, string name = null, CustomSummaryResult results = null) - { - return new CustomSummarizationOperationResult( - lastUpdateDateTime, - status, - name, - AnalyzeConversationOperationResultsKind.CustomSummarizationOperationResults, - serializedAdditionalRawData: null, - results); - } - - /// Initializes a new instance of . - /// array of conversations. - /// 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 CustomSummaryResult CustomSummaryResult(IEnumerable conversations = null, IEnumerable errors = null, RequestStatistics statistics = null, string projectName = null, string deploymentName = null) - { - conversations ??= new List(); - errors ??= new List(); - - return new CustomSummaryResult( - conversations?.ToList(), - errors?.ToList(), - statistics, - projectName, - deploymentName, + mask, + maskOffset, + maskLength, serializedAdditionalRawData: null); } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Docs/ConversationAnalysisClient.xml b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Docs/ConversationAnalysisClient.xml index 9a307ff5dc86..572bedf8b8a2 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Docs/ConversationAnalysisClient.xml +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Docs/ConversationAnalysisClient.xml @@ -369,6 +369,30 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); +Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); +]]> +This sample shows how to call GetAnalyzeConversationJobStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); +]]> +This sample shows how to call GetAnalyzeConversationJobStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); +]]> +This sample shows how to call GetAnalyzeConversationJobStatusAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.Parse("3e9e8518-492f-47f9-abd1-9a7468231086")); ]]> This sample shows how to call GetAnalyzeConversationJobStatusAsync. @@ -420,6 +444,30 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); +Response response = client.GetAnalyzeConversationJobStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); +]]> +This sample shows how to call GetAnalyzeConversationJobStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +Response response = client.GetAnalyzeConversationJobStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); +]]> +This sample shows how to call GetAnalyzeConversationJobStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +Response response = client.GetAnalyzeConversationJobStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); +]]> +This sample shows how to call GetAnalyzeConversationJobStatus. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + Response response = client.GetAnalyzeConversationJobStatus(Guid.Parse("3e9e8518-492f-47f9-abd1-9a7468231086")); ]]> This sample shows how to call GetAnalyzeConversationJobStatus. @@ -501,6 +549,60 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); +Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), 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 GetAnalyzeConversationJobStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), 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 GetAnalyzeConversationJobStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), 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 GetAnalyzeConversationJobStatusAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.Parse("3e9e8518-492f-47f9-abd1-9a7468231086"), null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -612,6 +714,60 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); +Response response = client.GetAnalyzeConversationJobStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), 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 GetAnalyzeConversationJobStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +Response response = client.GetAnalyzeConversationJobStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), 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 GetAnalyzeConversationJobStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +Response response = client.GetAnalyzeConversationJobStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), 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 GetAnalyzeConversationJobStatus and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + Response response = client.GetAnalyzeConversationJobStatus(Guid.Parse("3e9e8518-492f-47f9-abd1-9a7468231086"), null, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; @@ -714,9 +870,13 @@ AnalyzeConversationOperationInput analyzeConversationOperationInput = new Analyz ActionContent = new ConversationPiiActionContent { ModelVersion = "latest", + PiiCategories = {ConversationPiiCategories.All}, RedactAudioTiming = true, RedactionSource = TranscriptContentType.Lexical, - ExcludePiiCategories = {ConversationPiiCategoryExclusions.Person}, + RedactionPolicy = new CharacterMaskPolicyType + { + RedactionCharacter = RedactionCharacter.Minus, + }, }, Name = "Conversation PII", } @@ -780,7 +940,7 @@ AnalyzeConversationOperationInput analyzeConversationOperationInput = new Analyz PiiCategories = {ConversationPiiCategories.All}, RedactAudioTiming = true, RedactionSource = TranscriptContentType.Lexical, - RedactionCharacter = RedactionCharacter.Minus, + RedactionPolicy = new EntityMaskTypePolicyType(), }, Name = "Conversation PII", } @@ -841,9 +1001,9 @@ AnalyzeConversationOperationInput analyzeConversationOperationInput = new Analyz ActionContent = new ConversationPiiActionContent { ModelVersion = "latest", - PiiCategories = {ConversationPiiCategories.All}, RedactAudioTiming = true, RedactionSource = TranscriptContentType.Lexical, + ExcludePiiCategories = {ConversationPiiCategoryExclusions.Person}, }, Name = "Conversation PII", } @@ -865,57 +1025,55 @@ AnalyzeConversationOperationInput analyzeConversationOperationInput = new Analyz { new TranscriptConversationItem( "1", - "speaker 1", - "", - "", - "Let's get started.", - "") + "1", + "good morning john doe", + "good morning john doe", + "Good morning John Doe.", + "good morning john doe") { - ConversationItemLevelTiming = new ConversationItemLevelTiming + WordLevelTimings = {new WordLevelTiming { - Offset = 0L, - Duration = 20000000L, - }, - }, - new TranscriptConversationItem( - "2", - "speaker 2", - "", - "", - "OK. How many remaining bugs do we have now?", - "") - { - ConversationItemLevelTiming = new ConversationItemLevelTiming + Offset = 390000L, + Duration = 2700000L, + Word = "good", + }, new WordLevelTiming { - Offset = 20000000L, - Duration = 50000000L, - }, - }, - new TranscriptConversationItem( - "3", - "speaker 3", - "", - "", - "Only 3.", - "") - { - ConversationItemLevelTiming = new ConversationItemLevelTiming + Offset = 4500000L, + Duration = 920000L, + Word = "morning", + }, new WordLevelTiming { - Offset = 50000000L, - Duration = 60000000L, - }, + Offset = 590000L, + Duration = 2700000L, + Word = "john", + }, new WordLevelTiming + { + Offset = 6300000L, + Duration = 920000L, + Word = "doe", + }}, } }) + { + Domain = ConversationDomain.Generic, + } }), new AnalyzeConversationOperationAction[] { - new SummarizationOperationAction + new PiiOperationAction { - ActionContent = new ConversationSummarizationActionContent(new SummaryAspect[]{SummaryAspect.ChapterTitle, SummaryAspect.Narrative}), - Name = "Conversation Summarization Task 1", + ActionContent = new ConversationPiiActionContent + { + ModelVersion = "latest", + PiiCategories = {ConversationPiiCategories.All}, + RedactAudioTiming = true, + RedactionSource = TranscriptContentType.Lexical, + RedactionPolicy = new NoMaskPolicyType(), + }, + Name = "Conversation PII", } }) { - DisplayName = "Conversation Summarization Example", + DisplayName = "Redacting PII data from transcribed audio", }; Operation operation = await client.AnalyzeConversationSubmitOperationAsync(WaitUntil.Completed, analyzeConversationOperationInput); ]]> @@ -927,17 +1085,210 @@ ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, cre AnalyzeConversationOperationInput analyzeConversationOperationInput = new AnalyzeConversationOperationInput(new MultiLanguageConversationInput(new ConversationInput[] { - new TextConversation("20220101meeting", "en", new TextConversationItem[] + new TranscriptConversation("1", "en", new TranscriptConversationItem[] { - new TextConversationItem("1", "user", "Hi!") - { - Role = ParticipantRole.Customer, - }, - new TextConversationItem("2", "agent", "Hello, how can I help you?") - { - Role = ParticipantRole.Agent, - }, - new TextConversationItem("3", "user", "I am having trouble issuing a return of a game on my xbox: call of duty") + new TranscriptConversationItem( + "1", + "1", + "good morning john doe", + "good morning john doe", + "Good morning John Doe.", + "good morning john doe") + { + WordLevelTimings = {new WordLevelTiming + { + Offset = 390000L, + Duration = 2700000L, + Word = "good", + }, new WordLevelTiming + { + Offset = 4500000L, + Duration = 920000L, + Word = "morning", + }, new WordLevelTiming + { + Offset = 590000L, + Duration = 2700000L, + Word = "john", + }, new WordLevelTiming + { + Offset = 6300000L, + Duration = 920000L, + Word = "doe", + }}, + } + }) + { + Domain = ConversationDomain.Generic, + } +}), new AnalyzeConversationOperationAction[] +{ + new PiiOperationAction + { + ActionContent = new ConversationPiiActionContent + { + ModelVersion = "latest", + PiiCategories = {ConversationPiiCategories.All}, + RedactAudioTiming = true, + RedactionSource = TranscriptContentType.Lexical, + RedactionCharacter = RedactionCharacter.Minus, + }, + Name = "Conversation PII", + } +}) +{ + DisplayName = "Redacting PII data from transcribed audio", +}; +Operation operation = await client.AnalyzeConversationSubmitOperationAsync(WaitUntil.Completed, analyzeConversationOperationInput); +]]> +This sample shows how to call AnalyzeConversationSubmitOperationAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +AnalyzeConversationOperationInput analyzeConversationOperationInput = new AnalyzeConversationOperationInput(new MultiLanguageConversationInput(new ConversationInput[] +{ + new TranscriptConversation("1", "en", new TranscriptConversationItem[] + { + new TranscriptConversationItem( + "1", + "1", + "good morning john doe", + "good morning john doe", + "Good morning John Doe.", + "good morning john doe") + { + WordLevelTimings = {new WordLevelTiming + { + Offset = 390000L, + Duration = 2700000L, + Word = "good", + }, new WordLevelTiming + { + Offset = 4500000L, + Duration = 920000L, + Word = "morning", + }, new WordLevelTiming + { + Offset = 590000L, + Duration = 2700000L, + Word = "john", + }, new WordLevelTiming + { + Offset = 6300000L, + Duration = 920000L, + Word = "doe", + }}, + } + }) + { + Domain = ConversationDomain.Generic, + } +}), new AnalyzeConversationOperationAction[] +{ + new PiiOperationAction + { + ActionContent = new ConversationPiiActionContent + { + ModelVersion = "latest", + PiiCategories = {ConversationPiiCategories.All}, + RedactAudioTiming = true, + RedactionSource = TranscriptContentType.Lexical, + }, + Name = "Conversation PII", + } +}) +{ + DisplayName = "Redacting PII data from transcribed audio", +}; +Operation operation = await client.AnalyzeConversationSubmitOperationAsync(WaitUntil.Completed, analyzeConversationOperationInput); +]]> +This sample shows how to call AnalyzeConversationSubmitOperationAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +AnalyzeConversationOperationInput analyzeConversationOperationInput = new AnalyzeConversationOperationInput(new MultiLanguageConversationInput(new ConversationInput[] +{ + new TranscriptConversation("1", "en", new TranscriptConversationItem[] + { + new TranscriptConversationItem( + "1", + "speaker 1", + "", + "", + "Let's get started.", + "") + { + ConversationItemLevelTiming = new ConversationItemLevelTiming + { + Offset = 0L, + Duration = 20000000L, + }, + }, + new TranscriptConversationItem( + "2", + "speaker 2", + "", + "", + "OK. How many remaining bugs do we have now?", + "") + { + ConversationItemLevelTiming = new ConversationItemLevelTiming + { + Offset = 20000000L, + Duration = 50000000L, + }, + }, + new TranscriptConversationItem( + "3", + "speaker 3", + "", + "", + "Only 3.", + "") + { + ConversationItemLevelTiming = new ConversationItemLevelTiming + { + Offset = 50000000L, + Duration = 60000000L, + }, + } + }) +}), new AnalyzeConversationOperationAction[] +{ + new SummarizationOperationAction + { + ActionContent = new ConversationSummarizationActionContent(new SummaryAspect[]{SummaryAspect.ChapterTitle, SummaryAspect.Narrative}), + Name = "Conversation Summarization Task 1", + } +}) +{ + DisplayName = "Conversation Summarization Example", +}; +Operation operation = await client.AnalyzeConversationSubmitOperationAsync(WaitUntil.Completed, analyzeConversationOperationInput); +]]> +This sample shows how to call AnalyzeConversationSubmitOperationAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +AnalyzeConversationOperationInput analyzeConversationOperationInput = new AnalyzeConversationOperationInput(new MultiLanguageConversationInput(new ConversationInput[] +{ + new TextConversation("20220101meeting", "en", new TextConversationItem[] + { + new TextConversationItem("1", "user", "Hi!") + { + Role = ParticipantRole.Customer, + }, + new TextConversationItem("2", "agent", "Hello, how can I help you?") + { + Role = ParticipantRole.Agent, + }, + new TextConversationItem("3", "user", "I am having trouble issuing a return of a game on my xbox: call of duty") { Role = ParticipantRole.Customer, } @@ -1081,9 +1432,204 @@ AnalyzeConversationOperationInput analyzeConversationOperationInput = new Analyz ActionContent = new ConversationPiiActionContent { ModelVersion = "latest", + PiiCategories = {ConversationPiiCategories.All}, + RedactAudioTiming = true, + RedactionSource = TranscriptContentType.Lexical, + RedactionPolicy = new CharacterMaskPolicyType + { + RedactionCharacter = RedactionCharacter.Minus, + }, + }, + Name = "Conversation PII", + } +}) +{ + DisplayName = "Redacting PII data from transcribed audio", +}; +Operation operation = client.AnalyzeConversationSubmitOperation(WaitUntil.Completed, analyzeConversationOperationInput); +]]> +This sample shows how to call AnalyzeConversationSubmitOperation. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +AnalyzeConversationOperationInput analyzeConversationOperationInput = new AnalyzeConversationOperationInput(new MultiLanguageConversationInput(new ConversationInput[] +{ + new TranscriptConversation("1", "en", new TranscriptConversationItem[] + { + new TranscriptConversationItem( + "1", + "1", + "good morning john doe", + "good morning john doe", + "Good morning John Doe.", + "good morning john doe") + { + WordLevelTimings = {new WordLevelTiming + { + Offset = 390000L, + Duration = 2700000L, + Word = "good", + }, new WordLevelTiming + { + Offset = 4500000L, + Duration = 920000L, + Word = "morning", + }, new WordLevelTiming + { + Offset = 590000L, + Duration = 2700000L, + Word = "john", + }, new WordLevelTiming + { + Offset = 6300000L, + Duration = 920000L, + Word = "doe", + }}, + } + }) + { + Domain = ConversationDomain.Generic, + } +}), new AnalyzeConversationOperationAction[] +{ + new PiiOperationAction + { + ActionContent = new ConversationPiiActionContent + { + ModelVersion = "latest", + PiiCategories = {ConversationPiiCategories.All}, + RedactAudioTiming = true, + RedactionSource = TranscriptContentType.Lexical, + RedactionPolicy = new EntityMaskTypePolicyType(), + }, + Name = "Conversation PII", + } +}) +{ + DisplayName = "Redacting PII data from transcribed audio", +}; +Operation operation = client.AnalyzeConversationSubmitOperation(WaitUntil.Completed, analyzeConversationOperationInput); +]]> +This sample shows how to call AnalyzeConversationSubmitOperation. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +AnalyzeConversationOperationInput analyzeConversationOperationInput = new AnalyzeConversationOperationInput(new MultiLanguageConversationInput(new ConversationInput[] +{ + new TranscriptConversation("1", "en", new TranscriptConversationItem[] + { + new TranscriptConversationItem( + "1", + "1", + "good morning john doe", + "good morning john doe", + "Good morning John Doe.", + "good morning john doe") + { + WordLevelTimings = {new WordLevelTiming + { + Offset = 390000L, + Duration = 2700000L, + Word = "good", + }, new WordLevelTiming + { + Offset = 4500000L, + Duration = 920000L, + Word = "morning", + }, new WordLevelTiming + { + Offset = 590000L, + Duration = 2700000L, + Word = "john", + }, new WordLevelTiming + { + Offset = 6300000L, + Duration = 920000L, + Word = "doe", + }}, + } + }) + { + Domain = ConversationDomain.Generic, + } +}), new AnalyzeConversationOperationAction[] +{ + new PiiOperationAction + { + ActionContent = new ConversationPiiActionContent + { + ModelVersion = "latest", + RedactAudioTiming = true, + RedactionSource = TranscriptContentType.Lexical, + ExcludePiiCategories = {ConversationPiiCategoryExclusions.Person}, + }, + Name = "Conversation PII", + } +}) +{ + DisplayName = "Redacting PII data from transcribed audio", +}; +Operation operation = client.AnalyzeConversationSubmitOperation(WaitUntil.Completed, analyzeConversationOperationInput); +]]> +This sample shows how to call AnalyzeConversationSubmitOperation. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +AnalyzeConversationOperationInput analyzeConversationOperationInput = new AnalyzeConversationOperationInput(new MultiLanguageConversationInput(new ConversationInput[] +{ + new TranscriptConversation("1", "en", new TranscriptConversationItem[] + { + new TranscriptConversationItem( + "1", + "1", + "good morning john doe", + "good morning john doe", + "Good morning John Doe.", + "good morning john doe") + { + WordLevelTimings = {new WordLevelTiming + { + Offset = 390000L, + Duration = 2700000L, + Word = "good", + }, new WordLevelTiming + { + Offset = 4500000L, + Duration = 920000L, + Word = "morning", + }, new WordLevelTiming + { + Offset = 590000L, + Duration = 2700000L, + Word = "john", + }, new WordLevelTiming + { + Offset = 6300000L, + Duration = 920000L, + Word = "doe", + }}, + } + }) + { + Domain = ConversationDomain.Generic, + } +}), new AnalyzeConversationOperationAction[] +{ + new PiiOperationAction + { + ActionContent = new ConversationPiiActionContent + { + ModelVersion = "latest", + PiiCategories = {ConversationPiiCategories.All}, RedactAudioTiming = true, RedactionSource = TranscriptContentType.Lexical, - ExcludePiiCategories = {ConversationPiiCategoryExclusions.Person}, + RedactionPolicy = new NoMaskPolicyType(), }, Name = "Conversation PII", } @@ -1403,6 +1949,179 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); +using RequestContent content = RequestContent.Create(new +{ + displayName = "Redacting PII data from transcribed audio", + analysisInput = new + { + conversations = new object[] + { + new + { + id = "1", + language = "en", + modality = "transcript", + domain = "generic", + conversationItems = new object[] + { + new + { + participantId = "1", + id = "1", + text = "Good morning John Doe.", + itn = "good morning john doe", + maskedItn = "good morning john doe", + lexical = "good morning john doe", + wordLevelTimings = new object[] + { + new + { + word = "good", + offset = 390000L, + duration = 2700000L, + }, + new + { + word = "morning", + offset = 4500000L, + duration = 920000L, + }, + new + { + word = "john", + offset = 590000L, + duration = 2700000L, + }, + new + { + word = "doe", + offset = 6300000L, + duration = 920000L, + } + }, + } + }, + } + }, + }, + tasks = new object[] + { + new + { + taskName = "Conversation PII", + kind = "ConversationalPIITask", + parameters = new + { + modelVersion = "latest", + piiCategories = new object[] + { + "All" + }, + redactionPolicy = new + { + policyKind = "characterMask", + redactionCharacter = "-", + }, + redactionSource = "lexical", + redactAudioTiming = true, + }, + } + }, +}); +Operation operation = await client.AnalyzeConversationSubmitOperationAsync(WaitUntil.Completed, content); +]]> +This sample shows how to call AnalyzeConversationSubmitOperationAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + displayName = "Redacting PII data from transcribed audio", + analysisInput = new + { + conversations = new object[] + { + new + { + id = "1", + language = "en", + modality = "transcript", + domain = "generic", + conversationItems = new object[] + { + new + { + participantId = "1", + id = "1", + text = "Good morning John Doe.", + itn = "good morning john doe", + maskedItn = "good morning john doe", + lexical = "good morning john doe", + wordLevelTimings = new object[] + { + new + { + word = "good", + offset = 390000L, + duration = 2700000L, + }, + new + { + word = "morning", + offset = 4500000L, + duration = 920000L, + }, + new + { + word = "john", + offset = 590000L, + duration = 2700000L, + }, + new + { + word = "doe", + offset = 6300000L, + duration = 920000L, + } + }, + } + }, + } + }, + }, + tasks = new object[] + { + new + { + taskName = "Conversation PII", + kind = "ConversationalPIITask", + parameters = new + { + modelVersion = "latest", + piiCategories = new object[] + { + "All" + }, + redactionPolicy = new + { + policyKind = "entityMask", + }, + redactionSource = "lexical", + redactAudioTiming = true, + }, + } + }, +}); +Operation operation = await client.AnalyzeConversationSubmitOperationAsync(WaitUntil.Completed, content); +]]> +This sample shows how to call AnalyzeConversationSubmitOperationAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + using RequestContent content = RequestContent.Create(new { displayName = "Redacting PII data from transcribed audio", @@ -1469,7 +2188,93 @@ using RequestContent content = RequestContent.Create(new modelVersion = "latest", excludePiiCategories = new object[] { - "Person" + "Person" + }, + redactionSource = "lexical", + redactAudioTiming = true, + }, + } + }, +}); +Operation operation = await client.AnalyzeConversationSubmitOperationAsync(WaitUntil.Completed, content); +]]> +This sample shows how to call AnalyzeConversationSubmitOperationAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + displayName = "Redacting PII data from transcribed audio", + analysisInput = new + { + conversations = new object[] + { + new + { + id = "1", + language = "en", + modality = "transcript", + domain = "generic", + conversationItems = new object[] + { + new + { + participantId = "1", + id = "1", + text = "Good morning John Doe.", + itn = "good morning john doe", + maskedItn = "good morning john doe", + lexical = "good morning john doe", + wordLevelTimings = new object[] + { + new + { + word = "good", + offset = 390000L, + duration = 2700000L, + }, + new + { + word = "morning", + offset = 4500000L, + duration = 920000L, + }, + new + { + word = "john", + offset = 590000L, + duration = 2700000L, + }, + new + { + word = "doe", + offset = 6300000L, + duration = 920000L, + } + }, + } + }, + } + }, + }, + tasks = new object[] + { + new + { + taskName = "Conversation PII", + kind = "ConversationalPIITask", + parameters = new + { + modelVersion = "latest", + piiCategories = new object[] + { + "All" + }, + redactionPolicy = new + { + policyKind = "noMask", }, redactionSource = "lexical", redactAudioTiming = true, @@ -1890,6 +2695,179 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); +using RequestContent content = RequestContent.Create(new +{ + displayName = "Redacting PII data from transcribed audio", + analysisInput = new + { + conversations = new object[] + { + new + { + id = "1", + language = "en", + modality = "transcript", + domain = "generic", + conversationItems = new object[] + { + new + { + participantId = "1", + id = "1", + text = "Good morning John Doe.", + itn = "good morning john doe", + maskedItn = "good morning john doe", + lexical = "good morning john doe", + wordLevelTimings = new object[] + { + new + { + word = "good", + offset = 390000L, + duration = 2700000L, + }, + new + { + word = "morning", + offset = 4500000L, + duration = 920000L, + }, + new + { + word = "john", + offset = 590000L, + duration = 2700000L, + }, + new + { + word = "doe", + offset = 6300000L, + duration = 920000L, + } + }, + } + }, + } + }, + }, + tasks = new object[] + { + new + { + taskName = "Conversation PII", + kind = "ConversationalPIITask", + parameters = new + { + modelVersion = "latest", + piiCategories = new object[] + { + "All" + }, + redactionPolicy = new + { + policyKind = "characterMask", + redactionCharacter = "-", + }, + redactionSource = "lexical", + redactAudioTiming = true, + }, + } + }, +}); +Operation operation = client.AnalyzeConversationSubmitOperation(WaitUntil.Completed, content); +]]> +This sample shows how to call AnalyzeConversationSubmitOperation. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + displayName = "Redacting PII data from transcribed audio", + analysisInput = new + { + conversations = new object[] + { + new + { + id = "1", + language = "en", + modality = "transcript", + domain = "generic", + conversationItems = new object[] + { + new + { + participantId = "1", + id = "1", + text = "Good morning John Doe.", + itn = "good morning john doe", + maskedItn = "good morning john doe", + lexical = "good morning john doe", + wordLevelTimings = new object[] + { + new + { + word = "good", + offset = 390000L, + duration = 2700000L, + }, + new + { + word = "morning", + offset = 4500000L, + duration = 920000L, + }, + new + { + word = "john", + offset = 590000L, + duration = 2700000L, + }, + new + { + word = "doe", + offset = 6300000L, + duration = 920000L, + } + }, + } + }, + } + }, + }, + tasks = new object[] + { + new + { + taskName = "Conversation PII", + kind = "ConversationalPIITask", + parameters = new + { + modelVersion = "latest", + piiCategories = new object[] + { + "All" + }, + redactionPolicy = new + { + policyKind = "entityMask", + }, + redactionSource = "lexical", + redactAudioTiming = true, + }, + } + }, +}); +Operation operation = client.AnalyzeConversationSubmitOperation(WaitUntil.Completed, content); +]]> +This sample shows how to call AnalyzeConversationSubmitOperation. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + using RequestContent content = RequestContent.Create(new { displayName = "Redacting PII data from transcribed audio", @@ -1972,6 +2950,92 @@ Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); +using RequestContent content = RequestContent.Create(new +{ + displayName = "Redacting PII data from transcribed audio", + analysisInput = new + { + conversations = new object[] + { + new + { + id = "1", + language = "en", + modality = "transcript", + domain = "generic", + conversationItems = new object[] + { + new + { + participantId = "1", + id = "1", + text = "Good morning John Doe.", + itn = "good morning john doe", + maskedItn = "good morning john doe", + lexical = "good morning john doe", + wordLevelTimings = new object[] + { + new + { + word = "good", + offset = 390000L, + duration = 2700000L, + }, + new + { + word = "morning", + offset = 4500000L, + duration = 920000L, + }, + new + { + word = "john", + offset = 590000L, + duration = 2700000L, + }, + new + { + word = "doe", + offset = 6300000L, + duration = 920000L, + } + }, + } + }, + } + }, + }, + tasks = new object[] + { + new + { + taskName = "Conversation PII", + kind = "ConversationalPIITask", + parameters = new + { + modelVersion = "latest", + piiCategories = new object[] + { + "All" + }, + redactionPolicy = new + { + policyKind = "noMask", + }, + redactionSource = "lexical", + redactAudioTiming = true, + }, + } + }, +}); +Operation operation = client.AnalyzeConversationSubmitOperation(WaitUntil.Completed, content); +]]> +This sample shows how to call AnalyzeConversationSubmitOperation. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + using RequestContent content = RequestContent.Create(new { displayName = "Redacting PII data from transcribed audio", diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AgeResolution.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AgeResolution.Serialization.cs index a84e8ecb5d90..d85f9700bf47 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AgeResolution.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AgeResolution.Serialization.cs @@ -18,15 +18,6 @@ public partial class AgeResolution : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,11 +25,29 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AgeResolution)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteNumberValue(Value); writer.WritePropertyName("unit"u8); writer.WriteStringValue(Unit.ToString()); + writer.WritePropertyName("resolutionKind"u8); + writer.WriteStringValue(ResolutionKind.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 + } + } + writer.WriteEndObject(); } AgeResolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnalysisConfig.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnalysisConfig.Serialization.cs index e1b24817093a..f5819c5d6204 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnalysisConfig.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnalysisConfig.Serialization.cs @@ -18,15 +18,6 @@ public partial class AnalysisConfig : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AnalysisConfig)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("targetProjectKind"u8); writer.WriteStringValue(TargetProjectKind.ToString()); if (Optional.IsDefined(ApiVersion)) @@ -56,6 +48,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AnalysisConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnalyzeConversationActionResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnalyzeConversationActionResult.Serialization.cs index 783f475d12ae..c50361711306 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnalyzeConversationActionResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnalyzeConversationActionResult.Serialization.cs @@ -18,15 +18,6 @@ public partial class AnalyzeConversationActionResult : IUtf8JsonSerializable, IJ 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AnalyzeConversationActionResult)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -51,6 +43,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AnalyzeConversationActionResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnalyzeConversationInput.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnalyzeConversationInput.Serialization.cs index 4b6d21eea296..6b6c5e540306 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnalyzeConversationInput.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnalyzeConversationInput.Serialization.cs @@ -18,15 +18,6 @@ public partial class AnalyzeConversationInput : IUtf8JsonSerializable, IJsonMode 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AnalyzeConversationInput)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -51,6 +43,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AnalyzeConversationInput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnalyzeConversationOperationAction.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnalyzeConversationOperationAction.Serialization.cs index 6d7e637d0d33..ede5acdcf722 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnalyzeConversationOperationAction.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnalyzeConversationOperationAction.Serialization.cs @@ -18,15 +18,6 @@ public partial class AnalyzeConversationOperationAction : IUtf8JsonSerializable, 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AnalyzeConversationOperationAction)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Name)) { writer.WritePropertyName("taskName"u8); @@ -56,6 +48,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AnalyzeConversationOperationAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnalyzeConversationOperationInput.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnalyzeConversationOperationInput.Serialization.cs index 3cf29a5cd727..97d1f7984bba 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnalyzeConversationOperationInput.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnalyzeConversationOperationInput.Serialization.cs @@ -18,15 +18,6 @@ public partial class AnalyzeConversationOperationInput : IUtf8JsonSerializable, 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AnalyzeConversationOperationInput)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(DisplayName)) { writer.WritePropertyName("displayName"u8); @@ -63,6 +55,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AnalyzeConversationOperationInput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnalyzeConversationOperationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnalyzeConversationOperationResult.Serialization.cs index 26953fbf4b07..859cdee202d3 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnalyzeConversationOperationResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnalyzeConversationOperationResult.Serialization.cs @@ -18,15 +18,6 @@ public partial class AnalyzeConversationOperationResult : IUtf8JsonSerializable, 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AnalyzeConversationOperationResult)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("lastUpdateDateTime"u8); writer.WriteStringValue(LastUpdateDateTime, "O"); writer.WritePropertyName("status"u8); @@ -60,6 +52,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AnalyzeConversationOperationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnalyzeConversationOperationState.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnalyzeConversationOperationState.Serialization.cs index 3246cb889a1f..d198ea3450b0 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnalyzeConversationOperationState.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnalyzeConversationOperationState.Serialization.cs @@ -18,15 +18,6 @@ public partial class AnalyzeConversationOperationState : IUtf8JsonSerializable, 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AnalyzeConversationOperationState)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(DisplayName)) { writer.WritePropertyName("displayName"u8); @@ -92,6 +84,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AnalyzeConversationOperationState IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnalyzeConversationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnalyzeConversationResult.Serialization.cs index e42e7dd0b0ad..c0a489d8ccc5 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnalyzeConversationResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnalyzeConversationResult.Serialization.cs @@ -18,15 +18,6 @@ public partial class AnalyzeConversationResult : IUtf8JsonSerializable, IJsonMod 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AnalyzeConversationResult)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("query"u8); writer.WriteStringValue(Query); if (Optional.IsDefined(DetectedLanguage)) @@ -58,6 +50,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AnalyzeConversationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnswerSpan.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnswerSpan.Serialization.cs index fc0cc9e9f644..276783708f6e 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnswerSpan.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnswerSpan.Serialization.cs @@ -18,15 +18,6 @@ public partial class AnswerSpan : 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AnswerSpan)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Text)) { writer.WritePropertyName("text"u8); @@ -69,6 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AnswerSpan IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnswersResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnswersResult.Serialization.cs index d74571511d9f..e6db51f2d350 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnswersResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AnswersResult.Serialization.cs @@ -18,15 +18,6 @@ public partial class AnswersResult : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AnswersResult)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsCollectionDefined(Answers)) { writer.WritePropertyName("answers"u8); @@ -59,6 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AnswersResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AreaResolution.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AreaResolution.Serialization.cs index 1309254e6158..60b00d27184c 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AreaResolution.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AreaResolution.Serialization.cs @@ -18,15 +18,6 @@ public partial class AreaResolution : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,11 +25,29 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AreaResolution)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteNumberValue(Value); writer.WritePropertyName("unit"u8); writer.WriteStringValue(Unit.ToString()); + writer.WritePropertyName("resolutionKind"u8); + writer.WriteStringValue(ResolutionKind.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 + } + } + writer.WriteEndObject(); } AreaResolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AudioTiming.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AudioTiming.Serialization.cs index a15be0d104fc..cbcb812ae497 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AudioTiming.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/AudioTiming.Serialization.cs @@ -18,15 +18,6 @@ public partial class AudioTiming : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AudioTiming)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Offset)) { writer.WritePropertyName("offset"u8); @@ -59,6 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } AudioTiming IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/BaseRedactionPolicy.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/BaseRedactionPolicy.Serialization.cs new file mode 100644 index 000000000000..97ef5aaeb8b2 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/BaseRedactionPolicy.Serialization.cs @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Language.Conversations.Models +{ + [PersistableModelProxy(typeof(UnknownBaseRedactionPolicy))] + public partial class BaseRedactionPolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BaseRedactionPolicy)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("policyKind"u8); + writer.WriteStringValue(PolicyKind.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 + } + } + writer.WriteEndObject(); + } + + BaseRedactionPolicy 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(BaseRedactionPolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBaseRedactionPolicy(document.RootElement, options); + } + + internal static BaseRedactionPolicy DeserializeBaseRedactionPolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("policyKind", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "characterMask": return CharacterMaskPolicyType.DeserializeCharacterMaskPolicyType(element, options); + case "entityMask": return EntityMaskTypePolicyType.DeserializeEntityMaskTypePolicyType(element, options); + case "noMask": return NoMaskPolicyType.DeserializeNoMaskPolicyType(element, options); + } + } + return UnknownBaseRedactionPolicy.DeserializeUnknownBaseRedactionPolicy(element, options); + } + + 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(BaseRedactionPolicy)} does not support writing '{options.Format}' format."); + } + } + + BaseRedactionPolicy 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 DeserializeBaseRedactionPolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BaseRedactionPolicy)} 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 BaseRedactionPolicy FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeBaseRedactionPolicy(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.Conversations/src/Generated/Models/BaseRedactionPolicy.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/BaseRedactionPolicy.cs new file mode 100644 index 000000000000..2396509fe391 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/BaseRedactionPolicy.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Language.Conversations.Models +{ + /// + /// 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 BaseRedactionPolicy + { + /// + /// 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 protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected BaseRedactionPolicy() + { + } + + /// Initializes a new instance of . + /// The entity RedactionPolicy object kind. + /// Keeps track of any properties unknown to the library. + internal BaseRedactionPolicy(RedactionPolicyKind policyKind, IDictionary serializedAdditionalRawData) + { + PolicyKind = policyKind; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The entity RedactionPolicy object kind. + internal RedactionPolicyKind PolicyKind { get; set; } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/BooleanResolution.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/BooleanResolution.Serialization.cs index 526bddc4cac6..b695fa1b940f 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/BooleanResolution.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/BooleanResolution.Serialization.cs @@ -18,15 +18,6 @@ public partial class BooleanResolution : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,9 +25,27 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(BooleanResolution)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteBooleanValue(Value); + writer.WritePropertyName("resolutionKind"u8); + writer.WriteStringValue(ResolutionKind.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 + } + } + writer.WriteEndObject(); } BooleanResolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/CharacterMaskPolicyType.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/CharacterMaskPolicyType.Serialization.cs new file mode 100644 index 000000000000..b15991ccc520 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/CharacterMaskPolicyType.Serialization.cs @@ -0,0 +1,150 @@ +// 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.Conversations.Models +{ + public partial class CharacterMaskPolicyType : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CharacterMaskPolicyType)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(RedactionCharacter)) + { + writer.WritePropertyName("redactionCharacter"u8); + writer.WriteStringValue(RedactionCharacter.Value.ToString()); + } + writer.WritePropertyName("policyKind"u8); + writer.WriteStringValue(PolicyKind.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 + } + } + writer.WriteEndObject(); + } + + CharacterMaskPolicyType 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(CharacterMaskPolicyType)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCharacterMaskPolicyType(document.RootElement, options); + } + + internal static CharacterMaskPolicyType DeserializeCharacterMaskPolicyType(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RedactionCharacter? redactionCharacter = default; + RedactionPolicyKind policyKind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("redactionCharacter"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + redactionCharacter = new RedactionCharacter(property.Value.GetString()); + continue; + } + if (property.NameEquals("policyKind"u8)) + { + policyKind = new RedactionPolicyKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CharacterMaskPolicyType(policyKind, serializedAdditionalRawData, redactionCharacter); + } + + 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(CharacterMaskPolicyType)} does not support writing '{options.Format}' format."); + } + } + + CharacterMaskPolicyType 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 DeserializeCharacterMaskPolicyType(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CharacterMaskPolicyType)} 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 CharacterMaskPolicyType FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeCharacterMaskPolicyType(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.Conversations/src/Generated/Models/CharacterMaskPolicyType.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/CharacterMaskPolicyType.cs new file mode 100644 index 000000000000..141dee29a3d2 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/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.Conversations.Models +{ + /// Represents the policy of masking 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.Conversations/src/Generated/Models/ConversationActionResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationActionResult.Serialization.cs index 195e378a8874..b4aa6ad885c4 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationActionResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationActionResult.Serialization.cs @@ -18,15 +18,6 @@ public partial class ConversationActionResult : IUtf8JsonSerializable, IJsonMode 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") @@ -34,9 +25,27 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationActionResult)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("result"u8); writer.WriteObjectValue(Result, options); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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 + } + } + writer.WriteEndObject(); } ConversationActionResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationActions.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationActions.Serialization.cs index 1c8d86a59ca3..11307ae89a1e 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationActions.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationActions.Serialization.cs @@ -18,15 +18,6 @@ public partial class ConversationActions : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ConversationActions)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("completed"u8); writer.WriteNumberValue(Completed); writer.WritePropertyName("failed"u8); @@ -67,6 +59,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ConversationActions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationAnalysisInput.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationAnalysisInput.Serialization.cs index 8cad96eb7e93..e76ed83547b4 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationAnalysisInput.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationAnalysisInput.Serialization.cs @@ -18,15 +18,6 @@ public partial class ConversationAnalysisInput : IUtf8JsonSerializable, IJsonMod 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ConversationAnalysisInput)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("conversationItem"u8); writer.WriteObjectValue(ConversationItem, options); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -51,6 +43,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ConversationAnalysisInput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationCallingConfig.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationCallingConfig.Serialization.cs index d728590eb93e..2c8d5ab1b1e0 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationCallingConfig.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationCallingConfig.Serialization.cs @@ -18,15 +18,6 @@ public partial class ConversationCallingConfig : IUtf8JsonSerializable, IJsonMod 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ConversationCallingConfig)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Language)) { writer.WritePropertyName("language"u8); @@ -64,6 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ConversationCallingConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationConfig.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationConfig.Serialization.cs index 02e31de87eea..68982166471b 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationConfig.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationConfig.Serialization.cs @@ -18,15 +18,6 @@ public partial class ConversationConfig : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,12 +25,35 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationConfig)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(CallingOptions)) { writer.WritePropertyName("callingOptions"u8); writer.WriteObjectValue(CallingOptions, options); } + writer.WritePropertyName("targetProjectKind"u8); + writer.WriteStringValue(TargetProjectKind.ToString()); + if (Optional.IsDefined(ApiVersion)) + { + writer.WritePropertyName("apiVersion"u8); + writer.WriteStringValue(ApiVersion); + } + 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 + } + } + writer.WriteEndObject(); } ConversationConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationEntity.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationEntity.Serialization.cs index ed4e8de5d734..b22bf2e9781c 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationEntity.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationEntity.Serialization.cs @@ -18,15 +18,6 @@ public partial class ConversationEntity : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ConversationEntity)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("category"u8); writer.WriteStringValue(Category); writer.WritePropertyName("text"u8); @@ -79,6 +71,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ConversationEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationEntityExtraInformation.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationEntityExtraInformation.Serialization.cs index 14ee96ee503e..1a89de75a6b8 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationEntityExtraInformation.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationEntityExtraInformation.Serialization.cs @@ -18,15 +18,6 @@ public partial class ConversationEntityExtraInformation : IUtf8JsonSerializable, 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ConversationEntityExtraInformation)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("extraInformationKind"u8); writer.WriteStringValue(ExtraInformationKind.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -51,6 +43,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ConversationEntityExtraInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationError.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationError.Serialization.cs index dfa09561aea0..d5d0e5c4cacc 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationError.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationError.Serialization.cs @@ -18,15 +18,6 @@ public partial class ConversationError : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ConversationError)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("code"u8); writer.WriteStringValue(Code.ToString()); writer.WritePropertyName("message"u8); @@ -73,6 +65,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ConversationError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationInput.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationInput.Serialization.cs index cb59843da184..2b1495aa9bc3 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationInput.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationInput.Serialization.cs @@ -18,15 +18,6 @@ public partial class ConversationInput : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ConversationInput)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); writer.WritePropertyName("language"u8); @@ -60,6 +52,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ConversationInput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationIntent.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationIntent.Serialization.cs index dd013771955b..63996e7e8538 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationIntent.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationIntent.Serialization.cs @@ -18,15 +18,6 @@ public partial class ConversationIntent : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ConversationIntent)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("category"u8); writer.WriteStringValue(Category); writer.WritePropertyName("confidenceScore"u8); @@ -53,6 +45,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ConversationIntent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationItemLevelTiming.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationItemLevelTiming.Serialization.cs index bfed6933313a..83b523a97799 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationItemLevelTiming.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationItemLevelTiming.Serialization.cs @@ -18,15 +18,6 @@ public partial class ConversationItemLevelTiming : IUtf8JsonSerializable, IJsonM 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ConversationItemLevelTiming)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Offset)) { writer.WritePropertyName("offset"u8); @@ -59,6 +51,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ConversationItemLevelTiming IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationLanguageUnderstandingActionContent.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationLanguageUnderstandingActionContent.Serialization.cs index fb1b2203c25d..0416662db393 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationLanguageUnderstandingActionContent.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationLanguageUnderstandingActionContent.Serialization.cs @@ -18,15 +18,6 @@ public partial class ConversationLanguageUnderstandingActionContent : IUtf8JsonS 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ConversationLanguageUnderstandingActionContent)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("projectName"u8); writer.WriteStringValue(ProjectName); writer.WritePropertyName("deploymentName"u8); @@ -84,6 +76,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ConversationLanguageUnderstandingActionContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationLanguageUnderstandingInput.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationLanguageUnderstandingInput.Serialization.cs index 65a0873b21fd..e47834b757bd 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationLanguageUnderstandingInput.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationLanguageUnderstandingInput.Serialization.cs @@ -18,15 +18,6 @@ public partial class ConversationLanguageUnderstandingInput : IUtf8JsonSerializa 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") @@ -34,11 +25,29 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationLanguageUnderstandingInput)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("analysisInput"u8); writer.WriteObjectValue(ConversationInput, options); writer.WritePropertyName("parameters"u8); writer.WriteObjectValue(ActionContent, options); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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 + } + } + writer.WriteEndObject(); } ConversationLanguageUnderstandingInput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationPiiActionContent.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationPiiActionContent.Serialization.cs index 5b5f0e66c881..703a12f7192d 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationPiiActionContent.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationPiiActionContent.Serialization.cs @@ -18,15 +18,6 @@ public partial class ConversationPiiActionContent : IUtf8JsonSerializable, IJson 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ConversationPiiActionContent)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(LoggingOptOut)) { writer.WritePropertyName("loggingOptOut"u8); @@ -79,6 +71,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } + if (Optional.IsDefined(RedactionPolicy)) + { + writer.WritePropertyName("redactionPolicy"u8); + writer.WriteObjectValue(RedactionPolicy, options); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -94,6 +91,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ConversationPiiActionContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -123,6 +121,7 @@ internal static ConversationPiiActionContent DeserializeConversationPiiActionCon TranscriptContentType? redactionSource = default; RedactionCharacter? redactionCharacter = default; IList excludePiiCategories = default; + BaseRedactionPolicy redactionPolicy = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -196,6 +195,15 @@ internal static ConversationPiiActionContent DeserializeConversationPiiActionCon excludePiiCategories = array; continue; } + if (property.NameEquals("redactionPolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + redactionPolicy = BaseRedactionPolicy.DeserializeBaseRedactionPolicy(property.Value, options); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -210,6 +218,7 @@ internal static ConversationPiiActionContent DeserializeConversationPiiActionCon redactionSource, redactionCharacter, excludePiiCategories ?? new ChangeTrackingList(), + redactionPolicy, serializedAdditionalRawData); } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationPiiActionContent.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationPiiActionContent.cs index fc962a138448..d1e3038d7711 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationPiiActionContent.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationPiiActionContent.cs @@ -60,8 +60,13 @@ public ConversationPiiActionContent() /// For transcript conversations, this parameter provides information regarding which content type (ITN, Text, Lexical, Masked ITN) should be used for entity detection. The details of the entities detected - like the offset, length and the text itself - will correspond to the text type selected here. /// 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. /// List of categories that need to be excluded instead of included. + /// + /// Optional parameter determine what type of redaction to use. + /// 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 ConversationPiiActionContent(bool? loggingOptOut, string modelVersion, IList piiCategories, bool? redactAudioTiming, TranscriptContentType? redactionSource, RedactionCharacter? redactionCharacter, IList excludePiiCategories, IDictionary serializedAdditionalRawData) + internal ConversationPiiActionContent(bool? loggingOptOut, string modelVersion, IList piiCategories, bool? redactAudioTiming, TranscriptContentType? redactionSource, RedactionCharacter? redactionCharacter, IList excludePiiCategories, BaseRedactionPolicy redactionPolicy, IDictionary serializedAdditionalRawData) { LoggingOptOut = loggingOptOut; ModelVersion = modelVersion; @@ -70,6 +75,7 @@ internal ConversationPiiActionContent(bool? loggingOptOut, string modelVersion, RedactionSource = redactionSource; RedactionCharacter = redactionCharacter; ExcludePiiCategories = excludePiiCategories; + RedactionPolicy = redactionPolicy; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -87,5 +93,11 @@ internal ConversationPiiActionContent(bool? loggingOptOut, string modelVersion, public RedactionCharacter? RedactionCharacter { get; set; } /// List of categories that need to be excluded instead of included. public IList ExcludePiiCategories { get; } + /// + /// Optional parameter determine what type of redaction to use. + /// 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.Conversations/src/Generated/Models/ConversationPiiItemResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationPiiItemResult.Serialization.cs index 3eae0688436e..a055f001ec46 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationPiiItemResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationPiiItemResult.Serialization.cs @@ -18,15 +18,6 @@ public partial class ConversationPiiItemResult : IUtf8JsonSerializable, IJsonMod 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ConversationPiiItemResult)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); writer.WritePropertyName("redactedContent"u8); @@ -60,6 +52,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ConversationPiiItemResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationPiiOperationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationPiiOperationResult.Serialization.cs index 3072a1499bf5..82f202745fab 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationPiiOperationResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationPiiOperationResult.Serialization.cs @@ -18,15 +18,6 @@ public partial class ConversationPiiOperationResult : IUtf8JsonSerializable, IJs 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") @@ -34,9 +25,36 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationPiiOperationResult)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("results"u8); writer.WriteObjectValue(Results, options); + writer.WritePropertyName("lastUpdateDateTime"u8); + writer.WriteStringValue(LastUpdateDateTime, "O"); + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("taskName"u8); + writer.WriteStringValue(Name); + } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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 + } + } + writer.WriteEndObject(); } ConversationPiiOperationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationPiiResults.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationPiiResults.Serialization.cs index 0b19f928878e..58d4a8066734 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationPiiResults.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationPiiResults.Serialization.cs @@ -18,15 +18,6 @@ public partial class ConversationPiiResults : 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ConversationPiiResults)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("errors"u8); writer.WriteStartArray(); foreach (var item in Errors) @@ -70,6 +62,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ConversationPiiResults IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationPrediction.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationPrediction.Serialization.cs index 70f7a38c4ce6..5075509e4099 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationPrediction.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationPrediction.Serialization.cs @@ -18,15 +18,6 @@ public partial class ConversationPrediction : 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationPrediction)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("intents"u8); writer.WriteStartArray(); foreach (var item in Intents) @@ -49,6 +40,29 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(item, options); } writer.WriteEndArray(); + writer.WritePropertyName("projectKind"u8); + writer.WriteStringValue(ProjectKind.ToString()); + if (Optional.IsDefined(TopIntent)) + { + writer.WritePropertyName("topIntent"u8); + writer.WriteStringValue(TopIntent); + } + 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 + } + } + writer.WriteEndObject(); } ConversationPrediction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationRequestStatistics.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationRequestStatistics.Serialization.cs index e9529019ba6a..69576df73535 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationRequestStatistics.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationRequestStatistics.Serialization.cs @@ -18,15 +18,6 @@ public partial class ConversationRequestStatistics : IUtf8JsonSerializable, IJso 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ConversationRequestStatistics)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("documentsCount"u8); writer.WriteNumberValue(DocumentsCount); writer.WritePropertyName("validDocumentsCount"u8); @@ -63,6 +55,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ConversationRequestStatistics IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationResult.Serialization.cs index f765f0e53038..60a5812a4d5c 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationResult.Serialization.cs @@ -18,15 +18,6 @@ public partial class ConversationResult : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ConversationResult)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("query"u8); writer.WriteStringValue(Query); if (Optional.IsDefined(DetectedLanguage)) @@ -61,6 +53,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ConversationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationStatistics.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationStatistics.Serialization.cs index 9b5fe7d5fdda..5455b2130b7b 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationStatistics.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationStatistics.Serialization.cs @@ -18,15 +18,6 @@ public partial class ConversationStatistics : 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ConversationStatistics)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("transactionsCount"u8); writer.WriteNumberValue(TransactionsCount); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -51,6 +43,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ConversationStatistics IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationSummarizationActionContent.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationSummarizationActionContent.Serialization.cs index 3f164373f622..ef554ee33676 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationSummarizationActionContent.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationSummarizationActionContent.Serialization.cs @@ -18,15 +18,6 @@ public partial class ConversationSummarizationActionContent : IUtf8JsonSerializa 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ConversationSummarizationActionContent)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(LoggingOptOut)) { writer.WritePropertyName("loggingOptOut"u8); @@ -66,6 +58,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(item.ToString()); } writer.WriteEndArray(); + if (Optional.IsDefined(Instruction)) + { + writer.WritePropertyName("instruction"u8); + writer.WriteStringValue(Instruction); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -81,6 +78,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ConversationSummarizationActionContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -109,6 +107,7 @@ internal static ConversationSummarizationActionContent DeserializeConversationSu StringIndexType? stringIndexType = default; SummaryLengthBucket? summaryLength = default; IList summaryAspects = default; + string instruction = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -164,6 +163,11 @@ internal static ConversationSummarizationActionContent DeserializeConversationSu summaryAspects = array; continue; } + if (property.NameEquals("instruction"u8)) + { + instruction = property.Value.GetString(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -177,6 +181,7 @@ internal static ConversationSummarizationActionContent DeserializeConversationSu stringIndexType, summaryLength, summaryAspects, + instruction, serializedAdditionalRawData); } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationSummarizationActionContent.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationSummarizationActionContent.cs index 30e6964d7584..178dadaf413f 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationSummarizationActionContent.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationSummarizationActionContent.cs @@ -63,8 +63,9 @@ public ConversationSummarizationActionContent(IEnumerable summary /// String index type. /// (NOTE: Recommended to use summaryLength over sentenceCount) Controls the approximate length of the output summaries. /// Array of Summary Aspects. + /// a text field to allow customers to use natural language to describe their needs for summarization. /// Keeps track of any properties unknown to the library. - internal ConversationSummarizationActionContent(bool? loggingOptOut, string modelVersion, int? sentenceCount, StringIndexType? stringIndexType, SummaryLengthBucket? summaryLength, IList summaryAspects, IDictionary serializedAdditionalRawData) + internal ConversationSummarizationActionContent(bool? loggingOptOut, string modelVersion, int? sentenceCount, StringIndexType? stringIndexType, SummaryLengthBucket? summaryLength, IList summaryAspects, string instruction, IDictionary serializedAdditionalRawData) { LoggingOptOut = loggingOptOut; ModelVersion = modelVersion; @@ -72,6 +73,7 @@ internal ConversationSummarizationActionContent(bool? loggingOptOut, string mode StringIndexType = stringIndexType; SummaryLength = summaryLength; SummaryAspects = summaryAspects; + Instruction = instruction; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -92,5 +94,7 @@ internal ConversationSummarizationActionContent() public SummaryLengthBucket? SummaryLength { get; set; } /// Array of Summary Aspects. public IList SummaryAspects { get; } + /// a text field to allow customers to use natural language to describe their needs for summarization. + public string Instruction { get; set; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationTargetIntentResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationTargetIntentResult.Serialization.cs index 2e4cadd4be34..91c6aae49af6 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationTargetIntentResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationTargetIntentResult.Serialization.cs @@ -18,15 +18,6 @@ public partial class ConversationTargetIntentResult : IUtf8JsonSerializable, IJs 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") @@ -34,12 +25,37 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationTargetIntentResult)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(Result)) { writer.WritePropertyName("result"u8); writer.WriteObjectValue(Result, options); } + writer.WritePropertyName("targetProjectKind"u8); + writer.WriteStringValue(TargetProjectKind.ToString()); + if (Optional.IsDefined(ApiVersion)) + { + writer.WritePropertyName("apiVersion"u8); + writer.WriteStringValue(ApiVersion); + } + writer.WritePropertyName("confidenceScore"u8); + writer.WriteNumberValue(Confidence); + 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 + } + } + writer.WriteEndObject(); } ConversationTargetIntentResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationalPiiResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationalPiiResult.Serialization.cs index c202cc4c3585..cb860ce9237f 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationalPiiResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationalPiiResult.Serialization.cs @@ -18,15 +18,6 @@ public partial class ConversationalPiiResult : 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ConversationalPiiResult)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); writer.WritePropertyName("warnings"u8); @@ -70,6 +62,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ConversationalPiiResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationsSummaryResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationsSummaryResult.Serialization.cs index 85a89b435278..dbd9da962fe0 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationsSummaryResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ConversationsSummaryResult.Serialization.cs @@ -18,15 +18,6 @@ public partial class ConversationsSummaryResult : IUtf8JsonSerializable, IJsonMo 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ConversationsSummaryResult)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); writer.WritePropertyName("warnings"u8); @@ -70,6 +62,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ConversationsSummaryResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/CurrencyResolution.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/CurrencyResolution.Serialization.cs index a6a749438514..73ceb10778d7 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/CurrencyResolution.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/CurrencyResolution.Serialization.cs @@ -18,15 +18,6 @@ public partial class CurrencyResolution : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(CurrencyResolution)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(Iso4217)) { writer.WritePropertyName("ISO4217"u8); @@ -44,6 +35,24 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteNumberValue(Value); writer.WritePropertyName("unit"u8); writer.WriteStringValue(Unit); + writer.WritePropertyName("resolutionKind"u8); + writer.WriteStringValue(ResolutionKind.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 + } + } + writer.WriteEndObject(); } CurrencyResolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/CustomConversationSummarizationActionContent.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/CustomConversationSummarizationActionContent.Serialization.cs index d1a03ed4c7d8..65683c94a2a7 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/CustomConversationSummarizationActionContent.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/CustomConversationSummarizationActionContent.Serialization.cs @@ -18,15 +18,6 @@ public partial class CustomConversationSummarizationActionContent : IUtf8JsonSer 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(CustomConversationSummarizationActionContent)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(LoggingOptOut)) { writer.WritePropertyName("loggingOptOut"u8); @@ -80,6 +72,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } CustomConversationSummarizationActionContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/CustomSummarizationOperationAction.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/CustomSummarizationOperationAction.Serialization.cs index b756953606f8..341ebd86c039 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/CustomSummarizationOperationAction.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/CustomSummarizationOperationAction.Serialization.cs @@ -18,15 +18,6 @@ public partial class CustomSummarizationOperationAction : IUtf8JsonSerializable, 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") @@ -34,12 +25,35 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(CustomSummarizationOperationAction)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(ActionContent)) { writer.WritePropertyName("parameters"u8); writer.WriteObjectValue(ActionContent, options); } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("taskName"u8); + writer.WriteStringValue(Name); + } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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 + } + } + writer.WriteEndObject(); } CustomSummarizationOperationAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/CustomSummarizationOperationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/CustomSummarizationOperationResult.Serialization.cs index 9fb7229f86b8..224b27e9d056 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/CustomSummarizationOperationResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/CustomSummarizationOperationResult.Serialization.cs @@ -18,15 +18,6 @@ public partial class CustomSummarizationOperationResult : IUtf8JsonSerializable, 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") @@ -34,9 +25,36 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(CustomSummarizationOperationResult)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("results"u8); writer.WriteObjectValue(Results, options); + writer.WritePropertyName("lastUpdateDateTime"u8); + writer.WriteStringValue(LastUpdateDateTime, "O"); + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("taskName"u8); + writer.WriteStringValue(Name); + } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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 + } + } + writer.WriteEndObject(); } CustomSummarizationOperationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/CustomSummaryResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/CustomSummaryResult.Serialization.cs index d93d767a995f..aa5e660ac44a 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/CustomSummaryResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/CustomSummaryResult.Serialization.cs @@ -18,15 +18,6 @@ public partial class CustomSummaryResult : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(CustomSummaryResult)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("conversations"u8); writer.WriteStartArray(); foreach (var item in Conversations) @@ -72,6 +64,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } CustomSummaryResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/DateTimeResolution.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/DateTimeResolution.Serialization.cs index 8a9c39ac2ee7..69cb62a6ea85 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/DateTimeResolution.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/DateTimeResolution.Serialization.cs @@ -18,15 +18,6 @@ public partial class DateTimeResolution : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(DateTimeResolution)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("timex"u8); writer.WriteStringValue(Timex); writer.WritePropertyName("dateTimeSubKind"u8); @@ -46,6 +37,24 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("modifier"u8); writer.WriteStringValue(Modifier.Value.ToString()); } + writer.WritePropertyName("resolutionKind"u8); + writer.WriteStringValue(ResolutionKind.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 + } + } + writer.WriteEndObject(); } DateTimeResolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/DocumentError.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/DocumentError.Serialization.cs index ac7d0d0d4022..97fedb22db16 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/DocumentError.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/DocumentError.Serialization.cs @@ -18,15 +18,6 @@ public partial class DocumentError : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DocumentError)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); writer.WritePropertyName("error"u8); @@ -53,6 +45,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } DocumentError IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/EntityMaskTypePolicyType.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/EntityMaskTypePolicyType.Serialization.cs new file mode 100644 index 000000000000..bee52c1f0ace --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/EntityMaskTypePolicyType.Serialization.cs @@ -0,0 +1,135 @@ +// 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.Conversations.Models +{ + public partial class EntityMaskTypePolicyType : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EntityMaskTypePolicyType)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("policyKind"u8); + writer.WriteStringValue(PolicyKind.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 + } + } + writer.WriteEndObject(); + } + + EntityMaskTypePolicyType 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(EntityMaskTypePolicyType)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEntityMaskTypePolicyType(document.RootElement, options); + } + + internal static EntityMaskTypePolicyType DeserializeEntityMaskTypePolicyType(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RedactionPolicyKind policyKind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("policyKind"u8)) + { + policyKind = new RedactionPolicyKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EntityMaskTypePolicyType(policyKind, 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(EntityMaskTypePolicyType)} does not support writing '{options.Format}' format."); + } + } + + EntityMaskTypePolicyType 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 DeserializeEntityMaskTypePolicyType(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EntityMaskTypePolicyType)} 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 EntityMaskTypePolicyType FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeEntityMaskTypePolicyType(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.Conversations/src/Generated/Models/EntityMaskTypePolicyType.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/EntityMaskTypePolicyType.cs new file mode 100644 index 000000000000..2345cff7d3f5 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/EntityMaskTypePolicyType.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.Conversations.Models +{ + /// Represents the policy of masking PII with the entity type. + public partial class EntityMaskTypePolicyType : BaseRedactionPolicy + { + /// Initializes a new instance of . + public EntityMaskTypePolicyType() + { + PolicyKind = RedactionPolicyKind.EntityMask; + } + + /// Initializes a new instance of . + /// The entity RedactionPolicy object kind. + /// Keeps track of any properties unknown to the library. + internal EntityMaskTypePolicyType(RedactionPolicyKind policyKind, IDictionary serializedAdditionalRawData) : base(policyKind, serializedAdditionalRawData) + { + } + } +} diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/EntitySubtype.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/EntitySubtype.Serialization.cs index 2ec531ec9086..6742256bab8b 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/EntitySubtype.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/EntitySubtype.Serialization.cs @@ -18,15 +18,6 @@ public partial class EntitySubtype : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(EntitySubtype)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); @@ -50,6 +41,24 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } + writer.WritePropertyName("extraInformationKind"u8); + writer.WriteStringValue(ExtraInformationKind.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 + } + } + writer.WriteEndObject(); } EntitySubtype IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/EntityTag.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/EntityTag.Serialization.cs index 6c789896ec48..725384570449 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/EntityTag.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/EntityTag.Serialization.cs @@ -18,15 +18,6 @@ public partial class EntityTag : 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(EntityTag)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); if (Optional.IsDefined(ConfidenceScore)) @@ -56,6 +48,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } EntityTag IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/InformationResolution.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/InformationResolution.Serialization.cs index b9868b04be34..21b149226413 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/InformationResolution.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/InformationResolution.Serialization.cs @@ -18,15 +18,6 @@ public partial class InformationResolution : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,11 +25,29 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(InformationResolution)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteNumberValue(Value); writer.WritePropertyName("unit"u8); writer.WriteStringValue(Unit.ToString()); + writer.WritePropertyName("resolutionKind"u8); + writer.WriteStringValue(ResolutionKind.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 + } + } + writer.WriteEndObject(); } InformationResolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/InnerErrorModel.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/InnerErrorModel.Serialization.cs index c9c0fe4105ee..fdbef36d7d80 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/InnerErrorModel.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/InnerErrorModel.Serialization.cs @@ -18,15 +18,6 @@ public partial class InnerErrorModel : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(InnerErrorModel)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("code"u8); writer.WriteStringValue(Code.ToString()); writer.WritePropertyName("message"u8); @@ -74,6 +66,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } InnerErrorModel IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/InputWarning.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/InputWarning.Serialization.cs index 798d2134209f..7593de3ee557 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/InputWarning.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/InputWarning.Serialization.cs @@ -18,15 +18,6 @@ public partial class InputWarning : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(InputWarning)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("code"u8); writer.WriteStringValue(Code); writer.WritePropertyName("message"u8); @@ -58,6 +50,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } InputWarning IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ItemizedSummaryContext.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ItemizedSummaryContext.Serialization.cs index c7380d61b224..f7e4398a2a99 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ItemizedSummaryContext.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ItemizedSummaryContext.Serialization.cs @@ -18,15 +18,6 @@ public partial class ItemizedSummaryContext : 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ItemizedSummaryContext)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("offset"u8); writer.WriteNumberValue(Offset); writer.WritePropertyName("length"u8); @@ -55,6 +47,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ItemizedSummaryContext IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/KnowledgeBaseAnswer.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/KnowledgeBaseAnswer.Serialization.cs index 5cd43754f42d..ba9c974e1278 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/KnowledgeBaseAnswer.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/KnowledgeBaseAnswer.Serialization.cs @@ -18,15 +18,6 @@ public partial class KnowledgeBaseAnswer : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(KnowledgeBaseAnswer)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsCollectionDefined(Questions)) { writer.WritePropertyName("questions"u8); @@ -100,6 +92,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } KnowledgeBaseAnswer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/KnowledgeBaseAnswerContext.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/KnowledgeBaseAnswerContext.Serialization.cs index a11a5eda1660..51e1f12216c3 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/KnowledgeBaseAnswerContext.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/KnowledgeBaseAnswerContext.Serialization.cs @@ -18,15 +18,6 @@ public partial class KnowledgeBaseAnswerContext : IUtf8JsonSerializable, IJsonMo 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(KnowledgeBaseAnswerContext)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("previousQnaId"u8); writer.WriteNumberValue(PreviousQnaId); if (Optional.IsDefined(PreviousQuestion)) @@ -56,6 +48,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } KnowledgeBaseAnswerContext IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/KnowledgeBaseAnswerDialog.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/KnowledgeBaseAnswerDialog.Serialization.cs index edb90e56b0a1..c6b750935e18 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/KnowledgeBaseAnswerDialog.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/KnowledgeBaseAnswerDialog.Serialization.cs @@ -18,15 +18,6 @@ public partial class KnowledgeBaseAnswerDialog : IUtf8JsonSerializable, IJsonMod 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(KnowledgeBaseAnswerDialog)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(IsContextOnly)) { writer.WritePropertyName("isContextOnly"u8); @@ -64,6 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } KnowledgeBaseAnswerDialog IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/KnowledgeBaseAnswerPrompt.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/KnowledgeBaseAnswerPrompt.Serialization.cs index 0ac62e1233f8..e14d729b3cab 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/KnowledgeBaseAnswerPrompt.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/KnowledgeBaseAnswerPrompt.Serialization.cs @@ -18,15 +18,6 @@ public partial class KnowledgeBaseAnswerPrompt : IUtf8JsonSerializable, IJsonMod 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(KnowledgeBaseAnswerPrompt)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(DisplayOrder)) { writer.WritePropertyName("displayOrder"u8); @@ -64,6 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } KnowledgeBaseAnswerPrompt IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/LengthResolution.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/LengthResolution.Serialization.cs index 46bdfb201271..624bae186940 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/LengthResolution.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/LengthResolution.Serialization.cs @@ -18,15 +18,6 @@ public partial class LengthResolution : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,11 +25,29 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(LengthResolution)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteNumberValue(Value); writer.WritePropertyName("unit"u8); writer.WriteStringValue(Unit.ToString()); + writer.WritePropertyName("resolutionKind"u8); + writer.WriteStringValue(ResolutionKind.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 + } + } + writer.WriteEndObject(); } LengthResolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ListKey.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ListKey.Serialization.cs index 266ffe41649b..1648ec7f7094 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ListKey.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ListKey.Serialization.cs @@ -18,15 +18,6 @@ public partial class ListKey : 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") @@ -34,12 +25,30 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ListKey)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(Key)) { writer.WritePropertyName("key"u8); writer.WriteStringValue(Key); } + writer.WritePropertyName("extraInformationKind"u8); + writer.WriteStringValue(ExtraInformationKind.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 + } + } + writer.WriteEndObject(); } ListKey IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/LuisCallingConfig.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/LuisCallingConfig.Serialization.cs index 881652682845..25b0a68abb3b 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/LuisCallingConfig.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/LuisCallingConfig.Serialization.cs @@ -18,15 +18,6 @@ public partial class LuisCallingConfig : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(LuisCallingConfig)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Verbose)) { writer.WritePropertyName("verbose"u8); @@ -79,6 +71,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } LuisCallingConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/LuisConfig.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/LuisConfig.Serialization.cs index b437d906fcf7..1331360b9e7e 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/LuisConfig.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/LuisConfig.Serialization.cs @@ -18,15 +18,6 @@ public partial class LuisConfig : 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(LuisConfig)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(Query)) { writer.WritePropertyName("query"u8); @@ -45,6 +36,29 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("callingOptions"u8); writer.WriteObjectValue(CallingOptions, options); } + writer.WritePropertyName("targetProjectKind"u8); + writer.WriteStringValue(TargetProjectKind.ToString()); + if (Optional.IsDefined(ApiVersion)) + { + writer.WritePropertyName("apiVersion"u8); + writer.WriteStringValue(ApiVersion); + } + 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 + } + } + writer.WriteEndObject(); } LuisConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/LuisResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/LuisResult.Serialization.cs index c1df5bd33bd9..629b705877e2 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/LuisResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/LuisResult.Serialization.cs @@ -18,15 +18,6 @@ public partial class LuisResult : 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(LuisResult)} does not support writing '{format}' format."); } + writer.WriteStartObject(); foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); @@ -46,6 +38,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } #endif } + writer.WriteEndObject(); } LuisResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/LuisTargetIntentResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/LuisTargetIntentResult.Serialization.cs index 8f9ea217865a..145303e2c853 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/LuisTargetIntentResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/LuisTargetIntentResult.Serialization.cs @@ -18,15 +18,6 @@ public partial class LuisTargetIntentResult : 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") @@ -34,12 +25,37 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(LuisTargetIntentResult)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(Result)) { writer.WritePropertyName("result"u8); writer.WriteObjectValue(Result, options); } + writer.WritePropertyName("targetProjectKind"u8); + writer.WriteStringValue(TargetProjectKind.ToString()); + if (Optional.IsDefined(ApiVersion)) + { + writer.WritePropertyName("apiVersion"u8); + writer.WriteStringValue(ApiVersion); + } + writer.WritePropertyName("confidenceScore"u8); + writer.WriteNumberValue(Confidence); + 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 + } + } + writer.WriteEndObject(); } LuisTargetIntentResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/MetadataFilter.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/MetadataFilter.Serialization.cs index 819bcd801bb3..cdac14ba6c50 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/MetadataFilter.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/MetadataFilter.Serialization.cs @@ -18,15 +18,6 @@ public partial class MetadataFilter : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MetadataFilter)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsCollectionDefined(Metadata)) { writer.WritePropertyName("metadata"u8); @@ -64,6 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } MetadataFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/MetadataRecord.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/MetadataRecord.Serialization.cs index 19205a853541..8bd7877b90dd 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/MetadataRecord.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/MetadataRecord.Serialization.cs @@ -18,15 +18,6 @@ public partial class MetadataRecord : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MetadataRecord)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("key"u8); writer.WriteStringValue(Key); writer.WritePropertyName("value"u8); @@ -53,6 +45,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } MetadataRecord IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/MultiLanguageConversationInput.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/MultiLanguageConversationInput.Serialization.cs index 73f8779dcbd0..b1128b207c51 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/MultiLanguageConversationInput.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/MultiLanguageConversationInput.Serialization.cs @@ -18,15 +18,6 @@ public partial class MultiLanguageConversationInput : IUtf8JsonSerializable, IJs 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MultiLanguageConversationInput)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("conversations"u8); writer.WriteStartArray(); foreach (var item in Conversations) @@ -56,6 +48,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } MultiLanguageConversationInput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NamedEntity.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NamedEntity.Serialization.cs index d5bb88576ca7..eb0add1d4db5 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NamedEntity.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NamedEntity.Serialization.cs @@ -18,15 +18,6 @@ public partial class NamedEntity : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(NamedEntity)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("text"u8); writer.WriteStringValue(Text); writer.WritePropertyName("category"u8); @@ -49,6 +41,21 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNumberValue(Length); writer.WritePropertyName("confidenceScore"u8); writer.WriteNumberValue(ConfidenceScore); + if (Optional.IsDefined(Mask)) + { + 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) { foreach (var item in _serializedAdditionalRawData) @@ -64,6 +71,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } NamedEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -92,6 +100,9 @@ internal static NamedEntity DeserializeNamedEntity(JsonElement element, ModelRea int offset = default; int length = default; double confidenceScore = default; + string mask = default; + int? maskOffset = default; + int? maskLength = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -126,6 +137,29 @@ internal static NamedEntity DeserializeNamedEntity(JsonElement element, ModelRea confidenceScore = property.Value.GetDouble(); continue; } + if (property.NameEquals("mask"u8)) + { + mask = property.Value.GetString(); + continue; + } + if (property.NameEquals("maskOffset"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maskOffset = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maskLength"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maskLength = property.Value.GetInt32(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -139,6 +173,9 @@ internal static NamedEntity DeserializeNamedEntity(JsonElement element, ModelRea offset, length, confidenceScore, + mask, + maskOffset, + maskLength, serializedAdditionalRawData); } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NamedEntity.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NamedEntity.cs index f8079487a0a5..3e60776d7584 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NamedEntity.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NamedEntity.cs @@ -71,8 +71,11 @@ internal NamedEntity(string text, string category, int offset, int length, doubl /// 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. + /// Exact mask text to mask the PII entity. + /// Offset of the mask text. + /// Length of the mask text. /// Keeps track of any properties unknown to the library. - internal NamedEntity(string text, string category, string subcategory, int offset, int length, double confidenceScore, IDictionary serializedAdditionalRawData) + internal NamedEntity(string text, string category, string subcategory, int offset, int length, double confidenceScore, string mask, int? maskOffset, int? maskLength, IDictionary serializedAdditionalRawData) { Text = text; Category = category; @@ -80,6 +83,9 @@ internal NamedEntity(string text, string category, string subcategory, int offse Offset = offset; Length = length; ConfidenceScore = confidenceScore; + Mask = mask; + MaskOffset = maskOffset; + MaskLength = maskLength; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -100,5 +106,11 @@ internal NamedEntity() public int Length { get; } /// Confidence score between 0 and 1 of the extracted entity. public double ConfidenceScore { get; } + /// Exact mask text to mask the PII entity. + public string Mask { get; } + /// Offset of the mask text. + public int? MaskOffset { get; } + /// Length of the mask text. + public int? MaskLength { get; } } } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NoMaskPolicyType.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NoMaskPolicyType.Serialization.cs new file mode 100644 index 000000000000..c370d72f7831 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NoMaskPolicyType.Serialization.cs @@ -0,0 +1,135 @@ +// 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.Conversations.Models +{ + public partial class NoMaskPolicyType : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NoMaskPolicyType)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("policyKind"u8); + writer.WriteStringValue(PolicyKind.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 + } + } + writer.WriteEndObject(); + } + + NoMaskPolicyType 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(NoMaskPolicyType)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNoMaskPolicyType(document.RootElement, options); + } + + internal static NoMaskPolicyType DeserializeNoMaskPolicyType(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RedactionPolicyKind policyKind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("policyKind"u8)) + { + policyKind = new RedactionPolicyKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NoMaskPolicyType(policyKind, 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(NoMaskPolicyType)} does not support writing '{options.Format}' format."); + } + } + + NoMaskPolicyType 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 DeserializeNoMaskPolicyType(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NoMaskPolicyType)} 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 NoMaskPolicyType FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeNoMaskPolicyType(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.Conversations/src/Generated/Models/NoMaskPolicyType.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NoMaskPolicyType.cs new file mode 100644 index 000000000000..2ccc30399781 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/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.Conversations.Models +{ + /// Represents the policy of not masking 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.Conversations/src/Generated/Models/NoneLinkedTargetIntentResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NoneLinkedTargetIntentResult.Serialization.cs index c385d8716d3b..ebfbd8552207 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NoneLinkedTargetIntentResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NoneLinkedTargetIntentResult.Serialization.cs @@ -18,15 +18,6 @@ public partial class NoneLinkedTargetIntentResult : IUtf8JsonSerializable, IJson 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") @@ -34,12 +25,37 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(NoneLinkedTargetIntentResult)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(Result)) { writer.WritePropertyName("result"u8); writer.WriteObjectValue(Result, options); } + writer.WritePropertyName("targetProjectKind"u8); + writer.WriteStringValue(TargetProjectKind.ToString()); + if (Optional.IsDefined(ApiVersion)) + { + writer.WritePropertyName("apiVersion"u8); + writer.WriteStringValue(ApiVersion); + } + writer.WritePropertyName("confidenceScore"u8); + writer.WriteNumberValue(Confidence); + 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 + } + } + writer.WriteEndObject(); } NoneLinkedTargetIntentResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NumberResolution.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NumberResolution.Serialization.cs index 6224c6282b76..7911e9b3113d 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NumberResolution.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NumberResolution.Serialization.cs @@ -18,15 +18,6 @@ public partial class NumberResolution : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,11 +25,29 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(NumberResolution)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("numberKind"u8); writer.WriteStringValue(NumberKind.ToString()); writer.WritePropertyName("value"u8); writer.WriteNumberValue(Value); + writer.WritePropertyName("resolutionKind"u8); + writer.WriteStringValue(ResolutionKind.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 + } + } + writer.WriteEndObject(); } NumberResolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NumericRangeResolution.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NumericRangeResolution.Serialization.cs index 1ff759a08cd0..84c20a2d6dd6 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NumericRangeResolution.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/NumericRangeResolution.Serialization.cs @@ -18,15 +18,6 @@ public partial class NumericRangeResolution : 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") @@ -34,13 +25,31 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(NumericRangeResolution)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("rangeKind"u8); writer.WriteStringValue(RangeKind.ToString()); writer.WritePropertyName("minimum"u8); writer.WriteNumberValue(Minimum); writer.WritePropertyName("maximum"u8); writer.WriteNumberValue(Maximum); + writer.WritePropertyName("resolutionKind"u8); + writer.WriteStringValue(ResolutionKind.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 + } + } + writer.WriteEndObject(); } NumericRangeResolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/OrchestrationPrediction.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/OrchestrationPrediction.Serialization.cs index bb843544eb31..8bbea7966e93 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/OrchestrationPrediction.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/OrchestrationPrediction.Serialization.cs @@ -18,15 +18,6 @@ public partial class OrchestrationPrediction : 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(OrchestrationPrediction)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("intents"u8); writer.WriteStartObject(); foreach (var item in Intents) @@ -43,6 +34,29 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(item.Value, options); } writer.WriteEndObject(); + writer.WritePropertyName("projectKind"u8); + writer.WriteStringValue(ProjectKind.ToString()); + if (Optional.IsDefined(TopIntent)) + { + writer.WritePropertyName("topIntent"u8); + writer.WriteStringValue(TopIntent); + } + 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 + } + } + writer.WriteEndObject(); } OrchestrationPrediction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/OrdinalResolution.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/OrdinalResolution.Serialization.cs index f52c098a1ac6..b34092a88c2f 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/OrdinalResolution.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/OrdinalResolution.Serialization.cs @@ -18,15 +18,6 @@ public partial class OrdinalResolution : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,13 +25,31 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(OrdinalResolution)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("offset"u8); writer.WriteStringValue(Offset); writer.WritePropertyName("relativeTo"u8); writer.WriteStringValue(RelativeTo.ToString()); writer.WritePropertyName("value"u8); writer.WriteStringValue(Value); + writer.WritePropertyName("resolutionKind"u8); + writer.WriteStringValue(ResolutionKind.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 + } + } + writer.WriteEndObject(); } OrdinalResolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/PiiOperationAction.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/PiiOperationAction.Serialization.cs index 4a3d0516e4f7..544df7255863 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/PiiOperationAction.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/PiiOperationAction.Serialization.cs @@ -18,15 +18,6 @@ public partial class PiiOperationAction : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,12 +25,35 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(PiiOperationAction)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(ActionContent)) { writer.WritePropertyName("parameters"u8); writer.WriteObjectValue(ActionContent, options); } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("taskName"u8); + writer.WriteStringValue(Name); + } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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 + } + } + writer.WriteEndObject(); } PiiOperationAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/PredictionBase.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/PredictionBase.Serialization.cs index 98c02f20aafc..ddd014e0c293 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/PredictionBase.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/PredictionBase.Serialization.cs @@ -18,15 +18,6 @@ public partial class PredictionBase : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(PredictionBase)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("projectKind"u8); writer.WriteStringValue(ProjectKind.ToString()); if (Optional.IsDefined(TopIntent)) @@ -56,6 +48,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } PredictionBase IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/QueryFilters.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/QueryFilters.Serialization.cs index 998fc74e74fe..4f937697043a 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/QueryFilters.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/QueryFilters.Serialization.cs @@ -18,15 +18,6 @@ public partial class QueryFilters : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(QueryFilters)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(MetadataFilter)) { writer.WritePropertyName("metadataFilter"u8); @@ -69,6 +61,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } QueryFilters IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/QuestionAnsweringConfig.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/QuestionAnsweringConfig.Serialization.cs index f24c7ef803e9..07b6ee723379 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/QuestionAnsweringConfig.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/QuestionAnsweringConfig.Serialization.cs @@ -18,15 +18,6 @@ public partial class QuestionAnsweringConfig : 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") @@ -34,12 +25,35 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(QuestionAnsweringConfig)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(CallingOptions)) { writer.WritePropertyName("callingOptions"u8); writer.WriteObjectValue(CallingOptions, options); } + writer.WritePropertyName("targetProjectKind"u8); + writer.WriteStringValue(TargetProjectKind.ToString()); + if (Optional.IsDefined(ApiVersion)) + { + writer.WritePropertyName("apiVersion"u8); + writer.WriteStringValue(ApiVersion); + } + 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 + } + } + writer.WriteEndObject(); } QuestionAnsweringConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/QuestionAnsweringTargetIntentResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/QuestionAnsweringTargetIntentResult.Serialization.cs index a64c0a9b14b6..6ebed6e2fd19 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/QuestionAnsweringTargetIntentResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/QuestionAnsweringTargetIntentResult.Serialization.cs @@ -18,15 +18,6 @@ public partial class QuestionAnsweringTargetIntentResult : IUtf8JsonSerializable 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") @@ -34,12 +25,37 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(QuestionAnsweringTargetIntentResult)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(Result)) { writer.WritePropertyName("result"u8); writer.WriteObjectValue(Result, options); } + writer.WritePropertyName("targetProjectKind"u8); + writer.WriteStringValue(TargetProjectKind.ToString()); + if (Optional.IsDefined(ApiVersion)) + { + writer.WritePropertyName("apiVersion"u8); + writer.WriteStringValue(ApiVersion); + } + writer.WritePropertyName("confidenceScore"u8); + writer.WriteNumberValue(Confidence); + 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 + } + } + writer.WriteEndObject(); } QuestionAnsweringTargetIntentResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/QuestionAnswersConfig.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/QuestionAnswersConfig.Serialization.cs index df37fc69ecbe..eaa2e307353e 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/QuestionAnswersConfig.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/QuestionAnswersConfig.Serialization.cs @@ -18,15 +18,6 @@ public partial class QuestionAnswersConfig : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(QuestionAnswersConfig)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(QnaId)) { writer.WritePropertyName("qnaId"u8); @@ -99,6 +91,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } QuestionAnswersConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/RedactedTranscriptContent.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/RedactedTranscriptContent.Serialization.cs index 16ccb0fe2673..447a3c36038e 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/RedactedTranscriptContent.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/RedactedTranscriptContent.Serialization.cs @@ -18,15 +18,6 @@ public partial class RedactedTranscriptContent : IUtf8JsonSerializable, IJsonMod 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RedactedTranscriptContent)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(InverseTextNormalized)) { writer.WritePropertyName("itn"u8); @@ -79,6 +71,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } RedactedTranscriptContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/RedactionPolicyKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/RedactionPolicyKind.cs new file mode 100644 index 000000000000..18f75a5d2d9a --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/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.Conversations.Models +{ + /// 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 mask detected entities. + public static RedactionPolicyKind NoMask { get; } = new RedactionPolicyKind(NoMaskValue); + /// Mask detected entities with redaction character. + public static RedactionPolicyKind CharacterMask { get; } = new RedactionPolicyKind(CharacterMaskValue); + /// Mask 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.Conversations/src/Generated/Models/RegexKey.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/RegexKey.Serialization.cs index e41396265ee3..33f7536dd7ec 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/RegexKey.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/RegexKey.Serialization.cs @@ -18,15 +18,6 @@ public partial class RegexKey : 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(RegexKey)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(Key)) { writer.WritePropertyName("key"u8); @@ -45,6 +36,24 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("regexPattern"u8); writer.WriteStringValue(RegexPattern); } + writer.WritePropertyName("extraInformationKind"u8); + writer.WriteStringValue(ExtraInformationKind.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 + } + } + writer.WriteEndObject(); } RegexKey IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/RequestStatistics.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/RequestStatistics.Serialization.cs index 85b3542f316b..1d288b348aef 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/RequestStatistics.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/RequestStatistics.Serialization.cs @@ -18,15 +18,6 @@ public partial class RequestStatistics : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RequestStatistics)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("documentsCount"u8); writer.WriteNumberValue(DocumentsCount); writer.WritePropertyName("validDocumentsCount"u8); @@ -57,6 +49,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } RequestStatistics IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ResolutionBase.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ResolutionBase.Serialization.cs index 992d1a5e5295..2b48d2f9a811 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ResolutionBase.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ResolutionBase.Serialization.cs @@ -18,15 +18,6 @@ public partial class ResolutionBase : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ResolutionBase)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("resolutionKind"u8); writer.WriteStringValue(ResolutionKind.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) @@ -51,6 +43,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ResolutionBase IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ShortAnswerConfig.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ShortAnswerConfig.Serialization.cs index 2cb381df00c9..d18c6a8639de 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ShortAnswerConfig.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/ShortAnswerConfig.Serialization.cs @@ -18,15 +18,6 @@ public partial class ShortAnswerConfig : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ShortAnswerConfig)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Enable)) { writer.WritePropertyName("enable"u8); @@ -64,6 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } ShortAnswerConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/SpeedResolution.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/SpeedResolution.Serialization.cs index 3edc5dec489a..940a8c1bedd1 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/SpeedResolution.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/SpeedResolution.Serialization.cs @@ -18,15 +18,6 @@ public partial class SpeedResolution : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,11 +25,29 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(SpeedResolution)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteNumberValue(Value); writer.WritePropertyName("unit"u8); writer.WriteStringValue(Unit.ToString()); + writer.WritePropertyName("resolutionKind"u8); + writer.WriteStringValue(ResolutionKind.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 + } + } + writer.WriteEndObject(); } SpeedResolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/SummarizationOperationAction.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/SummarizationOperationAction.Serialization.cs index e534a0409476..0f6ddc5ad3ef 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/SummarizationOperationAction.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/SummarizationOperationAction.Serialization.cs @@ -18,15 +18,6 @@ public partial class SummarizationOperationAction : IUtf8JsonSerializable, IJson 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") @@ -34,12 +25,35 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(SummarizationOperationAction)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(ActionContent)) { writer.WritePropertyName("parameters"u8); writer.WriteObjectValue(ActionContent, options); } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("taskName"u8); + writer.WriteStringValue(Name); + } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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 + } + } + writer.WriteEndObject(); } SummarizationOperationAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/SummarizationOperationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/SummarizationOperationResult.Serialization.cs index 72545c4275e7..224b70a4df32 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/SummarizationOperationResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/SummarizationOperationResult.Serialization.cs @@ -18,15 +18,6 @@ public partial class SummarizationOperationResult : IUtf8JsonSerializable, IJson 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") @@ -34,9 +25,36 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(SummarizationOperationResult)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("results"u8); writer.WriteObjectValue(Results, options); + writer.WritePropertyName("lastUpdateDateTime"u8); + writer.WriteStringValue(LastUpdateDateTime, "O"); + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("taskName"u8); + writer.WriteStringValue(Name); + } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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 + } + } + writer.WriteEndObject(); } SummarizationOperationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/SummaryResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/SummaryResult.Serialization.cs index 29b6d64612e3..3c561ccfc234 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/SummaryResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/SummaryResult.Serialization.cs @@ -18,15 +18,6 @@ public partial class SummaryResult : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(SummaryResult)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("conversations"u8); writer.WriteStartArray(); foreach (var item in Conversations) @@ -70,6 +62,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } SummaryResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/SummaryResultItem.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/SummaryResultItem.Serialization.cs index e816717ba88f..3fd56471ea0f 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/SummaryResultItem.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/SummaryResultItem.Serialization.cs @@ -18,15 +18,6 @@ public partial class SummaryResultItem : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(SummaryResultItem)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("aspect"u8); writer.WriteStringValue(Aspect); writer.WritePropertyName("text"u8); @@ -63,6 +55,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } SummaryResultItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/TargetIntentResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/TargetIntentResult.Serialization.cs index ce5cc4004358..68cba7b83f6c 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/TargetIntentResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/TargetIntentResult.Serialization.cs @@ -18,15 +18,6 @@ public partial class TargetIntentResult : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(TargetIntentResult)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("targetProjectKind"u8); writer.WriteStringValue(TargetProjectKind.ToString()); if (Optional.IsDefined(ApiVersion)) @@ -58,6 +50,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } TargetIntentResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/TemperatureResolution.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/TemperatureResolution.Serialization.cs index 10dca652c523..1a8256e8d09b 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/TemperatureResolution.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/TemperatureResolution.Serialization.cs @@ -18,15 +18,6 @@ public partial class TemperatureResolution : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,11 +25,29 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(TemperatureResolution)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteNumberValue(Value); writer.WritePropertyName("unit"u8); writer.WriteStringValue(Unit.ToString()); + writer.WritePropertyName("resolutionKind"u8); + writer.WriteStringValue(ResolutionKind.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 + } + } + writer.WriteEndObject(); } TemperatureResolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/TemporalSpanResolution.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/TemporalSpanResolution.Serialization.cs index 5772c4b4387c..873c4b2bb566 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/TemporalSpanResolution.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/TemporalSpanResolution.Serialization.cs @@ -18,15 +18,6 @@ public partial class TemporalSpanResolution : 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(TemporalSpanResolution)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); if (Optional.IsDefined(Begin)) { writer.WritePropertyName("begin"u8); @@ -60,6 +51,24 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("timex"u8); writer.WriteStringValue(Timex); } + writer.WritePropertyName("resolutionKind"u8); + writer.WriteStringValue(ResolutionKind.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 + } + } + writer.WriteEndObject(); } TemporalSpanResolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/TextConversation.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/TextConversation.Serialization.cs index 2880ef3ba5f9..25fb8a47515c 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/TextConversation.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/TextConversation.Serialization.cs @@ -18,15 +18,6 @@ public partial class TextConversation : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(TextConversation)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("conversationItems"u8); writer.WriteStartArray(); foreach (var item in ConversationItems) @@ -42,6 +33,33 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(item, options); } writer.WriteEndArray(); + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + writer.WritePropertyName("modality"u8); + writer.WriteStringValue(Modality.ToString()); + if (Optional.IsDefined(Domain)) + { + writer.WritePropertyName("domain"u8); + writer.WriteStringValue(Domain.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 + } + } + writer.WriteEndObject(); } TextConversation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/TextConversationItem.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/TextConversationItem.Serialization.cs index 072e5648b2d6..8889098ee45b 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/TextConversationItem.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/TextConversationItem.Serialization.cs @@ -18,15 +18,6 @@ public partial class TextConversationItem : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(TextConversationItem)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); writer.WritePropertyName("participantId"u8); @@ -70,6 +62,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } TextConversationItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/TranscriptConversation.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/TranscriptConversation.Serialization.cs index 7096679e366b..b4bbd33db588 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/TranscriptConversation.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/TranscriptConversation.Serialization.cs @@ -18,15 +18,6 @@ public partial class TranscriptConversation : 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") @@ -34,7 +25,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(TranscriptConversation)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("conversationItems"u8); writer.WriteStartArray(); foreach (var item in ConversationItems) @@ -42,6 +33,33 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteObjectValue(item, options); } writer.WriteEndArray(); + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + writer.WritePropertyName("modality"u8); + writer.WriteStringValue(Modality.ToString()); + if (Optional.IsDefined(Domain)) + { + writer.WritePropertyName("domain"u8); + writer.WriteStringValue(Domain.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 + } + } + writer.WriteEndObject(); } TranscriptConversation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/TranscriptConversationItem.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/TranscriptConversationItem.Serialization.cs index 11640bec909d..df69681720f1 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/TranscriptConversationItem.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/TranscriptConversationItem.Serialization.cs @@ -18,15 +18,6 @@ public partial class TranscriptConversationItem : IUtf8JsonSerializable, IJsonMo 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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(TranscriptConversationItem)} does not support writing '{format}' format."); } + writer.WriteStartObject(); writer.WritePropertyName("id"u8); writer.WriteStringValue(Id); writer.WritePropertyName("participantId"u8); @@ -91,6 +83,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } TranscriptConversationItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownAnalysisConfig.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownAnalysisConfig.Serialization.cs index 5f779771c0c3..cd3691392d0f 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownAnalysisConfig.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownAnalysisConfig.Serialization.cs @@ -18,15 +18,6 @@ internal partial class UnknownAnalysisConfig : 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") @@ -34,7 +25,30 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AnalysisConfig)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("targetProjectKind"u8); + writer.WriteStringValue(TargetProjectKind.ToString()); + if (Optional.IsDefined(ApiVersion)) + { + writer.WritePropertyName("apiVersion"u8); + writer.WriteStringValue(ApiVersion); + } + 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 + } + } + writer.WriteEndObject(); } AnalysisConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownAnalyzeConversationActionResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownAnalyzeConversationActionResult.Serialization.cs index ed62240dd9ba..e08843b88352 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownAnalyzeConversationActionResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownAnalyzeConversationActionResult.Serialization.cs @@ -18,15 +18,6 @@ internal partial class UnknownAnalyzeConversationActionResult : IUtf8JsonSeriali 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") @@ -34,7 +25,25 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AnalyzeConversationActionResult)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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 + } + } + writer.WriteEndObject(); } AnalyzeConversationActionResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownAnalyzeConversationInput.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownAnalyzeConversationInput.Serialization.cs index 5eaa7d095bd9..03961eb64f43 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownAnalyzeConversationInput.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownAnalyzeConversationInput.Serialization.cs @@ -18,15 +18,6 @@ internal partial class UnknownAnalyzeConversationInput : IUtf8JsonSerializable, 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") @@ -34,7 +25,25 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AnalyzeConversationInput)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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 + } + } + writer.WriteEndObject(); } AnalyzeConversationInput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownAnalyzeConversationOperationAction.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownAnalyzeConversationOperationAction.Serialization.cs index e1e41d3fa94e..60b81f57ea88 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownAnalyzeConversationOperationAction.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownAnalyzeConversationOperationAction.Serialization.cs @@ -18,15 +18,6 @@ internal partial class UnknownAnalyzeConversationOperationAction : IUtf8JsonSeri 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") @@ -34,7 +25,30 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AnalyzeConversationOperationAction)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("taskName"u8); + writer.WriteStringValue(Name); + } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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 + } + } + writer.WriteEndObject(); } AnalyzeConversationOperationAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownAnalyzeConversationOperationResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownAnalyzeConversationOperationResult.Serialization.cs index d998a375ddff..d0d622b196ab 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownAnalyzeConversationOperationResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownAnalyzeConversationOperationResult.Serialization.cs @@ -18,15 +18,6 @@ internal partial class UnknownAnalyzeConversationOperationResult : IUtf8JsonSeri 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") @@ -34,7 +25,34 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(AnalyzeConversationOperationResult)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("lastUpdateDateTime"u8); + writer.WriteStringValue(LastUpdateDateTime, "O"); + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("taskName"u8); + writer.WriteStringValue(Name); + } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.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 + } + } + writer.WriteEndObject(); } AnalyzeConversationOperationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownBaseRedactionPolicy.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownBaseRedactionPolicy.Serialization.cs new file mode 100644 index 000000000000..5b7c5166c554 --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownBaseRedactionPolicy.Serialization.cs @@ -0,0 +1,135 @@ +// 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.Conversations.Models +{ + internal partial class UnknownBaseRedactionPolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BaseRedactionPolicy)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("policyKind"u8); + writer.WriteStringValue(PolicyKind.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 + } + } + writer.WriteEndObject(); + } + + BaseRedactionPolicy 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(BaseRedactionPolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBaseRedactionPolicy(document.RootElement, options); + } + + internal static UnknownBaseRedactionPolicy DeserializeUnknownBaseRedactionPolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RedactionPolicyKind policyKind = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("policyKind"u8)) + { + policyKind = new RedactionPolicyKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownBaseRedactionPolicy(policyKind, 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(BaseRedactionPolicy)} does not support writing '{options.Format}' format."); + } + } + + BaseRedactionPolicy 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 DeserializeBaseRedactionPolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BaseRedactionPolicy)} 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 UnknownBaseRedactionPolicy FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUnknownBaseRedactionPolicy(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.Conversations/src/Generated/Models/UnknownBaseRedactionPolicy.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownBaseRedactionPolicy.cs new file mode 100644 index 000000000000..07561d15dc2c --- /dev/null +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/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.Conversations.Models +{ + /// 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.Conversations/src/Generated/Models/UnknownConversationEntityExtraInformation.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownConversationEntityExtraInformation.Serialization.cs index 832666ea7522..09f6a996c7c9 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownConversationEntityExtraInformation.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownConversationEntityExtraInformation.Serialization.cs @@ -18,15 +18,6 @@ internal partial class UnknownConversationEntityExtraInformation : IUtf8JsonSeri 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") @@ -34,7 +25,25 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationEntityExtraInformation)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("extraInformationKind"u8); + writer.WriteStringValue(ExtraInformationKind.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 + } + } + writer.WriteEndObject(); } ConversationEntityExtraInformation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownConversationInput.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownConversationInput.Serialization.cs index 8c2e07eb9cb7..045e929e14ce 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownConversationInput.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownConversationInput.Serialization.cs @@ -18,15 +18,6 @@ internal partial class UnknownConversationInput : IUtf8JsonSerializable, IJsonMo 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") @@ -34,7 +25,34 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ConversationInput)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + writer.WritePropertyName("modality"u8); + writer.WriteStringValue(Modality.ToString()); + if (Optional.IsDefined(Domain)) + { + writer.WritePropertyName("domain"u8); + writer.WriteStringValue(Domain.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 + } + } + writer.WriteEndObject(); } ConversationInput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownPredictionBase.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownPredictionBase.Serialization.cs index a6d12e49c186..817125a728ad 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownPredictionBase.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownPredictionBase.Serialization.cs @@ -18,15 +18,6 @@ internal partial class UnknownPredictionBase : 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") @@ -34,7 +25,30 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(PredictionBase)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("projectKind"u8); + writer.WriteStringValue(ProjectKind.ToString()); + if (Optional.IsDefined(TopIntent)) + { + writer.WritePropertyName("topIntent"u8); + writer.WriteStringValue(TopIntent); + } + 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 + } + } + writer.WriteEndObject(); } PredictionBase IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownResolutionBase.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownResolutionBase.Serialization.cs index a01e9bb1f5de..5e9e2e4768b0 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownResolutionBase.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownResolutionBase.Serialization.cs @@ -18,15 +18,6 @@ internal partial class UnknownResolutionBase : 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") @@ -34,7 +25,25 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(ResolutionBase)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("resolutionKind"u8); + writer.WriteStringValue(ResolutionKind.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 + } + } + writer.WriteEndObject(); } ResolutionBase IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownTargetIntentResult.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownTargetIntentResult.Serialization.cs index 0f11460a9c08..3cd3cef0b71f 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownTargetIntentResult.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/UnknownTargetIntentResult.Serialization.cs @@ -18,15 +18,6 @@ internal partial class UnknownTargetIntentResult : IUtf8JsonSerializable, IJsonM 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") @@ -34,7 +25,32 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(TargetIntentResult)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); + writer.WritePropertyName("targetProjectKind"u8); + writer.WriteStringValue(TargetProjectKind.ToString()); + if (Optional.IsDefined(ApiVersion)) + { + writer.WritePropertyName("apiVersion"u8); + writer.WriteStringValue(ApiVersion); + } + writer.WritePropertyName("confidenceScore"u8); + writer.WriteNumberValue(Confidence); + 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 + } + } + writer.WriteEndObject(); } TargetIntentResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/VolumeResolution.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/VolumeResolution.Serialization.cs index 8b77e804f9cf..fdd3fa0e810a 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/VolumeResolution.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/VolumeResolution.Serialization.cs @@ -18,15 +18,6 @@ public partial class VolumeResolution : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,11 +25,29 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(VolumeResolution)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteNumberValue(Value); writer.WritePropertyName("unit"u8); writer.WriteStringValue(Unit.ToString()); + writer.WritePropertyName("resolutionKind"u8); + writer.WriteStringValue(ResolutionKind.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 + } + } + writer.WriteEndObject(); } VolumeResolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/WeightResolution.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/WeightResolution.Serialization.cs index b125360c876b..d47b38f3f92b 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/WeightResolution.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/WeightResolution.Serialization.cs @@ -18,15 +18,6 @@ public partial class WeightResolution : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,11 +25,29 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(WeightResolution)} does not support writing '{format}' format."); } - base.JsonModelWriteCore(writer, options); + writer.WriteStartObject(); writer.WritePropertyName("value"u8); writer.WriteNumberValue(Value); writer.WritePropertyName("unit"u8); writer.WriteStringValue(Unit.ToString()); + writer.WritePropertyName("resolutionKind"u8); + writer.WriteStringValue(ResolutionKind.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 + } + } + writer.WriteEndObject(); } WeightResolution IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/WordLevelTiming.Serialization.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/WordLevelTiming.Serialization.cs index cc2800b8f5fd..8afc0a4fd663 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/WordLevelTiming.Serialization.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/src/Generated/Models/WordLevelTiming.Serialization.cs @@ -18,15 +18,6 @@ public partial class WordLevelTiming : IUtf8JsonSerializable, IJsonModel ((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") @@ -34,6 +25,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(WordLevelTiming)} does not support writing '{format}' format."); } + writer.WriteStartObject(); if (Optional.IsDefined(Offset)) { writer.WritePropertyName("offset"u8); @@ -64,6 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit #endif } } + writer.WriteEndObject(); } WordLevelTiming IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tests/Generated/Samples/Samples_ConversationAnalysisClient.cs b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tests/Generated/Samples/Samples_ConversationAnalysisClient.cs index 1ba9ef786043..3f584ad613a7 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tests/Generated/Samples/Samples_ConversationAnalysisClient.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tests/Generated/Samples/Samples_ConversationAnalysisClient.cs @@ -377,6 +377,134 @@ public async Task Example_Conversations_AnalyzeConversation_SuccessfulAnalyzeCon Response response = await client.AnalyzeConversationAsync(analyzeConversationInput); } + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationJobState_GetAnalyzeConversationJobStatus_SuccessfulConversationPIICharacterMaskTaskStatusRequest() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + Response response = client.GetAnalyzeConversationJobStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), 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_AnalyzeConversationJobState_GetAnalyzeConversationJobStatus_SuccessfulConversationPIICharacterMaskTaskStatusRequest_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), 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_AnalyzeConversationJobState_GetAnalyzeConversationJobStatus_SuccessfulConversationPIICharacterMaskTaskStatusRequest_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + Response response = client.GetAnalyzeConversationJobStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationJobState_GetAnalyzeConversationJobStatus_SuccessfulConversationPIICharacterMaskTaskStatusRequest_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationJobState_GetAnalyzeConversationJobStatus_SuccessfulConversationPIIEntityMaskTaskStatusRequest() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + Response response = client.GetAnalyzeConversationJobStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), 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_AnalyzeConversationJobState_GetAnalyzeConversationJobStatus_SuccessfulConversationPIIEntityMaskTaskStatusRequest_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), 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_AnalyzeConversationJobState_GetAnalyzeConversationJobStatus_SuccessfulConversationPIIEntityMaskTaskStatusRequest_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + Response response = client.GetAnalyzeConversationJobStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationJobState_GetAnalyzeConversationJobStatus_SuccessfulConversationPIIEntityMaskTaskStatusRequest_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); + } + [Test] [Ignore("Only validating compilation of examples")] public void Example_AnalyzeConversationJobState_GetAnalyzeConversationJobStatus_SuccessfulConversationPIIExclusionTaskStatusRequest() @@ -441,6 +569,70 @@ public async Task Example_AnalyzeConversationJobState_GetAnalyzeConversationJobS Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); } + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_AnalyzeConversationJobState_GetAnalyzeConversationJobStatus_SuccessfulConversationPIINoMaskTaskStatusRequest() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + Response response = client.GetAnalyzeConversationJobStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), 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_AnalyzeConversationJobState_GetAnalyzeConversationJobStatus_SuccessfulConversationPIINoMaskTaskStatusRequest_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18"), 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_AnalyzeConversationJobState_GetAnalyzeConversationJobStatus_SuccessfulConversationPIINoMaskTaskStatusRequest_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + Response response = client.GetAnalyzeConversationJobStatus(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_AnalyzeConversationJobState_GetAnalyzeConversationJobStatus_SuccessfulConversationPIINoMaskTaskStatusRequest_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + Response response = await client.GetAnalyzeConversationJobStatusAsync(Guid.Parse("c0f2a446-05d9-48fc-ba8f-3ef4af8d0b18")); + } + [Test] [Ignore("Only validating compilation of examples")] public void Example_AnalyzeConversationJobState_GetAnalyzeConversationJobStatus_SuccessfulConversationPIIRedactionCharTaskStatusRequest() @@ -763,7 +955,7 @@ public async Task Example_AnalyzeConversationJobState_GetAnalyzeConversationJobS [Test] [Ignore("Only validating compilation of examples")] - public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIIExclusionSubmit() + public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIICharacterMask() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -833,9 +1025,14 @@ public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulC parameters = new { modelVersion = "latest", -excludePiiCategories = new object[] +piiCategories = new object[] { -"Person" +"All" +}, +redactionPolicy = new +{ +policyKind = "characterMask", +redactionCharacter = "-", }, redactionSource = "lexical", redactAudioTiming = true, @@ -848,7 +1045,7 @@ public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulC [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIIExclusionSubmit_Async() + public async Task Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIICharacterMask_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -918,9 +1115,14 @@ public async Task Example_Conversations_AnalyzeConversationSubmitOperation_Succe parameters = new { modelVersion = "latest", -excludePiiCategories = new object[] +piiCategories = new object[] { -"Person" +"All" +}, +redactionPolicy = new +{ +policyKind = "characterMask", +redactionCharacter = "-", }, redactionSource = "lexical", redactAudioTiming = true, @@ -933,7 +1135,7 @@ public async Task Example_Conversations_AnalyzeConversationSubmitOperation_Succe [Test] [Ignore("Only validating compilation of examples")] - public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIIExclusionSubmit_Convenience() + public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIICharacterMask_Convenience() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -984,9 +1186,13 @@ public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulC ActionContent = new ConversationPiiActionContent { ModelVersion = "latest", +PiiCategories = {ConversationPiiCategories.All}, RedactAudioTiming = true, RedactionSource = TranscriptContentType.Lexical, -ExcludePiiCategories = {ConversationPiiCategoryExclusions.Person}, +RedactionPolicy = new CharacterMaskPolicyType +{ +RedactionCharacter = RedactionCharacter.Minus, +}, }, Name = "Conversation PII", } @@ -999,7 +1205,7 @@ public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulC [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIIExclusionSubmit_Convenience_Async() + public async Task Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIICharacterMask_Convenience_Async() { Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); @@ -1050,9 +1256,939 @@ public async Task Example_Conversations_AnalyzeConversationSubmitOperation_Succe ActionContent = new ConversationPiiActionContent { ModelVersion = "latest", +PiiCategories = {ConversationPiiCategories.All}, RedactAudioTiming = true, RedactionSource = TranscriptContentType.Lexical, -ExcludePiiCategories = {ConversationPiiCategoryExclusions.Person}, +RedactionPolicy = new CharacterMaskPolicyType +{ +RedactionCharacter = RedactionCharacter.Minus, +}, +}, +Name = "Conversation PII", +} + }) + { + DisplayName = "Redacting PII data from transcribed audio", + }; + Operation operation = await client.AnalyzeConversationSubmitOperationAsync(WaitUntil.Completed, analyzeConversationOperationInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIIEntityMask() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + displayName = "Redacting PII data from transcribed audio", + analysisInput = new + { + conversations = new object[] + { +new +{ +id = "1", +language = "en", +modality = "transcript", +domain = "generic", +conversationItems = new object[] +{ +new +{ +participantId = "1", +id = "1", +text = "Good morning John Doe.", +itn = "good morning john doe", +maskedItn = "good morning john doe", +lexical = "good morning john doe", +wordLevelTimings = new object[] +{ +new +{ +word = "good", +offset = 390000L, +duration = 2700000L, +}, +new +{ +word = "morning", +offset = 4500000L, +duration = 920000L, +}, +new +{ +word = "john", +offset = 590000L, +duration = 2700000L, +}, +new +{ +word = "doe", +offset = 6300000L, +duration = 920000L, +} +}, +} +}, +} + }, + }, + tasks = new object[] + { +new +{ +taskName = "Conversation PII", +kind = "ConversationalPIITask", +parameters = new +{ +modelVersion = "latest", +piiCategories = new object[] +{ +"All" +}, +redactionPolicy = new +{ +policyKind = "entityMask", +}, +redactionSource = "lexical", +redactAudioTiming = true, +}, +} + }, + }); + Operation operation = client.AnalyzeConversationSubmitOperation(WaitUntil.Completed, content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIIEntityMask_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + displayName = "Redacting PII data from transcribed audio", + analysisInput = new + { + conversations = new object[] + { +new +{ +id = "1", +language = "en", +modality = "transcript", +domain = "generic", +conversationItems = new object[] +{ +new +{ +participantId = "1", +id = "1", +text = "Good morning John Doe.", +itn = "good morning john doe", +maskedItn = "good morning john doe", +lexical = "good morning john doe", +wordLevelTimings = new object[] +{ +new +{ +word = "good", +offset = 390000L, +duration = 2700000L, +}, +new +{ +word = "morning", +offset = 4500000L, +duration = 920000L, +}, +new +{ +word = "john", +offset = 590000L, +duration = 2700000L, +}, +new +{ +word = "doe", +offset = 6300000L, +duration = 920000L, +} +}, +} +}, +} + }, + }, + tasks = new object[] + { +new +{ +taskName = "Conversation PII", +kind = "ConversationalPIITask", +parameters = new +{ +modelVersion = "latest", +piiCategories = new object[] +{ +"All" +}, +redactionPolicy = new +{ +policyKind = "entityMask", +}, +redactionSource = "lexical", +redactAudioTiming = true, +}, +} + }, + }); + Operation operation = await client.AnalyzeConversationSubmitOperationAsync(WaitUntil.Completed, content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIIEntityMask_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + AnalyzeConversationOperationInput analyzeConversationOperationInput = new AnalyzeConversationOperationInput(new MultiLanguageConversationInput(new ConversationInput[] + { +new TranscriptConversation("1", "en", new TranscriptConversationItem[] +{ +new TranscriptConversationItem( + "1", + "1", + "good morning john doe", + "good morning john doe", + "Good morning John Doe.", + "good morning john doe") +{ +WordLevelTimings = {new WordLevelTiming +{ +Offset = 390000L, +Duration = 2700000L, +Word = "good", +}, new WordLevelTiming +{ +Offset = 4500000L, +Duration = 920000L, +Word = "morning", +}, new WordLevelTiming +{ +Offset = 590000L, +Duration = 2700000L, +Word = "john", +}, new WordLevelTiming +{ +Offset = 6300000L, +Duration = 920000L, +Word = "doe", +}}, +} +}) +{ +Domain = ConversationDomain.Generic, +} + }), new AnalyzeConversationOperationAction[] + { +new PiiOperationAction +{ +ActionContent = new ConversationPiiActionContent +{ +ModelVersion = "latest", +PiiCategories = {ConversationPiiCategories.All}, +RedactAudioTiming = true, +RedactionSource = TranscriptContentType.Lexical, +RedactionPolicy = new EntityMaskTypePolicyType(), +}, +Name = "Conversation PII", +} + }) + { + DisplayName = "Redacting PII data from transcribed audio", + }; + Operation operation = client.AnalyzeConversationSubmitOperation(WaitUntil.Completed, analyzeConversationOperationInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIIEntityMask_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + AnalyzeConversationOperationInput analyzeConversationOperationInput = new AnalyzeConversationOperationInput(new MultiLanguageConversationInput(new ConversationInput[] + { +new TranscriptConversation("1", "en", new TranscriptConversationItem[] +{ +new TranscriptConversationItem( + "1", + "1", + "good morning john doe", + "good morning john doe", + "Good morning John Doe.", + "good morning john doe") +{ +WordLevelTimings = {new WordLevelTiming +{ +Offset = 390000L, +Duration = 2700000L, +Word = "good", +}, new WordLevelTiming +{ +Offset = 4500000L, +Duration = 920000L, +Word = "morning", +}, new WordLevelTiming +{ +Offset = 590000L, +Duration = 2700000L, +Word = "john", +}, new WordLevelTiming +{ +Offset = 6300000L, +Duration = 920000L, +Word = "doe", +}}, +} +}) +{ +Domain = ConversationDomain.Generic, +} + }), new AnalyzeConversationOperationAction[] + { +new PiiOperationAction +{ +ActionContent = new ConversationPiiActionContent +{ +ModelVersion = "latest", +PiiCategories = {ConversationPiiCategories.All}, +RedactAudioTiming = true, +RedactionSource = TranscriptContentType.Lexical, +RedactionPolicy = new EntityMaskTypePolicyType(), +}, +Name = "Conversation PII", +} + }) + { + DisplayName = "Redacting PII data from transcribed audio", + }; + Operation operation = await client.AnalyzeConversationSubmitOperationAsync(WaitUntil.Completed, analyzeConversationOperationInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIIExclusionSubmit() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + displayName = "Redacting PII data from transcribed audio", + analysisInput = new + { + conversations = new object[] + { +new +{ +id = "1", +language = "en", +modality = "transcript", +domain = "generic", +conversationItems = new object[] +{ +new +{ +participantId = "1", +id = "1", +text = "Good morning John Doe.", +itn = "good morning john doe", +maskedItn = "good morning john doe", +lexical = "good morning john doe", +wordLevelTimings = new object[] +{ +new +{ +word = "good", +offset = 390000L, +duration = 2700000L, +}, +new +{ +word = "morning", +offset = 4500000L, +duration = 920000L, +}, +new +{ +word = "john", +offset = 590000L, +duration = 2700000L, +}, +new +{ +word = "doe", +offset = 6300000L, +duration = 920000L, +} +}, +} +}, +} + }, + }, + tasks = new object[] + { +new +{ +taskName = "Conversation PII", +kind = "ConversationalPIITask", +parameters = new +{ +modelVersion = "latest", +excludePiiCategories = new object[] +{ +"Person" +}, +redactionSource = "lexical", +redactAudioTiming = true, +}, +} + }, + }); + Operation operation = client.AnalyzeConversationSubmitOperation(WaitUntil.Completed, content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIIExclusionSubmit_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + displayName = "Redacting PII data from transcribed audio", + analysisInput = new + { + conversations = new object[] + { +new +{ +id = "1", +language = "en", +modality = "transcript", +domain = "generic", +conversationItems = new object[] +{ +new +{ +participantId = "1", +id = "1", +text = "Good morning John Doe.", +itn = "good morning john doe", +maskedItn = "good morning john doe", +lexical = "good morning john doe", +wordLevelTimings = new object[] +{ +new +{ +word = "good", +offset = 390000L, +duration = 2700000L, +}, +new +{ +word = "morning", +offset = 4500000L, +duration = 920000L, +}, +new +{ +word = "john", +offset = 590000L, +duration = 2700000L, +}, +new +{ +word = "doe", +offset = 6300000L, +duration = 920000L, +} +}, +} +}, +} + }, + }, + tasks = new object[] + { +new +{ +taskName = "Conversation PII", +kind = "ConversationalPIITask", +parameters = new +{ +modelVersion = "latest", +excludePiiCategories = new object[] +{ +"Person" +}, +redactionSource = "lexical", +redactAudioTiming = true, +}, +} + }, + }); + Operation operation = await client.AnalyzeConversationSubmitOperationAsync(WaitUntil.Completed, content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIIExclusionSubmit_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + AnalyzeConversationOperationInput analyzeConversationOperationInput = new AnalyzeConversationOperationInput(new MultiLanguageConversationInput(new ConversationInput[] + { +new TranscriptConversation("1", "en", new TranscriptConversationItem[] +{ +new TranscriptConversationItem( + "1", + "1", + "good morning john doe", + "good morning john doe", + "Good morning John Doe.", + "good morning john doe") +{ +WordLevelTimings = {new WordLevelTiming +{ +Offset = 390000L, +Duration = 2700000L, +Word = "good", +}, new WordLevelTiming +{ +Offset = 4500000L, +Duration = 920000L, +Word = "morning", +}, new WordLevelTiming +{ +Offset = 590000L, +Duration = 2700000L, +Word = "john", +}, new WordLevelTiming +{ +Offset = 6300000L, +Duration = 920000L, +Word = "doe", +}}, +} +}) +{ +Domain = ConversationDomain.Generic, +} + }), new AnalyzeConversationOperationAction[] + { +new PiiOperationAction +{ +ActionContent = new ConversationPiiActionContent +{ +ModelVersion = "latest", +RedactAudioTiming = true, +RedactionSource = TranscriptContentType.Lexical, +ExcludePiiCategories = {ConversationPiiCategoryExclusions.Person}, +}, +Name = "Conversation PII", +} + }) + { + DisplayName = "Redacting PII data from transcribed audio", + }; + Operation operation = client.AnalyzeConversationSubmitOperation(WaitUntil.Completed, analyzeConversationOperationInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIIExclusionSubmit_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + AnalyzeConversationOperationInput analyzeConversationOperationInput = new AnalyzeConversationOperationInput(new MultiLanguageConversationInput(new ConversationInput[] + { +new TranscriptConversation("1", "en", new TranscriptConversationItem[] +{ +new TranscriptConversationItem( + "1", + "1", + "good morning john doe", + "good morning john doe", + "Good morning John Doe.", + "good morning john doe") +{ +WordLevelTimings = {new WordLevelTiming +{ +Offset = 390000L, +Duration = 2700000L, +Word = "good", +}, new WordLevelTiming +{ +Offset = 4500000L, +Duration = 920000L, +Word = "morning", +}, new WordLevelTiming +{ +Offset = 590000L, +Duration = 2700000L, +Word = "john", +}, new WordLevelTiming +{ +Offset = 6300000L, +Duration = 920000L, +Word = "doe", +}}, +} +}) +{ +Domain = ConversationDomain.Generic, +} + }), new AnalyzeConversationOperationAction[] + { +new PiiOperationAction +{ +ActionContent = new ConversationPiiActionContent +{ +ModelVersion = "latest", +RedactAudioTiming = true, +RedactionSource = TranscriptContentType.Lexical, +ExcludePiiCategories = {ConversationPiiCategoryExclusions.Person}, +}, +Name = "Conversation PII", +} + }) + { + DisplayName = "Redacting PII data from transcribed audio", + }; + Operation operation = await client.AnalyzeConversationSubmitOperationAsync(WaitUntil.Completed, analyzeConversationOperationInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIINoMask() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + displayName = "Redacting PII data from transcribed audio", + analysisInput = new + { + conversations = new object[] + { +new +{ +id = "1", +language = "en", +modality = "transcript", +domain = "generic", +conversationItems = new object[] +{ +new +{ +participantId = "1", +id = "1", +text = "Good morning John Doe.", +itn = "good morning john doe", +maskedItn = "good morning john doe", +lexical = "good morning john doe", +wordLevelTimings = new object[] +{ +new +{ +word = "good", +offset = 390000L, +duration = 2700000L, +}, +new +{ +word = "morning", +offset = 4500000L, +duration = 920000L, +}, +new +{ +word = "john", +offset = 590000L, +duration = 2700000L, +}, +new +{ +word = "doe", +offset = 6300000L, +duration = 920000L, +} +}, +} +}, +} + }, + }, + tasks = new object[] + { +new +{ +taskName = "Conversation PII", +kind = "ConversationalPIITask", +parameters = new +{ +modelVersion = "latest", +piiCategories = new object[] +{ +"All" +}, +redactionPolicy = new +{ +policyKind = "noMask", +}, +redactionSource = "lexical", +redactAudioTiming = true, +}, +} + }, + }); + Operation operation = client.AnalyzeConversationSubmitOperation(WaitUntil.Completed, content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIINoMask_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + displayName = "Redacting PII data from transcribed audio", + analysisInput = new + { + conversations = new object[] + { +new +{ +id = "1", +language = "en", +modality = "transcript", +domain = "generic", +conversationItems = new object[] +{ +new +{ +participantId = "1", +id = "1", +text = "Good morning John Doe.", +itn = "good morning john doe", +maskedItn = "good morning john doe", +lexical = "good morning john doe", +wordLevelTimings = new object[] +{ +new +{ +word = "good", +offset = 390000L, +duration = 2700000L, +}, +new +{ +word = "morning", +offset = 4500000L, +duration = 920000L, +}, +new +{ +word = "john", +offset = 590000L, +duration = 2700000L, +}, +new +{ +word = "doe", +offset = 6300000L, +duration = 920000L, +} +}, +} +}, +} + }, + }, + tasks = new object[] + { +new +{ +taskName = "Conversation PII", +kind = "ConversationalPIITask", +parameters = new +{ +modelVersion = "latest", +piiCategories = new object[] +{ +"All" +}, +redactionPolicy = new +{ +policyKind = "noMask", +}, +redactionSource = "lexical", +redactAudioTiming = true, +}, +} + }, + }); + Operation operation = await client.AnalyzeConversationSubmitOperationAsync(WaitUntil.Completed, content); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIINoMask_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + AnalyzeConversationOperationInput analyzeConversationOperationInput = new AnalyzeConversationOperationInput(new MultiLanguageConversationInput(new ConversationInput[] + { +new TranscriptConversation("1", "en", new TranscriptConversationItem[] +{ +new TranscriptConversationItem( + "1", + "1", + "good morning john doe", + "good morning john doe", + "Good morning John Doe.", + "good morning john doe") +{ +WordLevelTimings = {new WordLevelTiming +{ +Offset = 390000L, +Duration = 2700000L, +Word = "good", +}, new WordLevelTiming +{ +Offset = 4500000L, +Duration = 920000L, +Word = "morning", +}, new WordLevelTiming +{ +Offset = 590000L, +Duration = 2700000L, +Word = "john", +}, new WordLevelTiming +{ +Offset = 6300000L, +Duration = 920000L, +Word = "doe", +}}, +} +}) +{ +Domain = ConversationDomain.Generic, +} + }), new AnalyzeConversationOperationAction[] + { +new PiiOperationAction +{ +ActionContent = new ConversationPiiActionContent +{ +ModelVersion = "latest", +PiiCategories = {ConversationPiiCategories.All}, +RedactAudioTiming = true, +RedactionSource = TranscriptContentType.Lexical, +RedactionPolicy = new NoMaskPolicyType(), +}, +Name = "Conversation PII", +} + }) + { + DisplayName = "Redacting PII data from transcribed audio", + }; + Operation operation = client.AnalyzeConversationSubmitOperation(WaitUntil.Completed, analyzeConversationOperationInput); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Conversations_AnalyzeConversationSubmitOperation_SuccessfulConversationPIINoMask_Convenience_Async() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = new AzureKeyCredential(""); + ConversationAnalysisClient client = new ConversationAnalysisClient(endpoint, credential); + + AnalyzeConversationOperationInput analyzeConversationOperationInput = new AnalyzeConversationOperationInput(new MultiLanguageConversationInput(new ConversationInput[] + { +new TranscriptConversation("1", "en", new TranscriptConversationItem[] +{ +new TranscriptConversationItem( + "1", + "1", + "good morning john doe", + "good morning john doe", + "Good morning John Doe.", + "good morning john doe") +{ +WordLevelTimings = {new WordLevelTiming +{ +Offset = 390000L, +Duration = 2700000L, +Word = "good", +}, new WordLevelTiming +{ +Offset = 4500000L, +Duration = 920000L, +Word = "morning", +}, new WordLevelTiming +{ +Offset = 590000L, +Duration = 2700000L, +Word = "john", +}, new WordLevelTiming +{ +Offset = 6300000L, +Duration = 920000L, +Word = "doe", +}}, +} +}) +{ +Domain = ConversationDomain.Generic, +} + }), new AnalyzeConversationOperationAction[] + { +new PiiOperationAction +{ +ActionContent = new ConversationPiiActionContent +{ +ModelVersion = "latest", +PiiCategories = {ConversationPiiCategories.All}, +RedactAudioTiming = true, +RedactionSource = TranscriptContentType.Lexical, +RedactionPolicy = new NoMaskPolicyType(), }, Name = "Conversation PII", } diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tsp-location.yaml b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tsp-location.yaml index e58f26495960..bb7653507a64 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tsp-location.yaml +++ b/sdk/cognitivelanguage/Azure.AI.Language.Conversations/tsp-location.yaml @@ -1,3 +1,4 @@ directory: specification/cognitiveservices/Language.Conversations -commit: 2615781c5393ddc021de33e854ebfeb361245e3e +commit: 28dbc390c34ce9f1cda5f48663b7bc877fcfd345 repo: Azure/azure-rest-api-specs +additionalDirectories: