From a62fb8e3962934b20a2497b1ecbad6139add7217 Mon Sep 17 00:00:00 2001 From: Mohit Chakraborty Date: Tue, 30 Mar 2021 13:27:27 -0700 Subject: [PATCH 1/2] Update AutoRest version to 47b422a4 Add CustomEnityLookup skill and DocumentExtraction skill --- .../Models/CustomEntity.Serialization.cs | 301 ++++++++++++++++++ .../src/Generated/Models/CustomEntity.cs | 85 +++++ .../Models/CustomEntityAlias.Serialization.cs | 106 ++++++ .../src/Generated/Models/CustomEntityAlias.cs | 50 +++ .../CustomEntityLookupSkill.Serialization.cs | 255 +++++++++++++++ .../Models/CustomEntityLookupSkill.cs | 73 +++++ .../Models/CustomEntityLookupSkillLanguage.cs | 72 +++++ .../Generated/Models/DataSourceCredentials.cs | 4 +- .../DocumentExtractionSkill.Serialization.cs | 187 +++++++++++ .../Models/DocumentExtractionSkill.cs | 61 ++++ .../Models/SearchIndexerDataSourceType.cs | 7 +- .../SearchIndexerSkill.Serialization.cs | 2 + .../Azure.Search.Documents/src/autorest.md | 4 +- .../tests/SearchIndexerClientTests.cs | 3 + .../RoundtripAllSkills.json | 188 ++++++++--- .../RoundtripAllSkillsAsync.json | 188 ++++++++--- 16 files changed, 1490 insertions(+), 96 deletions(-) create mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/CustomEntity.Serialization.cs create mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/CustomEntity.cs create mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/CustomEntityAlias.Serialization.cs create mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/CustomEntityAlias.cs create mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/CustomEntityLookupSkill.Serialization.cs create mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/CustomEntityLookupSkill.cs create mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/CustomEntityLookupSkillLanguage.cs create mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentExtractionSkill.Serialization.cs create mode 100644 sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentExtractionSkill.cs diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomEntity.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomEntity.Serialization.cs new file mode 100644 index 0000000000000..ba8690140c99b --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomEntity.Serialization.cs @@ -0,0 +1,301 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Search.Documents.Indexes.Models +{ + public partial class CustomEntity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsDefined(Type)) + { + if (Type != null) + { + writer.WritePropertyName("type"); + writer.WriteStringValue(Type); + } + else + { + writer.WriteNull("type"); + } + } + if (Optional.IsDefined(Subtype)) + { + if (Subtype != null) + { + writer.WritePropertyName("subtype"); + writer.WriteStringValue(Subtype); + } + else + { + writer.WriteNull("subtype"); + } + } + if (Optional.IsDefined(Id)) + { + if (Id != null) + { + writer.WritePropertyName("id"); + writer.WriteStringValue(Id); + } + else + { + writer.WriteNull("id"); + } + } + if (Optional.IsDefined(CaseSensitive)) + { + if (CaseSensitive != null) + { + writer.WritePropertyName("caseSensitive"); + writer.WriteBooleanValue(CaseSensitive.Value); + } + else + { + writer.WriteNull("caseSensitive"); + } + } + if (Optional.IsDefined(AccentSensitive)) + { + if (AccentSensitive != null) + { + writer.WritePropertyName("accentSensitive"); + writer.WriteBooleanValue(AccentSensitive.Value); + } + else + { + writer.WriteNull("accentSensitive"); + } + } + if (Optional.IsDefined(FuzzyEditDistance)) + { + if (FuzzyEditDistance != null) + { + writer.WritePropertyName("fuzzyEditDistance"); + writer.WriteNumberValue(FuzzyEditDistance.Value); + } + else + { + writer.WriteNull("fuzzyEditDistance"); + } + } + if (Optional.IsDefined(DefaultCaseSensitive)) + { + if (DefaultCaseSensitive != null) + { + writer.WritePropertyName("defaultCaseSensitive"); + writer.WriteBooleanValue(DefaultCaseSensitive.Value); + } + else + { + writer.WriteNull("defaultCaseSensitive"); + } + } + if (Optional.IsDefined(DefaultAccentSensitive)) + { + if (DefaultAccentSensitive != null) + { + writer.WritePropertyName("defaultAccentSensitive"); + writer.WriteBooleanValue(DefaultAccentSensitive.Value); + } + else + { + writer.WriteNull("defaultAccentSensitive"); + } + } + if (Optional.IsDefined(DefaultFuzzyEditDistance)) + { + if (DefaultFuzzyEditDistance != null) + { + writer.WritePropertyName("defaultFuzzyEditDistance"); + writer.WriteNumberValue(DefaultFuzzyEditDistance.Value); + } + else + { + writer.WriteNull("defaultFuzzyEditDistance"); + } + } + if (Optional.IsCollectionDefined(Aliases)) + { + if (Aliases != null) + { + writer.WritePropertyName("aliases"); + writer.WriteStartArray(); + foreach (var item in Aliases) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("aliases"); + } + } + writer.WriteEndObject(); + } + + internal static CustomEntity DeserializeCustomEntity(JsonElement element) + { + string name = default; + Optional description = default; + Optional type = default; + Optional subtype = default; + Optional id = default; + Optional caseSensitive = default; + Optional accentSensitive = default; + Optional fuzzyEditDistance = default; + Optional defaultCaseSensitive = default; + Optional defaultAccentSensitive = default; + Optional defaultFuzzyEditDistance = default; + Optional> aliases = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + type = null; + continue; + } + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("subtype")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + subtype = null; + continue; + } + subtype = property.Value.GetString(); + continue; + } + if (property.NameEquals("id")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + id = null; + continue; + } + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("caseSensitive")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + caseSensitive = null; + continue; + } + caseSensitive = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("accentSensitive")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + accentSensitive = null; + continue; + } + accentSensitive = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("fuzzyEditDistance")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + fuzzyEditDistance = null; + continue; + } + fuzzyEditDistance = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("defaultCaseSensitive")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + defaultCaseSensitive = null; + continue; + } + defaultCaseSensitive = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("defaultAccentSensitive")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + defaultAccentSensitive = null; + continue; + } + defaultAccentSensitive = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("defaultFuzzyEditDistance")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + defaultFuzzyEditDistance = null; + continue; + } + defaultFuzzyEditDistance = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("aliases")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + aliases = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CustomEntityAlias.DeserializeCustomEntityAlias(item)); + } + aliases = array; + continue; + } + } + return new CustomEntity(name, description.Value, type.Value, subtype.Value, id.Value, Optional.ToNullable(caseSensitive), Optional.ToNullable(accentSensitive), Optional.ToNullable(fuzzyEditDistance), Optional.ToNullable(defaultCaseSensitive), Optional.ToNullable(defaultAccentSensitive), Optional.ToNullable(defaultFuzzyEditDistance), Optional.ToList(aliases)); + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomEntity.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomEntity.cs new file mode 100644 index 0000000000000..21001a88bdff7 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomEntity.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Search.Documents.Indexes.Models +{ + /// An object that contains information about the matches that were found, and related metadata. + public partial class CustomEntity + { + /// Initializes a new instance of CustomEntity. + /// The top-level entity descriptor. Matches in the skill output will be grouped by this name, and it should represent the "normalized" form of the text being found. + /// is null. + public CustomEntity(string name) + { + if (name == null) + { + throw new ArgumentNullException(nameof(name)); + } + + Name = name; + Aliases = new ChangeTrackingList(); + } + + /// Initializes a new instance of CustomEntity. + /// The top-level entity descriptor. Matches in the skill output will be grouped by this name, and it should represent the "normalized" form of the text being found. + /// This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output. + /// This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output. + /// This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output. + /// This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output. + /// Defaults to false. Boolean value denoting whether comparisons with the entity name should be sensitive to character casing. Sample case insensitive matches of "Microsoft" could be: microsoft, microSoft, MICROSOFT. + /// Defaults to false. Boolean value denoting whether comparisons with the entity name should be sensitive to accent. + /// Defaults to 0. Maximum value of 5. Denotes the acceptable number of divergent characters that would still constitute a match with the entity name. The smallest possible fuzziness for any given match is returned. For instance, if the edit distance is set to 3, "Windows10" would still match "Windows", "Windows10" and "Windows 7". When case sensitivity is set to false, case differences do NOT count towards fuzziness tolerance, but otherwise do. + /// Changes the default case sensitivity value for this entity. It be used to change the default value of all aliases caseSensitive values. + /// Changes the default accent sensitivity value for this entity. It be used to change the default value of all aliases accentSensitive values. + /// Changes the default fuzzy edit distance value for this entity. It can be used to change the default value of all aliases fuzzyEditDistance values. + /// An array of complex objects that can be used to specify alternative spellings or synonyms to the root entity name. + internal CustomEntity(string name, string description, string type, string subtype, string id, bool? caseSensitive, bool? accentSensitive, int? fuzzyEditDistance, bool? defaultCaseSensitive, bool? defaultAccentSensitive, int? defaultFuzzyEditDistance, IList aliases) + { + Name = name; + Description = description; + Type = type; + Subtype = subtype; + Id = id; + CaseSensitive = caseSensitive; + AccentSensitive = accentSensitive; + FuzzyEditDistance = fuzzyEditDistance; + DefaultCaseSensitive = defaultCaseSensitive; + DefaultAccentSensitive = defaultAccentSensitive; + DefaultFuzzyEditDistance = defaultFuzzyEditDistance; + Aliases = aliases; + } + + /// The top-level entity descriptor. Matches in the skill output will be grouped by this name, and it should represent the "normalized" form of the text being found. + public string Name { get; set; } + /// This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output. + public string Description { get; set; } + /// This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output. + public string Type { get; set; } + /// This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output. + public string Subtype { get; set; } + /// This field can be used as a passthrough for custom metadata about the matched text(s). The value of this field will appear with every match of its entity in the skill output. + public string Id { get; set; } + /// Defaults to false. Boolean value denoting whether comparisons with the entity name should be sensitive to character casing. Sample case insensitive matches of "Microsoft" could be: microsoft, microSoft, MICROSOFT. + public bool? CaseSensitive { get; set; } + /// Defaults to false. Boolean value denoting whether comparisons with the entity name should be sensitive to accent. + public bool? AccentSensitive { get; set; } + /// Defaults to 0. Maximum value of 5. Denotes the acceptable number of divergent characters that would still constitute a match with the entity name. The smallest possible fuzziness for any given match is returned. For instance, if the edit distance is set to 3, "Windows10" would still match "Windows", "Windows10" and "Windows 7". When case sensitivity is set to false, case differences do NOT count towards fuzziness tolerance, but otherwise do. + public int? FuzzyEditDistance { get; set; } + /// Changes the default case sensitivity value for this entity. It be used to change the default value of all aliases caseSensitive values. + public bool? DefaultCaseSensitive { get; set; } + /// Changes the default accent sensitivity value for this entity. It be used to change the default value of all aliases accentSensitive values. + public bool? DefaultAccentSensitive { get; set; } + /// Changes the default fuzzy edit distance value for this entity. It can be used to change the default value of all aliases fuzzyEditDistance values. + public int? DefaultFuzzyEditDistance { get; set; } + /// An array of complex objects that can be used to specify alternative spellings or synonyms to the root entity name. + public IList Aliases { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomEntityAlias.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomEntityAlias.Serialization.cs new file mode 100644 index 0000000000000..b284bdea7dd90 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomEntityAlias.Serialization.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Search.Documents.Indexes.Models +{ + public partial class CustomEntityAlias : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("text"); + writer.WriteStringValue(Text); + if (Optional.IsDefined(CaseSensitive)) + { + if (CaseSensitive != null) + { + writer.WritePropertyName("caseSensitive"); + writer.WriteBooleanValue(CaseSensitive.Value); + } + else + { + writer.WriteNull("caseSensitive"); + } + } + if (Optional.IsDefined(AccentSensitive)) + { + if (AccentSensitive != null) + { + writer.WritePropertyName("accentSensitive"); + writer.WriteBooleanValue(AccentSensitive.Value); + } + else + { + writer.WriteNull("accentSensitive"); + } + } + if (Optional.IsDefined(FuzzyEditDistance)) + { + if (FuzzyEditDistance != null) + { + writer.WritePropertyName("fuzzyEditDistance"); + writer.WriteNumberValue(FuzzyEditDistance.Value); + } + else + { + writer.WriteNull("fuzzyEditDistance"); + } + } + writer.WriteEndObject(); + } + + internal static CustomEntityAlias DeserializeCustomEntityAlias(JsonElement element) + { + string text = default; + Optional caseSensitive = default; + Optional accentSensitive = default; + Optional fuzzyEditDistance = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("text")) + { + text = property.Value.GetString(); + continue; + } + if (property.NameEquals("caseSensitive")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + caseSensitive = null; + continue; + } + caseSensitive = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("accentSensitive")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + accentSensitive = null; + continue; + } + accentSensitive = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("fuzzyEditDistance")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + fuzzyEditDistance = null; + continue; + } + fuzzyEditDistance = property.Value.GetInt32(); + continue; + } + } + return new CustomEntityAlias(text, Optional.ToNullable(caseSensitive), Optional.ToNullable(accentSensitive), Optional.ToNullable(fuzzyEditDistance)); + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomEntityAlias.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomEntityAlias.cs new file mode 100644 index 0000000000000..3ebe03e8ae914 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomEntityAlias.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Search.Documents.Indexes.Models +{ + /// A complex object that can be used to specify alternative spellings or synonyms to the root entity name. + public partial class CustomEntityAlias + { + /// Initializes a new instance of CustomEntityAlias. + /// The text of the alias. + /// is null. + public CustomEntityAlias(string text) + { + if (text == null) + { + throw new ArgumentNullException(nameof(text)); + } + + Text = text; + } + + /// Initializes a new instance of CustomEntityAlias. + /// The text of the alias. + /// Determine if the alias is case sensitive. + /// Determine if the alias is accent sensitive. + /// Determine the fuzzy edit distance of the alias. + internal CustomEntityAlias(string text, bool? caseSensitive, bool? accentSensitive, int? fuzzyEditDistance) + { + Text = text; + CaseSensitive = caseSensitive; + AccentSensitive = accentSensitive; + FuzzyEditDistance = fuzzyEditDistance; + } + + /// The text of the alias. + public string Text { get; set; } + /// Determine if the alias is case sensitive. + public bool? CaseSensitive { get; set; } + /// Determine if the alias is accent sensitive. + public bool? AccentSensitive { get; set; } + /// Determine the fuzzy edit distance of the alias. + public int? FuzzyEditDistance { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomEntityLookupSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomEntityLookupSkill.Serialization.cs new file mode 100644 index 0000000000000..e990d0cb9bcd4 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomEntityLookupSkill.Serialization.cs @@ -0,0 +1,255 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Search.Documents.Indexes.Models +{ + public partial class CustomEntityLookupSkill : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DefaultLanguageCode)) + { + if (DefaultLanguageCode != null) + { + writer.WritePropertyName("defaultLanguageCode"); + writer.WriteStringValue(DefaultLanguageCode.Value.ToString()); + } + else + { + writer.WriteNull("defaultLanguageCode"); + } + } + if (Optional.IsDefined(EntitiesDefinitionUri)) + { + if (EntitiesDefinitionUri != null) + { + writer.WritePropertyName("entitiesDefinitionUri"); + writer.WriteStringValue(EntitiesDefinitionUri); + } + else + { + writer.WriteNull("entitiesDefinitionUri"); + } + } + if (Optional.IsCollectionDefined(InlineEntitiesDefinition)) + { + if (InlineEntitiesDefinition != null) + { + writer.WritePropertyName("inlineEntitiesDefinition"); + writer.WriteStartArray(); + foreach (var item in InlineEntitiesDefinition) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("inlineEntitiesDefinition"); + } + } + if (Optional.IsDefined(GlobalDefaultCaseSensitive)) + { + if (GlobalDefaultCaseSensitive != null) + { + writer.WritePropertyName("globalDefaultCaseSensitive"); + writer.WriteBooleanValue(GlobalDefaultCaseSensitive.Value); + } + else + { + writer.WriteNull("globalDefaultCaseSensitive"); + } + } + if (Optional.IsDefined(GlobalDefaultAccentSensitive)) + { + if (GlobalDefaultAccentSensitive != null) + { + writer.WritePropertyName("globalDefaultAccentSensitive"); + writer.WriteBooleanValue(GlobalDefaultAccentSensitive.Value); + } + else + { + writer.WriteNull("globalDefaultAccentSensitive"); + } + } + if (Optional.IsDefined(GlobalDefaultFuzzyEditDistance)) + { + if (GlobalDefaultFuzzyEditDistance != null) + { + writer.WritePropertyName("globalDefaultFuzzyEditDistance"); + writer.WriteNumberValue(GlobalDefaultFuzzyEditDistance.Value); + } + else + { + writer.WriteNull("globalDefaultFuzzyEditDistance"); + } + } + writer.WritePropertyName("@odata.type"); + writer.WriteStringValue(ODataType); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(Context)) + { + writer.WritePropertyName("context"); + writer.WriteStringValue(Context); + } + writer.WritePropertyName("inputs"); + writer.WriteStartArray(); + foreach (var item in Inputs) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("outputs"); + writer.WriteStartArray(); + foreach (var item in Outputs) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WriteEndObject(); + } + + internal static CustomEntityLookupSkill DeserializeCustomEntityLookupSkill(JsonElement element) + { + Optional defaultLanguageCode = default; + Optional entitiesDefinitionUri = default; + Optional> inlineEntitiesDefinition = default; + Optional globalDefaultCaseSensitive = default; + Optional globalDefaultAccentSensitive = default; + Optional globalDefaultFuzzyEditDistance = default; + string odataType = default; + Optional name = default; + Optional description = default; + Optional context = default; + IList inputs = default; + IList outputs = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("defaultLanguageCode")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + defaultLanguageCode = null; + continue; + } + defaultLanguageCode = new CustomEntityLookupSkillLanguage(property.Value.GetString()); + continue; + } + if (property.NameEquals("entitiesDefinitionUri")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + entitiesDefinitionUri = null; + continue; + } + entitiesDefinitionUri = property.Value.GetString(); + continue; + } + if (property.NameEquals("inlineEntitiesDefinition")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + inlineEntitiesDefinition = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CustomEntity.DeserializeCustomEntity(item)); + } + inlineEntitiesDefinition = array; + continue; + } + if (property.NameEquals("globalDefaultCaseSensitive")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + globalDefaultCaseSensitive = null; + continue; + } + globalDefaultCaseSensitive = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("globalDefaultAccentSensitive")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + globalDefaultAccentSensitive = null; + continue; + } + globalDefaultAccentSensitive = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("globalDefaultFuzzyEditDistance")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + globalDefaultFuzzyEditDistance = null; + continue; + } + globalDefaultFuzzyEditDistance = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("@odata.type")) + { + odataType = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("context")) + { + context = property.Value.GetString(); + continue; + } + if (property.NameEquals("inputs")) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(InputFieldMappingEntry.DeserializeInputFieldMappingEntry(item)); + } + inputs = array; + continue; + } + if (property.NameEquals("outputs")) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(OutputFieldMappingEntry.DeserializeOutputFieldMappingEntry(item)); + } + outputs = array; + continue; + } + } + return new CustomEntityLookupSkill(odataType, name.Value, description.Value, context.Value, inputs, outputs, Optional.ToNullable(defaultLanguageCode), entitiesDefinitionUri.Value, Optional.ToList(inlineEntitiesDefinition), Optional.ToNullable(globalDefaultCaseSensitive), Optional.ToNullable(globalDefaultAccentSensitive), Optional.ToNullable(globalDefaultFuzzyEditDistance)); + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomEntityLookupSkill.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomEntityLookupSkill.cs new file mode 100644 index 0000000000000..f6edeaf3f513a --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomEntityLookupSkill.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Search.Documents.Indexes.Models +{ + /// A skill looks for text from a custom, user-defined list of words and phrases. + public partial class CustomEntityLookupSkill : SearchIndexerSkill + { + /// Initializes a new instance of CustomEntityLookupSkill. + /// Inputs of the skills could be a column in the source data set, or the output of an upstream skill. + /// The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. + /// or is null. + public CustomEntityLookupSkill(IEnumerable inputs, IEnumerable outputs) : base(inputs, outputs) + { + if (inputs == null) + { + throw new ArgumentNullException(nameof(inputs)); + } + if (outputs == null) + { + throw new ArgumentNullException(nameof(outputs)); + } + + InlineEntitiesDefinition = new ChangeTrackingList(); + ODataType = "#Microsoft.Skills.Text.CustomEntityLookupSkill"; + } + + /// Initializes a new instance of CustomEntityLookupSkill. + /// Identifies the concrete type of the skill. + /// The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. + /// The description of the skill which describes the inputs, outputs, and usage of the skill. + /// Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. + /// Inputs of the skills could be a column in the source data set, or the output of an upstream skill. + /// The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. + /// A value indicating which language code to use. Default is en. + /// Path to a JSON or CSV file containing all the target text to match against. This entity definition is read at the beginning of an indexer run. Any updates to this file during an indexer run will not take effect until subsequent runs. This config must be accessible over HTTPS. + /// The inline CustomEntity definition. + /// A global flag for CaseSensitive. If CaseSensitive is not set in CustomEntity, this value will be the default value. + /// A global flag for AccentSensitive. If AccentSensitive is not set in CustomEntity, this value will be the default value. + /// A global flag for FuzzyEditDistance. If FuzzyEditDistance is not set in CustomEntity, this value will be the default value. + internal CustomEntityLookupSkill(string oDataType, string name, string description, string context, IList inputs, IList outputs, CustomEntityLookupSkillLanguage? defaultLanguageCode, string entitiesDefinitionUri, IList inlineEntitiesDefinition, bool? globalDefaultCaseSensitive, bool? globalDefaultAccentSensitive, int? globalDefaultFuzzyEditDistance) : base(oDataType, name, description, context, inputs, outputs) + { + DefaultLanguageCode = defaultLanguageCode; + EntitiesDefinitionUri = entitiesDefinitionUri; + InlineEntitiesDefinition = inlineEntitiesDefinition; + GlobalDefaultCaseSensitive = globalDefaultCaseSensitive; + GlobalDefaultAccentSensitive = globalDefaultAccentSensitive; + GlobalDefaultFuzzyEditDistance = globalDefaultFuzzyEditDistance; + ODataType = oDataType ?? "#Microsoft.Skills.Text.CustomEntityLookupSkill"; + } + + /// A value indicating which language code to use. Default is en. + public CustomEntityLookupSkillLanguage? DefaultLanguageCode { get; set; } + /// Path to a JSON or CSV file containing all the target text to match against. This entity definition is read at the beginning of an indexer run. Any updates to this file during an indexer run will not take effect until subsequent runs. This config must be accessible over HTTPS. + public string EntitiesDefinitionUri { get; set; } + /// The inline CustomEntity definition. + public IList InlineEntitiesDefinition { get; set; } + /// A global flag for CaseSensitive. If CaseSensitive is not set in CustomEntity, this value will be the default value. + public bool? GlobalDefaultCaseSensitive { get; set; } + /// A global flag for AccentSensitive. If AccentSensitive is not set in CustomEntity, this value will be the default value. + public bool? GlobalDefaultAccentSensitive { get; set; } + /// A global flag for FuzzyEditDistance. If FuzzyEditDistance is not set in CustomEntity, this value will be the default value. + public int? GlobalDefaultFuzzyEditDistance { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomEntityLookupSkillLanguage.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomEntityLookupSkillLanguage.cs new file mode 100644 index 0000000000000..34f8021d95407 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/CustomEntityLookupSkillLanguage.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Search.Documents.Indexes.Models +{ + /// The language codes supported for input text by CustomEntityLookupSkill. + public readonly partial struct CustomEntityLookupSkillLanguage : IEquatable + { + private readonly string _value; + + /// Determines if two values are the same. + /// is null. + public CustomEntityLookupSkillLanguage(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DaValue = "da"; + private const string DeValue = "de"; + private const string EnValue = "en"; + private const string EsValue = "es"; + private const string FiValue = "fi"; + private const string FrValue = "fr"; + private const string ItValue = "it"; + private const string KoValue = "ko"; + private const string PtValue = "pt"; + + /// Danish. + public static CustomEntityLookupSkillLanguage Da { get; } = new CustomEntityLookupSkillLanguage(DaValue); + /// German. + public static CustomEntityLookupSkillLanguage De { get; } = new CustomEntityLookupSkillLanguage(DeValue); + /// English. + public static CustomEntityLookupSkillLanguage En { get; } = new CustomEntityLookupSkillLanguage(EnValue); + /// Spanish. + public static CustomEntityLookupSkillLanguage Es { get; } = new CustomEntityLookupSkillLanguage(EsValue); + /// Finnish. + public static CustomEntityLookupSkillLanguage Fi { get; } = new CustomEntityLookupSkillLanguage(FiValue); + /// French. + public static CustomEntityLookupSkillLanguage Fr { get; } = new CustomEntityLookupSkillLanguage(FrValue); + /// Italian. + public static CustomEntityLookupSkillLanguage It { get; } = new CustomEntityLookupSkillLanguage(ItValue); + /// Korean. + public static CustomEntityLookupSkillLanguage Ko { get; } = new CustomEntityLookupSkillLanguage(KoValue); + /// Portuguese. + public static CustomEntityLookupSkillLanguage Pt { get; } = new CustomEntityLookupSkillLanguage(PtValue); + /// Determines if two values are the same. + public static bool operator ==(CustomEntityLookupSkillLanguage left, CustomEntityLookupSkillLanguage right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CustomEntityLookupSkillLanguage left, CustomEntityLookupSkillLanguage right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator CustomEntityLookupSkillLanguage(string value) => new CustomEntityLookupSkillLanguage(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CustomEntityLookupSkillLanguage other && Equals(other); + /// + public bool Equals(CustomEntityLookupSkillLanguage other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/DataSourceCredentials.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/DataSourceCredentials.cs index f7a8cedb869ae..62c66779e9afb 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/DataSourceCredentials.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/DataSourceCredentials.cs @@ -16,13 +16,13 @@ public DataSourceCredentials() } /// Initializes a new instance of DataSourceCredentials. - /// The connection string for the datasource. + /// The connection string for the datasource. Set to '<unchanged>' if you do not want the connection string updated. internal DataSourceCredentials(string connectionString) { ConnectionString = connectionString; } - /// The connection string for the datasource. + /// The connection string for the datasource. Set to '<unchanged>' if you do not want the connection string updated. public string ConnectionString { get; set; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentExtractionSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentExtractionSkill.Serialization.cs new file mode 100644 index 0000000000000..d4a3298ee16e3 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentExtractionSkill.Serialization.cs @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Search.Documents.Indexes.Models +{ + public partial class DocumentExtractionSkill : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ParsingMode)) + { + if (ParsingMode != null) + { + writer.WritePropertyName("parsingMode"); + writer.WriteStringValue(ParsingMode); + } + else + { + writer.WriteNull("parsingMode"); + } + } + if (Optional.IsDefined(DataToExtract)) + { + if (DataToExtract != null) + { + writer.WritePropertyName("dataToExtract"); + writer.WriteStringValue(DataToExtract); + } + else + { + writer.WriteNull("dataToExtract"); + } + } + if (Optional.IsCollectionDefined(Configuration)) + { + if (Configuration != null) + { + writer.WritePropertyName("configuration"); + writer.WriteStartObject(); + foreach (var item in Configuration) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("configuration"); + } + } + writer.WritePropertyName("@odata.type"); + writer.WriteStringValue(ODataType); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(Context)) + { + writer.WritePropertyName("context"); + writer.WriteStringValue(Context); + } + writer.WritePropertyName("inputs"); + writer.WriteStartArray(); + foreach (var item in Inputs) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("outputs"); + writer.WriteStartArray(); + foreach (var item in Outputs) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WriteEndObject(); + } + + internal static DocumentExtractionSkill DeserializeDocumentExtractionSkill(JsonElement element) + { + Optional parsingMode = default; + Optional dataToExtract = default; + Optional> configuration = default; + string odataType = default; + Optional name = default; + Optional description = default; + Optional context = default; + IList inputs = default; + IList outputs = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("parsingMode")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + parsingMode = null; + continue; + } + parsingMode = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataToExtract")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + dataToExtract = null; + continue; + } + dataToExtract = property.Value.GetString(); + continue; + } + if (property.NameEquals("configuration")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + configuration = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetObject()); + } + configuration = dictionary; + continue; + } + if (property.NameEquals("@odata.type")) + { + odataType = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("context")) + { + context = property.Value.GetString(); + continue; + } + if (property.NameEquals("inputs")) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(InputFieldMappingEntry.DeserializeInputFieldMappingEntry(item)); + } + inputs = array; + continue; + } + if (property.NameEquals("outputs")) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(OutputFieldMappingEntry.DeserializeOutputFieldMappingEntry(item)); + } + outputs = array; + continue; + } + } + return new DocumentExtractionSkill(odataType, name.Value, description.Value, context.Value, inputs, outputs, parsingMode.Value, dataToExtract.Value, Optional.ToDictionary(configuration)); + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentExtractionSkill.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentExtractionSkill.cs new file mode 100644 index 0000000000000..a624e97ad60f8 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentExtractionSkill.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Search.Documents.Indexes.Models +{ + /// A skill that extracts content from a file within the enrichment pipeline. + public partial class DocumentExtractionSkill : SearchIndexerSkill + { + /// Initializes a new instance of DocumentExtractionSkill. + /// Inputs of the skills could be a column in the source data set, or the output of an upstream skill. + /// The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. + /// or is null. + public DocumentExtractionSkill(IEnumerable inputs, IEnumerable outputs) : base(inputs, outputs) + { + if (inputs == null) + { + throw new ArgumentNullException(nameof(inputs)); + } + if (outputs == null) + { + throw new ArgumentNullException(nameof(outputs)); + } + + Configuration = new ChangeTrackingDictionary(); + ODataType = "#Microsoft.Skills.Util.DocumentExtractionSkill"; + } + + /// Initializes a new instance of DocumentExtractionSkill. + /// Identifies the concrete type of the skill. + /// The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. + /// The description of the skill which describes the inputs, outputs, and usage of the skill. + /// Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. + /// Inputs of the skills could be a column in the source data set, or the output of an upstream skill. + /// The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. + /// The parsingMode for the skill. Will be set to 'default' if not defined. + /// The type of data to be extracted for the skill. Will be set to 'contentAndMetadata' if not defined. + /// A dictionary of configurations for the skill. + internal DocumentExtractionSkill(string oDataType, string name, string description, string context, IList inputs, IList outputs, string parsingMode, string dataToExtract, IDictionary configuration) : base(oDataType, name, description, context, inputs, outputs) + { + ParsingMode = parsingMode; + DataToExtract = dataToExtract; + Configuration = configuration; + ODataType = oDataType ?? "#Microsoft.Skills.Util.DocumentExtractionSkill"; + } + + /// The parsingMode for the skill. Will be set to 'default' if not defined. + public string ParsingMode { get; set; } + /// The type of data to be extracted for the skill. Will be set to 'contentAndMetadata' if not defined. + public string DataToExtract { get; set; } + /// A dictionary of configurations for the skill. + public IDictionary Configuration { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceType.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceType.cs index 1057e827b41df..7a36cb6863b5e 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceType.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceType.cs @@ -27,17 +27,20 @@ public SearchIndexerDataSourceType(string value) private const string AzureBlobValue = "azureblob"; private const string AzureTableValue = "azuretable"; private const string MySqlValue = "mysql"; + private const string AdlsGen2Value = "adlsgen2"; /// Indicates an Azure SQL datasource. public static SearchIndexerDataSourceType AzureSql { get; } = new SearchIndexerDataSourceType(AzureSqlValue); /// Indicates a CosmosDB datasource. public static SearchIndexerDataSourceType CosmosDb { get; } = new SearchIndexerDataSourceType(CosmosDbValue); - /// Indicates a Azure Blob datasource. + /// Indicates an Azure Blob datasource. public static SearchIndexerDataSourceType AzureBlob { get; } = new SearchIndexerDataSourceType(AzureBlobValue); - /// Indicates a Azure Table datasource. + /// Indicates an Azure Table datasource. public static SearchIndexerDataSourceType AzureTable { get; } = new SearchIndexerDataSourceType(AzureTableValue); /// Indicates a MySql datasource. public static SearchIndexerDataSourceType MySql { get; } = new SearchIndexerDataSourceType(MySqlValue); + /// Indicates an ADLS Gen2 datasource. + public static SearchIndexerDataSourceType AdlsGen2 { get; } = new SearchIndexerDataSourceType(AdlsGen2Value); /// Determines if two values are the same. public static bool operator ==(SearchIndexerDataSourceType left, SearchIndexerDataSourceType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.Serialization.cs index c6bf7dfc3b7dc..79aecff2621da 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.Serialization.cs @@ -57,6 +57,7 @@ internal static SearchIndexerSkill DeserializeSearchIndexerSkill(JsonElement ele switch (discriminator.GetString()) { case "#Microsoft.Skills.Custom.WebApiSkill": return WebApiSkill.DeserializeWebApiSkill(element); + case "#Microsoft.Skills.Text.CustomEntityLookupSkill": return CustomEntityLookupSkill.DeserializeCustomEntityLookupSkill(element); case "#Microsoft.Skills.Text.EntityRecognitionSkill": return EntityRecognitionSkill.DeserializeEntityRecognitionSkill(element); case "#Microsoft.Skills.Text.KeyPhraseExtractionSkill": return KeyPhraseExtractionSkill.DeserializeKeyPhraseExtractionSkill(element); case "#Microsoft.Skills.Text.LanguageDetectionSkill": return LanguageDetectionSkill.DeserializeLanguageDetectionSkill(element); @@ -65,6 +66,7 @@ internal static SearchIndexerSkill DeserializeSearchIndexerSkill(JsonElement ele case "#Microsoft.Skills.Text.SplitSkill": return SplitSkill.DeserializeSplitSkill(element); case "#Microsoft.Skills.Text.TranslationSkill": return TextTranslationSkill.DeserializeTextTranslationSkill(element); case "#Microsoft.Skills.Util.ConditionalSkill": return ConditionalSkill.DeserializeConditionalSkill(element); + case "#Microsoft.Skills.Util.DocumentExtractionSkill": return DocumentExtractionSkill.DeserializeDocumentExtractionSkill(element); case "#Microsoft.Skills.Util.ShaperSkill": return ShaperSkill.DeserializeShaperSkill(element); case "#Microsoft.Skills.Vision.ImageAnalysisSkill": return ImageAnalysisSkill.DeserializeImageAnalysisSkill(element); case "#Microsoft.Skills.Vision.OcrSkill": return OcrSkill.DeserializeOcrSkill(element); diff --git a/sdk/search/Azure.Search.Documents/src/autorest.md b/sdk/search/Azure.Search.Documents/src/autorest.md index fc666a2449191..dae1c8cf22d07 100644 --- a/sdk/search/Azure.Search.Documents/src/autorest.md +++ b/sdk/search/Azure.Search.Documents/src/autorest.md @@ -13,8 +13,8 @@ copy them locally in `/sdk/search/generate.ps1` and reference them here. ```yaml title: SearchServiceClient input-file: -- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/55c3979124d193ab8cd4c5409a3e9f67739ca571/specification/search/data-plane/Azure.Search/preview/2020-06-30/searchindex.json -- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/55c3979124d193ab8cd4c5409a3e9f67739ca571/specification/search/data-plane/Azure.Search/preview/2020-06-30/searchservice.json +- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/47b422a4d1ea9f4736739a4a6a19d4a8a2fe54d9/specification/search/data-plane/Azure.Search/preview/2020-06-30/searchindex.json +- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/47b422a4d1ea9f4736739a4a6a19d4a8a2fe54d9/specification/search/data-plane/Azure.Search/preview/2020-06-30/searchservice.json ``` ## Release hacks diff --git a/sdk/search/Azure.Search.Documents/tests/SearchIndexerClientTests.cs b/sdk/search/Azure.Search.Documents/tests/SearchIndexerClientTests.cs index 1b63731ac143a..e21dbae637fa3 100644 --- a/sdk/search/Azure.Search.Documents/tests/SearchIndexerClientTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/SearchIndexerClientTests.cs @@ -541,6 +541,7 @@ SearchIndexerSkill CreateSkill(Type t, string[] inputNames, string[] outputNames return t switch { + Type _ when t == typeof(CustomEntityLookupSkill) => new CustomEntityLookupSkill(inputs, outputs) { EntitiesDefinitionUri = "https://microsoft.com" }, // TODO: Should TextSplitMode be added to constructor (required input)? Type _ when t == typeof(SplitSkill) => new SplitSkill(inputs, outputs) { TextSplitMode = TextSplitMode.Pages }, @@ -555,6 +556,8 @@ SearchIndexerSkill CreateSkill(Type t, string[] inputNames, string[] outputNames .Select(t => t switch { Type _ when t == typeof(ConditionalSkill) => CreateSkill(t, new[] { "condition", "whenTrue", "whenFalse" }, new[] { "output" }), + Type _ when t == typeof(CustomEntityLookupSkill) => CreateSkill(t, new[] { "text", "languageCode" }, new[] { "entities" }), + Type _ when t == typeof(DocumentExtractionSkill) => CreateSkill(t, new[] { "file_data" }, new[] { "content", "normalized_images" }), Type _ when t == typeof(EntityRecognitionSkill) => CreateSkill(t, new[] { "languageCode", "text" }, new[] { "persons" }), Type _ when t == typeof(ImageAnalysisSkill) => CreateSkill(t, new[] { "image" }, new[] { "categories" }), Type _ when t == typeof(KeyPhraseExtractionSkill) => CreateSkill(t, new[] { "text", "languageCode" }, new[] { "keyPhrases" }), diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchIndexerClientTests/RoundtripAllSkills.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchIndexerClientTests/RoundtripAllSkills.json index 73f4664733f4c..f67ce34f38117 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchIndexerClientTests/RoundtripAllSkills.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchIndexerClientTests/RoundtripAllSkills.json @@ -6,14 +6,14 @@ "RequestHeaders": { "Accept": "application/json; odata.metadata=minimal", "api-key": "Sanitized", - "Content-Length": "3029", + "Content-Length": "3541", "Content-Type": "application/json", - "traceparent": "00-357c8322df08db408d45814584a35a6b-ad4ed7e68d34304d-00", + "traceparent": "00-b3743f7b3e32a740838fddaf53f1cfc6-46da0256cdfb0c47-00", "User-Agent": [ - "azsdk-net-Search.Documents/11.3.0-alpha.20210326.1", - "(.NET Core 4.6.29719.03; Microsoft Windows 10.0.19043 )" + "azsdk-net-Search.Documents/11.3.0-alpha.20210330.1", + "(.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )" ], - "x-ms-client-request-id": "7c15986df0790821cfd9e7040b8a411b", + "x-ms-client-request-id": "5d016cb905478992346230c9ebac18e1", "x-ms-return-client-request-id": "true" }, "RequestBody": { @@ -42,6 +42,45 @@ } ] }, + { + "entitiesDefinitionUri": "https://microsoft.com", + "@odata.type": "#Microsoft.Skills.Text.CustomEntityLookupSkill", + "inputs": [ + { + "name": "text", + "source": "/document/content" + }, + { + "name": "languageCode", + "source": "/document/content" + } + ], + "outputs": [ + { + "name": "entities", + "targetName": "upyugkjy" + } + ] + }, + { + "@odata.type": "#Microsoft.Skills.Util.DocumentExtractionSkill", + "inputs": [ + { + "name": "file_data", + "source": "/document/content" + } + ], + "outputs": [ + { + "name": "content", + "targetName": "cojtwncd" + }, + { + "name": "normalized_images", + "targetName": "xyafuysk" + } + ] + }, { "@odata.type": "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [ @@ -57,7 +96,7 @@ "outputs": [ { "name": "persons", - "targetName": "upyugkjy" + "targetName": "lripadri" } ] }, @@ -72,7 +111,7 @@ "outputs": [ { "name": "categories", - "targetName": "cojtwncd" + "targetName": "oxeepvou" } ] }, @@ -91,7 +130,7 @@ "outputs": [ { "name": "keyPhrases", - "targetName": "xyafuysk" + "targetName": "gnhofmax" } ] }, @@ -106,15 +145,15 @@ "outputs": [ { "name": "languageCode", - "targetName": "lripadri" + "targetName": "djmltsdu" }, { "name": "languageName", - "targetName": "oxeepvou" + "targetName": "wojnbsyy" }, { "name": "score", - "targetName": "gnhofmax" + "targetName": "vaeyixnb" } ] }, @@ -137,7 +176,7 @@ "outputs": [ { "name": "mergedText", - "targetName": "djmltsdu" + "targetName": "jexhrdex" } ] }, @@ -152,11 +191,11 @@ "outputs": [ { "name": "text", - "targetName": "wojnbsyy" + "targetName": "rkmppgnu" }, { "name": "layoutText", - "targetName": "vaeyixnb" + "targetName": "tjgbmatn" } ] }, @@ -175,7 +214,7 @@ "outputs": [ { "name": "score", - "targetName": "jexhrdex" + "targetName": "nisfhboe" } ] }, @@ -190,7 +229,7 @@ "outputs": [ { "name": "output", - "targetName": "rkmppgnu" + "targetName": "vlbotvcs" } ] }, @@ -210,7 +249,7 @@ "outputs": [ { "name": "textItems", - "targetName": "tjgbmatn" + "targetName": "jkvqfjip" } ] }, @@ -234,15 +273,15 @@ "outputs": [ { "name": "translatedText", - "targetName": "nisfhboe" + "targetName": "ljeyqloi" }, { "name": "translatedToLanguageCode", - "targetName": "vlbotvcs" + "targetName": "kktjkyqp" }, { "name": "translatedFromLanguageCode", - "targetName": "jkvqfjip" + "targetName": "viseexax" } ] }, @@ -258,7 +297,7 @@ "outputs": [ { "name": "output", - "targetName": "ljeyqloi" + "targetName": "gnrbedhd" } ] } @@ -270,24 +309,24 @@ "StatusCode": 201, "ResponseHeaders": { "Cache-Control": "no-cache", - "client-request-id": "7c15986d-f079-0821-cfd9-e7040b8a411b", - "Content-Length": "5156", + "client-request-id": "5d016cb9-0547-8992-3462-30c9ebac18e1", + "Content-Length": "6085", "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Sat, 27 Mar 2021 18:45:30 GMT", - "elapsed-time": "229", - "ETag": "W/\u00220x8D8F1507F808C0E\u0022", + "Date": "Tue, 30 Mar 2021 20:20:55 GMT", + "elapsed-time": "351", + "ETag": "W/\u00220x8D8F3B952A32D23\u0022", "Expires": "-1", "Location": "https://mohitc-acs.search.windows.net/skillsets(\u0027fpmjeogx\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "7c15986d-f079-0821-cfd9-e7040b8a411b", + "request-id": "5d016cb9-0547-8992-3462-30c9ebac18e1", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "x-ms-client-request-id": "7c15986d-f079-0821-cfd9-e7040b8a411b" + "x-ms-client-request-id": "5d016cb9-0547-8992-3462-30c9ebac18e1" }, "ResponseBody": { "@odata.context": "https://mohitc-acs.search.windows.net/$metadata#skillsets/$entity", - "@odata.etag": "\u00220x8D8F1507F808C0E\u0022", + "@odata.etag": "\u00220x8D8F3B952A32D23\u0022", "name": "fpmjeogx", "description": null, "skills": [ @@ -323,6 +362,65 @@ } ] }, + { + "@odata.type": "#Microsoft.Skills.Text.CustomEntityLookupSkill", + "name": null, + "description": null, + "context": null, + "defaultLanguageCode": null, + "entitiesDefinitionUri": "https://microsoft.com", + "globalDefaultCaseSensitive": null, + "globalDefaultAccentSensitive": null, + "globalDefaultFuzzyEditDistance": null, + "inputs": [ + { + "name": "text", + "source": "/document/content", + "sourceContext": null, + "inputs": [] + }, + { + "name": "languageCode", + "source": "/document/content", + "sourceContext": null, + "inputs": [] + } + ], + "outputs": [ + { + "name": "entities", + "targetName": "upyugkjy" + } + ], + "inlineEntitiesDefinition": [] + }, + { + "@odata.type": "#Microsoft.Skills.Util.DocumentExtractionSkill", + "name": null, + "description": null, + "context": null, + "parsingMode": null, + "dataToExtract": null, + "inputs": [ + { + "name": "file_data", + "source": "/document/content", + "sourceContext": null, + "inputs": [] + } + ], + "outputs": [ + { + "name": "content", + "targetName": "cojtwncd" + }, + { + "name": "normalized_images", + "targetName": "xyafuysk" + } + ], + "configuration": null + }, { "@odata.type": "#Microsoft.Skills.Text.EntityRecognitionSkill", "name": null, @@ -349,7 +447,7 @@ "outputs": [ { "name": "persons", - "targetName": "upyugkjy" + "targetName": "lripadri" } ] }, @@ -372,7 +470,7 @@ "outputs": [ { "name": "categories", - "targetName": "cojtwncd" + "targetName": "oxeepvou" } ] }, @@ -401,7 +499,7 @@ "outputs": [ { "name": "keyPhrases", - "targetName": "xyafuysk" + "targetName": "gnhofmax" } ] }, @@ -423,15 +521,15 @@ "outputs": [ { "name": "languageCode", - "targetName": "lripadri" + "targetName": "djmltsdu" }, { "name": "languageName", - "targetName": "oxeepvou" + "targetName": "wojnbsyy" }, { "name": "score", - "targetName": "gnhofmax" + "targetName": "vaeyixnb" } ] }, @@ -465,7 +563,7 @@ "outputs": [ { "name": "mergedText", - "targetName": "djmltsdu" + "targetName": "jexhrdex" } ] }, @@ -489,11 +587,11 @@ "outputs": [ { "name": "text", - "targetName": "wojnbsyy" + "targetName": "rkmppgnu" }, { "name": "layoutText", - "targetName": "vaeyixnb" + "targetName": "tjgbmatn" } ] }, @@ -520,7 +618,7 @@ "outputs": [ { "name": "score", - "targetName": "jexhrdex" + "targetName": "nisfhboe" } ] }, @@ -540,7 +638,7 @@ "outputs": [ { "name": "output", - "targetName": "rkmppgnu" + "targetName": "vlbotvcs" } ] }, @@ -569,7 +667,7 @@ "outputs": [ { "name": "textItems", - "targetName": "tjgbmatn" + "targetName": "jkvqfjip" } ] }, @@ -604,15 +702,15 @@ "outputs": [ { "name": "translatedText", - "targetName": "nisfhboe" + "targetName": "ljeyqloi" }, { "name": "translatedToLanguageCode", - "targetName": "vlbotvcs" + "targetName": "kktjkyqp" }, { "name": "translatedFromLanguageCode", - "targetName": "jkvqfjip" + "targetName": "viseexax" } ] }, @@ -637,7 +735,7 @@ "outputs": [ { "name": "output", - "targetName": "ljeyqloi" + "targetName": "gnrbedhd" } ], "httpHeaders": null diff --git a/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchIndexerClientTests/RoundtripAllSkillsAsync.json b/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchIndexerClientTests/RoundtripAllSkillsAsync.json index d9d08cc3bc974..460fcac7820c7 100644 --- a/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchIndexerClientTests/RoundtripAllSkillsAsync.json +++ b/sdk/search/Azure.Search.Documents/tests/SessionRecords/SearchIndexerClientTests/RoundtripAllSkillsAsync.json @@ -6,14 +6,14 @@ "RequestHeaders": { "Accept": "application/json; odata.metadata=minimal", "api-key": "Sanitized", - "Content-Length": "3029", + "Content-Length": "3541", "Content-Type": "application/json", - "traceparent": "00-fd584930920bee4798caff14c7e9fe6b-f92c4d712cb90541-00", + "traceparent": "00-b932f3e88226234587aa64379787ce3d-28968fcfe8499047-00", "User-Agent": [ - "azsdk-net-Search.Documents/11.3.0-alpha.20210326.1", - "(.NET Core 4.6.29719.03; Microsoft Windows 10.0.19043 )" + "azsdk-net-Search.Documents/11.3.0-alpha.20210330.1", + "(.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )" ], - "x-ms-client-request-id": "36f442407343fbea34a8a7608ea1160a", + "x-ms-client-request-id": "8e39ba448961d14a4b538fa82f0f897a", "x-ms-return-client-request-id": "true" }, "RequestBody": { @@ -42,6 +42,45 @@ } ] }, + { + "entitiesDefinitionUri": "https://microsoft.com", + "@odata.type": "#Microsoft.Skills.Text.CustomEntityLookupSkill", + "inputs": [ + { + "name": "text", + "source": "/document/content" + }, + { + "name": "languageCode", + "source": "/document/content" + } + ], + "outputs": [ + { + "name": "entities", + "targetName": "xnehbjyk" + } + ] + }, + { + "@odata.type": "#Microsoft.Skills.Util.DocumentExtractionSkill", + "inputs": [ + { + "name": "file_data", + "source": "/document/content" + } + ], + "outputs": [ + { + "name": "content", + "targetName": "alqyjdbi" + }, + { + "name": "normalized_images", + "targetName": "ptidacek" + } + ] + }, { "@odata.type": "#Microsoft.Skills.Text.EntityRecognitionSkill", "inputs": [ @@ -57,7 +96,7 @@ "outputs": [ { "name": "persons", - "targetName": "xnehbjyk" + "targetName": "niyhrstv" } ] }, @@ -72,7 +111,7 @@ "outputs": [ { "name": "categories", - "targetName": "alqyjdbi" + "targetName": "wgomeenc" } ] }, @@ -91,7 +130,7 @@ "outputs": [ { "name": "keyPhrases", - "targetName": "ptidacek" + "targetName": "fuvknxeo" } ] }, @@ -106,15 +145,15 @@ "outputs": [ { "name": "languageCode", - "targetName": "niyhrstv" + "targetName": "dmqnsedu" }, { "name": "languageName", - "targetName": "wgomeenc" + "targetName": "jtsskqrg" }, { "name": "score", - "targetName": "fuvknxeo" + "targetName": "qtbcoodl" } ] }, @@ -137,7 +176,7 @@ "outputs": [ { "name": "mergedText", - "targetName": "dmqnsedu" + "targetName": "fgxegswp" } ] }, @@ -152,11 +191,11 @@ "outputs": [ { "name": "text", - "targetName": "jtsskqrg" + "targetName": "ejefcfds" }, { "name": "layoutText", - "targetName": "qtbcoodl" + "targetName": "dtcklurn" } ] }, @@ -175,7 +214,7 @@ "outputs": [ { "name": "score", - "targetName": "fgxegswp" + "targetName": "dpsswbyn" } ] }, @@ -190,7 +229,7 @@ "outputs": [ { "name": "output", - "targetName": "ejefcfds" + "targetName": "ieilgxop" } ] }, @@ -210,7 +249,7 @@ "outputs": [ { "name": "textItems", - "targetName": "dtcklurn" + "targetName": "wdnammdl" } ] }, @@ -234,15 +273,15 @@ "outputs": [ { "name": "translatedText", - "targetName": "dpsswbyn" + "targetName": "pixulsyk" }, { "name": "translatedToLanguageCode", - "targetName": "ieilgxop" + "targetName": "ojbpydrd" }, { "name": "translatedFromLanguageCode", - "targetName": "wdnammdl" + "targetName": "jpvwwqmf" } ] }, @@ -258,7 +297,7 @@ "outputs": [ { "name": "output", - "targetName": "pixulsyk" + "targetName": "fmmhhqbp" } ] } @@ -270,24 +309,24 @@ "StatusCode": 201, "ResponseHeaders": { "Cache-Control": "no-cache", - "client-request-id": "36f44240-7343-fbea-34a8-a7608ea1160a", - "Content-Length": "5156", + "client-request-id": "8e39ba44-8961-d14a-4b53-8fa82f0f897a", + "Content-Length": "6085", "Content-Type": "application/json; odata.metadata=minimal", - "Date": "Sat, 27 Mar 2021 18:46:33 GMT", - "elapsed-time": "134", - "ETag": "W/\u00220x8D8F150A4A4F5B1\u0022", + "Date": "Tue, 30 Mar 2021 20:20:55 GMT", + "elapsed-time": "140", + "ETag": "W/\u00220x8D8F3B952E6D17A\u0022", "Expires": "-1", "Location": "https://mohitc-acs.search.windows.net/skillsets(\u0027lefvvewn\u0027)?api-version=2020-06-30", "OData-Version": "4.0", "Pragma": "no-cache", "Preference-Applied": "odata.include-annotations=\u0022*\u0022", - "request-id": "36f44240-7343-fbea-34a8-a7608ea1160a", + "request-id": "8e39ba44-8961-d14a-4b53-8fa82f0f897a", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "x-ms-client-request-id": "36f44240-7343-fbea-34a8-a7608ea1160a" + "x-ms-client-request-id": "8e39ba44-8961-d14a-4b53-8fa82f0f897a" }, "ResponseBody": { "@odata.context": "https://mohitc-acs.search.windows.net/$metadata#skillsets/$entity", - "@odata.etag": "\u00220x8D8F150A4A4F5B1\u0022", + "@odata.etag": "\u00220x8D8F3B952E6D17A\u0022", "name": "lefvvewn", "description": null, "skills": [ @@ -323,6 +362,65 @@ } ] }, + { + "@odata.type": "#Microsoft.Skills.Text.CustomEntityLookupSkill", + "name": null, + "description": null, + "context": null, + "defaultLanguageCode": null, + "entitiesDefinitionUri": "https://microsoft.com", + "globalDefaultCaseSensitive": null, + "globalDefaultAccentSensitive": null, + "globalDefaultFuzzyEditDistance": null, + "inputs": [ + { + "name": "text", + "source": "/document/content", + "sourceContext": null, + "inputs": [] + }, + { + "name": "languageCode", + "source": "/document/content", + "sourceContext": null, + "inputs": [] + } + ], + "outputs": [ + { + "name": "entities", + "targetName": "xnehbjyk" + } + ], + "inlineEntitiesDefinition": [] + }, + { + "@odata.type": "#Microsoft.Skills.Util.DocumentExtractionSkill", + "name": null, + "description": null, + "context": null, + "parsingMode": null, + "dataToExtract": null, + "inputs": [ + { + "name": "file_data", + "source": "/document/content", + "sourceContext": null, + "inputs": [] + } + ], + "outputs": [ + { + "name": "content", + "targetName": "alqyjdbi" + }, + { + "name": "normalized_images", + "targetName": "ptidacek" + } + ], + "configuration": null + }, { "@odata.type": "#Microsoft.Skills.Text.EntityRecognitionSkill", "name": null, @@ -349,7 +447,7 @@ "outputs": [ { "name": "persons", - "targetName": "xnehbjyk" + "targetName": "niyhrstv" } ] }, @@ -372,7 +470,7 @@ "outputs": [ { "name": "categories", - "targetName": "alqyjdbi" + "targetName": "wgomeenc" } ] }, @@ -401,7 +499,7 @@ "outputs": [ { "name": "keyPhrases", - "targetName": "ptidacek" + "targetName": "fuvknxeo" } ] }, @@ -423,15 +521,15 @@ "outputs": [ { "name": "languageCode", - "targetName": "niyhrstv" + "targetName": "dmqnsedu" }, { "name": "languageName", - "targetName": "wgomeenc" + "targetName": "jtsskqrg" }, { "name": "score", - "targetName": "fuvknxeo" + "targetName": "qtbcoodl" } ] }, @@ -465,7 +563,7 @@ "outputs": [ { "name": "mergedText", - "targetName": "dmqnsedu" + "targetName": "fgxegswp" } ] }, @@ -489,11 +587,11 @@ "outputs": [ { "name": "text", - "targetName": "jtsskqrg" + "targetName": "ejefcfds" }, { "name": "layoutText", - "targetName": "qtbcoodl" + "targetName": "dtcklurn" } ] }, @@ -520,7 +618,7 @@ "outputs": [ { "name": "score", - "targetName": "fgxegswp" + "targetName": "dpsswbyn" } ] }, @@ -540,7 +638,7 @@ "outputs": [ { "name": "output", - "targetName": "ejefcfds" + "targetName": "ieilgxop" } ] }, @@ -569,7 +667,7 @@ "outputs": [ { "name": "textItems", - "targetName": "dtcklurn" + "targetName": "wdnammdl" } ] }, @@ -604,15 +702,15 @@ "outputs": [ { "name": "translatedText", - "targetName": "dpsswbyn" + "targetName": "pixulsyk" }, { "name": "translatedToLanguageCode", - "targetName": "ieilgxop" + "targetName": "ojbpydrd" }, { "name": "translatedFromLanguageCode", - "targetName": "wdnammdl" + "targetName": "jpvwwqmf" } ] }, @@ -637,7 +735,7 @@ "outputs": [ { "name": "output", - "targetName": "pixulsyk" + "targetName": "fmmhhqbp" } ], "httpHeaders": null From c27efca8318137dd04aa7c3c7e071fdd1458e594 Mon Sep 17 00:00:00 2001 From: Mohit Chakraborty Date: Tue, 30 Mar 2021 13:57:50 -0700 Subject: [PATCH 2/2] Update API file --- .../Azure.Search.Documents.netstandard2.0.cs | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/sdk/search/Azure.Search.Documents/api/Azure.Search.Documents.netstandard2.0.cs b/sdk/search/Azure.Search.Documents/api/Azure.Search.Documents.netstandard2.0.cs index b6a1c46b6cbc9..965b49cde385a 100644 --- a/sdk/search/Azure.Search.Documents/api/Azure.Search.Documents.netstandard2.0.cs +++ b/sdk/search/Azure.Search.Documents/api/Azure.Search.Documents.netstandard2.0.cs @@ -460,6 +460,65 @@ public CustomAnalyzer(string name, Azure.Search.Documents.Indexes.Models.Lexical public System.Collections.Generic.IList TokenFilters { get { throw null; } } public Azure.Search.Documents.Indexes.Models.LexicalTokenizerName TokenizerName { get { throw null; } set { } } } + public partial class CustomEntity + { + public CustomEntity(string name) { } + public bool? AccentSensitive { get { throw null; } set { } } + public System.Collections.Generic.IList Aliases { get { throw null; } set { } } + public bool? CaseSensitive { get { throw null; } set { } } + public bool? DefaultAccentSensitive { get { throw null; } set { } } + public bool? DefaultCaseSensitive { get { throw null; } set { } } + public int? DefaultFuzzyEditDistance { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public int? FuzzyEditDistance { get { throw null; } set { } } + public string Id { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public string Subtype { get { throw null; } set { } } + public string Type { get { throw null; } set { } } + } + public partial class CustomEntityAlias + { + public CustomEntityAlias(string text) { } + public bool? AccentSensitive { get { throw null; } set { } } + public bool? CaseSensitive { get { throw null; } set { } } + public int? FuzzyEditDistance { get { throw null; } set { } } + public string Text { get { throw null; } set { } } + } + public partial class CustomEntityLookupSkill : Azure.Search.Documents.Indexes.Models.SearchIndexerSkill + { + public CustomEntityLookupSkill(System.Collections.Generic.IEnumerable inputs, System.Collections.Generic.IEnumerable outputs) { } + public Azure.Search.Documents.Indexes.Models.CustomEntityLookupSkillLanguage? DefaultLanguageCode { get { throw null; } set { } } + public string EntitiesDefinitionUri { get { throw null; } set { } } + public bool? GlobalDefaultAccentSensitive { get { throw null; } set { } } + public bool? GlobalDefaultCaseSensitive { get { throw null; } set { } } + public int? GlobalDefaultFuzzyEditDistance { get { throw null; } set { } } + public System.Collections.Generic.IList InlineEntitiesDefinition { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct CustomEntityLookupSkillLanguage : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public CustomEntityLookupSkillLanguage(string value) { throw null; } + public static Azure.Search.Documents.Indexes.Models.CustomEntityLookupSkillLanguage Da { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.CustomEntityLookupSkillLanguage De { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.CustomEntityLookupSkillLanguage En { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.CustomEntityLookupSkillLanguage Es { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.CustomEntityLookupSkillLanguage Fi { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.CustomEntityLookupSkillLanguage Fr { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.CustomEntityLookupSkillLanguage It { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.CustomEntityLookupSkillLanguage Ko { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.CustomEntityLookupSkillLanguage Pt { get { throw null; } } + public bool Equals(Azure.Search.Documents.Indexes.Models.CustomEntityLookupSkillLanguage other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.Search.Documents.Indexes.Models.CustomEntityLookupSkillLanguage left, Azure.Search.Documents.Indexes.Models.CustomEntityLookupSkillLanguage right) { throw null; } + public static implicit operator Azure.Search.Documents.Indexes.Models.CustomEntityLookupSkillLanguage (string value) { throw null; } + public static bool operator !=(Azure.Search.Documents.Indexes.Models.CustomEntityLookupSkillLanguage left, Azure.Search.Documents.Indexes.Models.CustomEntityLookupSkillLanguage right) { throw null; } + public override string ToString() { throw null; } + } public partial class DataChangeDetectionPolicy { internal DataChangeDetectionPolicy() { } @@ -492,6 +551,13 @@ public DistanceScoringParameters(string referencePointParameter, double boosting public double BoostingDistance { get { throw null; } set { } } public string ReferencePointParameter { get { throw null; } set { } } } + public partial class DocumentExtractionSkill : Azure.Search.Documents.Indexes.Models.SearchIndexerSkill + { + public DocumentExtractionSkill(System.Collections.Generic.IEnumerable inputs, System.Collections.Generic.IEnumerable outputs) { } + public System.Collections.Generic.IDictionary Configuration { get { throw null; } set { } } + public string DataToExtract { get { throw null; } set { } } + public string ParsingMode { get { throw null; } set { } } + } public partial class EdgeNGramTokenFilter : Azure.Search.Documents.Indexes.Models.TokenFilter { public EdgeNGramTokenFilter(string name) { } @@ -1523,6 +1589,7 @@ public SearchIndexerDataSourceConnection(string name, Azure.Search.Documents.Ind private readonly object _dummy; private readonly int _dummyPrimitive; public SearchIndexerDataSourceType(string value) { throw null; } + public static Azure.Search.Documents.Indexes.Models.SearchIndexerDataSourceType AdlsGen2 { get { throw null; } } public static Azure.Search.Documents.Indexes.Models.SearchIndexerDataSourceType AzureBlob { get { throw null; } } public static Azure.Search.Documents.Indexes.Models.SearchIndexerDataSourceType AzureSql { get { throw null; } } public static Azure.Search.Documents.Indexes.Models.SearchIndexerDataSourceType AzureTable { get { throw null; } }