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/AnalyzeRequest.Serialization.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AnalyzeRequest.Serialization.cs
new file mode 100644
index 000000000000..a9d945ab2031
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AnalyzeRequest.Serialization.cs
@@ -0,0 +1,228 @@
+// 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.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;
+ 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("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,
+ 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..92686886a4b3
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AnalyzeRequest.cs
@@ -0,0 +1,121 @@
+// 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.
+ ///
+ ///
+ /// 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, IList tokenFilters, IList charFilters, IDictionary serializedAdditionalRawData)
+ {
+ Text = text;
+ Analyzer = analyzer;
+ Tokenizer = tokenizer;
+ 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; }
+ ///
+ /// 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/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)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(AzureOpenAIEmbeddingSkill)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ AzureOpenAIEmbeddingSkill 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 DeserializeAzureOpenAIEmbeddingSkill(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(AzureOpenAIEmbeddingSkill)} 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 AzureOpenAIEmbeddingSkill FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeAzureOpenAIEmbeddingSkill(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/AzureOpenAIEmbeddingSkill.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AzureOpenAIEmbeddingSkill.cs
new file mode 100644
index 000000000000..070bba6d7378
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AzureOpenAIEmbeddingSkill.cs
@@ -0,0 +1,116 @@
+// 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
+{
+ ///
+ /// Allows you to generate a vector embedding for a given text input using the
+ /// Azure OpenAI resource.
+ ///
+ public partial class AzureOpenAIEmbeddingSkill : 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 AzureOpenAIEmbeddingSkill(IEnumerable inputs, IEnumerable outputs) : base(inputs, outputs)
+ {
+ Argument.AssertNotNull(inputs, nameof(inputs));
+ Argument.AssertNotNull(outputs, nameof(outputs));
+
+ OdataType = "#Microsoft.Skills.Text.AzureOpenAIEmbeddingSkill";
+ }
+
+ /// 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.
+ /// The resource URI of the Azure OpenAI resource.
+ /// ID of the Azure OpenAI model deployment on the designated resource.
+ /// API key of the designated Azure OpenAI resource.
+ ///
+ /// The user-assigned managed identity used for outbound connections.
+ /// 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 name of the embedding model that is deployed at the provided deploymentId
+ /// path.
+ ///
+ ///
+ /// The number of dimensions the resulting output embeddings should have. Only
+ /// supported in text-embedding-3 and later models.
+ ///
+ internal AzureOpenAIEmbeddingSkill(string odataType, string name, string description, string context, IList inputs, IList outputs, IDictionary serializedAdditionalRawData, Uri resourceUri, string deploymentId, string apiKey, SearchIndexerDataIdentity authIdentity, AzureOpenAIModelName? modelName, int? dimensions) : base(odataType, name, description, context, inputs, outputs, serializedAdditionalRawData)
+ {
+ ResourceUri = resourceUri;
+ DeploymentId = deploymentId;
+ ApiKey = apiKey;
+ AuthIdentity = authIdentity;
+ ModelName = modelName;
+ Dimensions = dimensions;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal AzureOpenAIEmbeddingSkill()
+ {
+ }
+
+ /// The resource URI of the Azure OpenAI resource.
+ public Uri ResourceUri { get; set; }
+ /// ID of the Azure OpenAI model deployment on the designated resource.
+ public string DeploymentId { get; set; }
+ /// API key of the designated Azure OpenAI resource.
+ public string ApiKey { get; set; }
+ ///
+ /// The user-assigned managed identity used for outbound connections.
+ /// 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; }
+ ///
+ /// The name of the embedding model that is deployed at the provided deploymentId
+ /// path.
+ ///
+ public AzureOpenAIModelName? ModelName { get; set; }
+ ///
+ /// The number of dimensions the resulting output embeddings should have. Only
+ /// supported in text-embedding-3 and later models.
+ ///
+ public int? Dimensions { get; set; }
+ }
+}
diff --git a/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AzureOpenAIModelName.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AzureOpenAIModelName.cs
new file mode 100644
index 000000000000..cd595cd31c52
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AzureOpenAIModelName.cs
@@ -0,0 +1,54 @@
+// 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 Azure Open AI model name that will be called.
+ public readonly partial struct AzureOpenAIModelName : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public AzureOpenAIModelName(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string TextEmbeddingAda002Value = "text-embedding-ada-002";
+ private const string TextEmbedding3LargeValue = "text-embedding-3-large";
+ private const string TextEmbedding3SmallValue = "text-embedding-3-small";
+
+ /// TextEmbeddingAda002 model.
+ public static AzureOpenAIModelName TextEmbeddingAda002 { get; } = new AzureOpenAIModelName(TextEmbeddingAda002Value);
+ /// TextEmbedding3Large model.
+ public static AzureOpenAIModelName TextEmbedding3Large { get; } = new AzureOpenAIModelName(TextEmbedding3LargeValue);
+ /// TextEmbedding3Small model.
+ public static AzureOpenAIModelName TextEmbedding3Small { get; } = new AzureOpenAIModelName(TextEmbedding3SmallValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(AzureOpenAIModelName left, AzureOpenAIModelName right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(AzureOpenAIModelName left, AzureOpenAIModelName right) => !left.Equals(right);
+ /// Converts a to a .
+ public static implicit operator AzureOpenAIModelName(string value) => new AzureOpenAIModelName(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is AzureOpenAIModelName other && Equals(other);
+ ///
+ public bool Equals(AzureOpenAIModelName 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/AzureOpenAIVectorizer.Serialization.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AzureOpenAIVectorizer.Serialization.cs
new file mode 100644
index 000000000000..c92b8909214d
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AzureOpenAIVectorizer.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 AzureOpenAIVectorizer : 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(AzureOpenAIVectorizer)} does not support writing '{format}' format.");
+ }
+
+ base.JsonModelWriteCore(writer, options);
+ if (Optional.IsDefined(AzureOpenAIParameters))
+ {
+ writer.WritePropertyName("azureOpenAIParameters"u8);
+ writer.WriteObjectValue(AzureOpenAIParameters, options);
+ }
+ }
+
+ AzureOpenAIVectorizer 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(AzureOpenAIVectorizer)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeAzureOpenAIVectorizer(document.RootElement, options);
+ }
+
+ internal static AzureOpenAIVectorizer DeserializeAzureOpenAIVectorizer(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ AzureOpenAIVectorizerParameters azureOpenAIParameters = default;
+ string name = default;
+ VectorSearchVectorizerKind kind = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("azureOpenAIParameters"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ azureOpenAIParameters = AzureOpenAIVectorizerParameters.DeserializeAzureOpenAIVectorizerParameters(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 AzureOpenAIVectorizer(name, kind, serializedAdditionalRawData, azureOpenAIParameters);
+ }
+
+ 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(AzureOpenAIVectorizer)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ AzureOpenAIVectorizer 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 DeserializeAzureOpenAIVectorizer(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(AzureOpenAIVectorizer)} 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 AzureOpenAIVectorizer FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeAzureOpenAIVectorizer(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/AzureOpenAIVectorizer.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AzureOpenAIVectorizer.cs
new file mode 100644
index 000000000000..a6b3996b73a0
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AzureOpenAIVectorizer.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
+{
+ /// Specifies the Azure OpenAI resource used to vectorize a query string.
+ public partial class AzureOpenAIVectorizer : VectorSearchVectorizer
+ {
+ /// Initializes a new instance of .
+ /// The name to associate with this particular vectorization method.
+ /// is null.
+ public AzureOpenAIVectorizer(string name) : base(name)
+ {
+ Argument.AssertNotNull(name, nameof(name));
+
+ Kind = VectorSearchVectorizerKind.AzureOpenAI;
+ }
+
+ /// 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 Azure OpenAI embedding vectorization.
+ internal AzureOpenAIVectorizer(string name, VectorSearchVectorizerKind kind, IDictionary serializedAdditionalRawData, AzureOpenAIVectorizerParameters azureOpenAIParameters) : base(name, kind, serializedAdditionalRawData)
+ {
+ AzureOpenAIParameters = azureOpenAIParameters;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal AzureOpenAIVectorizer()
+ {
+ }
+
+ /// Contains the parameters specific to Azure OpenAI embedding vectorization.
+ public AzureOpenAIVectorizerParameters AzureOpenAIParameters { get; set; }
+ }
+}
diff --git a/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AzureOpenAIVectorizerParameters.Serialization.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AzureOpenAIVectorizerParameters.Serialization.cs
new file mode 100644
index 000000000000..585afc04a0bb
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AzureOpenAIVectorizerParameters.Serialization.cs
@@ -0,0 +1,207 @@
+// 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 AzureOpenAIVectorizerParameters : 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(AzureOpenAIVectorizerParameters)} does not support writing '{format}' format.");
+ }
+
+ 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 (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
+ }
+ }
+ }
+
+ AzureOpenAIVectorizerParameters 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(AzureOpenAIVectorizerParameters)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeAzureOpenAIVectorizerParameters(document.RootElement, options);
+ }
+
+ internal static AzureOpenAIVectorizerParameters DeserializeAzureOpenAIVectorizerParameters(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;
+ 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 (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new AzureOpenAIVectorizerParameters(
+ resourceUri,
+ deploymentId,
+ apiKey,
+ authIdentity,
+ 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(AzureOpenAIVectorizerParameters)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ AzureOpenAIVectorizerParameters 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 DeserializeAzureOpenAIVectorizerParameters(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(AzureOpenAIVectorizerParameters)} 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 AzureOpenAIVectorizerParameters FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeAzureOpenAIVectorizerParameters(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/AzureOpenAIVectorizerParameters.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AzureOpenAIVectorizerParameters.cs
new file mode 100644
index 000000000000..c6d660b564ed
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/AzureOpenAIVectorizerParameters.cs
@@ -0,0 +1,95 @@
+// 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 parameters for connecting to the Azure OpenAI resource.
+ public partial class AzureOpenAIVectorizerParameters
+ {
+ ///
+ /// 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 .
+ public AzureOpenAIVectorizerParameters()
+ {
+ }
+
+ /// Initializes a new instance of .
+ /// The resource URI of the Azure OpenAI resource.
+ /// ID of the Azure OpenAI model deployment on the designated resource.
+ /// API key of the designated Azure OpenAI resource.
+ ///
+ /// The user-assigned managed identity used for outbound connections.
+ /// 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 name of the embedding model that is deployed at the provided deploymentId
+ /// path.
+ ///
+ /// Keeps track of any properties unknown to the library.
+ internal AzureOpenAIVectorizerParameters(Uri resourceUri, string deploymentId, string apiKey, SearchIndexerDataIdentity authIdentity, AzureOpenAIModelName? modelName, IDictionary serializedAdditionalRawData)
+ {
+ ResourceUri = resourceUri;
+ DeploymentId = deploymentId;
+ ApiKey = apiKey;
+ AuthIdentity = authIdentity;
+ ModelName = modelName;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// The resource URI of the Azure OpenAI resource.
+ public Uri ResourceUri { get; set; }
+ /// ID of the Azure OpenAI model deployment on the designated resource.
+ public string DeploymentId { get; set; }
+ /// API key of the designated Azure OpenAI resource.
+ public string ApiKey { get; set; }
+ ///
+ /// The user-assigned managed identity used for outbound connections.
+ /// 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; }
+ ///
+ /// The name of the embedding model that is deployed at the provided deploymentId
+ /// path.
+ ///
+ public AzureOpenAIModelName? ModelName { get; set; }
+ }
+}
diff --git a/sdk/search/Azure.Search.Documents.Indexes/src/Generated/BM25SimilarityAlgorithm.Serialization.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/BM25SimilarityAlgorithm.Serialization.cs
new file mode 100644
index 000000000000..4b44522d0941
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/BM25SimilarityAlgorithm.Serialization.cs
@@ -0,0 +1,156 @@
+// 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 BM25SimilarityAlgorithm : 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(BM25SimilarityAlgorithm)} does not support writing '{format}' format.");
+ }
+
+ base.JsonModelWriteCore(writer, options);
+ if (Optional.IsDefined(K1))
+ {
+ writer.WritePropertyName("k1"u8);
+ writer.WriteNumberValue(K1.Value);
+ }
+ if (Optional.IsDefined(B))
+ {
+ writer.WritePropertyName("b"u8);
+ writer.WriteNumberValue(B.Value);
+ }
+ }
+
+ BM25SimilarityAlgorithm 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(BM25SimilarityAlgorithm)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeBM25SimilarityAlgorithm(document.RootElement, options);
+ }
+
+ internal static BM25SimilarityAlgorithm DeserializeBM25SimilarityAlgorithm(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ double? k1 = default;
+ double? b = default;
+ string odataType = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("k1"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ k1 = property.Value.GetDouble();
+ continue;
+ }
+ if (property.NameEquals("b"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ b = property.Value.GetDouble();
+ continue;
+ }
+ if (property.NameEquals("@odata.type"u8))
+ {
+ odataType = property.Value.GetString();
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new BM25SimilarityAlgorithm(odataType, serializedAdditionalRawData, k1, b);
+ }
+
+ 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(BM25SimilarityAlgorithm)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ BM25SimilarityAlgorithm 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 DeserializeBM25SimilarityAlgorithm(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(BM25SimilarityAlgorithm)} 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 BM25SimilarityAlgorithm FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeBM25SimilarityAlgorithm(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/BM25SimilarityAlgorithm.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/BM25SimilarityAlgorithm.cs
new file mode 100644
index 000000000000..e5db97b66d00
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/BM25SimilarityAlgorithm.cs
@@ -0,0 +1,63 @@
+// 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
+{
+ ///
+ /// Ranking function based on the Okapi BM25 similarity algorithm. BM25 is a
+ /// TF-IDF-like algorithm that includes length normalization (controlled by the 'b'
+ /// parameter) as well as term frequency saturation (controlled by the 'k1'
+ /// parameter).
+ ///
+ public partial class BM25SimilarityAlgorithm : SimilarityAlgorithm
+ {
+ /// Initializes a new instance of .
+ public BM25SimilarityAlgorithm()
+ {
+ OdataType = "#Microsoft.Azure.Search.BM25Similarity";
+ }
+
+ /// Initializes a new instance of .
+ /// The discriminator for derived types.
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// This property controls the scaling function between the term frequency of each
+ /// matching terms and the final relevance score of a document-query pair. By
+ /// default, a value of 1.2 is used. A value of 0.0 means the score does not scale
+ /// with an increase in term frequency.
+ ///
+ ///
+ /// This property controls how the length of a document affects the relevance
+ /// score. By default, a value of 0.75 is used. A value of 0.0 means no length
+ /// normalization is applied, while a value of 1.0 means the score is fully
+ /// normalized by the length of the document.
+ ///
+ internal BM25SimilarityAlgorithm(string odataType, IDictionary serializedAdditionalRawData, double? k1, double? b) : base(odataType, serializedAdditionalRawData)
+ {
+ K1 = k1;
+ B = b;
+ }
+
+ ///
+ /// This property controls the scaling function between the term frequency of each
+ /// matching terms and the final relevance score of a document-query pair. By
+ /// default, a value of 1.2 is used. A value of 0.0 means the score does not scale
+ /// with an increase in term frequency.
+ ///
+ public double? K1 { get; set; }
+ ///
+ /// This property controls how the length of a document affects the relevance
+ /// score. By default, a value of 0.75 is used. A value of 0.0 means no length
+ /// normalization is applied, while a value of 1.0 means the score is fully
+ /// normalized by the length of the document.
+ ///
+ public double? B { get; set; }
+ }
+}
diff --git a/sdk/search/Azure.Search.Documents.Indexes/src/Generated/BinaryQuantizationCompression.Serialization.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/BinaryQuantizationCompression.Serialization.cs
new file mode 100644
index 000000000000..91ee763ec20b
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/BinaryQuantizationCompression.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 BinaryQuantizationCompression : 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(BinaryQuantizationCompression)} does not support writing '{format}' format.");
+ }
+
+ base.JsonModelWriteCore(writer, options);
+ }
+
+ BinaryQuantizationCompression 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(BinaryQuantizationCompression)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeBinaryQuantizationCompression(document.RootElement, options);
+ }
+
+ internal static BinaryQuantizationCompression DeserializeBinaryQuantizationCompression(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ string name = default;
+ bool? rerankWithOriginalVectors = default;
+ double? defaultOversampling = default;
+ VectorSearchCompressionKind kind = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("name"u8))
+ {
+ name = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("rerankWithOriginalVectors"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ rerankWithOriginalVectors = property.Value.GetBoolean();
+ continue;
+ }
+ if (property.NameEquals("defaultOversampling"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ defaultOversampling = property.Value.GetDouble();
+ continue;
+ }
+ if (property.NameEquals("kind"u8))
+ {
+ kind = new VectorSearchCompressionKind(property.Value.GetString());
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new BinaryQuantizationCompression(name, rerankWithOriginalVectors, defaultOversampling, kind, 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(BinaryQuantizationCompression)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ BinaryQuantizationCompression 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 DeserializeBinaryQuantizationCompression(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(BinaryQuantizationCompression)} 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 BinaryQuantizationCompression FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeBinaryQuantizationCompression(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/BinaryQuantizationCompression.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/BinaryQuantizationCompression.cs
new file mode 100644
index 000000000000..eded9a63313b
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/BinaryQuantizationCompression.cs
@@ -0,0 +1,56 @@
+// 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
+{
+ ///
+ /// Contains configuration options specific to the binary quantization compression
+ /// method used during indexing and querying.
+ ///
+ public partial class BinaryQuantizationCompression : VectorSearchCompression
+ {
+ /// Initializes a new instance of .
+ /// The name to associate with this particular configuration.
+ /// is null.
+ public BinaryQuantizationCompression(string name) : base(name)
+ {
+ Argument.AssertNotNull(name, nameof(name));
+
+ Kind = VectorSearchCompressionKind.BinaryQuantization;
+ }
+
+ /// Initializes a new instance of .
+ /// The name to associate with this particular configuration.
+ ///
+ /// If set to true, once the ordered set of results calculated using compressed
+ /// vectors are obtained, they will be reranked again by recalculating the
+ /// full-precision similarity scores. This will improve recall at the expense of
+ /// latency.
+ ///
+ ///
+ /// Default oversampling factor. Oversampling will internally request more
+ /// documents (specified by this multiplier) in the initial search. This increases
+ /// the set of results that will be reranked using recomputed similarity scores
+ /// from full-precision vectors. Minimum value is 1, meaning no oversampling (1x).
+ /// This parameter can only be set when rerankWithOriginalVectors is true. Higher
+ /// values improve recall at the expense of latency.
+ ///
+ /// Type of VectorSearchCompression.
+ /// Keeps track of any properties unknown to the library.
+ internal BinaryQuantizationCompression(string name, bool? rerankWithOriginalVectors, double? defaultOversampling, VectorSearchCompressionKind kind, IDictionary serializedAdditionalRawData) : base(name, rerankWithOriginalVectors, defaultOversampling, kind, serializedAdditionalRawData)
+ {
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal BinaryQuantizationCompression()
+ {
+ }
+ }
+}
diff --git a/sdk/search/Azure.Search.Documents.Indexes/src/Generated/BlobIndexerDataToExtract.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/BlobIndexerDataToExtract.cs
new file mode 100644
index 000000000000..9cda3f7c856b
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/BlobIndexerDataToExtract.cs
@@ -0,0 +1,63 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.Search.Documents.Indexes
+{
+ ///
+ /// Specifies the data to extract from Azure blob storage and tells the indexer
+ /// which data to extract from image content when "imageAction" is set to a value
+ /// other than "none". This applies to embedded image content in a .PDF or other
+ /// application, or image files such as .jpg and .png, in Azure blobs.
+ ///
+ public readonly partial struct BlobIndexerDataToExtract : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public BlobIndexerDataToExtract(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string StorageMetadataValue = "storageMetadata";
+ private const string AllMetadataValue = "allMetadata";
+ private const string ContentAndMetadataValue = "contentAndMetadata";
+
+ /// Indexes just the standard blob properties and user-specified metadata.
+ public static BlobIndexerDataToExtract StorageMetadata { get; } = new BlobIndexerDataToExtract(StorageMetadataValue);
+ ///
+ /// Extracts metadata provided by the Azure blob storage subsystem and the
+ /// content-type specific metadata (for example, metadata unique to just .png files
+ /// are indexed).
+ ///
+ public static BlobIndexerDataToExtract AllMetadata { get; } = new BlobIndexerDataToExtract(AllMetadataValue);
+ /// Extracts all metadata and textual content from each blob.
+ public static BlobIndexerDataToExtract ContentAndMetadata { get; } = new BlobIndexerDataToExtract(ContentAndMetadataValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(BlobIndexerDataToExtract left, BlobIndexerDataToExtract right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(BlobIndexerDataToExtract left, BlobIndexerDataToExtract right) => !left.Equals(right);
+ /// Converts a to a .
+ public static implicit operator BlobIndexerDataToExtract(string value) => new BlobIndexerDataToExtract(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is BlobIndexerDataToExtract other && Equals(other);
+ ///
+ public bool Equals(BlobIndexerDataToExtract 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/BlobIndexerImageAction.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/BlobIndexerImageAction.cs
new file mode 100644
index 000000000000..144688d7f1c0
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/BlobIndexerImageAction.cs
@@ -0,0 +1,71 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.Search.Documents.Indexes
+{
+ ///
+ /// Determines how to process embedded images and image files in Azure blob
+ /// storage. Setting the "imageAction" configuration to any value other than
+ /// "none" requires that a skillset also be attached to that indexer.
+ ///
+ public readonly partial struct BlobIndexerImageAction : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public BlobIndexerImageAction(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string NoneValue = "none";
+ private const string GenerateNormalizedImagesValue = "generateNormalizedImages";
+ private const string GenerateNormalizedImagePerPageValue = "generateNormalizedImagePerPage";
+
+ /// Ignores embedded images or image files in the data set. This is the default.
+ public static BlobIndexerImageAction None { get; } = new BlobIndexerImageAction(NoneValue);
+ ///
+ /// Extracts text from images (for example, the word "STOP" from a traffic stop
+ /// sign), and embeds it into the content field. This action requires that
+ /// "dataToExtract" is set to "contentAndMetadata". A normalized image refers to
+ /// additional processing resulting in uniform image output, sized and rotated to
+ /// promote consistent rendering when you include images in visual search results.
+ /// This information is generated for each image when you use this option.
+ ///
+ public static BlobIndexerImageAction GenerateNormalizedImages { get; } = new BlobIndexerImageAction(GenerateNormalizedImagesValue);
+ ///
+ /// Extracts text from images (for example, the word "STOP" from a traffic stop
+ /// sign), and embeds it into the content field, but treats PDF files differently
+ /// in that each page will be rendered as an image and normalized accordingly,
+ /// instead of extracting embedded images. Non-PDF file types will be treated the
+ /// same as if "generateNormalizedImages" was set.
+ ///
+ public static BlobIndexerImageAction GenerateNormalizedImagePerPage { get; } = new BlobIndexerImageAction(GenerateNormalizedImagePerPageValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(BlobIndexerImageAction left, BlobIndexerImageAction right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(BlobIndexerImageAction left, BlobIndexerImageAction right) => !left.Equals(right);
+ /// Converts a to a .
+ public static implicit operator BlobIndexerImageAction(string value) => new BlobIndexerImageAction(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is BlobIndexerImageAction other && Equals(other);
+ ///
+ public bool Equals(BlobIndexerImageAction 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/BlobIndexerPDFTextRotationAlgorithm.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/BlobIndexerPDFTextRotationAlgorithm.cs
new file mode 100644
index 000000000000..84c5c4c27230
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/BlobIndexerPDFTextRotationAlgorithm.cs
@@ -0,0 +1,57 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.Search.Documents.Indexes
+{
+ /// Determines algorithm for text extraction from PDF files in Azure blob storage.
+ public readonly partial struct BlobIndexerPDFTextRotationAlgorithm : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public BlobIndexerPDFTextRotationAlgorithm(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string NoneValue = "none";
+ private const string DetectAnglesValue = "detectAngles";
+
+ /// Leverages normal text extraction. This is the default.
+ public static BlobIndexerPDFTextRotationAlgorithm None { get; } = new BlobIndexerPDFTextRotationAlgorithm(NoneValue);
+ ///
+ /// May produce better and more readable text extraction from PDF files that have
+ /// rotated text within them. Note that there may be a small performance speed
+ /// impact when this parameter is used. This parameter only applies to PDF files,
+ /// and only to PDFs with embedded text. If the rotated text appears within an
+ /// embedded image in the PDF, this parameter does not apply.
+ ///
+ public static BlobIndexerPDFTextRotationAlgorithm DetectAngles { get; } = new BlobIndexerPDFTextRotationAlgorithm(DetectAnglesValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(BlobIndexerPDFTextRotationAlgorithm left, BlobIndexerPDFTextRotationAlgorithm right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(BlobIndexerPDFTextRotationAlgorithm left, BlobIndexerPDFTextRotationAlgorithm right) => !left.Equals(right);
+ /// Converts a to a .
+ public static implicit operator BlobIndexerPDFTextRotationAlgorithm(string value) => new BlobIndexerPDFTextRotationAlgorithm(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is BlobIndexerPDFTextRotationAlgorithm other && Equals(other);
+ ///
+ public bool Equals(BlobIndexerPDFTextRotationAlgorithm 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/BlobIndexerParsingMode.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/BlobIndexerParsingMode.cs
new file mode 100644
index 000000000000..0ee33835b136
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/BlobIndexerParsingMode.cs
@@ -0,0 +1,69 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.Search.Documents.Indexes
+{
+ /// Represents the parsing mode for indexing from an Azure blob data source.
+ public readonly partial struct BlobIndexerParsingMode : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public BlobIndexerParsingMode(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string DefaultValue = "default";
+ private const string TextValue = "text";
+ private const string DelimitedTextValue = "delimitedText";
+ private const string JsonValue = "json";
+ private const string JsonArrayValue = "jsonArray";
+ private const string JsonLinesValue = "jsonLines";
+
+ /// Set to default for normal file processing.
+ public static BlobIndexerParsingMode Default { get; } = new BlobIndexerParsingMode(DefaultValue);
+ /// Set to text to improve indexing performance on plain text files in blob storage.
+ public static BlobIndexerParsingMode Text { get; } = new BlobIndexerParsingMode(TextValue);
+ /// Set to delimitedText when blobs are plain CSV files.
+ public static BlobIndexerParsingMode DelimitedText { get; } = new BlobIndexerParsingMode(DelimitedTextValue);
+ /// Set to json to extract structured content from JSON files.
+ public static BlobIndexerParsingMode Json { get; } = new BlobIndexerParsingMode(JsonValue);
+ ///
+ /// Set to jsonArray to extract individual elements of a JSON array as separate
+ /// documents.
+ ///
+ public static BlobIndexerParsingMode JsonArray { get; } = new BlobIndexerParsingMode(JsonArrayValue);
+ ///
+ /// Set to jsonLines to extract individual JSON entities, separated by a new line,
+ /// as separate documents.
+ ///
+ public static BlobIndexerParsingMode JsonLines { get; } = new BlobIndexerParsingMode(JsonLinesValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(BlobIndexerParsingMode left, BlobIndexerParsingMode right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(BlobIndexerParsingMode left, BlobIndexerParsingMode right) => !left.Equals(right);
+ /// Converts a to a .
+ public static implicit operator BlobIndexerParsingMode(string value) => new BlobIndexerParsingMode(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is BlobIndexerParsingMode other && Equals(other);
+ ///
+ public bool Equals(BlobIndexerParsingMode 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/CharFilter.Serialization.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/CharFilter.Serialization.cs
new file mode 100644
index 000000000000..2c4117da1369
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/CharFilter.Serialization.cs
@@ -0,0 +1,136 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.Search.Documents.Indexes
+{
+ [PersistableModelProxy(typeof(UnknownCharFilter))]
+ public partial class CharFilter : 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(CharFilter)} does not support writing '{format}' format.");
+ }
+
+ writer.WritePropertyName("@odata.type"u8);
+ writer.WriteStringValue(OdataType);
+ writer.WritePropertyName("name"u8);
+ writer.WriteStringValue(Name);
+ 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
+ }
+ }
+ }
+
+ CharFilter 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(CharFilter)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeCharFilter(document.RootElement, options);
+ }
+
+ internal static CharFilter DeserializeCharFilter(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ if (element.TryGetProperty("@odata.type", out JsonElement discriminator))
+ {
+ switch (discriminator.GetString())
+ {
+ case "#Microsoft.Azure.Search.MappingCharFilter": return MappingCharFilter.DeserializeMappingCharFilter(element, options);
+ case "#Microsoft.Azure.Search.PatternReplaceCharFilter": return PatternReplaceCharFilter.DeserializePatternReplaceCharFilter(element, options);
+ }
+ }
+ return UnknownCharFilter.DeserializeUnknownCharFilter(element, options);
+ }
+
+ 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(CharFilter)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ CharFilter 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 DeserializeCharFilter(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(CharFilter)} 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 CharFilter FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeCharFilter(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/CharFilter.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/CharFilter.cs
new file mode 100644
index 000000000000..3e8a180fabcb
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/CharFilter.cs
@@ -0,0 +1,95 @@
+// 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
+{
+ ///
+ /// Base type for character filters.
+ /// 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 abstract partial class CharFilter
+ {
+ ///
+ /// 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 protected IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ ///
+ /// The name of the char 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.
+ protected CharFilter(string name)
+ {
+ Argument.AssertNotNull(name, nameof(name));
+
+ Name = name;
+ }
+
+ /// Initializes a new instance of .
+ /// The discriminator for derived types.
+ ///
+ /// The name of the char 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.
+ internal CharFilter(string odataType, string name, IDictionary serializedAdditionalRawData)
+ {
+ OdataType = odataType;
+ Name = name;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal CharFilter()
+ {
+ }
+
+ /// The discriminator for derived types.
+ internal string OdataType { get; set; }
+ ///
+ /// The name of the char 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.
+ ///
+ public string Name { get; set; }
+ }
+}
diff --git a/sdk/search/Azure.Search.Documents.Indexes/src/Generated/CharFilterName.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/CharFilterName.cs
new file mode 100644
index 000000000000..1b4006ab6867
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/CharFilterName.cs
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.Search.Documents.Indexes
+{
+ /// Defines the names of all character filters supported by the search engine.
+ public readonly partial struct CharFilterName : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public CharFilterName(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string HtmlStripValue = "html_strip";
+
+ ///
+ /// A character filter that attempts to strip out HTML constructs. See
+ /// https://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.html
+ ///
+ public static CharFilterName HtmlStrip { get; } = new CharFilterName(HtmlStripValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(CharFilterName left, CharFilterName right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(CharFilterName left, CharFilterName right) => !left.Equals(right);
+ /// Converts a to a .
+ public static implicit operator CharFilterName(string value) => new CharFilterName(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is CharFilterName other && Equals(other);
+ ///
+ public bool Equals(CharFilterName 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/CjkBigramTokenFilter.Serialization.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/CjkBigramTokenFilter.Serialization.cs
new file mode 100644
index 000000000000..7aca89494775
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/CjkBigramTokenFilter.Serialization.cs
@@ -0,0 +1,172 @@
+// 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 CjkBigramTokenFilter : 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(CjkBigramTokenFilter)} does not support writing '{format}' format.");
+ }
+
+ base.JsonModelWriteCore(writer, options);
+ if (Optional.IsCollectionDefined(IgnoreScripts))
+ {
+ writer.WritePropertyName("ignoreScripts"u8);
+ writer.WriteStartArray();
+ foreach (var item in IgnoreScripts)
+ {
+ writer.WriteStringValue(item.ToString());
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsDefined(OutputUnigrams))
+ {
+ writer.WritePropertyName("outputUnigrams"u8);
+ writer.WriteBooleanValue(OutputUnigrams.Value);
+ }
+ }
+
+ CjkBigramTokenFilter 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(CjkBigramTokenFilter)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeCjkBigramTokenFilter(document.RootElement, options);
+ }
+
+ internal static CjkBigramTokenFilter DeserializeCjkBigramTokenFilter(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ IList ignoreScripts = default;
+ bool? outputUnigrams = default;
+ string odataType = default;
+ string name = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("ignoreScripts"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(new CjkBigramTokenFilterScripts(item.GetString()));
+ }
+ ignoreScripts = array;
+ continue;
+ }
+ if (property.NameEquals("outputUnigrams"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ outputUnigrams = 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 CjkBigramTokenFilter(odataType, name, serializedAdditionalRawData, ignoreScripts ?? new ChangeTrackingList(), outputUnigrams);
+ }
+
+ 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(CjkBigramTokenFilter)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ CjkBigramTokenFilter 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 DeserializeCjkBigramTokenFilter(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(CjkBigramTokenFilter)} 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 CjkBigramTokenFilter FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeCjkBigramTokenFilter(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/CjkBigramTokenFilter.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/CjkBigramTokenFilter.cs
new file mode 100644
index 000000000000..164823eeff2f
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/CjkBigramTokenFilter.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
+{
+ ///
+ /// Forms bigrams of CJK terms that are generated from the standard tokenizer. This
+ /// token filter is implemented using Apache Lucene.
+ ///
+ public partial class CjkBigramTokenFilter : 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 CjkBigramTokenFilter(string name) : base(name)
+ {
+ Argument.AssertNotNull(name, nameof(name));
+
+ OdataType = "#Microsoft.Azure.Search.CjkBigramTokenFilter";
+ IgnoreScripts = new ChangeTrackingList();
+ }
+
+ /// 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.
+ /// The scripts to ignore.
+ ///
+ /// A value indicating whether to output both unigrams and bigrams (if true), or
+ /// just bigrams (if false). Default is false.
+ ///
+ internal CjkBigramTokenFilter(string odataType, string name, IDictionary serializedAdditionalRawData, IList ignoreScripts, bool? outputUnigrams) : base(odataType, name, serializedAdditionalRawData)
+ {
+ IgnoreScripts = ignoreScripts;
+ OutputUnigrams = outputUnigrams;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal CjkBigramTokenFilter()
+ {
+ }
+
+ /// The scripts to ignore.
+ public IList IgnoreScripts { get; }
+ ///
+ /// A value indicating whether to output both unigrams and bigrams (if true), or
+ /// just bigrams (if false). Default is false.
+ ///
+ public bool? OutputUnigrams { get; set; }
+ }
+}
diff --git a/sdk/search/Azure.Search.Documents.Indexes/src/Generated/CjkBigramTokenFilterScripts.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/CjkBigramTokenFilterScripts.cs
new file mode 100644
index 000000000000..7ec8adf00937
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/CjkBigramTokenFilterScripts.cs
@@ -0,0 +1,57 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.Search.Documents.Indexes
+{
+ /// Scripts that can be ignored by CjkBigramTokenFilter.
+ public readonly partial struct CjkBigramTokenFilterScripts : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public CjkBigramTokenFilterScripts(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string HanValue = "han";
+ private const string HiraganaValue = "hiragana";
+ private const string KatakanaValue = "katakana";
+ private const string HangulValue = "hangul";
+
+ /// Ignore Han script when forming bigrams of CJK terms.
+ public static CjkBigramTokenFilterScripts Han { get; } = new CjkBigramTokenFilterScripts(HanValue);
+ /// Ignore Hiragana script when forming bigrams of CJK terms.
+ public static CjkBigramTokenFilterScripts Hiragana { get; } = new CjkBigramTokenFilterScripts(HiraganaValue);
+ /// Ignore Katakana script when forming bigrams of CJK terms.
+ public static CjkBigramTokenFilterScripts Katakana { get; } = new CjkBigramTokenFilterScripts(KatakanaValue);
+ /// Ignore Hangul script when forming bigrams of CJK terms.
+ public static CjkBigramTokenFilterScripts Hangul { get; } = new CjkBigramTokenFilterScripts(HangulValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(CjkBigramTokenFilterScripts left, CjkBigramTokenFilterScripts right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(CjkBigramTokenFilterScripts left, CjkBigramTokenFilterScripts right) => !left.Equals(right);
+ /// Converts a to a .
+ public static implicit operator CjkBigramTokenFilterScripts(string value) => new CjkBigramTokenFilterScripts(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is CjkBigramTokenFilterScripts other && Equals(other);
+ ///
+ public bool Equals(CjkBigramTokenFilterScripts 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/ClassicSimilarityAlgorithm.Serialization.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/ClassicSimilarityAlgorithm.Serialization.cs
new file mode 100644
index 000000000000..9124ca4649c2
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/ClassicSimilarityAlgorithm.Serialization.cs
@@ -0,0 +1,126 @@
+// 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 ClassicSimilarityAlgorithm : 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(ClassicSimilarityAlgorithm)} does not support writing '{format}' format.");
+ }
+
+ base.JsonModelWriteCore(writer, options);
+ }
+
+ ClassicSimilarityAlgorithm 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(ClassicSimilarityAlgorithm)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeClassicSimilarityAlgorithm(document.RootElement, options);
+ }
+
+ internal static ClassicSimilarityAlgorithm DeserializeClassicSimilarityAlgorithm(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ string odataType = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("@odata.type"u8))
+ {
+ odataType = property.Value.GetString();
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new ClassicSimilarityAlgorithm(odataType, 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(ClassicSimilarityAlgorithm)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ ClassicSimilarityAlgorithm 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 DeserializeClassicSimilarityAlgorithm(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(ClassicSimilarityAlgorithm)} 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 ClassicSimilarityAlgorithm FromResponse(Response response)
+ {
+ using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions);
+ return DeserializeClassicSimilarityAlgorithm(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/ClassicSimilarityAlgorithm.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/ClassicSimilarityAlgorithm.cs
new file mode 100644
index 000000000000..d0bbda23159e
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/ClassicSimilarityAlgorithm.cs
@@ -0,0 +1,34 @@
+// 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
+{
+ ///
+ /// Legacy similarity algorithm which uses the Lucene TFIDFSimilarity
+ /// implementation of TF-IDF. This variation of TF-IDF introduces static document
+ /// length normalization as well as coordinating factors that penalize documents
+ /// that only partially match the searched queries.
+ ///
+ public partial class ClassicSimilarityAlgorithm : SimilarityAlgorithm
+ {
+ /// Initializes a new instance of .
+ public ClassicSimilarityAlgorithm()
+ {
+ OdataType = "#Microsoft.Azure.Search.ClassicSimilarity";
+ }
+
+ /// Initializes a new instance of .
+ /// The discriminator for derived types.
+ /// Keeps track of any properties unknown to the library.
+ internal ClassicSimilarityAlgorithm(string odataType, IDictionary serializedAdditionalRawData) : base(odataType, serializedAdditionalRawData)
+ {
+ }
+ }
+}
diff --git a/sdk/search/Azure.Search.Documents.Indexes/src/Generated/ClassicTokenizer.Serialization.cs b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/ClassicTokenizer.Serialization.cs
new file mode 100644
index 000000000000..5b3652d00d6c
--- /dev/null
+++ b/sdk/search/Azure.Search.Documents.Indexes/src/Generated/ClassicTokenizer.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 ClassicTokenizer : 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(ClassicTokenizer)} does not support writing '{format}' format.");
+ }
+
+ base.JsonModelWriteCore(writer, options);
+ if (Optional.IsDefined(MaxTokenLength))
+ {
+ writer.WritePropertyName("maxTokenLength"u8);
+ writer.WriteNumberValue(MaxTokenLength.Value);
+ }
+ }
+
+ ClassicTokenizer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel