diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningSkill.Serialization.cs
new file mode 100644
index 000000000000..dd4167ed10fe
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningSkill.Serialization.cs
@@ -0,0 +1,246 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Search.Documents.Indexes.Models
+{
+ public partial class AzureMachineLearningSkill : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Optional.IsDefined(ScoringUri))
+ {
+ if (ScoringUri != null)
+ {
+ writer.WritePropertyName("uri");
+ writer.WriteStringValue(ScoringUri);
+ }
+ else
+ {
+ writer.WriteNull("uri");
+ }
+ }
+ if (Optional.IsDefined(AuthenticationKey))
+ {
+ if (AuthenticationKey != null)
+ {
+ writer.WritePropertyName("key");
+ writer.WriteStringValue(AuthenticationKey);
+ }
+ else
+ {
+ writer.WriteNull("key");
+ }
+ }
+ if (Optional.IsDefined(ResourceId))
+ {
+ if (ResourceId != null)
+ {
+ writer.WritePropertyName("resourceId");
+ writer.WriteStringValue(ResourceId);
+ }
+ else
+ {
+ writer.WriteNull("resourceId");
+ }
+ }
+ if (Optional.IsDefined(Timeout))
+ {
+ if (Timeout != null)
+ {
+ writer.WritePropertyName("timeout");
+ writer.WriteStringValue(Timeout.Value, "P");
+ }
+ else
+ {
+ writer.WriteNull("timeout");
+ }
+ }
+ if (Optional.IsDefined(Region))
+ {
+ if (Region != null)
+ {
+ writer.WritePropertyName("region");
+ writer.WriteStringValue(Region);
+ }
+ else
+ {
+ writer.WriteNull("region");
+ }
+ }
+ if (Optional.IsDefined(DegreeOfParallelism))
+ {
+ if (DegreeOfParallelism != null)
+ {
+ writer.WritePropertyName("degreeOfParallelism");
+ writer.WriteNumberValue(DegreeOfParallelism.Value);
+ }
+ else
+ {
+ writer.WriteNull("degreeOfParallelism");
+ }
+ }
+ 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 AzureMachineLearningSkill DeserializeAzureMachineLearningSkill(JsonElement element)
+ {
+ Optional uri = default;
+ Optional key = default;
+ Optional resourceId = default;
+ Optional timeout = default;
+ Optional region = default;
+ Optional degreeOfParallelism = 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("uri"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ uri = null;
+ continue;
+ }
+ uri = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("key"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ key = null;
+ continue;
+ }
+ key = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("resourceId"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ resourceId = null;
+ continue;
+ }
+ resourceId = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("timeout"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ timeout = null;
+ continue;
+ }
+ timeout = property.Value.GetTimeSpan("P");
+ continue;
+ }
+ if (property.NameEquals("region"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ region = null;
+ continue;
+ }
+ region = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("degreeOfParallelism"))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ degreeOfParallelism = null;
+ continue;
+ }
+ degreeOfParallelism = 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 AzureMachineLearningSkill(odataType, name.Value, description.Value, context.Value, inputs, outputs, uri.Value, key.Value, resourceId.Value, Optional.ToNullable(timeout), region.Value, Optional.ToNullable(degreeOfParallelism));
+ }
+ }
+}
diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningSkill.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningSkill.cs
new file mode 100644
index 000000000000..0cced41d6a47
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningSkill.cs
@@ -0,0 +1,71 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+
+namespace Azure.Search.Documents.Indexes.Models
+{
+ /// The AML skill allows you to extend AI enrichment with a custom Azure Machine Learning (AML) model. Once an AML model is trained and deployed, an AML skill integrates it into AI enrichment.
+ public partial class AzureMachineLearningSkill : SearchIndexerSkill
+ {
+ /// Initializes a new instance of AzureMachineLearningSkill.
+ /// 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 AzureMachineLearningSkill(IEnumerable inputs, IEnumerable outputs) : base(inputs, outputs)
+ {
+ if (inputs == null)
+ {
+ throw new ArgumentNullException(nameof(inputs));
+ }
+ if (outputs == null)
+ {
+ throw new ArgumentNullException(nameof(outputs));
+ }
+
+ ODataType = "#Microsoft.Skills.Custom.AmlSkill";
+ }
+
+ /// Initializes a new instance of AzureMachineLearningSkill.
+ /// 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.
+ /// (Required for no authentication or key authentication) The scoring URI of the AML service to which the JSON payload will be sent. Only the https URI scheme is allowed.
+ /// (Required for key authentication) The key for the AML service.
+ /// (Required for token authentication). The Azure Resource Manager resource ID of the AML service. It should be in the format subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.MachineLearningServices/workspaces/{workspace-name}/services/{service_name}.
+ /// (Optional) When specified, indicates the timeout for the http client making the API call.
+ /// (Optional for token authentication). The region the AML service is deployed in.
+ /// (Optional) When specified, indicates the number of calls the indexer will make in parallel to the endpoint you have provided. You can decrease this value if your endpoint is failing under too high of a request load, or raise it if your endpoint is able to accept more requests and you would like an increase in the performance of the indexer. If not set, a default value of 5 is used. The degreeOfParallelism can be set to a maximum of 10 and a minimum of 1.
+ internal AzureMachineLearningSkill(string oDataType, string name, string description, string context, IList inputs, IList outputs, string scoringUri, string authenticationKey, string resourceId, TimeSpan? timeout, string region, int? degreeOfParallelism) : base(oDataType, name, description, context, inputs, outputs)
+ {
+ ScoringUri = scoringUri;
+ AuthenticationKey = authenticationKey;
+ ResourceId = resourceId;
+ Timeout = timeout;
+ Region = region;
+ DegreeOfParallelism = degreeOfParallelism;
+ ODataType = oDataType ?? "#Microsoft.Skills.Custom.AmlSkill";
+ }
+
+ /// (Required for no authentication or key authentication) The scoring URI of the AML service to which the JSON payload will be sent. Only the https URI scheme is allowed.
+ public string ScoringUri { get; set; }
+ /// (Required for key authentication) The key for the AML service.
+ public string AuthenticationKey { get; set; }
+ /// (Required for token authentication). The Azure Resource Manager resource ID of the AML service. It should be in the format subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.MachineLearningServices/workspaces/{workspace-name}/services/{service_name}.
+ public string ResourceId { get; set; }
+ /// (Optional) When specified, indicates the timeout for the http client making the API call.
+ public TimeSpan? Timeout { get; set; }
+ /// (Optional for token authentication). The region the AML service is deployed in.
+ public string Region { get; set; }
+ /// (Optional) When specified, indicates the number of calls the indexer will make in parallel to the endpoint you have provided. You can decrease this value if your endpoint is failing under too high of a request load, or raise it if your endpoint is able to accept more requests and you would like an increase in the performance of the indexer. If not set, a default value of 5 is used. The degreeOfParallelism can be set to a maximum of 10 and a minimum of 1.
+ public int? DegreeOfParallelism { get; set; }
+ }
+}
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 fae406abbdea..62a8887f796c 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
@@ -56,6 +56,7 @@ internal static SearchIndexerSkill DeserializeSearchIndexerSkill(JsonElement ele
{
switch (discriminator.GetString())
{
+ case "#Microsoft.Skills.Custom.AmlSkill": return AzureMachineLearningSkill.DeserializeAzureMachineLearningSkill(element);
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);
diff --git a/sdk/search/Azure.Search.Documents/src/autorest.md b/sdk/search/Azure.Search.Documents/src/autorest.md
index 706a90ec6a5a..f8f388b70bdc 100644
--- a/sdk/search/Azure.Search.Documents/src/autorest.md
+++ b/sdk/search/Azure.Search.Documents/src/autorest.md
@@ -12,7 +12,7 @@ See the [Contributing guidelines](https://github.com/Azure/azure-sdk-for-net/blo
title: SearchServiceClient
input-file:
- https://github.com/Azure/azure-rest-api-specs/blob/b8d48bca1298614fdf7734c26e21a88adf5375d9/specification/search/data-plane/Azure.Search/preview/2021-04-30-Preview/searchindex.json
- - https://github.com/Azure/azure-rest-api-specs/blob/b8d48bca1298614fdf7734c26e21a88adf5375d9/specification/search/data-plane/Azure.Search/preview/2021-04-30-Preview/searchservice.json
+ - https://github.com/Azure/azure-rest-api-specs/blob/bdc7dd557e7bf6f70ea57cd004257d9f076918f5/specification/search/data-plane/Azure.Search/preview/2021-04-30-Preview/searchservice.json
modelerfour:
seal-single-value-enum-by-default: true
```