diff --git a/sdk/search/Azure.Search.Documents.Indexes/Azure.Search.Documents.Indexes.sln b/sdk/search/Azure.Search.Documents.Indexes/Azure.Search.Documents.Indexes.sln
new file mode 100644
index 000000000000..c6e4d8616b88
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/Azure.Search.Documents.Indexes.sln
@@ -0,0 +1,56 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29709.97
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core.TestFramework", "..\..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{ECC730C1-4AEA-420C-916A-66B19B79E4DC}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Search.Documents.Indexes", "src\Azure.Search.Documents.Indexes.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Search.Documents.Indexes.Tests", "tests\Azure.Search.Documents.Indexes.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU
+ {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU
+ {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE}
+ EndGlobalSection
+EndGlobal
diff --git a/sdk/search/Azure.Search.Documents.Indexes/CHANGELOG.md b/sdk/search/Azure.Search.Documents.Indexes/CHANGELOG.md
new file mode 100644
index 000000000000..8b33f0fedccc
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/CHANGELOG.md
@@ -0,0 +1,11 @@
+# Release History
+
+## 1.0.0-beta.1 (Unreleased)
+
+### Features Added
+
+### Breaking Changes
+
+### Bugs Fixed
+
+### Other Changes
\ No newline at end of file
diff --git a/sdk/search/Azure.Search.Documents.Indexes/Directory.Build.props b/sdk/search/Azure.Search.Documents.Indexes/Directory.Build.props
new file mode 100644
index 000000000000..63bd836ad44b
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/Directory.Build.props
@@ -0,0 +1,6 @@
+
+
+
+
diff --git a/sdk/search/Azure.Search.Documents.Indexes/README.md b/sdk/search/Azure.Search.Documents.Indexes/README.md
new file mode 100644
index 000000000000..3f49cbf0a8d0
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/README.md
@@ -0,0 +1,107 @@
+# Azure.Search.Documents.Indexes client library for .NET
+
+Azure.Search.Documents.Indexes is a managed service that helps developers get secret simply and securely.
+
+Use the client library for to:
+
+* [Get secret](https://docs.microsoft.com/azure)
+
+[Source code][source_root] | [Package (NuGet)][package] | [API reference documentation][reference_docs] | [Product documentation][azconfig_docs] | [Samples][source_samples]
+
+ [Source code](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/search/Azure.Search.Documents.Indexes/src) | [Package (NuGet)](https://www.nuget.org/packages) | [API reference documentation](https://azure.github.io/azure-sdk-for-net) | [Product documentation](https://docs.microsoft.com/azure)
+
+## Getting started
+
+This section should include everything a developer needs to do to install and create their first client connection *very quickly*.
+
+### Install the package
+
+First, provide instruction for obtaining and installing the package or library. This section might include only a single line of code, like `dotnet add package package-name`, but should enable a developer to successfully install the package from NuGet, npm, or even cloning a GitHub repository.
+
+Install the client library for .NET with [NuGet](https://www.nuget.org/ ):
+
+```dotnetcli
+dotnet add package Azure.Search.Documents.Indexes --prerelease
+```
+
+### Prerequisites
+
+Include a section after the install command that details any requirements that must be satisfied before a developer can [authenticate](#authenticate-the-client) and test all of the snippets in the [Examples](#examples) section. For example, for Cosmos DB:
+
+> You must have an [Azure subscription](https://azure.microsoft.com/free/dotnet/) and [Cosmos DB account](https://docs.microsoft.com/azure/cosmos-db/account-overview) (SQL API). In order to take advantage of the C# 8.0 syntax, it is recommended that you compile using the [.NET Core SDK](https://dotnet.microsoft.com/download) 3.0 or higher with a [language version](https://docs.microsoft.com/dotnet/csharp/language-reference/configure-language-version#override-a-default) of `latest`. It is also possible to compile with the .NET Core SDK 2.1.x using a language version of `preview`.
+
+### Authenticate the client
+
+If your library requires authentication for use, such as for Azure services, include instructions and example code needed for initializing and authenticating.
+
+For example, include details on obtaining an account key and endpoint URI, setting environment variables for each, and initializing the client object.
+
+### Service API versions
+
+The client library targets the latest service API version by default. A client instance accepts an optional service API version parameter from its options to specify which API version service to communicate.
+
+#### Select a service API version
+
+You have the flexibility to explicitly select a supported service API version when instantiating a client by configuring its associated options. This ensures that the client can communicate with services using the specified API version.
+
+For example,
+
+```C# Snippet:CreateClientForSpecificApiVersion
+Uri endpoint = new Uri("");
+DefaultAzureCredential credential = new DefaultAzureCredential();
+ClientOptions options = new ClientOptions(ClientOptions.ServiceVersion.)
+var client = new Client(endpoint, credential, options);
+```
+
+When selecting an API version, it's important to verify that there are no breaking changes compared to the latest API version. If there are significant differences, API calls may fail due to incompatibility.
+
+Always ensure that the chosen API version is fully supported and operational for your specific use case and that it aligns with the service's versioning policy.
+
+## Key concepts
+
+The *Key concepts* section should describe the functionality of the main classes. Point out the most important and useful classes in the package (with links to their reference pages) and explain how those classes work together. Feel free to use bulleted lists, tables, code blocks, or even diagrams for clarity.
+
+Include the *Thread safety* and *Additional concepts* sections below at the end of your *Key concepts* section. You may remove or add links depending on what your library makes use of:
+
+### Thread safety
+
+We guarantee that all client instance methods are thread-safe and independent of each other ([guideline](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-service-methods-thread-safety)). This ensures that the recommendation of reusing client instances is always safe, even across threads.
+
+### Additional concepts
+
+[Client options](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#configuring-service-clients-using-clientoptions) |
+[Accessing the response](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#accessing-http-response-details-using-responset) |
+[Long-running operations](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#consuming-long-running-operations-using-operationt) |
+[Handling failures](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#reporting-errors-requestfailedexception) |
+[Diagnostics](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/Diagnostics.md) |
+[Mocking](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#mocking) |
+[Client lifetime](https://devblogs.microsoft.com/azure-sdk/lifetime-management-and-thread-safety-guarantees-of-azure-sdk-net-clients/)
+
+
+## Examples
+
+You can familiarize yourself with different APIs using [Samples](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/search/Azure.Search.Documents.Indexes/samples).
+
+## Troubleshooting
+
+Describe common errors and exceptions, how to "unpack" them if necessary, and include guidance for graceful handling and recovery.
+
+Provide information to help developers avoid throttling or other service-enforced errors they might encounter. For example, provide guidance and examples for using retry or connection policies in the API.
+
+If the package or a related package supports it, include tips for logging or enabling instrumentation to help them debug their code.
+
+## Next steps
+
+* Provide a link to additional code examples, ideally to those sitting alongside the README in the package's `/samples` directory.
+* If appropriate, point users to other packages that might be useful.
+* If you think there's a good chance that developers might stumble across your package in error (because they're searching for specific functionality and mistakenly think the package provides that functionality), point them to the packages they might be looking for.
+
+## Contributing
+
+This is a template, but your SDK readme should include details on how to contribute code to the repo/package.
+
+
+[style-guide-msft]: https://docs.microsoft.com/style-guide/capitalization
+[style-guide-cloud]: https://aka.ms/azsdk/cloud-style-guide
+
+
\ No newline at end of file
diff --git a/sdk/search/Azure.Search.Documents.Indexes/src/Azure.Search.Documents.Indexes.csproj b/sdk/search/Azure.Search.Documents.Indexes/src/Azure.Search.Documents.Indexes.csproj
new file mode 100644
index 000000000000..7f6a7e205dc5
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Azure.Search.Documents.Indexes.csproj
@@ -0,0 +1,20 @@
+
+
+ This is the Azure.Search.Documents.Indexes client library for developing .NET applications with rich experience.
+ Azure SDK Code Generation Azure.Search.Documents.Indexes for Azure Data Plane
+ 1.0.0-beta.1
+ Azure.Search.Documents.Indexes
+ $(RequiredTargetFrameworks)
+ true
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AIFoundryModelCatalogName.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AIFoundryModelCatalogName.cs
new file mode 100644
index 000000000000..36b4265b67b3
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AIFoundryModelCatalogName.cs
@@ -0,0 +1,66 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.Search.Documents.Indexes
+{
+ ///
+ /// The name of the embedding model from the Azure AI Foundry Catalog that will be
+ /// called.
+ ///
+ public readonly partial struct AIFoundryModelCatalogName : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public AIFoundryModelCatalogName(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string OpenAICLIPImageTextEmbeddingsVitBasePatch32Value = "OpenAI-CLIP-Image-Text-Embeddings-vit-base-patch32";
+ private const string OpenAICLIPImageTextEmbeddingsViTLargePatch14336Value = "OpenAI-CLIP-Image-Text-Embeddings-ViT-Large-Patch14-336";
+ private const string FacebookDinoV2ImageEmbeddingsViTBaseValue = "Facebook-DinoV2-Image-Embeddings-ViT-Base";
+ private const string FacebookDinoV2ImageEmbeddingsViTGiantValue = "Facebook-DinoV2-Image-Embeddings-ViT-Giant";
+ private const string CohereEmbedV3EnglishValue = "Cohere-embed-v3-english";
+ private const string CohereEmbedV3MultilingualValue = "Cohere-embed-v3-multilingual";
+
+ /// OpenAI-CLIP-Image-Text-Embeddings-vit-base-patch32.
+ public static AIFoundryModelCatalogName OpenAICLIPImageTextEmbeddingsVitBasePatch32 { get; } = new AIFoundryModelCatalogName(OpenAICLIPImageTextEmbeddingsVitBasePatch32Value);
+ /// OpenAI-CLIP-Image-Text-Embeddings-ViT-Large-Patch14-336.
+ public static AIFoundryModelCatalogName OpenAICLIPImageTextEmbeddingsViTLargePatch14336 { get; } = new AIFoundryModelCatalogName(OpenAICLIPImageTextEmbeddingsViTLargePatch14336Value);
+ /// Facebook-DinoV2-Image-Embeddings-ViT-Base.
+ public static AIFoundryModelCatalogName FacebookDinoV2ImageEmbeddingsViTBase { get; } = new AIFoundryModelCatalogName(FacebookDinoV2ImageEmbeddingsViTBaseValue);
+ /// Facebook-DinoV2-Image-Embeddings-ViT-Giant.
+ public static AIFoundryModelCatalogName FacebookDinoV2ImageEmbeddingsViTGiant { get; } = new AIFoundryModelCatalogName(FacebookDinoV2ImageEmbeddingsViTGiantValue);
+ /// Cohere-embed-v3-english.
+ public static AIFoundryModelCatalogName CohereEmbedV3English { get; } = new AIFoundryModelCatalogName(CohereEmbedV3EnglishValue);
+ /// Cohere-embed-v3-multilingual.
+ public static AIFoundryModelCatalogName CohereEmbedV3Multilingual { get; } = new AIFoundryModelCatalogName(CohereEmbedV3MultilingualValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(AIFoundryModelCatalogName left, AIFoundryModelCatalogName right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(AIFoundryModelCatalogName left, AIFoundryModelCatalogName right) => !left.Equals(right);
+ /// Converts a to a .
+ public static implicit operator AIFoundryModelCatalogName(string value) => new AIFoundryModelCatalogName(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is AIFoundryModelCatalogName other && Equals(other);
+ ///
+ public bool Equals(AIFoundryModelCatalogName other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0;
+ ///
+ public override string ToString() => _value;
+ }
+}
diff --git a/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AIServicesAccountIdentity.Serialization.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AIServicesAccountIdentity.Serialization.cs
new file mode 100644
index 000000000000..abee52322831
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AIServicesAccountIdentity.Serialization.cs
@@ -0,0 +1,155 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Search.Documents.Indexes
+{
+ public partial class AIServicesAccountIdentity : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AIServicesAccountIdentity)} does not support writing '{format}' format.");
+ }
+
+ base.JsonModelWriteCore(writer, options);
+ if (Optional.IsDefined(Identity))
+ {
+ writer.WritePropertyName("identity"u8);
+ writer.WriteObjectValue(Identity, options);
+ }
+ writer.WritePropertyName("subdomainUrl"u8);
+ writer.WriteStringValue(SubdomainUrl);
+ }
+
+ AIServicesAccountIdentity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AIServicesAccountIdentity)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeAIServicesAccountIdentity(document.RootElement, options);
+ }
+
+ internal static AIServicesAccountIdentity DeserializeAIServicesAccountIdentity(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ SearchIndexerDataIdentity identity = default;
+ string subdomainUrl = default;
+ string odataType = default;
+ string description = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("identity"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ identity = SearchIndexerDataIdentity.DeserializeSearchIndexerDataIdentity(property.Value, options);
+ continue;
+ }
+ if (property.NameEquals("subdomainUrl"u8))
+ {
+ subdomainUrl = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("@odata.type"u8))
+ {
+ odataType = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("description"u8))
+ {
+ description = property.Value.GetString();
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new AIServicesAccountIdentity(odataType, description, serializedAdditionalRawData, identity, subdomainUrl);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(AIServicesAccountIdentity)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ AIServicesAccountIdentity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeAIServicesAccountIdentity(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(AIServicesAccountIdentity)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+
+ /// Deserializes the model from a raw response.
+ /// The response to deserialize the model from.
+ internal static new AIServicesAccountIdentity FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeAIServicesAccountIdentity(document.RootElement);
+ }
+
+ /// Convert into a .
+ internal override RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
+ return content;
+ }
+ }
+}
diff --git a/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AIServicesAccountIdentity.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AIServicesAccountIdentity.cs
new file mode 100644
index 000000000000..c38ca1eecb20
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AIServicesAccountIdentity.cs
@@ -0,0 +1,66 @@
+// 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
+{
+ ///
+ /// The multi-region account of an Azure AI service resource that's attached to a
+ /// skillset.
+ ///
+ public partial class AIServicesAccountIdentity : CognitiveServicesAccount
+ {
+ /// Initializes a new instance of .
+ /// The subdomain url for the corresponding AI Service.
+ /// is null.
+ public AIServicesAccountIdentity(string subdomainUrl)
+ {
+ Argument.AssertNotNull(subdomainUrl, nameof(subdomainUrl));
+
+ OdataType = "#Microsoft.Azure.Search.AIServicesByIdentity";
+ SubdomainUrl = subdomainUrl;
+ }
+
+ /// Initializes a new instance of .
+ /// The discriminator for derived types.
+ /// Description of the Azure AI service resource attached to a skillset.
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// The user-assigned managed identity used for connections to AI Service. If not
+ /// specified, the system-assigned managed identity is used. On updates to the
+ /// skillset, if the identity is unspecified, the value remains unchanged. If set
+ /// to "none", the value of this property is cleared.
+ /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
+ /// The available derived classes include and .
+ ///
+ /// The subdomain url for the corresponding AI Service.
+ internal AIServicesAccountIdentity(string odataType, string description, IDictionary serializedAdditionalRawData, SearchIndexerDataIdentity identity, string subdomainUrl) : base(odataType, description, serializedAdditionalRawData)
+ {
+ Identity = identity;
+ SubdomainUrl = subdomainUrl;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal AIServicesAccountIdentity()
+ {
+ }
+
+ ///
+ /// The user-assigned managed identity used for connections to AI Service. If not
+ /// specified, the system-assigned managed identity is used. On updates to the
+ /// skillset, if the identity is unspecified, the value remains unchanged. If set
+ /// to "none", the value of this property is cleared.
+ /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
+ /// The available derived classes include and .
+ ///
+ public SearchIndexerDataIdentity Identity { get; set; }
+ /// The subdomain url for the corresponding AI Service.
+ public string SubdomainUrl { get; set; }
+ }
+}
diff --git a/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AIServicesAccountKey.Serialization.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AIServicesAccountKey.Serialization.cs
new file mode 100644
index 000000000000..3351198056a7
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AIServicesAccountKey.Serialization.cs
@@ -0,0 +1,148 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Search.Documents.Indexes
+{
+ public partial class AIServicesAccountKey : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AIServicesAccountKey)} does not support writing '{format}' format.");
+ }
+
+ base.JsonModelWriteCore(writer, options);
+ writer.WritePropertyName("key"u8);
+ writer.WriteStringValue(Key);
+ writer.WritePropertyName("subdomainUrl"u8);
+ writer.WriteStringValue(SubdomainUrl);
+ }
+
+ AIServicesAccountKey IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AIServicesAccountKey)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeAIServicesAccountKey(document.RootElement, options);
+ }
+
+ internal static AIServicesAccountKey DeserializeAIServicesAccountKey(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ string key = default;
+ string subdomainUrl = default;
+ string odataType = default;
+ string description = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("key"u8))
+ {
+ key = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("subdomainUrl"u8))
+ {
+ subdomainUrl = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("@odata.type"u8))
+ {
+ odataType = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("description"u8))
+ {
+ description = property.Value.GetString();
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new AIServicesAccountKey(odataType, description, serializedAdditionalRawData, key, subdomainUrl);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(AIServicesAccountKey)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ AIServicesAccountKey IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeAIServicesAccountKey(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(AIServicesAccountKey)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+
+ /// Deserializes the model from a raw response.
+ /// The response to deserialize the model from.
+ internal static new AIServicesAccountKey FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeAIServicesAccountKey(document.RootElement);
+ }
+
+ /// Convert into a .
+ internal override RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
+ return content;
+ }
+ }
+}
diff --git a/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AIServicesAccountKey.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AIServicesAccountKey.cs
new file mode 100644
index 000000000000..3082412e9e17
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AIServicesAccountKey.cs
@@ -0,0 +1,55 @@
+// 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
+{
+ ///
+ /// The account key of an Azure AI service resource that's attached to a skillset,
+ /// to be used with the resource's subdomain.
+ ///
+ public partial class AIServicesAccountKey : CognitiveServicesAccount
+ {
+ /// Initializes a new instance of .
+ /// The key used to provision the Azure AI service resource attached to a skillset.
+ /// The subdomain url for the corresponding AI Service.
+ /// or is null.
+ public AIServicesAccountKey(string key, string subdomainUrl)
+ {
+ Argument.AssertNotNull(key, nameof(key));
+ Argument.AssertNotNull(subdomainUrl, nameof(subdomainUrl));
+
+ OdataType = "#Microsoft.Azure.Search.AIServicesByKey";
+ Key = key;
+ SubdomainUrl = subdomainUrl;
+ }
+
+ /// Initializes a new instance of .
+ /// The discriminator for derived types.
+ /// Description of the Azure AI service resource attached to a skillset.
+ /// Keeps track of any properties unknown to the library.
+ /// The key used to provision the Azure AI service resource attached to a skillset.
+ /// The subdomain url for the corresponding AI Service.
+ internal AIServicesAccountKey(string odataType, string description, IDictionary serializedAdditionalRawData, string key, string subdomainUrl) : base(odataType, description, serializedAdditionalRawData)
+ {
+ Key = key;
+ SubdomainUrl = subdomainUrl;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal AIServicesAccountKey()
+ {
+ }
+
+ /// The key used to provision the Azure AI service resource attached to a skillset.
+ public string Key { get; set; }
+ /// The subdomain url for the corresponding AI Service.
+ public string SubdomainUrl { get; set; }
+ }
+}
diff --git a/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AIServicesVisionParameters.Serialization.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AIServicesVisionParameters.Serialization.cs
new file mode 100644
index 000000000000..b8d189dc68b6
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AIServicesVisionParameters.Serialization.cs
@@ -0,0 +1,176 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Search.Documents.Indexes
+{
+ public partial class AIServicesVisionParameters : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AIServicesVisionParameters)} does not support writing '{format}' format.");
+ }
+
+ writer.WritePropertyName("modelVersion"u8);
+ writer.WriteStringValue(ModelVersion);
+ writer.WritePropertyName("resourceUri"u8);
+ writer.WriteStringValue(ResourceUri.AbsoluteUri);
+ if (Optional.IsDefined(ApiKey))
+ {
+ writer.WritePropertyName("apiKey"u8);
+ writer.WriteStringValue(ApiKey);
+ }
+ if (Optional.IsDefined(AuthIdentity))
+ {
+ writer.WritePropertyName("authIdentity"u8);
+ writer.WriteObjectValue(AuthIdentity, options);
+ }
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ }
+
+ AIServicesVisionParameters IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AIServicesVisionParameters)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeAIServicesVisionParameters(document.RootElement, options);
+ }
+
+ internal static AIServicesVisionParameters DeserializeAIServicesVisionParameters(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ string modelVersion = default;
+ Uri resourceUri = default;
+ string apiKey = default;
+ SearchIndexerDataIdentity authIdentity = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("modelVersion"u8))
+ {
+ modelVersion = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("resourceUri"u8))
+ {
+ resourceUri = new Uri(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("apiKey"u8))
+ {
+ apiKey = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("authIdentity"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ authIdentity = SearchIndexerDataIdentity.DeserializeSearchIndexerDataIdentity(property.Value, options);
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new AIServicesVisionParameters(modelVersion, resourceUri, apiKey, authIdentity, serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(AIServicesVisionParameters)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ AIServicesVisionParameters IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeAIServicesVisionParameters(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(AIServicesVisionParameters)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+
+ /// Deserializes the model from a raw response.
+ /// The response to deserialize the model from.
+ internal static AIServicesVisionParameters FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeAIServicesVisionParameters(document.RootElement);
+ }
+
+ /// Convert into a .
+ internal virtual RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
+ return content;
+ }
+ }
+}
diff --git a/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AIServicesVisionParameters.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AIServicesVisionParameters.cs
new file mode 100644
index 000000000000..6b9c4aef999a
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AIServicesVisionParameters.cs
@@ -0,0 +1,118 @@
+// 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
+{
+ ///
+ /// Specifies the AI Services Vision parameters for vectorizing a query image or
+ /// text.
+ ///
+ public partial class AIServicesVisionParameters
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ ///
+ /// The version of the model to use when calling the AI Services Vision service. It
+ /// will default to the latest available when not specified.
+ ///
+ /// The resource URI of the AI Services resource.
+ /// or is null.
+ public AIServicesVisionParameters(string modelVersion, Uri resourceUri)
+ {
+ Argument.AssertNotNull(modelVersion, nameof(modelVersion));
+ Argument.AssertNotNull(resourceUri, nameof(resourceUri));
+
+ ModelVersion = modelVersion;
+ ResourceUri = resourceUri;
+ }
+
+ /// Initializes a new instance of .
+ ///
+ /// The version of the model to use when calling the AI Services Vision service. It
+ /// will default to the latest available when not specified.
+ ///
+ /// The resource URI of the AI Services resource.
+ /// API key of the designated AI Services resource.
+ ///
+ /// The user-assigned managed identity used for outbound connections. If an
+ /// authResourceId is provided and it's not specified, the system-assigned managed
+ /// identity is used. On updates to the index, if the identity is unspecified, the
+ /// value remains unchanged. If set to "none", the value of this property is
+ /// cleared.
+ /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
+ /// The available derived classes include and .
+ ///
+ /// Keeps track of any properties unknown to the library.
+ internal AIServicesVisionParameters(string modelVersion, Uri resourceUri, string apiKey, SearchIndexerDataIdentity authIdentity, IDictionary serializedAdditionalRawData)
+ {
+ ModelVersion = modelVersion;
+ ResourceUri = resourceUri;
+ ApiKey = apiKey;
+ AuthIdentity = authIdentity;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal AIServicesVisionParameters()
+ {
+ }
+
+ ///
+ /// The version of the model to use when calling the AI Services Vision service. It
+ /// will default to the latest available when not specified.
+ ///
+ public string ModelVersion { get; set; }
+ /// The resource URI of the AI Services resource.
+ public Uri ResourceUri { get; set; }
+ /// API key of the designated AI Services resource.
+ public string ApiKey { get; set; }
+ ///
+ /// The user-assigned managed identity used for outbound connections. If an
+ /// authResourceId is provided and it's not specified, the system-assigned managed
+ /// identity is used. On updates to the index, if the identity is unspecified, the
+ /// value remains unchanged. If set to "none", the value of this property is
+ /// cleared.
+ /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
+ /// The available derived classes include and .
+ ///
+ public SearchIndexerDataIdentity AuthIdentity { get; set; }
+ }
+}
diff --git a/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AIServicesVisionVectorizer.Serialization.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AIServicesVisionVectorizer.Serialization.cs
new file mode 100644
index 000000000000..4ff27f503702
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AIServicesVisionVectorizer.Serialization.cs
@@ -0,0 +1,147 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Search.Documents.Indexes
+{
+ public partial class AIServicesVisionVectorizer : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AIServicesVisionVectorizer)} does not support writing '{format}' format.");
+ }
+
+ base.JsonModelWriteCore(writer, options);
+ if (Optional.IsDefined(AIServicesVisionParameters))
+ {
+ writer.WritePropertyName("AIServicesVisionParameters"u8);
+ writer.WriteObjectValue(AIServicesVisionParameters, options);
+ }
+ }
+
+ AIServicesVisionVectorizer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AIServicesVisionVectorizer)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeAIServicesVisionVectorizer(document.RootElement, options);
+ }
+
+ internal static AIServicesVisionVectorizer DeserializeAIServicesVisionVectorizer(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ AIServicesVisionParameters aiServicesVisionParameters = default;
+ string name = default;
+ VectorSearchVectorizerKind kind = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("AIServicesVisionParameters"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ aiServicesVisionParameters = AIServicesVisionParameters.DeserializeAIServicesVisionParameters(property.Value, options);
+ continue;
+ }
+ if (property.NameEquals("name"u8))
+ {
+ name = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("kind"u8))
+ {
+ kind = new VectorSearchVectorizerKind(property.Value.GetString());
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new AIServicesVisionVectorizer(name, kind, serializedAdditionalRawData, aiServicesVisionParameters);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(AIServicesVisionVectorizer)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ AIServicesVisionVectorizer IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeAIServicesVisionVectorizer(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(AIServicesVisionVectorizer)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+
+ /// Deserializes the model from a raw response.
+ /// The response to deserialize the model from.
+ internal static new AIServicesVisionVectorizer FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeAIServicesVisionVectorizer(document.RootElement);
+ }
+
+ /// Convert into a .
+ internal override RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
+ return content;
+ }
+ }
+}
diff --git a/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AIServicesVisionVectorizer.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AIServicesVisionVectorizer.cs
new file mode 100644
index 000000000000..2b7037cfe19e
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AIServicesVisionVectorizer.cs
@@ -0,0 +1,44 @@
+// 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
+{
+ /// Clears the identity property of a datasource.
+ public partial class AIServicesVisionVectorizer : VectorSearchVectorizer
+ {
+ /// Initializes a new instance of .
+ /// The name to associate with this particular vectorization method.
+ /// is null.
+ public AIServicesVisionVectorizer(string name) : base(name)
+ {
+ Argument.AssertNotNull(name, nameof(name));
+
+ Kind = VectorSearchVectorizerKind.AIServicesVision;
+ }
+
+ /// Initializes a new instance of .
+ /// The name to associate with this particular vectorization method.
+ /// Type of VectorSearchVectorizer.
+ /// Keeps track of any properties unknown to the library.
+ /// Contains the parameters specific to AI Services Vision embedding vectorization.
+ internal AIServicesVisionVectorizer(string name, VectorSearchVectorizerKind kind, IDictionary serializedAdditionalRawData, AIServicesVisionParameters aiServicesVisionParameters) : base(name, kind, serializedAdditionalRawData)
+ {
+ AIServicesVisionParameters = aiServicesVisionParameters;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal AIServicesVisionVectorizer()
+ {
+ }
+
+ /// Contains the parameters specific to AI Services Vision embedding vectorization.
+ public AIServicesVisionParameters AIServicesVisionParameters { get; set; }
+ }
+}
diff --git a/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AMLParameters.Serialization.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AMLParameters.Serialization.cs
new file mode 100644
index 000000000000..699e5cbbab03
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AMLParameters.Serialization.cs
@@ -0,0 +1,212 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Search.Documents.Indexes
+{
+ public partial class AMLParameters : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AMLParameters)} does not support writing '{format}' format.");
+ }
+
+ writer.WritePropertyName("uri"u8);
+ writer.WriteStringValue(Uri.AbsoluteUri);
+ if (Optional.IsDefined(Key))
+ {
+ writer.WritePropertyName("key"u8);
+ writer.WriteStringValue(Key);
+ }
+ if (Optional.IsDefined(ResourceId))
+ {
+ writer.WritePropertyName("resourceId"u8);
+ writer.WriteStringValue(ResourceId);
+ }
+ if (Optional.IsDefined(Timeout))
+ {
+ writer.WritePropertyName("timeout"u8);
+ writer.WriteStringValue(Timeout.Value, "P");
+ }
+ if (Optional.IsDefined(Region))
+ {
+ writer.WritePropertyName("region"u8);
+ writer.WriteStringValue(Region);
+ }
+ if (Optional.IsDefined(ModelName))
+ {
+ writer.WritePropertyName("modelName"u8);
+ writer.WriteStringValue(ModelName.Value.ToString());
+ }
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ }
+
+ AMLParameters IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AMLParameters)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeAMLParameters(document.RootElement, options);
+ }
+
+ internal static AMLParameters DeserializeAMLParameters(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ Uri uri = default;
+ string key = default;
+ string resourceId = default;
+ TimeSpan? timeout = default;
+ string region = default;
+ AIFoundryModelCatalogName? modelName = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("uri"u8))
+ {
+ uri = new Uri(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("key"u8))
+ {
+ key = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("resourceId"u8))
+ {
+ resourceId = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("timeout"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ timeout = property.Value.GetTimeSpan("P");
+ continue;
+ }
+ if (property.NameEquals("region"u8))
+ {
+ region = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("modelName"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ modelName = new AIFoundryModelCatalogName(property.Value.GetString());
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new AMLParameters(
+ uri,
+ key,
+ resourceId,
+ timeout,
+ region,
+ modelName,
+ serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(AMLParameters)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ AMLParameters IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeAMLParameters(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(AMLParameters)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+
+ /// Deserializes the model from a raw response.
+ /// The response to deserialize the model from.
+ internal static AMLParameters FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeAMLParameters(document.RootElement);
+ }
+
+ /// Convert into a .
+ internal virtual RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
+ return content;
+ }
+ }
+}
diff --git a/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AMLParameters.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AMLParameters.cs
new file mode 100644
index 000000000000..e07746d1312b
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AMLParameters.cs
@@ -0,0 +1,127 @@
+// 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
+{
+ /// Specifies the properties for connecting to an AML vectorizer.
+ public partial class AMLParameters
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ ///
+ /// (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.
+ ///
+ /// is null.
+ public AMLParameters(Uri uri)
+ {
+ Argument.AssertNotNull(uri, nameof(uri));
+
+ Uri = uri;
+ }
+
+ /// Initializes a new instance of .
+ ///
+ /// (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.
+ ///
+ /// The name of the embedding model from the Azure AI Foundry Catalog that is
+ /// deployed at the provided endpoint.
+ ///
+ /// Keeps track of any properties unknown to the library.
+ internal AMLParameters(Uri uri, string key, string resourceId, TimeSpan? timeout, string region, AIFoundryModelCatalogName? modelName, IDictionary serializedAdditionalRawData)
+ {
+ Uri = uri;
+ Key = key;
+ ResourceId = resourceId;
+ Timeout = timeout;
+ Region = region;
+ ModelName = modelName;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal AMLParameters()
+ {
+ }
+
+ ///
+ /// (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 Uri Uri { get; set; }
+ /// (Required for key authentication) The key for the AML service.
+ public string Key { 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; }
+ ///
+ /// The name of the embedding model from the Azure AI Foundry Catalog that is
+ /// deployed at the provided endpoint.
+ ///
+ public AIFoundryModelCatalogName? ModelName { get; set; }
+ }
+}
diff --git a/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AMLVectorizer.Serialization.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AMLVectorizer.Serialization.cs
new file mode 100644
index 000000000000..75ebdad4b893
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AMLVectorizer.Serialization.cs
@@ -0,0 +1,147 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Search.Documents.Indexes
+{
+ public partial class AMLVectorizer : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AMLVectorizer)} does not support writing '{format}' format.");
+ }
+
+ base.JsonModelWriteCore(writer, options);
+ if (Optional.IsDefined(AmlParameters))
+ {
+ writer.WritePropertyName("amlParameters"u8);
+ writer.WriteObjectValue(AmlParameters, options);
+ }
+ }
+
+ AMLVectorizer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AMLVectorizer)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeAMLVectorizer(document.RootElement, options);
+ }
+
+ internal static AMLVectorizer DeserializeAMLVectorizer(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ AMLParameters amlParameters = default;
+ string name = default;
+ VectorSearchVectorizerKind kind = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("amlParameters"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ amlParameters = AMLParameters.DeserializeAMLParameters(property.Value, options);
+ continue;
+ }
+ if (property.NameEquals("name"u8))
+ {
+ name = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("kind"u8))
+ {
+ kind = new VectorSearchVectorizerKind(property.Value.GetString());
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new AMLVectorizer(name, kind, serializedAdditionalRawData, amlParameters);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(AMLVectorizer)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ AMLVectorizer IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeAMLVectorizer(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(AMLVectorizer)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+
+ /// Deserializes the model from a raw response.
+ /// The response to deserialize the model from.
+ internal static new AMLVectorizer FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeAMLVectorizer(document.RootElement);
+ }
+
+ /// Convert into a .
+ internal override RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
+ return content;
+ }
+ }
+}
diff --git a/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AMLVectorizer.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AMLVectorizer.cs
new file mode 100644
index 000000000000..30b9f6b4effb
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AMLVectorizer.cs
@@ -0,0 +1,47 @@
+// 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
+{
+ ///
+ /// Specifies an Azure Machine Learning endpoint deployed via the Azure AI Foundry
+ /// Model Catalog for generating the vector embedding of a query string.
+ ///
+ public partial class AMLVectorizer : VectorSearchVectorizer
+ {
+ /// Initializes a new instance of .
+ /// The name to associate with this particular vectorization method.
+ /// is null.
+ public AMLVectorizer(string name) : base(name)
+ {
+ Argument.AssertNotNull(name, nameof(name));
+
+ Kind = VectorSearchVectorizerKind.AML;
+ }
+
+ /// Initializes a new instance of .
+ /// The name to associate with this particular vectorization method.
+ /// Type of VectorSearchVectorizer.
+ /// Keeps track of any properties unknown to the library.
+ /// Specifies the properties of the AML vectorizer.
+ internal AMLVectorizer(string name, VectorSearchVectorizerKind kind, IDictionary serializedAdditionalRawData, AMLParameters amlParameters) : base(name, kind, serializedAdditionalRawData)
+ {
+ AmlParameters = amlParameters;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal AMLVectorizer()
+ {
+ }
+
+ /// Specifies the properties of the AML vectorizer.
+ public AMLParameters AmlParameters { get; set; }
+ }
+}
diff --git a/sdk/search/Azure.Search.Documents.Indexes/src/Generated/Aliases.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/Aliases.cs
new file mode 100644
index 000000000000..507eb6d2511c
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/Aliases.cs
@@ -0,0 +1,656 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using Autorest.CSharp.Core;
+using Azure.Core;
+using Azure.Core.Pipeline;
+
+namespace Azure.Search.Documents.Indexes
+{
+ // Data plane generated sub-client.
+ /// The Aliases sub-client.
+ public partial class Aliases
+ {
+ private const string AuthorizationHeader = "api-key";
+ private readonly AzureKeyCredential _keyCredential;
+ private static readonly string[] AuthorizationScopes = new string[] { "https://search.azure.com/.default" };
+ private readonly TokenCredential _tokenCredential;
+ private readonly HttpPipeline _pipeline;
+ private readonly Uri _endpoint;
+ private readonly string _apiVersion;
+
+ /// The ClientDiagnostics is used to provide tracing support for the client library.
+ internal ClientDiagnostics ClientDiagnostics { get; }
+
+ /// The HTTP pipeline for sending and receiving REST requests and responses.
+ public virtual HttpPipeline Pipeline => _pipeline;
+
+ /// Initializes a new instance of Aliases for mocking.
+ protected Aliases()
+ {
+ }
+
+ /// Initializes a new instance of Aliases.
+ /// The handler for diagnostic messaging in the client.
+ /// The HTTP pipeline for sending and receiving REST requests and responses.
+ /// The key credential to copy.
+ /// The token credential to copy.
+ /// Service host.
+ /// The API version to use for this operation.
+ internal Aliases(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, AzureKeyCredential keyCredential, TokenCredential tokenCredential, Uri endpoint, string apiVersion)
+ {
+ ClientDiagnostics = clientDiagnostics;
+ _pipeline = pipeline;
+ _keyCredential = keyCredential;
+ _tokenCredential = tokenCredential;
+ _endpoint = endpoint;
+ _apiVersion = apiVersion;
+ }
+
+ /// Creates a new search alias.
+ /// The definition of the alias to create.
+ /// The cancellation token to use.
+ /// is null.
+ ///
+ public virtual async Task> CreateAsync(SearchAlias @alias, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(@alias, nameof(@alias));
+
+ using RequestContent content = @alias.ToRequestContent();
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = await CreateAsync(content, context).ConfigureAwait(false);
+ return Response.FromValue(SearchAlias.FromResponse(response), response);
+ }
+
+ /// Creates a new search alias.
+ /// The definition of the alias to create.
+ /// The cancellation token to use.
+ /// is null.
+ ///
+ public virtual Response Create(SearchAlias @alias, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(@alias, nameof(@alias));
+
+ using RequestContent content = @alias.ToRequestContent();
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = Create(content, context);
+ return Response.FromValue(SearchAlias.FromResponse(response), response);
+ }
+
+ ///
+ /// [Protocol Method] Creates a new search alias.
+ ///
+ /// -
+ ///
+ /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
+ ///
+ ///
+ /// -
+ ///
+ /// Please try the simpler convenience overload with strongly typed models first.
+ ///
+ ///
+ ///
+ ///
+ /// The content to send as the body of the request.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// is null.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual async Task CreateAsync(RequestContent content, RequestContext context = null)
+ {
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = ClientDiagnostics.CreateScope("Aliases.Create");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateCreateRequest(content, context);
+ return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// [Protocol Method] Creates a new search alias.
+ ///
+ /// -
+ ///
+ /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
+ ///
+ ///
+ /// -
+ ///
+ /// Please try the simpler convenience overload with strongly typed models first.
+ ///
+ ///
+ ///
+ ///
+ /// The content to send as the body of the request.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// is null.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual Response Create(RequestContent content, RequestContext context = null)
+ {
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = ClientDiagnostics.CreateScope("Aliases.Create");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateCreateRequest(content, context);
+ return _pipeline.ProcessMessage(message, context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Creates a new search alias or updates an alias if it already exists.
+ /// The name of the alias.
+ /// The definition of the alias to create or update.
+ /// The content to send as the request conditions of the request.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ ///
+ public virtual async Task> CreateOrUpdateAsync(string aliasName, SearchAlias @alias, MatchConditions matchConditions = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(aliasName, nameof(aliasName));
+ Argument.AssertNotNull(@alias, nameof(@alias));
+
+ using RequestContent content = @alias.ToRequestContent();
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = await CreateOrUpdateAsync(aliasName, content, matchConditions, context).ConfigureAwait(false);
+ return Response.FromValue(SearchAlias.FromResponse(response), response);
+ }
+
+ /// Creates a new search alias or updates an alias if it already exists.
+ /// The name of the alias.
+ /// The definition of the alias to create or update.
+ /// The content to send as the request conditions of the request.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ ///
+ public virtual Response CreateOrUpdate(string aliasName, SearchAlias @alias, MatchConditions matchConditions = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(aliasName, nameof(aliasName));
+ Argument.AssertNotNull(@alias, nameof(@alias));
+
+ using RequestContent content = @alias.ToRequestContent();
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = CreateOrUpdate(aliasName, content, matchConditions, context);
+ return Response.FromValue(SearchAlias.FromResponse(response), response);
+ }
+
+ ///
+ /// [Protocol Method] Creates a new search alias or updates an alias if it already exists.
+ ///
+ /// -
+ ///
+ /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
+ ///
+ ///
+ /// -
+ ///
+ /// Please try the simpler convenience overload with strongly typed models first.
+ ///
+ ///
+ ///
+ ///
+ /// The name of the alias.
+ /// The content to send as the body of the request.
+ /// The content to send as the request conditions of the request.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual async Task CreateOrUpdateAsync(string aliasName, RequestContent content, MatchConditions matchConditions = null, RequestContext context = null)
+ {
+ Argument.AssertNotNullOrEmpty(aliasName, nameof(aliasName));
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = ClientDiagnostics.CreateScope("Aliases.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateCreateOrUpdateRequest(aliasName, content, matchConditions, context);
+ return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// [Protocol Method] Creates a new search alias or updates an alias if it already exists.
+ ///
+ /// -
+ ///
+ /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
+ ///
+ ///
+ /// -
+ ///
+ /// Please try the simpler convenience overload with strongly typed models first.
+ ///
+ ///
+ ///
+ ///
+ /// The name of the alias.
+ /// The content to send as the body of the request.
+ /// The content to send as the request conditions of the request.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual Response CreateOrUpdate(string aliasName, RequestContent content, MatchConditions matchConditions = null, RequestContext context = null)
+ {
+ Argument.AssertNotNullOrEmpty(aliasName, nameof(aliasName));
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = ClientDiagnostics.CreateScope("Aliases.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateCreateOrUpdateRequest(aliasName, content, matchConditions, context);
+ return _pipeline.ProcessMessage(message, context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method
+ ///
+ /// [Protocol Method] Deletes a search alias and its associated mapping to an index. This operation
+ /// is permanent, with no recovery option. The mapped index is untouched by this
+ /// operation.
+ ///
+ /// -
+ ///
+ /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
+ ///
+ ///
+ ///
+ ///
+ /// The name of the alias.
+ /// The content to send as the request conditions of the request.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual async Task DeleteAsync(string aliasName, MatchConditions matchConditions = null, RequestContext context = null)
+ {
+ Argument.AssertNotNullOrEmpty(aliasName, nameof(aliasName));
+
+ using var scope = ClientDiagnostics.CreateScope("Aliases.Delete");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateDeleteRequest(aliasName, matchConditions, context);
+ return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method
+ ///
+ /// [Protocol Method] Deletes a search alias and its associated mapping to an index. This operation
+ /// is permanent, with no recovery option. The mapped index is untouched by this
+ /// operation.
+ ///
+ /// -
+ ///
+ /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
+ ///
+ ///
+ ///
+ ///
+ /// The name of the alias.
+ /// The content to send as the request conditions of the request.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual Response Delete(string aliasName, MatchConditions matchConditions = null, RequestContext context = null)
+ {
+ Argument.AssertNotNullOrEmpty(aliasName, nameof(aliasName));
+
+ using var scope = ClientDiagnostics.CreateScope("Aliases.Delete");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateDeleteRequest(aliasName, matchConditions, context);
+ return _pipeline.ProcessMessage(message, context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Retrieves an alias definition.
+ /// The name of the alias.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ ///
+ public virtual async Task> GetAliasAsync(string aliasName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(aliasName, nameof(aliasName));
+
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = await GetAliasAsync(aliasName, context).ConfigureAwait(false);
+ return Response.FromValue(SearchAlias.FromResponse(response), response);
+ }
+
+ /// Retrieves an alias definition.
+ /// The name of the alias.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ ///
+ public virtual Response GetAlias(string aliasName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(aliasName, nameof(aliasName));
+
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = GetAlias(aliasName, context);
+ return Response.FromValue(SearchAlias.FromResponse(response), response);
+ }
+
+ ///
+ /// [Protocol Method] Retrieves an alias definition.
+ ///
+ /// -
+ ///
+ /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
+ ///
+ ///
+ /// -
+ ///
+ /// Please try the simpler convenience overload with strongly typed models first.
+ ///
+ ///
+ ///
+ ///
+ /// The name of the alias.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual async Task GetAliasAsync(string aliasName, RequestContext context)
+ {
+ Argument.AssertNotNullOrEmpty(aliasName, nameof(aliasName));
+
+ using var scope = ClientDiagnostics.CreateScope("Aliases.GetAlias");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateGetAliasRequest(aliasName, context);
+ return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// [Protocol Method] Retrieves an alias definition.
+ ///
+ /// -
+ ///
+ /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
+ ///
+ ///
+ /// -
+ ///
+ /// Please try the simpler convenience overload with strongly typed models first.
+ ///
+ ///
+ ///
+ ///
+ /// The name of the alias.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// Service returned a non-success status code.
+ /// The response returned from the service.
+ ///
+ public virtual Response GetAlias(string aliasName, RequestContext context)
+ {
+ Argument.AssertNotNullOrEmpty(aliasName, nameof(aliasName));
+
+ using var scope = ClientDiagnostics.CreateScope("Aliases.GetAlias");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateGetAliasRequest(aliasName, context);
+ return _pipeline.ProcessMessage(message, context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Lists all aliases available for a search service.
+ /// The cancellation token to use.
+ ///
+ public virtual AsyncPageable GetAliasesAsync(CancellationToken cancellationToken = default)
+ {
+ RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null;
+ HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetAliasesRequest(context);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => SearchAlias.DeserializeSearchAlias(e), ClientDiagnostics, _pipeline, "Aliases.GetAliases", "value", null, context);
+ }
+
+ /// Lists all aliases available for a search service.
+ /// The cancellation token to use.
+ ///
+ public virtual Pageable GetAliases(CancellationToken cancellationToken = default)
+ {
+ RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null;
+ HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetAliasesRequest(context);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => SearchAlias.DeserializeSearchAlias(e), ClientDiagnostics, _pipeline, "Aliases.GetAliases", "value", null, context);
+ }
+
+ ///
+ /// [Protocol Method] Lists all aliases available for a search service.
+ ///
+ /// -
+ ///
+ /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
+ ///
+ ///
+ /// -
+ ///
+ /// Please try the simpler convenience overload with strongly typed models first.
+ ///
+ ///
+ ///
+ ///
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// Service returned a non-success status code.
+ /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below.
+ ///
+ public virtual AsyncPageable GetAliasesAsync(RequestContext context)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetAliasesRequest(context);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "Aliases.GetAliases", "value", null, context);
+ }
+
+ ///
+ /// [Protocol Method] Lists all aliases available for a search service.
+ ///
+ /// -
+ ///
+ /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
+ ///
+ ///
+ /// -
+ ///
+ /// Please try the simpler convenience overload with strongly typed models first.
+ ///
+ ///
+ ///
+ ///
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// Service returned a non-success status code.
+ /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below.
+ ///
+ public virtual Pageable GetAliases(RequestContext context)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetAliasesRequest(context);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "Aliases.GetAliases", "value", null, context);
+ }
+
+ internal HttpMessage CreateCreateRequest(RequestContent content, RequestContext context)
+ {
+ var message = _pipeline.CreateMessage(context, ResponseClassifier201);
+ var request = message.Request;
+ request.Method = RequestMethod.Post;
+ var uri = new RawRequestUriBuilder();
+ uri.Reset(_endpoint);
+ uri.AppendPath("/aliases", false);
+ uri.AppendQuery("api-version", _apiVersion, true);
+ request.Uri = uri;
+ request.Headers.Add("Accept", "application/json");
+ request.Headers.Add("Content-Type", "application/json");
+ request.Content = content;
+ return message;
+ }
+
+ internal HttpMessage CreateGetAliasesRequest(RequestContext context)
+ {
+ var message = _pipeline.CreateMessage(context, ResponseClassifier200);
+ var request = message.Request;
+ request.Method = RequestMethod.Get;
+ var uri = new RawRequestUriBuilder();
+ uri.Reset(_endpoint);
+ uri.AppendPath("/aliases", false);
+ uri.AppendQuery("api-version", _apiVersion, true);
+ request.Uri = uri;
+ request.Headers.Add("Accept", "application/json");
+ return message;
+ }
+
+ internal HttpMessage CreateCreateOrUpdateRequest(string aliasName, RequestContent content, MatchConditions matchConditions, RequestContext context)
+ {
+ var message = _pipeline.CreateMessage(context, ResponseClassifier200201);
+ var request = message.Request;
+ request.Method = RequestMethod.Put;
+ var uri = new RawRequestUriBuilder();
+ uri.Reset(_endpoint);
+ uri.AppendPath("/aliases('", false);
+ uri.AppendPath(aliasName, true);
+ uri.AppendPath("')", false);
+ uri.AppendQuery("api-version", _apiVersion, true);
+ request.Uri = uri;
+ request.Headers.Add("Prefer", "return=representation");
+ request.Headers.Add("Accept", "application/json");
+ if (matchConditions != null)
+ {
+ request.Headers.Add(matchConditions);
+ }
+ request.Headers.Add("Content-Type", "application/json");
+ request.Content = content;
+ return message;
+ }
+
+ internal HttpMessage CreateDeleteRequest(string aliasName, MatchConditions matchConditions, RequestContext context)
+ {
+ var message = _pipeline.CreateMessage(context, ResponseClassifier204404);
+ var request = message.Request;
+ request.Method = RequestMethod.Delete;
+ var uri = new RawRequestUriBuilder();
+ uri.Reset(_endpoint);
+ uri.AppendPath("/aliases('", false);
+ uri.AppendPath(aliasName, true);
+ uri.AppendPath("')", false);
+ uri.AppendQuery("api-version", _apiVersion, true);
+ request.Uri = uri;
+ request.Headers.Add("Accept", "application/json");
+ if (matchConditions != null)
+ {
+ request.Headers.Add(matchConditions);
+ }
+ return message;
+ }
+
+ internal HttpMessage CreateGetAliasRequest(string aliasName, RequestContext context)
+ {
+ var message = _pipeline.CreateMessage(context, ResponseClassifier200);
+ var request = message.Request;
+ request.Method = RequestMethod.Get;
+ var uri = new RawRequestUriBuilder();
+ uri.Reset(_endpoint);
+ uri.AppendPath("/aliases('", false);
+ uri.AppendPath(aliasName, true);
+ uri.AppendPath("')", false);
+ uri.AppendQuery("api-version", _apiVersion, true);
+ request.Uri = uri;
+ request.Headers.Add("Accept", "application/json");
+ return message;
+ }
+
+ private static RequestContext DefaultRequestContext = new RequestContext();
+ internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default)
+ {
+ if (!cancellationToken.CanBeCanceled)
+ {
+ return DefaultRequestContext;
+ }
+
+ return new RequestContext() { CancellationToken = cancellationToken };
+ }
+
+ private static ResponseClassifier _responseClassifier201;
+ private static ResponseClassifier ResponseClassifier201 => _responseClassifier201 ??= new StatusCodeClassifier(stackalloc ushort[] { 201 });
+ private static ResponseClassifier _responseClassifier200;
+ private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 });
+ private static ResponseClassifier _responseClassifier200201;
+ private static ResponseClassifier ResponseClassifier200201 => _responseClassifier200201 ??= new StatusCodeClassifier(stackalloc ushort[] { 200, 201 });
+ private static ResponseClassifier _responseClassifier204404;
+ private static ResponseClassifier ResponseClassifier204404 => _responseClassifier204404 ??= new StatusCodeClassifier(stackalloc ushort[] { 204, 404 });
+ }
+}
diff --git a/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AnalyzeRequest.Serialization.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AnalyzeRequest.Serialization.cs
new file mode 100644
index 000000000000..53e7ca28d72e
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AnalyzeRequest.Serialization.cs
@@ -0,0 +1,244 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Search.Documents.Indexes
+{
+ public partial class AnalyzeRequest : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AnalyzeRequest)} does not support writing '{format}' format.");
+ }
+
+ writer.WritePropertyName("text"u8);
+ writer.WriteStringValue(Text);
+ if (Optional.IsDefined(Analyzer))
+ {
+ writer.WritePropertyName("analyzer"u8);
+ writer.WriteStringValue(Analyzer.Value.ToString());
+ }
+ if (Optional.IsDefined(Tokenizer))
+ {
+ writer.WritePropertyName("tokenizer"u8);
+ writer.WriteStringValue(Tokenizer.Value.ToString());
+ }
+ if (Optional.IsDefined(Normalizer))
+ {
+ writer.WritePropertyName("normalizer"u8);
+ writer.WriteStringValue(Normalizer.Value.ToString());
+ }
+ if (Optional.IsCollectionDefined(TokenFilters))
+ {
+ writer.WritePropertyName("tokenFilters"u8);
+ writer.WriteStartArray();
+ foreach (var item in TokenFilters)
+ {
+ writer.WriteStringValue(item.ToString());
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsCollectionDefined(CharFilters))
+ {
+ writer.WritePropertyName("charFilters"u8);
+ writer.WriteStartArray();
+ foreach (var item in CharFilters)
+ {
+ writer.WriteStringValue(item.ToString());
+ }
+ writer.WriteEndArray();
+ }
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ }
+
+ AnalyzeRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AnalyzeRequest)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeAnalyzeRequest(document.RootElement, options);
+ }
+
+ internal static AnalyzeRequest DeserializeAnalyzeRequest(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ string text = default;
+ LexicalAnalyzerName? analyzer = default;
+ LexicalTokenizerName? tokenizer = default;
+ LexicalNormalizerName? normalizer = default;
+ IList tokenFilters = default;
+ IList charFilters = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("text"u8))
+ {
+ text = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("analyzer"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ analyzer = new LexicalAnalyzerName(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("tokenizer"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ tokenizer = new LexicalTokenizerName(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("normalizer"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ normalizer = new LexicalNormalizerName(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("tokenFilters"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(new TokenFilterName(item.GetString()));
+ }
+ tokenFilters = array;
+ continue;
+ }
+ if (property.NameEquals("charFilters"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(new CharFilterName(item.GetString()));
+ }
+ charFilters = array;
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new AnalyzeRequest(
+ text,
+ analyzer,
+ tokenizer,
+ normalizer,
+ tokenFilters ?? new ChangeTrackingList(),
+ charFilters ?? new ChangeTrackingList(),
+ serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(AnalyzeRequest)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ AnalyzeRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeAnalyzeRequest(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(AnalyzeRequest)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+
+ /// Deserializes the model from a raw response.
+ /// The response to deserialize the model from.
+ internal static AnalyzeRequest FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeAnalyzeRequest(document.RootElement);
+ }
+
+ /// Convert into a .
+ internal virtual RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
+ return content;
+ }
+ }
+}
diff --git a/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AnalyzeRequest.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AnalyzeRequest.cs
new file mode 100644
index 000000000000..2d38383406a9
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AnalyzeRequest.cs
@@ -0,0 +1,125 @@
+// 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
+{
+ /// Specifies some text and analysis components used to break that text into tokens.
+ public partial class AnalyzeRequest
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ /// The text to break into tokens.
+ /// is null.
+ public AnalyzeRequest(string text)
+ {
+ Argument.AssertNotNull(text, nameof(text));
+
+ Text = text;
+ TokenFilters = new ChangeTrackingList();
+ CharFilters = new ChangeTrackingList();
+ }
+
+ /// Initializes a new instance of .
+ /// The text to break into tokens.
+ ///
+ /// The name of the analyzer to use to break the given text. If this parameter is
+ /// not specified, you must specify a tokenizer instead. The tokenizer and analyzer
+ /// parameters are mutually exclusive.
+ ///
+ ///
+ /// The name of the tokenizer to use to break the given text. If this parameter is
+ /// not specified, you must specify an analyzer instead. The tokenizer and analyzer
+ /// parameters are mutually exclusive.
+ ///
+ /// The name of the normalizer to use to normalize the given text.
+ ///
+ /// An optional list of token filters to use when breaking the given text. This
+ /// parameter can only be set when using the tokenizer parameter.
+ ///
+ ///
+ /// An optional list of character filters to use when breaking the given text. This
+ /// parameter can only be set when using the tokenizer parameter.
+ ///
+ /// Keeps track of any properties unknown to the library.
+ internal AnalyzeRequest(string text, LexicalAnalyzerName? analyzer, LexicalTokenizerName? tokenizer, LexicalNormalizerName? normalizer, IList tokenFilters, IList charFilters, IDictionary serializedAdditionalRawData)
+ {
+ Text = text;
+ Analyzer = analyzer;
+ Tokenizer = tokenizer;
+ Normalizer = normalizer;
+ TokenFilters = tokenFilters;
+ CharFilters = charFilters;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal AnalyzeRequest()
+ {
+ }
+
+ /// The text to break into tokens.
+ public string Text { get; }
+ ///
+ /// The name of the analyzer to use to break the given text. If this parameter is
+ /// not specified, you must specify a tokenizer instead. The tokenizer and analyzer
+ /// parameters are mutually exclusive.
+ ///
+ public LexicalAnalyzerName? Analyzer { get; set; }
+ ///
+ /// The name of the tokenizer to use to break the given text. If this parameter is
+ /// not specified, you must specify an analyzer instead. The tokenizer and analyzer
+ /// parameters are mutually exclusive.
+ ///
+ public LexicalTokenizerName? Tokenizer { get; set; }
+ /// The name of the normalizer to use to normalize the given text.
+ public LexicalNormalizerName? Normalizer { get; set; }
+ ///
+ /// An optional list of token filters to use when breaking the given text. This
+ /// parameter can only be set when using the tokenizer parameter.
+ ///
+ public IList TokenFilters { get; }
+ ///
+ /// An optional list of character filters to use when breaking the given text. This
+ /// parameter can only be set when using the tokenizer parameter.
+ ///
+ public IList CharFilters { get; }
+ }
+}
diff --git a/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AnalyzeResult.Serialization.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AnalyzeResult.Serialization.cs
new file mode 100644
index 000000000000..1fa42f39c00c
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AnalyzeResult.Serialization.cs
@@ -0,0 +1,152 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Search.Documents.Indexes
+{
+ public partial class AnalyzeResult : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AnalyzeResult)} does not support writing '{format}' format.");
+ }
+
+ writer.WritePropertyName("tokens"u8);
+ writer.WriteStartArray();
+ foreach (var item in Tokens)
+ {
+ writer.WriteObjectValue(item, options);
+ }
+ writer.WriteEndArray();
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ }
+
+ AnalyzeResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AnalyzeResult)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeAnalyzeResult(document.RootElement, options);
+ }
+
+ internal static AnalyzeResult DeserializeAnalyzeResult(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ IReadOnlyList tokens = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("tokens"u8))
+ {
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(AnalyzedTokenInfo.DeserializeAnalyzedTokenInfo(item, options));
+ }
+ tokens = array;
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new AnalyzeResult(tokens, serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(AnalyzeResult)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ AnalyzeResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeAnalyzeResult(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(AnalyzeResult)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+
+ /// Deserializes the model from a raw response.
+ /// The response to deserialize the model from.
+ internal static AnalyzeResult FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeAnalyzeResult(document.RootElement);
+ }
+
+ /// Convert into a .
+ internal virtual RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
+ return content;
+ }
+ }
+}
diff --git a/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AnalyzeResult.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AnalyzeResult.cs
new file mode 100644
index 000000000000..0239a8f2ec5a
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AnalyzeResult.cs
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace Azure.Search.Documents.Indexes
+{
+ /// The result of testing an analyzer on text.
+ public partial class AnalyzeResult
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ /// The list of tokens returned by the analyzer specified in the request.
+ /// is null.
+ internal AnalyzeResult(IEnumerable tokens)
+ {
+ Argument.AssertNotNull(tokens, nameof(tokens));
+
+ Tokens = tokens.ToList();
+ }
+
+ /// Initializes a new instance of .
+ /// The list of tokens returned by the analyzer specified in the request.
+ /// Keeps track of any properties unknown to the library.
+ internal AnalyzeResult(IReadOnlyList tokens, IDictionary serializedAdditionalRawData)
+ {
+ Tokens = tokens;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal AnalyzeResult()
+ {
+ }
+
+ /// The list of tokens returned by the analyzer specified in the request.
+ public IReadOnlyList Tokens { get; }
+ }
+}
diff --git a/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AnalyzedTokenInfo.Serialization.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AnalyzedTokenInfo.Serialization.cs
new file mode 100644
index 000000000000..e270286b89b9
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AnalyzedTokenInfo.Serialization.cs
@@ -0,0 +1,166 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Search.Documents.Indexes
+{
+ public partial class AnalyzedTokenInfo : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AnalyzedTokenInfo)} does not support writing '{format}' format.");
+ }
+
+ writer.WritePropertyName("token"u8);
+ writer.WriteStringValue(Token);
+ writer.WritePropertyName("startOffset"u8);
+ writer.WriteNumberValue(StartOffset);
+ writer.WritePropertyName("endOffset"u8);
+ writer.WriteNumberValue(EndOffset);
+ writer.WritePropertyName("position"u8);
+ writer.WriteNumberValue(Position);
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ }
+
+ AnalyzedTokenInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AnalyzedTokenInfo)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeAnalyzedTokenInfo(document.RootElement, options);
+ }
+
+ internal static AnalyzedTokenInfo DeserializeAnalyzedTokenInfo(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ string token = default;
+ int startOffset = default;
+ int endOffset = default;
+ int position = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("token"u8))
+ {
+ token = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("startOffset"u8))
+ {
+ startOffset = property.Value.GetInt32();
+ continue;
+ }
+ if (property.NameEquals("endOffset"u8))
+ {
+ endOffset = property.Value.GetInt32();
+ continue;
+ }
+ if (property.NameEquals("position"u8))
+ {
+ position = property.Value.GetInt32();
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new AnalyzedTokenInfo(token, startOffset, endOffset, position, serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(AnalyzedTokenInfo)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ AnalyzedTokenInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeAnalyzedTokenInfo(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(AnalyzedTokenInfo)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+
+ /// Deserializes the model from a raw response.
+ /// The response to deserialize the model from.
+ internal static AnalyzedTokenInfo FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeAnalyzedTokenInfo(document.RootElement);
+ }
+
+ /// Convert into a .
+ internal virtual RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
+ return content;
+ }
+ }
+}
diff --git a/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AnalyzedTokenInfo.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AnalyzedTokenInfo.cs
new file mode 100644
index 000000000000..e981a23717e7
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AnalyzedTokenInfo.cs
@@ -0,0 +1,108 @@
+// 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
+{
+ /// Information about a token returned by an analyzer.
+ public partial class AnalyzedTokenInfo
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ /// The token returned by the analyzer.
+ /// The index of the first character of the token in the input text.
+ /// The index of the last character of the token in the input text.
+ ///
+ /// The position of the token in the input text relative to other tokens. The first
+ /// token in the input text has position 0, the next has position 1, and so on.
+ /// Depending on the analyzer used, some tokens might have the same position, for
+ /// example if they are synonyms of each other.
+ ///
+ /// is null.
+ internal AnalyzedTokenInfo(string token, int startOffset, int endOffset, int position)
+ {
+ Argument.AssertNotNull(token, nameof(token));
+
+ Token = token;
+ StartOffset = startOffset;
+ EndOffset = endOffset;
+ Position = position;
+ }
+
+ /// Initializes a new instance of .
+ /// The token returned by the analyzer.
+ /// The index of the first character of the token in the input text.
+ /// The index of the last character of the token in the input text.
+ ///
+ /// The position of the token in the input text relative to other tokens. The first
+ /// token in the input text has position 0, the next has position 1, and so on.
+ /// Depending on the analyzer used, some tokens might have the same position, for
+ /// example if they are synonyms of each other.
+ ///
+ /// Keeps track of any properties unknown to the library.
+ internal AnalyzedTokenInfo(string token, int startOffset, int endOffset, int position, IDictionary serializedAdditionalRawData)
+ {
+ Token = token;
+ StartOffset = startOffset;
+ EndOffset = endOffset;
+ Position = position;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal AnalyzedTokenInfo()
+ {
+ }
+
+ /// The token returned by the analyzer.
+ public string Token { get; }
+ /// The index of the first character of the token in the input text.
+ public int StartOffset { get; }
+ /// The index of the last character of the token in the input text.
+ public int EndOffset { get; }
+ ///
+ /// The position of the token in the input text relative to other tokens. The first
+ /// token in the input text has position 0, the next has position 1, and so on.
+ /// Depending on the analyzer used, some tokens might have the same position, for
+ /// example if they are synonyms of each other.
+ ///
+ public int Position { get; }
+ }
+}
diff --git a/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AsciiFoldingTokenFilter.Serialization.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AsciiFoldingTokenFilter.Serialization.cs
new file mode 100644
index 000000000000..65ede07fe0bb
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AsciiFoldingTokenFilter.Serialization.cs
@@ -0,0 +1,147 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Search.Documents.Indexes
+{
+ public partial class AsciiFoldingTokenFilter : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AsciiFoldingTokenFilter)} does not support writing '{format}' format.");
+ }
+
+ base.JsonModelWriteCore(writer, options);
+ if (Optional.IsDefined(PreserveOriginal))
+ {
+ writer.WritePropertyName("preserveOriginal"u8);
+ writer.WriteBooleanValue(PreserveOriginal.Value);
+ }
+ }
+
+ AsciiFoldingTokenFilter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AsciiFoldingTokenFilter)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeAsciiFoldingTokenFilter(document.RootElement, options);
+ }
+
+ internal static AsciiFoldingTokenFilter DeserializeAsciiFoldingTokenFilter(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ bool? preserveOriginal = default;
+ string odataType = default;
+ string name = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("preserveOriginal"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ preserveOriginal = property.Value.GetBoolean();
+ continue;
+ }
+ if (property.NameEquals("@odata.type"u8))
+ {
+ odataType = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("name"u8))
+ {
+ name = property.Value.GetString();
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new AsciiFoldingTokenFilter(odataType, name, serializedAdditionalRawData, preserveOriginal);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(AsciiFoldingTokenFilter)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ AsciiFoldingTokenFilter IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeAsciiFoldingTokenFilter(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(AsciiFoldingTokenFilter)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+
+ /// Deserializes the model from a raw response.
+ /// The response to deserialize the model from.
+ internal static new AsciiFoldingTokenFilter FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeAsciiFoldingTokenFilter(document.RootElement);
+ }
+
+ /// Convert into a .
+ internal override RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
+ return content;
+ }
+ }
+}
diff --git a/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AsciiFoldingTokenFilter.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AsciiFoldingTokenFilter.cs
new file mode 100644
index 000000000000..726d5ca14f38
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AsciiFoldingTokenFilter.cs
@@ -0,0 +1,57 @@
+// 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
+{
+ ///
+ /// Converts alphabetic, numeric, and symbolic Unicode characters which are not in
+ /// the first 127 ASCII characters (the "Basic Latin" Unicode block) into their
+ /// ASCII equivalents, if such equivalents exist. This token filter is implemented
+ /// using Apache Lucene.
+ ///
+ public partial class AsciiFoldingTokenFilter : TokenFilter
+ {
+ /// Initializes a new instance of .
+ ///
+ /// The name of the token filter. It must only contain letters, digits, spaces,
+ /// dashes or underscores, can only start and end with alphanumeric characters, and
+ /// is limited to 128 characters.
+ ///
+ /// is null.
+ public AsciiFoldingTokenFilter(string name) : base(name)
+ {
+ Argument.AssertNotNull(name, nameof(name));
+
+ OdataType = "#Microsoft.Azure.Search.AsciiFoldingTokenFilter";
+ }
+
+ /// Initializes a new instance of .
+ /// The discriminator for derived types.
+ ///
+ /// The name of the token filter. It must only contain letters, digits, spaces,
+ /// dashes or underscores, can only start and end with alphanumeric characters, and
+ /// is limited to 128 characters.
+ ///
+ /// Keeps track of any properties unknown to the library.
+ /// A value indicating whether the original token will be kept. Default is false.
+ internal AsciiFoldingTokenFilter(string odataType, string name, IDictionary serializedAdditionalRawData, bool? preserveOriginal) : base(odataType, name, serializedAdditionalRawData)
+ {
+ PreserveOriginal = preserveOriginal;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal AsciiFoldingTokenFilter()
+ {
+ }
+
+ /// A value indicating whether the original token will be kept. Default is false.
+ public bool? PreserveOriginal { get; set; }
+ }
+}
diff --git a/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AzureActiveDirectoryApplicationCredentials.Serialization.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AzureActiveDirectoryApplicationCredentials.Serialization.cs
new file mode 100644
index 000000000000..452a76720415
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AzureActiveDirectoryApplicationCredentials.Serialization.cs
@@ -0,0 +1,153 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Search.Documents.Indexes
+{
+ public partial class AzureActiveDirectoryApplicationCredentials : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AzureActiveDirectoryApplicationCredentials)} does not support writing '{format}' format.");
+ }
+
+ writer.WritePropertyName("applicationId"u8);
+ writer.WriteStringValue(ApplicationId);
+ if (Optional.IsDefined(ApplicationSecret))
+ {
+ writer.WritePropertyName("applicationSecret"u8);
+ writer.WriteStringValue(ApplicationSecret);
+ }
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ }
+
+ AzureActiveDirectoryApplicationCredentials IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AzureActiveDirectoryApplicationCredentials)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeAzureActiveDirectoryApplicationCredentials(document.RootElement, options);
+ }
+
+ internal static AzureActiveDirectoryApplicationCredentials DeserializeAzureActiveDirectoryApplicationCredentials(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ string applicationId = default;
+ string applicationSecret = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("applicationId"u8))
+ {
+ applicationId = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("applicationSecret"u8))
+ {
+ applicationSecret = property.Value.GetString();
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new AzureActiveDirectoryApplicationCredentials(applicationId, applicationSecret, serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(AzureActiveDirectoryApplicationCredentials)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ AzureActiveDirectoryApplicationCredentials IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeAzureActiveDirectoryApplicationCredentials(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(AzureActiveDirectoryApplicationCredentials)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+
+ /// Deserializes the model from a raw response.
+ /// The response to deserialize the model from.
+ internal static AzureActiveDirectoryApplicationCredentials FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeAzureActiveDirectoryApplicationCredentials(document.RootElement);
+ }
+
+ /// Convert into a .
+ internal virtual RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
+ return content;
+ }
+ }
+}
diff --git a/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AzureActiveDirectoryApplicationCredentials.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AzureActiveDirectoryApplicationCredentials.cs
new file mode 100644
index 000000000000..74efc6941b70
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AzureActiveDirectoryApplicationCredentials.cs
@@ -0,0 +1,97 @@
+// 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
+{
+ ///
+ /// Credentials of a registered application created for your search service, used
+ /// for authenticated access to the encryption keys stored in Azure Key Vault.
+ ///
+ public partial class AzureActiveDirectoryApplicationCredentials
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ ///
+ /// An AAD Application ID that was granted the required access permissions to the
+ /// Azure Key Vault that is to be used when encrypting your data at rest. The
+ /// Application ID should not be confused with the Object ID for your AAD
+ /// Application.
+ ///
+ /// is null.
+ public AzureActiveDirectoryApplicationCredentials(string applicationId)
+ {
+ Argument.AssertNotNull(applicationId, nameof(applicationId));
+
+ ApplicationId = applicationId;
+ }
+
+ /// Initializes a new instance of .
+ ///
+ /// An AAD Application ID that was granted the required access permissions to the
+ /// Azure Key Vault that is to be used when encrypting your data at rest. The
+ /// Application ID should not be confused with the Object ID for your AAD
+ /// Application.
+ ///
+ /// The authentication key of the specified AAD application.
+ /// Keeps track of any properties unknown to the library.
+ internal AzureActiveDirectoryApplicationCredentials(string applicationId, string applicationSecret, IDictionary serializedAdditionalRawData)
+ {
+ ApplicationId = applicationId;
+ ApplicationSecret = applicationSecret;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal AzureActiveDirectoryApplicationCredentials()
+ {
+ }
+
+ ///
+ /// An AAD Application ID that was granted the required access permissions to the
+ /// Azure Key Vault that is to be used when encrypting your data at rest. The
+ /// Application ID should not be confused with the Object ID for your AAD
+ /// Application.
+ ///
+ public string ApplicationId { get; set; }
+ /// The authentication key of the specified AAD application.
+ public string ApplicationSecret { get; set; }
+ }
+}
diff --git a/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AzureMachineLearningSkill.Serialization.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AzureMachineLearningSkill.Serialization.cs
new file mode 100644
index 000000000000..6788bf3c3eef
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AzureMachineLearningSkill.Serialization.cs
@@ -0,0 +1,257 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Search.Documents.Indexes
+{
+ public partial class AzureMachineLearningSkill : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AzureMachineLearningSkill)} does not support writing '{format}' format.");
+ }
+
+ base.JsonModelWriteCore(writer, options);
+ if (Optional.IsDefined(Uri))
+ {
+ writer.WritePropertyName("uri"u8);
+ writer.WriteStringValue(Uri.AbsoluteUri);
+ }
+ if (Optional.IsDefined(Key))
+ {
+ writer.WritePropertyName("key"u8);
+ writer.WriteStringValue(Key);
+ }
+ if (Optional.IsDefined(ResourceId))
+ {
+ writer.WritePropertyName("resourceId"u8);
+ writer.WriteStringValue(ResourceId);
+ }
+ if (Optional.IsDefined(Timeout))
+ {
+ writer.WritePropertyName("timeout"u8);
+ writer.WriteStringValue(Timeout.Value, "P");
+ }
+ if (Optional.IsDefined(Region))
+ {
+ writer.WritePropertyName("region"u8);
+ writer.WriteStringValue(Region);
+ }
+ if (Optional.IsDefined(DegreeOfParallelism))
+ {
+ writer.WritePropertyName("degreeOfParallelism"u8);
+ writer.WriteNumberValue(DegreeOfParallelism.Value);
+ }
+ }
+
+ AzureMachineLearningSkill IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AzureMachineLearningSkill)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeAzureMachineLearningSkill(document.RootElement, options);
+ }
+
+ internal static AzureMachineLearningSkill DeserializeAzureMachineLearningSkill(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ Uri uri = default;
+ string key = default;
+ string resourceId = default;
+ TimeSpan? timeout = default;
+ string region = default;
+ int? degreeOfParallelism = default;
+ string odataType = default;
+ string name = default;
+ string description = default;
+ string context = default;
+ IList inputs = default;
+ IList outputs = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("uri"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ uri = new Uri(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("key"u8))
+ {
+ key = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("resourceId"u8))
+ {
+ resourceId = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("timeout"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ timeout = property.Value.GetTimeSpan("P");
+ continue;
+ }
+ if (property.NameEquals("region"u8))
+ {
+ region = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("degreeOfParallelism"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ degreeOfParallelism = property.Value.GetInt32();
+ continue;
+ }
+ if (property.NameEquals("@odata.type"u8))
+ {
+ odataType = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("name"u8))
+ {
+ name = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("description"u8))
+ {
+ description = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("context"u8))
+ {
+ context = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("inputs"u8))
+ {
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(InputFieldMappingEntry.DeserializeInputFieldMappingEntry(item, options));
+ }
+ inputs = array;
+ continue;
+ }
+ if (property.NameEquals("outputs"u8))
+ {
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(OutputFieldMappingEntry.DeserializeOutputFieldMappingEntry(item, options));
+ }
+ outputs = array;
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new AzureMachineLearningSkill(
+ odataType,
+ name,
+ description,
+ context,
+ inputs,
+ outputs,
+ serializedAdditionalRawData,
+ uri,
+ key,
+ resourceId,
+ timeout,
+ region,
+ degreeOfParallelism);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(AzureMachineLearningSkill)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ AzureMachineLearningSkill IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeAzureMachineLearningSkill(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(AzureMachineLearningSkill)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+
+ /// Deserializes the model from a raw response.
+ /// The response to deserialize the model from.
+ internal static new AzureMachineLearningSkill FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeAzureMachineLearningSkill(document.RootElement);
+ }
+
+ /// Convert into a .
+ internal override RequestContent ToRequestContent()
+ {
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions);
+ return content;
+ }
+ }
+}
diff --git a/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AzureMachineLearningSkill.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AzureMachineLearningSkill.cs
new file mode 100644
index 000000000000..95660ca2833f
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AzureMachineLearningSkill.cs
@@ -0,0 +1,133 @@
+// 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
+{
+ ///
+ /// 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 .
+ ///
+ /// 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)
+ {
+ Argument.AssertNotNull(inputs, nameof(inputs));
+ Argument.AssertNotNull(outputs, nameof(outputs));
+
+ OdataType = "#Microsoft.Skills.Custom.AmlSkill";
+ }
+
+ /// Initializes a new instance of .
+ /// The discriminator for derived types.
+ ///
+ /// 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.
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// (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, IDictionary serializedAdditionalRawData, Uri uri, string key, string resourceId, TimeSpan? timeout, string region, int? degreeOfParallelism) : base(odataType, name, description, context, inputs, outputs, serializedAdditionalRawData)
+ {
+ Uri = uri;
+ Key = key;
+ ResourceId = resourceId;
+ Timeout = timeout;
+ Region = region;
+ DegreeOfParallelism = degreeOfParallelism;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal AzureMachineLearningSkill()
+ {
+ }
+
+ ///
+ /// (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 Uri Uri { get; set; }
+ /// (Required for key authentication) The key for the AML service.
+ public string Key { 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.Indexes/src/Generated/AzureOpenAIEmbeddingSkill.Serialization.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AzureOpenAIEmbeddingSkill.Serialization.cs
new file mode 100644
index 000000000000..539ee9fc7518
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AzureOpenAIEmbeddingSkill.Serialization.cs
@@ -0,0 +1,261 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Search.Documents.Indexes
+{
+ public partial class AzureOpenAIEmbeddingSkill : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ writer.WriteStartObject();
+ JsonModelWriteCore(writer, options);
+ writer.WriteEndObject();
+ }
+
+ /// The JSON writer.
+ /// The client options for reading and writing models.
+ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AzureOpenAIEmbeddingSkill)} does not support writing '{format}' format.");
+ }
+
+ base.JsonModelWriteCore(writer, options);
+ if (Optional.IsDefined(ResourceUri))
+ {
+ writer.WritePropertyName("resourceUri"u8);
+ writer.WriteStringValue(ResourceUri.AbsoluteUri);
+ }
+ if (Optional.IsDefined(DeploymentId))
+ {
+ writer.WritePropertyName("deploymentId"u8);
+ writer.WriteStringValue(DeploymentId);
+ }
+ if (Optional.IsDefined(ApiKey))
+ {
+ writer.WritePropertyName("apiKey"u8);
+ writer.WriteStringValue(ApiKey);
+ }
+ if (Optional.IsDefined(AuthIdentity))
+ {
+ writer.WritePropertyName("authIdentity"u8);
+ writer.WriteObjectValue(AuthIdentity, options);
+ }
+ if (Optional.IsDefined(ModelName))
+ {
+ writer.WritePropertyName("modelName"u8);
+ writer.WriteStringValue(ModelName.Value.ToString());
+ }
+ if (Optional.IsDefined(Dimensions))
+ {
+ writer.WritePropertyName("dimensions"u8);
+ writer.WriteNumberValue(Dimensions.Value);
+ }
+ }
+
+ AzureOpenAIEmbeddingSkill IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AzureOpenAIEmbeddingSkill)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeAzureOpenAIEmbeddingSkill(document.RootElement, options);
+ }
+
+ internal static AzureOpenAIEmbeddingSkill DeserializeAzureOpenAIEmbeddingSkill(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ Uri resourceUri = default;
+ string deploymentId = default;
+ string apiKey = default;
+ SearchIndexerDataIdentity authIdentity = default;
+ AzureOpenAIModelName? modelName = default;
+ int? dimensions = default;
+ string odataType = default;
+ string name = default;
+ string description = default;
+ string context = default;
+ IList inputs = default;
+ IList outputs = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("resourceUri"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ resourceUri = new Uri(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("deploymentId"u8))
+ {
+ deploymentId = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("apiKey"u8))
+ {
+ apiKey = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("authIdentity"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ authIdentity = SearchIndexerDataIdentity.DeserializeSearchIndexerDataIdentity(property.Value, options);
+ continue;
+ }
+ if (property.NameEquals("modelName"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ modelName = new AzureOpenAIModelName(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("dimensions"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ dimensions = property.Value.GetInt32();
+ continue;
+ }
+ if (property.NameEquals("@odata.type"u8))
+ {
+ odataType = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("name"u8))
+ {
+ name = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("description"u8))
+ {
+ description = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("context"u8))
+ {
+ context = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("inputs"u8))
+ {
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(InputFieldMappingEntry.DeserializeInputFieldMappingEntry(item, options));
+ }
+ inputs = array;
+ continue;
+ }
+ if (property.NameEquals("outputs"u8))
+ {
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(OutputFieldMappingEntry.DeserializeOutputFieldMappingEntry(item, options));
+ }
+ outputs = array;
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new AzureOpenAIEmbeddingSkill(
+ odataType,
+ name,
+ description,
+ context,
+ inputs,
+ outputs,
+ serializedAdditionalRawData,
+ resourceUri,
+ deploymentId,
+ apiKey,
+ authIdentity,
+ modelName,
+ dimensions);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel