public ExtractiveSummarizationLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, ExtractiveSummarizationResult results) : base(lastUpdateDateTime, status) { if (results == null) { throw new ArgumentNullException(nameof(results)); } Results = results; Kind = AnalyzeTextLROResultsKind.ExtractiveSummarizationLROResults; }
internal static ExtractiveSummarizationTaskResult DeserializeExtractiveSummarizationTaskResult(JsonElement element) { Optional <ExtractiveSummarizationResult> results = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("results")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } results = ExtractiveSummarizationResult.DeserializeExtractiveSummarizationResult(property.Value); continue; } } return(new ExtractiveSummarizationTaskResult(results.Value)); }
internal static ExtractiveSummarizationLROResult DeserializeExtractiveSummarizationLROResult(JsonElement element) { ExtractiveSummarizationResult results = default; AnalyzeTextLROResultsKind kind = default; Optional <string> taskName = default; DateTimeOffset lastUpdateDateTime = default; TextAnalyticsOperationStatus status = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("results")) { results = ExtractiveSummarizationResult.DeserializeExtractiveSummarizationResult(property.Value); continue; } if (property.NameEquals("kind")) { kind = new AnalyzeTextLROResultsKind(property.Value.GetString()); continue; } if (property.NameEquals("taskName")) { taskName = property.Value.GetString(); continue; } if (property.NameEquals("lastUpdateDateTime")) { lastUpdateDateTime = property.Value.GetDateTimeOffset("O"); continue; } if (property.NameEquals("status")) { status = new TextAnalyticsOperationStatus(property.Value.GetString()); continue; } } return(new ExtractiveSummarizationLROResult(lastUpdateDateTime, status, kind, taskName.Value, results)); }
internal static ExtractiveSummarizationTasksItem DeserializeExtractiveSummarizationTasksItem(JsonElement element) { Optional <ExtractiveSummarizationResult> results = default; DateTimeOffset lastUpdateDateTime = default; Optional <string> taskName = default; TextAnalyticsOperationStatus status = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("results")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } results = ExtractiveSummarizationResult.DeserializeExtractiveSummarizationResult(property.Value); continue; } if (property.NameEquals("lastUpdateDateTime")) { lastUpdateDateTime = property.Value.GetDateTimeOffset("O"); continue; } if (property.NameEquals("taskName")) { taskName = property.Value.GetString(); continue; } if (property.NameEquals("status")) { status = new TextAnalyticsOperationStatus(property.Value.GetString()); continue; } } return(new ExtractiveSummarizationTasksItem(lastUpdateDateTime, taskName.Value, status, results.Value)); }
internal ExtractiveSummarizationTasksItem(DateTimeOffset lastUpdateDateTime, string taskName, TextAnalyticsOperationStatus status, ExtractiveSummarizationResult results) : base(lastUpdateDateTime, taskName, status) { Results = results; }
internal ExtractiveSummarizationLROResult(DateTimeOffset lastUpdateDateTime, TextAnalyticsOperationStatus status, AnalyzeTextLROResultsKind kind, string taskName, ExtractiveSummarizationResult results) : base(lastUpdateDateTime, status, kind, taskName) { Results = results; Kind = kind; }