internal static KeyPhraseExtractionTasksItemProperties DeserializeKeyPhraseExtractionTasksItemProperties(JsonElement element) { KeyPhraseResult results = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("results")) { results = KeyPhraseResult.DeserializeKeyPhraseResult(property.Value); continue; } } return(new KeyPhraseExtractionTasksItemProperties(results)); }
internal static KeyPhraseExtractionTasksItemProperties DeserializeKeyPhraseExtractionTasksItemProperties(JsonElement element) { Optional <KeyPhraseResult> results = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("results")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } results = KeyPhraseResult.DeserializeKeyPhraseResult(property.Value); continue; } } return(new KeyPhraseExtractionTasksItemProperties(results.Value)); }
internal static Components1D9IzucSchemasTasksstatePropertiesTasksPropertiesKeyphraseextractiontasksItemsAllof1 DeserializeComponents1D9IzucSchemasTasksstatePropertiesTasksPropertiesKeyphraseextractiontasksItemsAllof1(JsonElement element) { Optional <KeyPhraseResult> results = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("results")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } results = KeyPhraseResult.DeserializeKeyPhraseResult(property.Value); continue; } } return(new Components1D9IzucSchemasTasksstatePropertiesTasksPropertiesKeyphraseextractiontasksItemsAllof1(results.Value)); }
internal static KeyPhraseTaskResult DeserializeKeyPhraseTaskResult(JsonElement element) { KeyPhraseResult results = default; AnalyzeTextTaskResultsKind kind = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("results")) { results = KeyPhraseResult.DeserializeKeyPhraseResult(property.Value); continue; } if (property.NameEquals("kind")) { kind = new AnalyzeTextTaskResultsKind(property.Value.GetString()); continue; } } return(new KeyPhraseTaskResult(kind, results)); }
internal static KeyPhraseExtractionLROResult DeserializeKeyPhraseExtractionLROResult(JsonElement element) { KeyPhraseResult 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 = KeyPhraseResult.DeserializeKeyPhraseResult(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 KeyPhraseExtractionLROResult(lastUpdateDateTime, status, kind, taskName.Value, results)); }
internal static KeyPhraseExtractionTasksItem DeserializeKeyPhraseExtractionTasksItem(JsonElement element) { Optional <KeyPhraseResult> results = default; DateTimeOffset lastUpdateDateTime = default; Optional <string> name = default; TextAnalyticsOperationStatus status = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("results")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } results = KeyPhraseResult.DeserializeKeyPhraseResult(property.Value); continue; } if (property.NameEquals("lastUpdateDateTime")) { lastUpdateDateTime = property.Value.GetDateTimeOffset("O"); continue; } if (property.NameEquals("name")) { name = property.Value.GetString(); continue; } if (property.NameEquals("status")) { status = new TextAnalyticsOperationStatus(property.Value.GetString()); continue; } } return(new KeyPhraseExtractionTasksItem(lastUpdateDateTime, name.Value, status, results.Value)); }