diff --git a/algoliasearch/Clients/CompositionClient.cs b/algoliasearch/Clients/CompositionClient.cs
new file mode 100644
index 00000000..89c03add
--- /dev/null
+++ b/algoliasearch/Clients/CompositionClient.cs
@@ -0,0 +1,221 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Collections.Generic;
+using System.Net.Http;
+using System.Threading;
+using System.Threading.Tasks;
+using Algolia.Search.Models.Composition;
+using Algolia.Search.Transport;
+using Algolia.Search.Http;
+using Algolia.Search.Utils;
+using Microsoft.Extensions.Logging;
+using Microsoft.Extensions.Logging.Abstractions;
+
+namespace Algolia.Search.Clients;
+
+
+///
+/// Represents a collection of functions to interact with the API endpoints
+///
+public interface ICompositionClient
+{
+ ///
+ /// Runs a query on a single composition and returns matching results.
+ ///
+ ///
+ /// Required API Key ACLs:
+ /// - search
+ /// Unique Composition ObjectID.
+ ///
+ /// Add extra http header or query parameters to Algolia.
+ /// Cancellation Token to cancel the request.
+ /// Thrown when arguments are not correct
+ /// Thrown when the API call was rejected by Algolia
+ /// Thrown when the client failed to call the endpoint
+ /// Task of SearchResponse{T}
+ Task> SearchAsync(string compositionID, RequestBody requestBody, RequestOptions options = null, CancellationToken cancellationToken = default);
+
+ ///
+ /// Runs a query on a single composition and returns matching results. (Synchronous version)
+ ///
+ ///
+ /// Required API Key ACLs:
+ /// - search
+ /// Unique Composition ObjectID.
+ ///
+ /// Add extra http header or query parameters to Algolia.
+ /// Cancellation Token to cancel the request.
+ /// Thrown when arguments are not correct
+ /// Thrown when the API call was rejected by Algolia
+ /// Thrown when the client failed to call the endpoint
+ /// SearchResponse{T}
+ SearchResponse Search(string compositionID, RequestBody requestBody, RequestOptions options = null, CancellationToken cancellationToken = default);
+
+ ///
+ /// Searches for values of a specified facet attribute on the composition's main source's index. - By default, facet values are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for facet values doesn't work if you have **more than 65 searchable facets and searchable attributes combined**.
+ ///
+ ///
+ /// Required API Key ACLs:
+ /// - search
+ /// Unique Composition ObjectID.
+ /// Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier.
+ /// (optional)
+ /// Add extra http header or query parameters to Algolia.
+ /// Cancellation Token to cancel the request.
+ /// Thrown when arguments are not correct
+ /// Thrown when the API call was rejected by Algolia
+ /// Thrown when the client failed to call the endpoint
+ /// Task of SearchForFacetValuesResponse
+ Task SearchForFacetValuesAsync(string compositionID, string facetName, SearchForFacetValuesRequest searchForFacetValuesRequest = default, RequestOptions options = null, CancellationToken cancellationToken = default);
+
+ ///
+ /// Searches for values of a specified facet attribute on the composition's main source's index. - By default, facet values are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for facet values doesn't work if you have **more than 65 searchable facets and searchable attributes combined**. (Synchronous version)
+ ///
+ ///
+ /// Required API Key ACLs:
+ /// - search
+ /// Unique Composition ObjectID.
+ /// Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier.
+ /// (optional)
+ /// Add extra http header or query parameters to Algolia.
+ /// Cancellation Token to cancel the request.
+ /// Thrown when arguments are not correct
+ /// Thrown when the API call was rejected by Algolia
+ /// Thrown when the client failed to call the endpoint
+ /// SearchForFacetValuesResponse
+ SearchForFacetValuesResponse SearchForFacetValues(string compositionID, string facetName, SearchForFacetValuesRequest searchForFacetValuesRequest = default, RequestOptions options = null, CancellationToken cancellationToken = default);
+
+}
+
+
+
+///
+/// Represents a collection of functions to interact with the API endpoints
+///
+public partial class CompositionClient : ICompositionClient
+{
+ internal HttpTransport _transport;
+ private readonly ILogger _logger;
+
+ ///
+ /// Create a new Composition client for the given appID and apiKey.
+ ///
+ /// Your application
+ /// Your API key
+ /// Logger factory
+
+ public CompositionClient(string applicationId, string apiKey, ILoggerFactory loggerFactory = null) : this(new CompositionConfig(applicationId, apiKey), new AlgoliaHttpRequester(loggerFactory), loggerFactory)
+ {
+ }
+
+ ///
+ /// Initialize a client with custom config
+ ///
+ /// Algolia configuration
+ /// Logger factory
+ public CompositionClient(CompositionConfig config, ILoggerFactory loggerFactory = null) : this(config, new AlgoliaHttpRequester(loggerFactory), loggerFactory)
+ {
+ }
+
+ ///
+ /// Initialize the client with custom config and custom Requester
+ ///
+ /// Algolia Config
+ /// Your Http requester implementation of
+ /// Logger factory
+ public CompositionClient(CompositionConfig config, IHttpRequester httpRequester, ILoggerFactory loggerFactory = null)
+ {
+ if (httpRequester == null)
+ {
+ throw new ArgumentException("An httpRequester is required");
+ }
+ if (config == null)
+ {
+ throw new ArgumentException("A config is required");
+ }
+ if (string.IsNullOrWhiteSpace(config.AppId))
+ {
+ throw new ArgumentException("`AppId` is missing.");
+ }
+ if (string.IsNullOrWhiteSpace(config.ApiKey))
+ {
+ throw new ArgumentException("`ApiKey` is missing.");
+ }
+
+ var factory = loggerFactory ?? NullLoggerFactory.Instance;
+ _transport = new HttpTransport(config, httpRequester, factory);
+ _logger = factory.CreateLogger();
+
+ if (_logger.IsEnabled(Microsoft.Extensions.Logging.LogLevel.Information))
+ {
+ _logger.LogInformation("Algolia Composition client is initialized.");
+ }
+ }
+
+ ///
+ /// Helper to switch the API key sent with each request
+ ///
+ /// Your new API Key
+ ///
+ public void SetClientApiKey(string apiKey)
+ {
+ _transport._algoliaConfig.SetClientApiKey(apiKey);
+ }
+
+
+
+ ///
+ public async Task> SearchAsync(string compositionID, RequestBody requestBody, RequestOptions options = null, CancellationToken cancellationToken = default)
+ {
+
+ if (compositionID == null)
+ throw new ArgumentException("Parameter `compositionID` is required when calling `Search`.");
+
+
+ if (requestBody == null)
+ throw new ArgumentException("Parameter `requestBody` is required when calling `Search`.");
+
+ var requestOptions = new InternalRequestOptions(options);
+
+ requestOptions.PathParameters.Add("compositionID", QueryStringHelper.ParameterToString(compositionID));
+
+ requestOptions.Data = requestBody;
+ requestOptions.UseReadTransporter = true;
+ return await _transport.ExecuteRequestAsync>(new HttpMethod("POST"), "/1/compositions/{compositionID}/run", requestOptions, cancellationToken).ConfigureAwait(false);
+ }
+
+
+ ///
+ public SearchResponse Search(string compositionID, RequestBody requestBody, RequestOptions options = null, CancellationToken cancellationToken = default) =>
+ AsyncHelper.RunSync(() => SearchAsync(compositionID, requestBody, options, cancellationToken));
+
+
+ ///
+ public async Task SearchForFacetValuesAsync(string compositionID, string facetName, SearchForFacetValuesRequest searchForFacetValuesRequest = default, RequestOptions options = null, CancellationToken cancellationToken = default)
+ {
+
+ if (compositionID == null)
+ throw new ArgumentException("Parameter `compositionID` is required when calling `SearchForFacetValues`.");
+
+
+ if (facetName == null)
+ throw new ArgumentException("Parameter `facetName` is required when calling `SearchForFacetValues`.");
+
+ var requestOptions = new InternalRequestOptions(options);
+
+ requestOptions.PathParameters.Add("compositionID", QueryStringHelper.ParameterToString(compositionID));
+ requestOptions.PathParameters.Add("facetName", QueryStringHelper.ParameterToString(facetName));
+
+ requestOptions.Data = searchForFacetValuesRequest;
+ requestOptions.UseReadTransporter = true;
+ return await _transport.ExecuteRequestAsync(new HttpMethod("POST"), "/1/compositions/{compositionID}/facets/{facetName}/query", requestOptions, cancellationToken).ConfigureAwait(false);
+ }
+
+
+ ///
+ public SearchForFacetValuesResponse SearchForFacetValues(string compositionID, string facetName, SearchForFacetValuesRequest searchForFacetValuesRequest = default, RequestOptions options = null, CancellationToken cancellationToken = default) =>
+ AsyncHelper.RunSync(() => SearchForFacetValuesAsync(compositionID, facetName, searchForFacetValuesRequest, options, cancellationToken));
+
+}
diff --git a/algoliasearch/Clients/CompositionConfiguration.cs b/algoliasearch/Clients/CompositionConfiguration.cs
new file mode 100644
index 00000000..a0cfc675
--- /dev/null
+++ b/algoliasearch/Clients/CompositionConfiguration.cs
@@ -0,0 +1,83 @@
+/*
+* Composition API
+*
+* Composition API.
+*
+* The version of the OpenAPI document: 1.0.0
+* Generated by: https://github.com/openapitools/openapi-generator.git
+*/
+
+
+using System;
+using System.Collections.Generic;
+using Algolia.Search.Models.Common;
+using Algolia.Search.Transport;
+using Algolia.Search.Utils;
+
+namespace Algolia.Search.Clients;
+
+///
+/// Composition client configuration
+///
+public sealed class CompositionConfig : AlgoliaConfig
+{
+ ///
+ /// The configuration of the Composition client
+ /// A client should have it's own configuration ie on configuration per client instance
+ ///
+ /// Your application ID
+ /// Your API Key
+ public CompositionConfig(string appId, string apiKey) : base(appId, apiKey, "Composition", "7.12.0")
+ {
+ DefaultHosts = GetDefaultHosts(appId);
+ Compression = CompressionType.None;
+ ReadTimeout = TimeSpan.FromMilliseconds(5000);
+ WriteTimeout = TimeSpan.FromMilliseconds(30000);
+ ConnectTimeout = TimeSpan.FromMilliseconds(2000);
+ }
+ private static List GetDefaultHosts(string appId)
+ {
+ var hosts = new List
+ {
+ new()
+ {
+ Url = $"{appId}-dsn.algolia.net",
+ Up = true,
+ LastUse = DateTime.UtcNow,
+ Accept = CallType.Read
+ },
+ new()
+ {
+ Url = $"{appId}.algolia.net", Up = true, LastUse = DateTime.UtcNow, Accept = CallType.Write,
+ }
+ };
+
+ var commonHosts = new List
+ {
+ new()
+ {
+ Url = $"{appId}-1.algolianet.com",
+ Up = true,
+ LastUse = DateTime.UtcNow,
+ Accept = CallType.Read | CallType.Write,
+ },
+ new()
+ {
+ Url = $"{appId}-2.algolianet.com",
+ Up = true,
+ LastUse = DateTime.UtcNow,
+ Accept = CallType.Read | CallType.Write,
+ },
+ new()
+ {
+ Url = $"{appId}-3.algolianet.com",
+ Up = true,
+ LastUse = DateTime.UtcNow,
+ Accept = CallType.Read | CallType.Write,
+ }
+ }.Shuffle();
+
+ hosts.AddRange(commonHosts);
+ return hosts;
+ }
+}
diff --git a/algoliasearch/Models/Composition/AroundPrecision.cs b/algoliasearch/Models/Composition/AroundPrecision.cs
new file mode 100644
index 00000000..92f04727
--- /dev/null
+++ b/algoliasearch/Models/Composition/AroundPrecision.cs
@@ -0,0 +1,210 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+using System.IO;
+using System.Reflection;
+using Algolia.Search.Models.Common;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// Precision of a coordinate-based search in meters to group results with similar distances. The Geo ranking criterion considers all matches within the same range of distances to be equal.
+///
+[JsonConverter(typeof(AroundPrecisionJsonConverter))]
+public partial class AroundPrecision : AbstractSchema
+{
+ ///
+ /// Initializes a new instance of the AroundPrecision class
+ /// with a int
+ ///
+ /// An instance of int.
+ public AroundPrecision(int actualInstance)
+ {
+ ActualInstance = actualInstance;
+ }
+
+ ///
+ /// Initializes a new instance of the AroundPrecision class
+ /// with a List{Range}
+ ///
+ /// An instance of List.
+ public AroundPrecision(List actualInstance)
+ {
+ ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
+ }
+
+
+ ///
+ /// Gets or Sets ActualInstance
+ ///
+ public sealed override object ActualInstance { get; set; }
+
+ ///
+ /// Get the actual instance of `int`. If the actual instance is not `int`,
+ /// the InvalidClassException will be thrown
+ ///
+ /// An instance of int
+ public int AsInt()
+ {
+ return (int)ActualInstance;
+ }
+
+ ///
+ /// Get the actual instance of `List{Range}`. If the actual instance is not `List{Range}`,
+ /// the InvalidClassException will be thrown
+ ///
+ /// An instance of List<Range>
+ public List AsListRange()
+ {
+ return (List)ActualInstance;
+ }
+
+
+ ///
+ /// Check if the actual instance is of `int` type.
+ ///
+ /// Whether or not the instance is the type
+ public bool IsInt()
+ {
+ return ActualInstance.GetType() == typeof(int);
+ }
+
+ ///
+ /// Check if the actual instance is of `List{Range}` type.
+ ///
+ /// Whether or not the instance is the type
+ public bool IsListRange()
+ {
+ return ActualInstance.GetType() == typeof(List);
+ }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ var sb = new StringBuilder();
+ sb.Append("class AroundPrecision {\n");
+ sb.Append(" ActualInstance: ").Append(ActualInstance).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public override string ToJson()
+ {
+ return JsonSerializer.Serialize(ActualInstance, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not AroundPrecision input)
+ {
+ return false;
+ }
+
+ return ActualInstance.Equals(input.ActualInstance);
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (ActualInstance != null)
+ hashCode = hashCode * 59 + ActualInstance.GetHashCode();
+ return hashCode;
+ }
+ }
+}
+
+
+
+
+
+///
+/// Custom JSON converter for AroundPrecision
+///
+public class AroundPrecisionJsonConverter : JsonConverter
+{
+
+ ///
+ /// Check if the object can be converted
+ ///
+ /// Object type
+ /// True if the object can be converted
+ public override bool CanConvert(Type objectType)
+ {
+ return objectType == typeof(AroundPrecision);
+ }
+
+ ///
+ /// To convert a JSON string into an object
+ ///
+ /// JSON reader
+ /// Object type
+ /// Serializer options
+ /// The object converted from the JSON string
+ public override AroundPrecision Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ var jsonDocument = JsonDocument.ParseValue(ref reader);
+ var root = jsonDocument.RootElement;
+ if (root.ValueKind == JsonValueKind.Number)
+ {
+ try
+ {
+ return new AroundPrecision(jsonDocument.Deserialize(JsonConfig.Options));
+ }
+ catch (Exception exception)
+ {
+ // deserialization failed, try the next one
+ System.Diagnostics.Debug.WriteLine($"Failed to deserialize into int: {exception}");
+ }
+ }
+ if (root.ValueKind == JsonValueKind.Array)
+ {
+ try
+ {
+ return new AroundPrecision(jsonDocument.Deserialize>(JsonConfig.Options));
+ }
+ catch (Exception exception)
+ {
+ // deserialization failed, try the next one
+ System.Diagnostics.Debug.WriteLine($"Failed to deserialize into List: {exception}");
+ }
+ }
+ throw new InvalidDataException($"The JSON string cannot be deserialized into any schema defined.");
+ }
+
+ ///
+ /// To write the JSON string
+ ///
+ /// JSON writer
+ /// AroundPrecision to be converted into a JSON string
+ /// JSON Serializer options
+ public override void Write(Utf8JsonWriter writer, AroundPrecision value, JsonSerializerOptions options)
+ {
+ writer.WriteRawValue(value.ToJson());
+ }
+}
+
diff --git a/algoliasearch/Models/Composition/AroundRadius.cs b/algoliasearch/Models/Composition/AroundRadius.cs
new file mode 100644
index 00000000..0a5018a3
--- /dev/null
+++ b/algoliasearch/Models/Composition/AroundRadius.cs
@@ -0,0 +1,210 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+using System.IO;
+using System.Reflection;
+using Algolia.Search.Models.Common;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// Maximum radius for a search around a central location. This parameter works in combination with the `aroundLatLng` and `aroundLatLngViaIP` parameters. By default, the search radius is determined automatically from the density of hits around the central location. The search radius is small if there are many hits close to the central coordinates.
+///
+[JsonConverter(typeof(AroundRadiusJsonConverter))]
+public partial class AroundRadius : AbstractSchema
+{
+ ///
+ /// Initializes a new instance of the AroundRadius class
+ /// with a int
+ ///
+ /// An instance of int.
+ public AroundRadius(int actualInstance)
+ {
+ ActualInstance = actualInstance;
+ }
+
+ ///
+ /// Initializes a new instance of the AroundRadius class
+ /// with a AroundRadiusAll
+ ///
+ /// An instance of AroundRadiusAll.
+ public AroundRadius(AroundRadiusAll actualInstance)
+ {
+ ActualInstance = actualInstance;
+ }
+
+
+ ///
+ /// Gets or Sets ActualInstance
+ ///
+ public sealed override object ActualInstance { get; set; }
+
+ ///
+ /// Get the actual instance of `int`. If the actual instance is not `int`,
+ /// the InvalidClassException will be thrown
+ ///
+ /// An instance of int
+ public int AsInt()
+ {
+ return (int)ActualInstance;
+ }
+
+ ///
+ /// Get the actual instance of `AroundRadiusAll`. If the actual instance is not `AroundRadiusAll`,
+ /// the InvalidClassException will be thrown
+ ///
+ /// An instance of AroundRadiusAll
+ public AroundRadiusAll AsAroundRadiusAll()
+ {
+ return (AroundRadiusAll)ActualInstance;
+ }
+
+
+ ///
+ /// Check if the actual instance is of `int` type.
+ ///
+ /// Whether or not the instance is the type
+ public bool IsInt()
+ {
+ return ActualInstance.GetType() == typeof(int);
+ }
+
+ ///
+ /// Check if the actual instance is of `AroundRadiusAll` type.
+ ///
+ /// Whether or not the instance is the type
+ public bool IsAroundRadiusAll()
+ {
+ return ActualInstance.GetType() == typeof(AroundRadiusAll);
+ }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ var sb = new StringBuilder();
+ sb.Append("class AroundRadius {\n");
+ sb.Append(" ActualInstance: ").Append(ActualInstance).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public override string ToJson()
+ {
+ return JsonSerializer.Serialize(ActualInstance, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not AroundRadius input)
+ {
+ return false;
+ }
+
+ return ActualInstance.Equals(input.ActualInstance);
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (ActualInstance != null)
+ hashCode = hashCode * 59 + ActualInstance.GetHashCode();
+ return hashCode;
+ }
+ }
+}
+
+
+
+
+
+///
+/// Custom JSON converter for AroundRadius
+///
+public class AroundRadiusJsonConverter : JsonConverter
+{
+
+ ///
+ /// Check if the object can be converted
+ ///
+ /// Object type
+ /// True if the object can be converted
+ public override bool CanConvert(Type objectType)
+ {
+ return objectType == typeof(AroundRadius);
+ }
+
+ ///
+ /// To convert a JSON string into an object
+ ///
+ /// JSON reader
+ /// Object type
+ /// Serializer options
+ /// The object converted from the JSON string
+ public override AroundRadius Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ var jsonDocument = JsonDocument.ParseValue(ref reader);
+ var root = jsonDocument.RootElement;
+ if (root.ValueKind == JsonValueKind.Number)
+ {
+ try
+ {
+ return new AroundRadius(jsonDocument.Deserialize(JsonConfig.Options));
+ }
+ catch (Exception exception)
+ {
+ // deserialization failed, try the next one
+ System.Diagnostics.Debug.WriteLine($"Failed to deserialize into int: {exception}");
+ }
+ }
+ if (root.ValueKind == JsonValueKind.String)
+ {
+ try
+ {
+ return new AroundRadius(jsonDocument.Deserialize(JsonConfig.Options));
+ }
+ catch (Exception exception)
+ {
+ // deserialization failed, try the next one
+ System.Diagnostics.Debug.WriteLine($"Failed to deserialize into AroundRadiusAll: {exception}");
+ }
+ }
+ throw new InvalidDataException($"The JSON string cannot be deserialized into any schema defined.");
+ }
+
+ ///
+ /// To write the JSON string
+ ///
+ /// JSON writer
+ /// AroundRadius to be converted into a JSON string
+ /// JSON Serializer options
+ public override void Write(Utf8JsonWriter writer, AroundRadius value, JsonSerializerOptions options)
+ {
+ writer.WriteRawValue(value.ToJson());
+ }
+}
+
diff --git a/algoliasearch/Models/Composition/AroundRadiusAll.cs b/algoliasearch/Models/Composition/AroundRadiusAll.cs
new file mode 100644
index 00000000..30a83d64
--- /dev/null
+++ b/algoliasearch/Models/Composition/AroundRadiusAll.cs
@@ -0,0 +1,27 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// Return all records with a valid `_geoloc` attribute. Don't filter by distance.
+///
+/// Return all records with a valid `_geoloc` attribute. Don't filter by distance.
+[JsonConverter(typeof(Serializer.JsonStringEnumConverter))]
+public enum AroundRadiusAll
+{
+ ///
+ /// Enum All for value: all
+ ///
+ [JsonPropertyName("all")]
+ All = 1
+}
+
diff --git a/algoliasearch/Models/Composition/Banner.cs b/algoliasearch/Models/Composition/Banner.cs
new file mode 100644
index 00000000..e9f7af12
--- /dev/null
+++ b/algoliasearch/Models/Composition/Banner.cs
@@ -0,0 +1,100 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// Banner with image and link to redirect users.
+///
+public partial class Banner
+{
+ ///
+ /// Initializes a new instance of the Banner class.
+ ///
+ public Banner()
+ {
+ }
+
+ ///
+ /// Gets or Sets Image
+ ///
+ [JsonPropertyName("image")]
+ public BannerImage Image { get; set; }
+
+ ///
+ /// Gets or Sets Link
+ ///
+ [JsonPropertyName("link")]
+ public BannerLink Link { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class Banner {\n");
+ sb.Append(" Image: ").Append(Image).Append("\n");
+ sb.Append(" Link: ").Append(Link).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonSerializer.Serialize(this, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not Banner input)
+ {
+ return false;
+ }
+
+ return
+ (Image == input.Image || (Image != null && Image.Equals(input.Image))) &&
+ (Link == input.Link || (Link != null && Link.Equals(input.Link)));
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (Image != null)
+ {
+ hashCode = (hashCode * 59) + Image.GetHashCode();
+ }
+ if (Link != null)
+ {
+ hashCode = (hashCode * 59) + Link.GetHashCode();
+ }
+ return hashCode;
+ }
+ }
+
+}
+
diff --git a/algoliasearch/Models/Composition/BannerImage.cs b/algoliasearch/Models/Composition/BannerImage.cs
new file mode 100644
index 00000000..3ee7ae25
--- /dev/null
+++ b/algoliasearch/Models/Composition/BannerImage.cs
@@ -0,0 +1,100 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// Image to show inside a banner.
+///
+public partial class BannerImage
+{
+ ///
+ /// Initializes a new instance of the BannerImage class.
+ ///
+ public BannerImage()
+ {
+ }
+
+ ///
+ /// Gets or Sets Urls
+ ///
+ [JsonPropertyName("urls")]
+ public List Urls { get; set; }
+
+ ///
+ /// Gets or Sets Title
+ ///
+ [JsonPropertyName("title")]
+ public string Title { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class BannerImage {\n");
+ sb.Append(" Urls: ").Append(Urls).Append("\n");
+ sb.Append(" Title: ").Append(Title).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonSerializer.Serialize(this, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not BannerImage input)
+ {
+ return false;
+ }
+
+ return
+ (Urls == input.Urls || Urls != null && input.Urls != null && Urls.SequenceEqual(input.Urls)) &&
+ (Title == input.Title || (Title != null && Title.Equals(input.Title)));
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (Urls != null)
+ {
+ hashCode = (hashCode * 59) + Urls.GetHashCode();
+ }
+ if (Title != null)
+ {
+ hashCode = (hashCode * 59) + Title.GetHashCode();
+ }
+ return hashCode;
+ }
+ }
+
+}
+
diff --git a/algoliasearch/Models/Composition/BannerImageUrl.cs b/algoliasearch/Models/Composition/BannerImageUrl.cs
new file mode 100644
index 00000000..3cda49a9
--- /dev/null
+++ b/algoliasearch/Models/Composition/BannerImageUrl.cs
@@ -0,0 +1,88 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// URL for an image to show inside a banner.
+///
+public partial class BannerImageUrl
+{
+ ///
+ /// Initializes a new instance of the BannerImageUrl class.
+ ///
+ public BannerImageUrl()
+ {
+ }
+
+ ///
+ /// Gets or Sets Url
+ ///
+ [JsonPropertyName("url")]
+ public string Url { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class BannerImageUrl {\n");
+ sb.Append(" Url: ").Append(Url).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonSerializer.Serialize(this, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not BannerImageUrl input)
+ {
+ return false;
+ }
+
+ return
+ (Url == input.Url || (Url != null && Url.Equals(input.Url)));
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (Url != null)
+ {
+ hashCode = (hashCode * 59) + Url.GetHashCode();
+ }
+ return hashCode;
+ }
+ }
+
+}
+
diff --git a/algoliasearch/Models/Composition/BannerLink.cs b/algoliasearch/Models/Composition/BannerLink.cs
new file mode 100644
index 00000000..41b0b6ef
--- /dev/null
+++ b/algoliasearch/Models/Composition/BannerLink.cs
@@ -0,0 +1,88 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// Link for a banner defined in the Merchandising Studio.
+///
+public partial class BannerLink
+{
+ ///
+ /// Initializes a new instance of the BannerLink class.
+ ///
+ public BannerLink()
+ {
+ }
+
+ ///
+ /// Gets or Sets Url
+ ///
+ [JsonPropertyName("url")]
+ public string Url { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class BannerLink {\n");
+ sb.Append(" Url: ").Append(Url).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonSerializer.Serialize(this, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not BannerLink input)
+ {
+ return false;
+ }
+
+ return
+ (Url == input.Url || (Url != null && Url.Equals(input.Url)));
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (Url != null)
+ {
+ hashCode = (hashCode * 59) + Url.GetHashCode();
+ }
+ return hashCode;
+ }
+ }
+
+}
+
diff --git a/algoliasearch/Models/Composition/CompositionIdRankingInfo.cs b/algoliasearch/Models/Composition/CompositionIdRankingInfo.cs
new file mode 100644
index 00000000..0df9bc00
--- /dev/null
+++ b/algoliasearch/Models/Composition/CompositionIdRankingInfo.cs
@@ -0,0 +1,109 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// CompositionIdRankingInfo
+///
+public partial class CompositionIdRankingInfo
+{
+ ///
+ /// Initializes a new instance of the CompositionIdRankingInfo class.
+ ///
+ [JsonConstructor]
+ public CompositionIdRankingInfo() { }
+ ///
+ /// Initializes a new instance of the CompositionIdRankingInfo class.
+ ///
+ /// index (required).
+ /// injectedItemKey (required).
+ public CompositionIdRankingInfo(string index, string injectedItemKey)
+ {
+ Index = index ?? throw new ArgumentNullException(nameof(index));
+ InjectedItemKey = injectedItemKey ?? throw new ArgumentNullException(nameof(injectedItemKey));
+ }
+
+ ///
+ /// Gets or Sets Index
+ ///
+ [JsonPropertyName("index")]
+ public string Index { get; set; }
+
+ ///
+ /// Gets or Sets InjectedItemKey
+ ///
+ [JsonPropertyName("injectedItemKey")]
+ public string InjectedItemKey { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class CompositionIdRankingInfo {\n");
+ sb.Append(" Index: ").Append(Index).Append("\n");
+ sb.Append(" InjectedItemKey: ").Append(InjectedItemKey).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonSerializer.Serialize(this, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not CompositionIdRankingInfo input)
+ {
+ return false;
+ }
+
+ return
+ (Index == input.Index || (Index != null && Index.Equals(input.Index))) &&
+ (InjectedItemKey == input.InjectedItemKey || (InjectedItemKey != null && InjectedItemKey.Equals(input.InjectedItemKey)));
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (Index != null)
+ {
+ hashCode = (hashCode * 59) + Index.GetHashCode();
+ }
+ if (InjectedItemKey != null)
+ {
+ hashCode = (hashCode * 59) + InjectedItemKey.GetHashCode();
+ }
+ return hashCode;
+ }
+ }
+
+}
+
diff --git a/algoliasearch/Models/Composition/CompositionRunAppliedRules.cs b/algoliasearch/Models/Composition/CompositionRunAppliedRules.cs
new file mode 100644
index 00000000..8a3f9a4f
--- /dev/null
+++ b/algoliasearch/Models/Composition/CompositionRunAppliedRules.cs
@@ -0,0 +1,96 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// CompositionRunAppliedRules
+///
+public partial class CompositionRunAppliedRules
+{
+ ///
+ /// Initializes a new instance of the CompositionRunAppliedRules class.
+ ///
+ [JsonConstructor]
+ public CompositionRunAppliedRules() { }
+ ///
+ /// Initializes a new instance of the CompositionRunAppliedRules class.
+ ///
+ /// Unique record identifier. (required).
+ public CompositionRunAppliedRules(string objectID)
+ {
+ ObjectID = objectID ?? throw new ArgumentNullException(nameof(objectID));
+ }
+
+ ///
+ /// Unique record identifier.
+ ///
+ /// Unique record identifier.
+ [JsonPropertyName("objectID")]
+ public string ObjectID { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class CompositionRunAppliedRules {\n");
+ sb.Append(" ObjectID: ").Append(ObjectID).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonSerializer.Serialize(this, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not CompositionRunAppliedRules input)
+ {
+ return false;
+ }
+
+ return
+ (ObjectID == input.ObjectID || (ObjectID != null && ObjectID.Equals(input.ObjectID)));
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (ObjectID != null)
+ {
+ hashCode = (hashCode * 59) + ObjectID.GetHashCode();
+ }
+ return hashCode;
+ }
+ }
+
+}
+
diff --git a/algoliasearch/Models/Composition/CompositionRunSearchResponse.cs b/algoliasearch/Models/Composition/CompositionRunSearchResponse.cs
new file mode 100644
index 00000000..cea701d5
--- /dev/null
+++ b/algoliasearch/Models/Composition/CompositionRunSearchResponse.cs
@@ -0,0 +1,124 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// CompositionRunSearchResponse
+///
+public partial class CompositionRunSearchResponse
+{
+ ///
+ /// Initializes a new instance of the CompositionRunSearchResponse class.
+ ///
+ [JsonConstructor]
+ public CompositionRunSearchResponse()
+ {
+ AdditionalProperties = new Dictionary();
+ }
+ ///
+ /// Initializes a new instance of the CompositionRunSearchResponse class.
+ ///
+ /// Unique record identifier. (required).
+ public CompositionRunSearchResponse(string objectID)
+ {
+ ObjectID = objectID ?? throw new ArgumentNullException(nameof(objectID));
+ AdditionalProperties = new Dictionary();
+ }
+
+ ///
+ /// Unique record identifier.
+ ///
+ /// Unique record identifier.
+ [JsonPropertyName("objectID")]
+ public string ObjectID { get; set; }
+
+ ///
+ /// Gets or Sets AppliedRules
+ ///
+ [JsonPropertyName("appliedRules")]
+ public List AppliedRules { get; set; }
+
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class CompositionRunSearchResponse {\n");
+ sb.Append(" ObjectID: ").Append(ObjectID).Append("\n");
+ sb.Append(" AppliedRules: ").Append(AppliedRules).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonSerializer.Serialize(this, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not CompositionRunSearchResponse input)
+ {
+ return false;
+ }
+
+ return
+ (ObjectID == input.ObjectID || (ObjectID != null && ObjectID.Equals(input.ObjectID))) &&
+ (AppliedRules == input.AppliedRules || AppliedRules != null && input.AppliedRules != null && AppliedRules.SequenceEqual(input.AppliedRules))
+ && (AdditionalProperties.Count == input.AdditionalProperties.Count && !AdditionalProperties.Except(input.AdditionalProperties).Any());
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (ObjectID != null)
+ {
+ hashCode = (hashCode * 59) + ObjectID.GetHashCode();
+ }
+ if (AppliedRules != null)
+ {
+ hashCode = (hashCode * 59) + AppliedRules.GetHashCode();
+ }
+ if (AdditionalProperties != null)
+ {
+ hashCode = (hashCode * 59) + AdditionalProperties.GetHashCode();
+ }
+ return hashCode;
+ }
+ }
+
+}
+
diff --git a/algoliasearch/Models/Composition/CompositionsSearchResponse.cs b/algoliasearch/Models/Composition/CompositionsSearchResponse.cs
new file mode 100644
index 00000000..601e9e55
--- /dev/null
+++ b/algoliasearch/Models/Composition/CompositionsSearchResponse.cs
@@ -0,0 +1,111 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// CompositionsSearchResponse
+///
+public partial class CompositionsSearchResponse
+{
+ ///
+ /// Initializes a new instance of the CompositionsSearchResponse class.
+ ///
+ [JsonConstructor]
+ public CompositionsSearchResponse()
+ {
+ AdditionalProperties = new Dictionary();
+ }
+ ///
+ /// Initializes a new instance of the CompositionsSearchResponse class.
+ ///
+ /// run (required).
+ public CompositionsSearchResponse(List run)
+ {
+ Run = run ?? throw new ArgumentNullException(nameof(run));
+ AdditionalProperties = new Dictionary();
+ }
+
+ ///
+ /// Gets or Sets Run
+ ///
+ [JsonPropertyName("run")]
+ public List Run { get; set; }
+
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class CompositionsSearchResponse {\n");
+ sb.Append(" Run: ").Append(Run).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonSerializer.Serialize(this, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not CompositionsSearchResponse input)
+ {
+ return false;
+ }
+
+ return
+ (Run == input.Run || Run != null && input.Run != null && Run.SequenceEqual(input.Run))
+ && (AdditionalProperties.Count == input.AdditionalProperties.Count && !AdditionalProperties.Except(input.AdditionalProperties).Any());
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (Run != null)
+ {
+ hashCode = (hashCode * 59) + Run.GetHashCode();
+ }
+ if (AdditionalProperties != null)
+ {
+ hashCode = (hashCode * 59) + AdditionalProperties.GetHashCode();
+ }
+ return hashCode;
+ }
+ }
+
+}
+
diff --git a/algoliasearch/Models/Composition/ErrorBase.cs b/algoliasearch/Models/Composition/ErrorBase.cs
new file mode 100644
index 00000000..cb217366
--- /dev/null
+++ b/algoliasearch/Models/Composition/ErrorBase.cs
@@ -0,0 +1,101 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// Error.
+///
+public partial class ErrorBase
+{
+ ///
+ /// Initializes a new instance of the ErrorBase class.
+ ///
+ public ErrorBase()
+ {
+ AdditionalProperties = new Dictionary();
+ }
+
+ ///
+ /// Gets or Sets Message
+ ///
+ [JsonPropertyName("message")]
+ public string Message { get; set; }
+
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class ErrorBase {\n");
+ sb.Append(" Message: ").Append(Message).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonSerializer.Serialize(this, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not ErrorBase input)
+ {
+ return false;
+ }
+
+ return
+ (Message == input.Message || (Message != null && Message.Equals(input.Message)))
+ && (AdditionalProperties.Count == input.AdditionalProperties.Count && !AdditionalProperties.Except(input.AdditionalProperties).Any());
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (Message != null)
+ {
+ hashCode = (hashCode * 59) + Message.GetHashCode();
+ }
+ if (AdditionalProperties != null)
+ {
+ hashCode = (hashCode * 59) + AdditionalProperties.GetHashCode();
+ }
+ return hashCode;
+ }
+ }
+
+}
+
diff --git a/algoliasearch/Models/Composition/Exhaustive.cs b/algoliasearch/Models/Composition/Exhaustive.cs
new file mode 100644
index 00000000..fddc1f0c
--- /dev/null
+++ b/algoliasearch/Models/Composition/Exhaustive.cs
@@ -0,0 +1,126 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// Whether certain properties of the search response are calculated exhaustive (exact) or approximated.
+///
+public partial class Exhaustive
+{
+ ///
+ /// Initializes a new instance of the Exhaustive class.
+ ///
+ public Exhaustive()
+ {
+ }
+
+ ///
+ /// Whether the facet count is exhaustive (`true`) or approximate (`false`). See the [related discussion](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-).
+ ///
+ /// Whether the facet count is exhaustive (`true`) or approximate (`false`). See the [related discussion](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-).
+ [JsonPropertyName("facetsCount")]
+ public bool? FacetsCount { get; set; }
+
+ ///
+ /// The value is `false` if not all facet values are retrieved.
+ ///
+ /// The value is `false` if not all facet values are retrieved.
+ [JsonPropertyName("facetValues")]
+ public bool? FacetValues { get; set; }
+
+ ///
+ /// Whether the `nbHits` is exhaustive (`true`) or approximate (`false`). When the query takes more than 50ms to be processed, the engine makes an approximation. This can happen when using complex filters on millions of records, when typo-tolerance was not exhaustive, or when enough hits have been retrieved (for example, after the engine finds 10,000 exact matches). `nbHits` is reported as non-exhaustive whenever an approximation is made, even if the approximation didn’t, in the end, impact the exhaustivity of the query.
+ ///
+ /// Whether the `nbHits` is exhaustive (`true`) or approximate (`false`). When the query takes more than 50ms to be processed, the engine makes an approximation. This can happen when using complex filters on millions of records, when typo-tolerance was not exhaustive, or when enough hits have been retrieved (for example, after the engine finds 10,000 exact matches). `nbHits` is reported as non-exhaustive whenever an approximation is made, even if the approximation didn’t, in the end, impact the exhaustivity of the query.
+ [JsonPropertyName("nbHits")]
+ public bool? NbHits { get; set; }
+
+ ///
+ /// Rules matching exhaustivity. The value is `false` if rules were enable for this query, and could not be fully processed due a timeout. This is generally caused by the number of alternatives (such as typos) which is too large.
+ ///
+ /// Rules matching exhaustivity. The value is `false` if rules were enable for this query, and could not be fully processed due a timeout. This is generally caused by the number of alternatives (such as typos) which is too large.
+ [JsonPropertyName("rulesMatch")]
+ public bool? RulesMatch { get; set; }
+
+ ///
+ /// Whether the typo search was exhaustive (`true`) or approximate (`false`). An approximation is done when the typo search query part takes more than 10% of the query budget (ie. 5ms by default) to be processed (this can happen when a lot of typo alternatives exist for the query). This field will not be included when typo-tolerance is entirely disabled.
+ ///
+ /// Whether the typo search was exhaustive (`true`) or approximate (`false`). An approximation is done when the typo search query part takes more than 10% of the query budget (ie. 5ms by default) to be processed (this can happen when a lot of typo alternatives exist for the query). This field will not be included when typo-tolerance is entirely disabled.
+ [JsonPropertyName("typo")]
+ public bool? Typo { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class Exhaustive {\n");
+ sb.Append(" FacetsCount: ").Append(FacetsCount).Append("\n");
+ sb.Append(" FacetValues: ").Append(FacetValues).Append("\n");
+ sb.Append(" NbHits: ").Append(NbHits).Append("\n");
+ sb.Append(" RulesMatch: ").Append(RulesMatch).Append("\n");
+ sb.Append(" Typo: ").Append(Typo).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonSerializer.Serialize(this, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not Exhaustive input)
+ {
+ return false;
+ }
+
+ return
+ (FacetsCount == input.FacetsCount || FacetsCount.Equals(input.FacetsCount)) &&
+ (FacetValues == input.FacetValues || FacetValues.Equals(input.FacetValues)) &&
+ (NbHits == input.NbHits || NbHits.Equals(input.NbHits)) &&
+ (RulesMatch == input.RulesMatch || RulesMatch.Equals(input.RulesMatch)) &&
+ (Typo == input.Typo || Typo.Equals(input.Typo));
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ hashCode = (hashCode * 59) + FacetsCount.GetHashCode();
+ hashCode = (hashCode * 59) + FacetValues.GetHashCode();
+ hashCode = (hashCode * 59) + NbHits.GetHashCode();
+ hashCode = (hashCode * 59) + RulesMatch.GetHashCode();
+ hashCode = (hashCode * 59) + Typo.GetHashCode();
+ return hashCode;
+ }
+ }
+
+}
+
diff --git a/algoliasearch/Models/Composition/FacetFilters.cs b/algoliasearch/Models/Composition/FacetFilters.cs
new file mode 100644
index 00000000..7caa43e2
--- /dev/null
+++ b/algoliasearch/Models/Composition/FacetFilters.cs
@@ -0,0 +1,210 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+using System.IO;
+using System.Reflection;
+using Algolia.Search.Models.Common;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// Filter the search by facet values, so that only records with the same facet values are retrieved. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** - `[filter1, filter2]` is interpreted as `filter1 AND filter2`. - `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 AND filter3`. - `facet:-value` is interpreted as `NOT facet:value`. While it's best to avoid attributes that start with a `-`, you can still filter them by escaping with a backslash: `facet:\\-value`.
+///
+[JsonConverter(typeof(FacetFiltersJsonConverter))]
+public partial class FacetFilters : AbstractSchema
+{
+ ///
+ /// Initializes a new instance of the FacetFilters class
+ /// with a List{FacetFilters}
+ ///
+ /// An instance of List.
+ public FacetFilters(List actualInstance)
+ {
+ ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
+ }
+
+ ///
+ /// Initializes a new instance of the FacetFilters class
+ /// with a string
+ ///
+ /// An instance of string.
+ public FacetFilters(string actualInstance)
+ {
+ ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
+ }
+
+
+ ///
+ /// Gets or Sets ActualInstance
+ ///
+ public sealed override object ActualInstance { get; set; }
+
+ ///
+ /// Get the actual instance of `List{FacetFilters}`. If the actual instance is not `List{FacetFilters}`,
+ /// the InvalidClassException will be thrown
+ ///
+ /// An instance of List<FacetFilters>
+ public List AsListFacetFilters()
+ {
+ return (List)ActualInstance;
+ }
+
+ ///
+ /// Get the actual instance of `string`. If the actual instance is not `string`,
+ /// the InvalidClassException will be thrown
+ ///
+ /// An instance of string
+ public string AsString()
+ {
+ return (string)ActualInstance;
+ }
+
+
+ ///
+ /// Check if the actual instance is of `List{FacetFilters}` type.
+ ///
+ /// Whether or not the instance is the type
+ public bool IsListFacetFilters()
+ {
+ return ActualInstance.GetType() == typeof(List);
+ }
+
+ ///
+ /// Check if the actual instance is of `string` type.
+ ///
+ /// Whether or not the instance is the type
+ public bool IsString()
+ {
+ return ActualInstance.GetType() == typeof(string);
+ }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ var sb = new StringBuilder();
+ sb.Append("class FacetFilters {\n");
+ sb.Append(" ActualInstance: ").Append(ActualInstance).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public override string ToJson()
+ {
+ return JsonSerializer.Serialize(ActualInstance, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not FacetFilters input)
+ {
+ return false;
+ }
+
+ return ActualInstance.Equals(input.ActualInstance);
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (ActualInstance != null)
+ hashCode = hashCode * 59 + ActualInstance.GetHashCode();
+ return hashCode;
+ }
+ }
+}
+
+
+
+
+
+///
+/// Custom JSON converter for FacetFilters
+///
+public class FacetFiltersJsonConverter : JsonConverter
+{
+
+ ///
+ /// Check if the object can be converted
+ ///
+ /// Object type
+ /// True if the object can be converted
+ public override bool CanConvert(Type objectType)
+ {
+ return objectType == typeof(FacetFilters);
+ }
+
+ ///
+ /// To convert a JSON string into an object
+ ///
+ /// JSON reader
+ /// Object type
+ /// Serializer options
+ /// The object converted from the JSON string
+ public override FacetFilters Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ var jsonDocument = JsonDocument.ParseValue(ref reader);
+ var root = jsonDocument.RootElement;
+ if (root.ValueKind == JsonValueKind.Array)
+ {
+ try
+ {
+ return new FacetFilters(jsonDocument.Deserialize>(JsonConfig.Options));
+ }
+ catch (Exception exception)
+ {
+ // deserialization failed, try the next one
+ System.Diagnostics.Debug.WriteLine($"Failed to deserialize into List: {exception}");
+ }
+ }
+ if (root.ValueKind == JsonValueKind.String)
+ {
+ try
+ {
+ return new FacetFilters(jsonDocument.Deserialize(JsonConfig.Options));
+ }
+ catch (Exception exception)
+ {
+ // deserialization failed, try the next one
+ System.Diagnostics.Debug.WriteLine($"Failed to deserialize into string: {exception}");
+ }
+ }
+ throw new InvalidDataException($"The JSON string cannot be deserialized into any schema defined.");
+ }
+
+ ///
+ /// To write the JSON string
+ ///
+ /// JSON writer
+ /// FacetFilters to be converted into a JSON string
+ /// JSON Serializer options
+ public override void Write(Utf8JsonWriter writer, FacetFilters value, JsonSerializerOptions options)
+ {
+ writer.WriteRawValue(value.ToJson());
+ }
+}
+
diff --git a/algoliasearch/Models/Composition/FacetHits.cs b/algoliasearch/Models/Composition/FacetHits.cs
new file mode 100644
index 00000000..74783967
--- /dev/null
+++ b/algoliasearch/Models/Composition/FacetHits.cs
@@ -0,0 +1,123 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// FacetHits
+///
+public partial class FacetHits
+{
+ ///
+ /// Initializes a new instance of the FacetHits class.
+ ///
+ [JsonConstructor]
+ public FacetHits() { }
+ ///
+ /// Initializes a new instance of the FacetHits class.
+ ///
+ /// Facet value. (required).
+ /// Highlighted attribute value, including HTML tags. (required).
+ /// Number of records with this facet value. [The count may be approximated](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). (required).
+ public FacetHits(string value, string highlighted, int count)
+ {
+ Value = value ?? throw new ArgumentNullException(nameof(value));
+ Highlighted = highlighted ?? throw new ArgumentNullException(nameof(highlighted));
+ Count = count;
+ }
+
+ ///
+ /// Facet value.
+ ///
+ /// Facet value.
+ [JsonPropertyName("value")]
+ public string Value { get; set; }
+
+ ///
+ /// Highlighted attribute value, including HTML tags.
+ ///
+ /// Highlighted attribute value, including HTML tags.
+ [JsonPropertyName("highlighted")]
+ public string Highlighted { get; set; }
+
+ ///
+ /// Number of records with this facet value. [The count may be approximated](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-).
+ ///
+ /// Number of records with this facet value. [The count may be approximated](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-).
+ [JsonPropertyName("count")]
+ public int Count { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class FacetHits {\n");
+ sb.Append(" Value: ").Append(Value).Append("\n");
+ sb.Append(" Highlighted: ").Append(Highlighted).Append("\n");
+ sb.Append(" Count: ").Append(Count).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonSerializer.Serialize(this, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not FacetHits input)
+ {
+ return false;
+ }
+
+ return
+ (Value == input.Value || (Value != null && Value.Equals(input.Value))) &&
+ (Highlighted == input.Highlighted || (Highlighted != null && Highlighted.Equals(input.Highlighted))) &&
+ (Count == input.Count || Count.Equals(input.Count));
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (Value != null)
+ {
+ hashCode = (hashCode * 59) + Value.GetHashCode();
+ }
+ if (Highlighted != null)
+ {
+ hashCode = (hashCode * 59) + Highlighted.GetHashCode();
+ }
+ hashCode = (hashCode * 59) + Count.GetHashCode();
+ return hashCode;
+ }
+ }
+
+}
+
diff --git a/algoliasearch/Models/Composition/FacetOrdering.cs b/algoliasearch/Models/Composition/FacetOrdering.cs
new file mode 100644
index 00000000..a17941af
--- /dev/null
+++ b/algoliasearch/Models/Composition/FacetOrdering.cs
@@ -0,0 +1,101 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// Order of facet names and facet values in your UI.
+///
+public partial class FacetOrdering
+{
+ ///
+ /// Initializes a new instance of the FacetOrdering class.
+ ///
+ public FacetOrdering()
+ {
+ }
+
+ ///
+ /// Gets or Sets Facets
+ ///
+ [JsonPropertyName("facets")]
+ public Facets Facets { get; set; }
+
+ ///
+ /// Order of facet values. One object for each facet.
+ ///
+ /// Order of facet values. One object for each facet.
+ [JsonPropertyName("values")]
+ public Dictionary Values { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class FacetOrdering {\n");
+ sb.Append(" Facets: ").Append(Facets).Append("\n");
+ sb.Append(" Values: ").Append(Values).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonSerializer.Serialize(this, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not FacetOrdering input)
+ {
+ return false;
+ }
+
+ return
+ (Facets == input.Facets || (Facets != null && Facets.Equals(input.Facets))) &&
+ (Values == input.Values || Values != null && input.Values != null && Values.SequenceEqual(input.Values));
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (Facets != null)
+ {
+ hashCode = (hashCode * 59) + Facets.GetHashCode();
+ }
+ if (Values != null)
+ {
+ hashCode = (hashCode * 59) + Values.GetHashCode();
+ }
+ return hashCode;
+ }
+ }
+
+}
+
diff --git a/algoliasearch/Models/Composition/FacetStats.cs b/algoliasearch/Models/Composition/FacetStats.cs
new file mode 100644
index 00000000..ba5d81e1
--- /dev/null
+++ b/algoliasearch/Models/Composition/FacetStats.cs
@@ -0,0 +1,116 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// FacetStats
+///
+public partial class FacetStats
+{
+ ///
+ /// Initializes a new instance of the FacetStats class.
+ ///
+ public FacetStats()
+ {
+ }
+
+ ///
+ /// Minimum value in the results.
+ ///
+ /// Minimum value in the results.
+ [JsonPropertyName("min")]
+ public double? Min { get; set; }
+
+ ///
+ /// Maximum value in the results.
+ ///
+ /// Maximum value in the results.
+ [JsonPropertyName("max")]
+ public double? Max { get; set; }
+
+ ///
+ /// Average facet value in the results.
+ ///
+ /// Average facet value in the results.
+ [JsonPropertyName("avg")]
+ public double? Avg { get; set; }
+
+ ///
+ /// Sum of all values in the results.
+ ///
+ /// Sum of all values in the results.
+ [JsonPropertyName("sum")]
+ public double? Sum { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class FacetStats {\n");
+ sb.Append(" Min: ").Append(Min).Append("\n");
+ sb.Append(" Max: ").Append(Max).Append("\n");
+ sb.Append(" Avg: ").Append(Avg).Append("\n");
+ sb.Append(" Sum: ").Append(Sum).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonSerializer.Serialize(this, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not FacetStats input)
+ {
+ return false;
+ }
+
+ return
+ (Min == input.Min || Min.Equals(input.Min)) &&
+ (Max == input.Max || Max.Equals(input.Max)) &&
+ (Avg == input.Avg || Avg.Equals(input.Avg)) &&
+ (Sum == input.Sum || Sum.Equals(input.Sum));
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ hashCode = (hashCode * 59) + Min.GetHashCode();
+ hashCode = (hashCode * 59) + Max.GetHashCode();
+ hashCode = (hashCode * 59) + Avg.GetHashCode();
+ hashCode = (hashCode * 59) + Sum.GetHashCode();
+ return hashCode;
+ }
+ }
+
+}
+
diff --git a/algoliasearch/Models/Composition/Facets.cs b/algoliasearch/Models/Composition/Facets.cs
new file mode 100644
index 00000000..bad3798a
--- /dev/null
+++ b/algoliasearch/Models/Composition/Facets.cs
@@ -0,0 +1,89 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// Order of facet names.
+///
+public partial class Facets
+{
+ ///
+ /// Initializes a new instance of the Facets class.
+ ///
+ public Facets()
+ {
+ }
+
+ ///
+ /// Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list.
+ ///
+ /// Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list.
+ [JsonPropertyName("order")]
+ public List Order { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class Facets {\n");
+ sb.Append(" Order: ").Append(Order).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonSerializer.Serialize(this, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not Facets input)
+ {
+ return false;
+ }
+
+ return
+ (Order == input.Order || Order != null && input.Order != null && Order.SequenceEqual(input.Order));
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (Order != null)
+ {
+ hashCode = (hashCode * 59) + Order.GetHashCode();
+ }
+ return hashCode;
+ }
+ }
+
+}
+
diff --git a/algoliasearch/Models/Composition/HighlightResult.cs b/algoliasearch/Models/Composition/HighlightResult.cs
new file mode 100644
index 00000000..c00f81ca
--- /dev/null
+++ b/algoliasearch/Models/Composition/HighlightResult.cs
@@ -0,0 +1,251 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+using System.IO;
+using System.Reflection;
+using Algolia.Search.Models.Common;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// HighlightResult
+///
+[JsonConverter(typeof(HighlightResultJsonConverter))]
+public partial class HighlightResult : AbstractSchema
+{
+ ///
+ /// Initializes a new instance of the HighlightResult class
+ /// with a HighlightResultOption
+ ///
+ /// An instance of HighlightResultOption.
+ public HighlightResult(HighlightResultOption actualInstance)
+ {
+ ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
+ }
+
+ ///
+ /// Initializes a new instance of the HighlightResult class
+ /// with a Dictionary{string, HighlightResult}
+ ///
+ /// An instance of Dictionary.
+ public HighlightResult(Dictionary actualInstance)
+ {
+ ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
+ }
+
+ ///
+ /// Initializes a new instance of the HighlightResult class
+ /// with a List{HighlightResult}
+ ///
+ /// An instance of List.
+ public HighlightResult(List actualInstance)
+ {
+ ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
+ }
+
+
+ ///
+ /// Gets or Sets ActualInstance
+ ///
+ public sealed override object ActualInstance { get; set; }
+
+ ///
+ /// Get the actual instance of `HighlightResultOption`. If the actual instance is not `HighlightResultOption`,
+ /// the InvalidClassException will be thrown
+ ///
+ /// An instance of HighlightResultOption
+ public HighlightResultOption AsHighlightResultOption()
+ {
+ return (HighlightResultOption)ActualInstance;
+ }
+
+ ///
+ /// Get the actual instance of `Dictionary{string, HighlightResult}`. If the actual instance is not `Dictionary{string, HighlightResult}`,
+ /// the InvalidClassException will be thrown
+ ///
+ /// An instance of Dictionary<string, HighlightResult>
+ public Dictionary AsDictionaryHighlightResult()
+ {
+ return (Dictionary)ActualInstance;
+ }
+
+ ///
+ /// Get the actual instance of `List{HighlightResult}`. If the actual instance is not `List{HighlightResult}`,
+ /// the InvalidClassException will be thrown
+ ///
+ /// An instance of List<HighlightResult>
+ public List AsListHighlightResult()
+ {
+ return (List)ActualInstance;
+ }
+
+
+ ///
+ /// Check if the actual instance is of `HighlightResultOption` type.
+ ///
+ /// Whether or not the instance is the type
+ public bool IsHighlightResultOption()
+ {
+ return ActualInstance.GetType() == typeof(HighlightResultOption);
+ }
+
+ ///
+ /// Check if the actual instance is of `Dictionary{string, HighlightResult}` type.
+ ///
+ /// Whether or not the instance is the type
+ public bool IsDictionaryHighlightResult()
+ {
+ return ActualInstance.GetType() == typeof(Dictionary);
+ }
+
+ ///
+ /// Check if the actual instance is of `List{HighlightResult}` type.
+ ///
+ /// Whether or not the instance is the type
+ public bool IsListHighlightResult()
+ {
+ return ActualInstance.GetType() == typeof(List);
+ }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ var sb = new StringBuilder();
+ sb.Append("class HighlightResult {\n");
+ sb.Append(" ActualInstance: ").Append(ActualInstance).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public override string ToJson()
+ {
+ return JsonSerializer.Serialize(ActualInstance, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not HighlightResult input)
+ {
+ return false;
+ }
+
+ return ActualInstance.Equals(input.ActualInstance);
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (ActualInstance != null)
+ hashCode = hashCode * 59 + ActualInstance.GetHashCode();
+ return hashCode;
+ }
+ }
+}
+
+
+
+
+
+///
+/// Custom JSON converter for HighlightResult
+///
+public class HighlightResultJsonConverter : JsonConverter
+{
+
+ ///
+ /// Check if the object can be converted
+ ///
+ /// Object type
+ /// True if the object can be converted
+ public override bool CanConvert(Type objectType)
+ {
+ return objectType == typeof(HighlightResult);
+ }
+
+ ///
+ /// To convert a JSON string into an object
+ ///
+ /// JSON reader
+ /// Object type
+ /// Serializer options
+ /// The object converted from the JSON string
+ public override HighlightResult Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ var jsonDocument = JsonDocument.ParseValue(ref reader);
+ var root = jsonDocument.RootElement;
+ if (root.ValueKind == JsonValueKind.Object && root.TryGetProperty("matchLevel", out _) && root.TryGetProperty("matchedWords", out _))
+ {
+ try
+ {
+ return new HighlightResult(jsonDocument.Deserialize(JsonConfig.Options));
+ }
+ catch (Exception exception)
+ {
+ // deserialization failed, try the next one
+ System.Diagnostics.Debug.WriteLine($"Failed to deserialize into HighlightResultOption: {exception}");
+ }
+ }
+ if (root.ValueKind == JsonValueKind.Object)
+ {
+ try
+ {
+ return new HighlightResult(jsonDocument.Deserialize>(JsonConfig.Options));
+ }
+ catch (Exception exception)
+ {
+ // deserialization failed, try the next one
+ System.Diagnostics.Debug.WriteLine($"Failed to deserialize into Dictionary: {exception}");
+ }
+ }
+ if (root.ValueKind == JsonValueKind.Array)
+ {
+ try
+ {
+ return new HighlightResult(jsonDocument.Deserialize>(JsonConfig.Options));
+ }
+ catch (Exception exception)
+ {
+ // deserialization failed, try the next one
+ System.Diagnostics.Debug.WriteLine($"Failed to deserialize into List: {exception}");
+ }
+ }
+ throw new InvalidDataException($"The JSON string cannot be deserialized into any schema defined.");
+ }
+
+ ///
+ /// To write the JSON string
+ ///
+ /// JSON writer
+ /// HighlightResult to be converted into a JSON string
+ /// JSON Serializer options
+ public override void Write(Utf8JsonWriter writer, HighlightResult value, JsonSerializerOptions options)
+ {
+ writer.WriteRawValue(value.ToJson());
+ }
+}
+
diff --git a/algoliasearch/Models/Composition/HighlightResultOption.cs b/algoliasearch/Models/Composition/HighlightResultOption.cs
new file mode 100644
index 00000000..b92e21da
--- /dev/null
+++ b/algoliasearch/Models/Composition/HighlightResultOption.cs
@@ -0,0 +1,132 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// Surround words that match the query with HTML tags for highlighting.
+///
+public partial class HighlightResultOption
+{
+
+ ///
+ /// Gets or Sets MatchLevel
+ ///
+ [JsonPropertyName("matchLevel")]
+ public MatchLevel? MatchLevel { get; set; }
+ ///
+ /// Initializes a new instance of the HighlightResultOption class.
+ ///
+ [JsonConstructor]
+ public HighlightResultOption() { }
+ ///
+ /// Initializes a new instance of the HighlightResultOption class.
+ ///
+ /// Highlighted attribute value, including HTML tags. (required).
+ /// matchLevel (required).
+ /// List of matched words from the search query. (required).
+ public HighlightResultOption(string value, MatchLevel? matchLevel, List matchedWords)
+ {
+ Value = value ?? throw new ArgumentNullException(nameof(value));
+ MatchLevel = matchLevel;
+ MatchedWords = matchedWords ?? throw new ArgumentNullException(nameof(matchedWords));
+ }
+
+ ///
+ /// Highlighted attribute value, including HTML tags.
+ ///
+ /// Highlighted attribute value, including HTML tags.
+ [JsonPropertyName("value")]
+ public string Value { get; set; }
+
+ ///
+ /// List of matched words from the search query.
+ ///
+ /// List of matched words from the search query.
+ [JsonPropertyName("matchedWords")]
+ public List MatchedWords { get; set; }
+
+ ///
+ /// Whether the entire attribute value is highlighted.
+ ///
+ /// Whether the entire attribute value is highlighted.
+ [JsonPropertyName("fullyHighlighted")]
+ public bool? FullyHighlighted { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class HighlightResultOption {\n");
+ sb.Append(" Value: ").Append(Value).Append("\n");
+ sb.Append(" MatchLevel: ").Append(MatchLevel).Append("\n");
+ sb.Append(" MatchedWords: ").Append(MatchedWords).Append("\n");
+ sb.Append(" FullyHighlighted: ").Append(FullyHighlighted).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonSerializer.Serialize(this, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not HighlightResultOption input)
+ {
+ return false;
+ }
+
+ return
+ (Value == input.Value || (Value != null && Value.Equals(input.Value))) &&
+ (MatchLevel == input.MatchLevel || MatchLevel.Equals(input.MatchLevel)) &&
+ (MatchedWords == input.MatchedWords || MatchedWords != null && input.MatchedWords != null && MatchedWords.SequenceEqual(input.MatchedWords)) &&
+ (FullyHighlighted == input.FullyHighlighted || FullyHighlighted.Equals(input.FullyHighlighted));
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (Value != null)
+ {
+ hashCode = (hashCode * 59) + Value.GetHashCode();
+ }
+ hashCode = (hashCode * 59) + MatchLevel.GetHashCode();
+ if (MatchedWords != null)
+ {
+ hashCode = (hashCode * 59) + MatchedWords.GetHashCode();
+ }
+ hashCode = (hashCode * 59) + FullyHighlighted.GetHashCode();
+ return hashCode;
+ }
+ }
+
+}
+
diff --git a/algoliasearch/Models/Composition/Hit.cs b/algoliasearch/Models/Composition/Hit.cs
new file mode 100644
index 00000000..28b28f16
--- /dev/null
+++ b/algoliasearch/Models/Composition/Hit.cs
@@ -0,0 +1,159 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// Search result. A hit is a record from your index, augmented with special attributes for highlighting, snippeting, and ranking.
+///
+public partial class Hit
+{
+ ///
+ /// Initializes a new instance of the Hit class.
+ ///
+ [JsonConstructor]
+ public Hit()
+ {
+ AdditionalProperties = new Dictionary();
+ }
+ ///
+ /// Initializes a new instance of the Hit class.
+ ///
+ /// Unique record identifier. (required).
+ public Hit(string objectID)
+ {
+ ObjectID = objectID ?? throw new ArgumentNullException(nameof(objectID));
+ AdditionalProperties = new Dictionary();
+ }
+
+ ///
+ /// Unique record identifier.
+ ///
+ /// Unique record identifier.
+ [JsonPropertyName("objectID")]
+ public string ObjectID { get; set; }
+
+ ///
+ /// Surround words that match the query with HTML tags for highlighting.
+ ///
+ /// Surround words that match the query with HTML tags for highlighting.
+ [JsonPropertyName("_highlightResult")]
+ public Dictionary HighlightResult { get; set; }
+
+ ///
+ /// Snippets that show the context around a matching search query.
+ ///
+ /// Snippets that show the context around a matching search query.
+ [JsonPropertyName("_snippetResult")]
+ public Dictionary SnippetResult { get; set; }
+
+ ///
+ /// Gets or Sets RankingInfo
+ ///
+ [JsonPropertyName("_rankingInfo")]
+ public HitRankingInfo RankingInfo { get; set; }
+
+ ///
+ /// Gets or Sets DistinctSeqID
+ ///
+ [JsonPropertyName("_distinctSeqID")]
+ public int? DistinctSeqID { get; set; }
+
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class Hit {\n");
+ sb.Append(" ObjectID: ").Append(ObjectID).Append("\n");
+ sb.Append(" HighlightResult: ").Append(HighlightResult).Append("\n");
+ sb.Append(" SnippetResult: ").Append(SnippetResult).Append("\n");
+ sb.Append(" RankingInfo: ").Append(RankingInfo).Append("\n");
+ sb.Append(" DistinctSeqID: ").Append(DistinctSeqID).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonSerializer.Serialize(this, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not Hit input)
+ {
+ return false;
+ }
+
+ return
+ (ObjectID == input.ObjectID || (ObjectID != null && ObjectID.Equals(input.ObjectID))) &&
+ (HighlightResult == input.HighlightResult || HighlightResult != null && input.HighlightResult != null && HighlightResult.SequenceEqual(input.HighlightResult)) &&
+ (SnippetResult == input.SnippetResult || SnippetResult != null && input.SnippetResult != null && SnippetResult.SequenceEqual(input.SnippetResult)) &&
+ (RankingInfo == input.RankingInfo || (RankingInfo != null && RankingInfo.Equals(input.RankingInfo))) &&
+ (DistinctSeqID == input.DistinctSeqID || DistinctSeqID.Equals(input.DistinctSeqID))
+ && (AdditionalProperties.Count == input.AdditionalProperties.Count && !AdditionalProperties.Except(input.AdditionalProperties).Any());
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (ObjectID != null)
+ {
+ hashCode = (hashCode * 59) + ObjectID.GetHashCode();
+ }
+ if (HighlightResult != null)
+ {
+ hashCode = (hashCode * 59) + HighlightResult.GetHashCode();
+ }
+ if (SnippetResult != null)
+ {
+ hashCode = (hashCode * 59) + SnippetResult.GetHashCode();
+ }
+ if (RankingInfo != null)
+ {
+ hashCode = (hashCode * 59) + RankingInfo.GetHashCode();
+ }
+ hashCode = (hashCode * 59) + DistinctSeqID.GetHashCode();
+ if (AdditionalProperties != null)
+ {
+ hashCode = (hashCode * 59) + AdditionalProperties.GetHashCode();
+ }
+ return hashCode;
+ }
+ }
+
+}
+
diff --git a/algoliasearch/Models/Composition/HitRankingInfo.cs b/algoliasearch/Models/Composition/HitRankingInfo.cs
new file mode 100644
index 00000000..538e23b5
--- /dev/null
+++ b/algoliasearch/Models/Composition/HitRankingInfo.cs
@@ -0,0 +1,237 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// HitRankingInfo
+///
+public partial class HitRankingInfo
+{
+ ///
+ /// Initializes a new instance of the HitRankingInfo class.
+ ///
+ [JsonConstructor]
+ public HitRankingInfo() { }
+ ///
+ /// Initializes a new instance of the HitRankingInfo class.
+ ///
+ /// Position of the first matched word in the best matching attribute of the record. (required).
+ /// Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters). (required).
+ /// Number of exactly matched words. (required).
+ /// Number of typos encountered when matching the record. (required).
+ /// Overall ranking of the record, expressed as a single integer. This attribute is internal. (required).
+ public HitRankingInfo(int firstMatchedWord, int geoDistance, int nbExactWords, int nbTypos, int userScore)
+ {
+ FirstMatchedWord = firstMatchedWord;
+ GeoDistance = geoDistance;
+ NbExactWords = nbExactWords;
+ NbTypos = nbTypos;
+ UserScore = userScore;
+ }
+
+ ///
+ /// Whether a filter matched the query.
+ ///
+ /// Whether a filter matched the query.
+ [JsonPropertyName("filters")]
+ public int? Filters { get; set; }
+
+ ///
+ /// Position of the first matched word in the best matching attribute of the record.
+ ///
+ /// Position of the first matched word in the best matching attribute of the record.
+ [JsonPropertyName("firstMatchedWord")]
+ public int FirstMatchedWord { get; set; }
+
+ ///
+ /// Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters).
+ ///
+ /// Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters).
+ [JsonPropertyName("geoDistance")]
+ public int GeoDistance { get; set; }
+
+ ///
+ /// Precision used when computing the geo distance, in meters.
+ ///
+ /// Precision used when computing the geo distance, in meters.
+ [JsonPropertyName("geoPrecision")]
+ public int? GeoPrecision { get; set; }
+
+ ///
+ /// Gets or Sets MatchedGeoLocation
+ ///
+ [JsonPropertyName("matchedGeoLocation")]
+ public MatchedGeoLocation MatchedGeoLocation { get; set; }
+
+ ///
+ /// Gets or Sets Personalization
+ ///
+ [JsonPropertyName("personalization")]
+ public Personalization Personalization { get; set; }
+
+ ///
+ /// Number of exactly matched words.
+ ///
+ /// Number of exactly matched words.
+ [JsonPropertyName("nbExactWords")]
+ public int NbExactWords { get; set; }
+
+ ///
+ /// Number of typos encountered when matching the record.
+ ///
+ /// Number of typos encountered when matching the record.
+ [JsonPropertyName("nbTypos")]
+ public int NbTypos { get; set; }
+
+ ///
+ /// Whether the record was promoted by a rule.
+ ///
+ /// Whether the record was promoted by a rule.
+ [JsonPropertyName("promoted")]
+ public bool? Promoted { get; set; }
+
+ ///
+ /// Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0.
+ ///
+ /// Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0.
+ [JsonPropertyName("proximityDistance")]
+ public int? ProximityDistance { get; set; }
+
+ ///
+ /// Overall ranking of the record, expressed as a single integer. This attribute is internal.
+ ///
+ /// Overall ranking of the record, expressed as a single integer. This attribute is internal.
+ [JsonPropertyName("userScore")]
+ public int UserScore { get; set; }
+
+ ///
+ /// Number of matched words.
+ ///
+ /// Number of matched words.
+ [JsonPropertyName("words")]
+ public int? Words { get; set; }
+
+ ///
+ /// Whether the record is re-ranked.
+ ///
+ /// Whether the record is re-ranked.
+ [JsonPropertyName("promotedByReRanking")]
+ public bool? PromotedByReRanking { get; set; }
+
+ ///
+ /// Gets or Sets Composed
+ ///
+ [JsonPropertyName("composed")]
+ public Dictionary Composed { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class HitRankingInfo {\n");
+ sb.Append(" Filters: ").Append(Filters).Append("\n");
+ sb.Append(" FirstMatchedWord: ").Append(FirstMatchedWord).Append("\n");
+ sb.Append(" GeoDistance: ").Append(GeoDistance).Append("\n");
+ sb.Append(" GeoPrecision: ").Append(GeoPrecision).Append("\n");
+ sb.Append(" MatchedGeoLocation: ").Append(MatchedGeoLocation).Append("\n");
+ sb.Append(" Personalization: ").Append(Personalization).Append("\n");
+ sb.Append(" NbExactWords: ").Append(NbExactWords).Append("\n");
+ sb.Append(" NbTypos: ").Append(NbTypos).Append("\n");
+ sb.Append(" Promoted: ").Append(Promoted).Append("\n");
+ sb.Append(" ProximityDistance: ").Append(ProximityDistance).Append("\n");
+ sb.Append(" UserScore: ").Append(UserScore).Append("\n");
+ sb.Append(" Words: ").Append(Words).Append("\n");
+ sb.Append(" PromotedByReRanking: ").Append(PromotedByReRanking).Append("\n");
+ sb.Append(" Composed: ").Append(Composed).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonSerializer.Serialize(this, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not HitRankingInfo input)
+ {
+ return false;
+ }
+
+ return
+ (Filters == input.Filters || Filters.Equals(input.Filters)) &&
+ (FirstMatchedWord == input.FirstMatchedWord || FirstMatchedWord.Equals(input.FirstMatchedWord)) &&
+ (GeoDistance == input.GeoDistance || GeoDistance.Equals(input.GeoDistance)) &&
+ (GeoPrecision == input.GeoPrecision || GeoPrecision.Equals(input.GeoPrecision)) &&
+ (MatchedGeoLocation == input.MatchedGeoLocation || (MatchedGeoLocation != null && MatchedGeoLocation.Equals(input.MatchedGeoLocation))) &&
+ (Personalization == input.Personalization || (Personalization != null && Personalization.Equals(input.Personalization))) &&
+ (NbExactWords == input.NbExactWords || NbExactWords.Equals(input.NbExactWords)) &&
+ (NbTypos == input.NbTypos || NbTypos.Equals(input.NbTypos)) &&
+ (Promoted == input.Promoted || Promoted.Equals(input.Promoted)) &&
+ (ProximityDistance == input.ProximityDistance || ProximityDistance.Equals(input.ProximityDistance)) &&
+ (UserScore == input.UserScore || UserScore.Equals(input.UserScore)) &&
+ (Words == input.Words || Words.Equals(input.Words)) &&
+ (PromotedByReRanking == input.PromotedByReRanking || PromotedByReRanking.Equals(input.PromotedByReRanking)) &&
+ (Composed == input.Composed || Composed != null && input.Composed != null && Composed.SequenceEqual(input.Composed));
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ hashCode = (hashCode * 59) + Filters.GetHashCode();
+ hashCode = (hashCode * 59) + FirstMatchedWord.GetHashCode();
+ hashCode = (hashCode * 59) + GeoDistance.GetHashCode();
+ hashCode = (hashCode * 59) + GeoPrecision.GetHashCode();
+ if (MatchedGeoLocation != null)
+ {
+ hashCode = (hashCode * 59) + MatchedGeoLocation.GetHashCode();
+ }
+ if (Personalization != null)
+ {
+ hashCode = (hashCode * 59) + Personalization.GetHashCode();
+ }
+ hashCode = (hashCode * 59) + NbExactWords.GetHashCode();
+ hashCode = (hashCode * 59) + NbTypos.GetHashCode();
+ hashCode = (hashCode * 59) + Promoted.GetHashCode();
+ hashCode = (hashCode * 59) + ProximityDistance.GetHashCode();
+ hashCode = (hashCode * 59) + UserScore.GetHashCode();
+ hashCode = (hashCode * 59) + Words.GetHashCode();
+ hashCode = (hashCode * 59) + PromotedByReRanking.GetHashCode();
+ if (Composed != null)
+ {
+ hashCode = (hashCode * 59) + Composed.GetHashCode();
+ }
+ return hashCode;
+ }
+ }
+
+}
+
diff --git a/algoliasearch/Models/Composition/InsideBoundingBox.cs b/algoliasearch/Models/Composition/InsideBoundingBox.cs
new file mode 100644
index 00000000..1c667010
--- /dev/null
+++ b/algoliasearch/Models/Composition/InsideBoundingBox.cs
@@ -0,0 +1,217 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+using System.IO;
+using System.Reflection;
+using Algolia.Search.Models.Common;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// InsideBoundingBox
+///
+[JsonConverter(typeof(InsideBoundingBoxJsonConverter))]
+public partial class InsideBoundingBox : AbstractSchema
+{
+ ///
+ /// Initializes a new instance of the InsideBoundingBox class.
+ ///
+ public InsideBoundingBox()
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the InsideBoundingBox class
+ /// with a string
+ ///
+ /// An instance of string.
+ public InsideBoundingBox(string actualInstance)
+ {
+ ActualInstance = actualInstance;
+ }
+
+ ///
+ /// Initializes a new instance of the InsideBoundingBox class
+ /// with a List{List{double}}
+ ///
+ /// An instance of List>.
+ public InsideBoundingBox(List> actualInstance)
+ {
+ ActualInstance = actualInstance;
+ }
+
+
+ ///
+ /// Gets or Sets ActualInstance
+ ///
+ public sealed override object ActualInstance { get; set; }
+
+ ///
+ /// Get the actual instance of `string`. If the actual instance is not `string`,
+ /// the InvalidClassException will be thrown
+ ///
+ /// An instance of string
+ public string AsString()
+ {
+ return (string)ActualInstance;
+ }
+
+ ///
+ /// Get the actual instance of `List{List{double}}`. If the actual instance is not `List{List{double}}`,
+ /// the InvalidClassException will be thrown
+ ///
+ /// An instance of List<List<double>>
+ public List> AsListListDouble()
+ {
+ return (List>)ActualInstance;
+ }
+
+
+ ///
+ /// Check if the actual instance is of `string` type.
+ ///
+ /// Whether or not the instance is the type
+ public bool IsString()
+ {
+ return ActualInstance.GetType() == typeof(string);
+ }
+
+ ///
+ /// Check if the actual instance is of `List{List{double}}` type.
+ ///
+ /// Whether or not the instance is the type
+ public bool IsListListDouble()
+ {
+ return ActualInstance.GetType() == typeof(List>);
+ }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ var sb = new StringBuilder();
+ sb.Append("class InsideBoundingBox {\n");
+ sb.Append(" ActualInstance: ").Append(ActualInstance).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public override string ToJson()
+ {
+ return JsonSerializer.Serialize(ActualInstance, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not InsideBoundingBox input)
+ {
+ return false;
+ }
+
+ return ActualInstance.Equals(input.ActualInstance);
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (ActualInstance != null)
+ hashCode = hashCode * 59 + ActualInstance.GetHashCode();
+ return hashCode;
+ }
+ }
+}
+
+
+
+
+
+///
+/// Custom JSON converter for InsideBoundingBox
+///
+public class InsideBoundingBoxJsonConverter : JsonConverter
+{
+
+ ///
+ /// Check if the object can be converted
+ ///
+ /// Object type
+ /// True if the object can be converted
+ public override bool CanConvert(Type objectType)
+ {
+ return objectType == typeof(InsideBoundingBox);
+ }
+
+ ///
+ /// To convert a JSON string into an object
+ ///
+ /// JSON reader
+ /// Object type
+ /// Serializer options
+ /// The object converted from the JSON string
+ public override InsideBoundingBox Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ var jsonDocument = JsonDocument.ParseValue(ref reader);
+ var root = jsonDocument.RootElement;
+ if (root.ValueKind == JsonValueKind.String)
+ {
+ try
+ {
+ return new InsideBoundingBox(jsonDocument.Deserialize(JsonConfig.Options));
+ }
+ catch (Exception exception)
+ {
+ // deserialization failed, try the next one
+ System.Diagnostics.Debug.WriteLine($"Failed to deserialize into string: {exception}");
+ }
+ }
+ if (root.ValueKind == JsonValueKind.Array)
+ {
+ try
+ {
+ return new InsideBoundingBox(jsonDocument.Deserialize>>(JsonConfig.Options));
+ }
+ catch (Exception exception)
+ {
+ // deserialization failed, try the next one
+ System.Diagnostics.Debug.WriteLine($"Failed to deserialize into List>: {exception}");
+ }
+ }
+ throw new InvalidDataException($"The JSON string cannot be deserialized into any schema defined.");
+ }
+
+ ///
+ /// To write the JSON string
+ ///
+ /// JSON writer
+ /// InsideBoundingBox to be converted into a JSON string
+ /// JSON Serializer options
+ public override void Write(Utf8JsonWriter writer, InsideBoundingBox value, JsonSerializerOptions options)
+ {
+ writer.WriteRawValue(value.ToJson());
+ }
+}
+
diff --git a/algoliasearch/Models/Composition/MatchLevel.cs b/algoliasearch/Models/Composition/MatchLevel.cs
new file mode 100644
index 00000000..b58ece4b
--- /dev/null
+++ b/algoliasearch/Models/Composition/MatchLevel.cs
@@ -0,0 +1,39 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// Whether the whole query string matches or only a part.
+///
+/// Whether the whole query string matches or only a part.
+[JsonConverter(typeof(Serializer.JsonStringEnumConverter))]
+public enum MatchLevel
+{
+ ///
+ /// Enum None for value: none
+ ///
+ [JsonPropertyName("none")]
+ None = 1,
+
+ ///
+ /// Enum Partial for value: partial
+ ///
+ [JsonPropertyName("partial")]
+ Partial = 2,
+
+ ///
+ /// Enum Full for value: full
+ ///
+ [JsonPropertyName("full")]
+ Full = 3
+}
+
diff --git a/algoliasearch/Models/Composition/MatchedGeoLocation.cs b/algoliasearch/Models/Composition/MatchedGeoLocation.cs
new file mode 100644
index 00000000..10b8a74d
--- /dev/null
+++ b/algoliasearch/Models/Composition/MatchedGeoLocation.cs
@@ -0,0 +1,106 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// MatchedGeoLocation
+///
+public partial class MatchedGeoLocation
+{
+ ///
+ /// Initializes a new instance of the MatchedGeoLocation class.
+ ///
+ public MatchedGeoLocation()
+ {
+ }
+
+ ///
+ /// Latitude of the matched location.
+ ///
+ /// Latitude of the matched location.
+ [JsonPropertyName("lat")]
+ public double? Lat { get; set; }
+
+ ///
+ /// Longitude of the matched location.
+ ///
+ /// Longitude of the matched location.
+ [JsonPropertyName("lng")]
+ public double? Lng { get; set; }
+
+ ///
+ /// Distance between the matched location and the search location (in meters).
+ ///
+ /// Distance between the matched location and the search location (in meters).
+ [JsonPropertyName("distance")]
+ public int? Distance { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class MatchedGeoLocation {\n");
+ sb.Append(" Lat: ").Append(Lat).Append("\n");
+ sb.Append(" Lng: ").Append(Lng).Append("\n");
+ sb.Append(" Distance: ").Append(Distance).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonSerializer.Serialize(this, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not MatchedGeoLocation input)
+ {
+ return false;
+ }
+
+ return
+ (Lat == input.Lat || Lat.Equals(input.Lat)) &&
+ (Lng == input.Lng || Lng.Equals(input.Lng)) &&
+ (Distance == input.Distance || Distance.Equals(input.Distance));
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ hashCode = (hashCode * 59) + Lat.GetHashCode();
+ hashCode = (hashCode * 59) + Lng.GetHashCode();
+ hashCode = (hashCode * 59) + Distance.GetHashCode();
+ return hashCode;
+ }
+ }
+
+}
+
diff --git a/algoliasearch/Models/Composition/NumericFilters.cs b/algoliasearch/Models/Composition/NumericFilters.cs
new file mode 100644
index 00000000..a7911753
--- /dev/null
+++ b/algoliasearch/Models/Composition/NumericFilters.cs
@@ -0,0 +1,210 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+using System.IO;
+using System.Reflection;
+using Algolia.Search.Models.Common;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// Filter by numeric facets. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`. Comparisons are precise up to 3 decimals. You can also provide ranges: `facet: TO `. The range includes the lower and upper boundaries. The same combination rules apply as for `facetFilters`.
+///
+[JsonConverter(typeof(NumericFiltersJsonConverter))]
+public partial class NumericFilters : AbstractSchema
+{
+ ///
+ /// Initializes a new instance of the NumericFilters class
+ /// with a List{NumericFilters}
+ ///
+ /// An instance of List.
+ public NumericFilters(List actualInstance)
+ {
+ ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
+ }
+
+ ///
+ /// Initializes a new instance of the NumericFilters class
+ /// with a string
+ ///
+ /// An instance of string.
+ public NumericFilters(string actualInstance)
+ {
+ ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
+ }
+
+
+ ///
+ /// Gets or Sets ActualInstance
+ ///
+ public sealed override object ActualInstance { get; set; }
+
+ ///
+ /// Get the actual instance of `List{NumericFilters}`. If the actual instance is not `List{NumericFilters}`,
+ /// the InvalidClassException will be thrown
+ ///
+ /// An instance of List<NumericFilters>
+ public List AsListNumericFilters()
+ {
+ return (List)ActualInstance;
+ }
+
+ ///
+ /// Get the actual instance of `string`. If the actual instance is not `string`,
+ /// the InvalidClassException will be thrown
+ ///
+ /// An instance of string
+ public string AsString()
+ {
+ return (string)ActualInstance;
+ }
+
+
+ ///
+ /// Check if the actual instance is of `List{NumericFilters}` type.
+ ///
+ /// Whether or not the instance is the type
+ public bool IsListNumericFilters()
+ {
+ return ActualInstance.GetType() == typeof(List);
+ }
+
+ ///
+ /// Check if the actual instance is of `string` type.
+ ///
+ /// Whether or not the instance is the type
+ public bool IsString()
+ {
+ return ActualInstance.GetType() == typeof(string);
+ }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ var sb = new StringBuilder();
+ sb.Append("class NumericFilters {\n");
+ sb.Append(" ActualInstance: ").Append(ActualInstance).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public override string ToJson()
+ {
+ return JsonSerializer.Serialize(ActualInstance, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not NumericFilters input)
+ {
+ return false;
+ }
+
+ return ActualInstance.Equals(input.ActualInstance);
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (ActualInstance != null)
+ hashCode = hashCode * 59 + ActualInstance.GetHashCode();
+ return hashCode;
+ }
+ }
+}
+
+
+
+
+
+///
+/// Custom JSON converter for NumericFilters
+///
+public class NumericFiltersJsonConverter : JsonConverter
+{
+
+ ///
+ /// Check if the object can be converted
+ ///
+ /// Object type
+ /// True if the object can be converted
+ public override bool CanConvert(Type objectType)
+ {
+ return objectType == typeof(NumericFilters);
+ }
+
+ ///
+ /// To convert a JSON string into an object
+ ///
+ /// JSON reader
+ /// Object type
+ /// Serializer options
+ /// The object converted from the JSON string
+ public override NumericFilters Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ var jsonDocument = JsonDocument.ParseValue(ref reader);
+ var root = jsonDocument.RootElement;
+ if (root.ValueKind == JsonValueKind.Array)
+ {
+ try
+ {
+ return new NumericFilters(jsonDocument.Deserialize>(JsonConfig.Options));
+ }
+ catch (Exception exception)
+ {
+ // deserialization failed, try the next one
+ System.Diagnostics.Debug.WriteLine($"Failed to deserialize into List: {exception}");
+ }
+ }
+ if (root.ValueKind == JsonValueKind.String)
+ {
+ try
+ {
+ return new NumericFilters(jsonDocument.Deserialize(JsonConfig.Options));
+ }
+ catch (Exception exception)
+ {
+ // deserialization failed, try the next one
+ System.Diagnostics.Debug.WriteLine($"Failed to deserialize into string: {exception}");
+ }
+ }
+ throw new InvalidDataException($"The JSON string cannot be deserialized into any schema defined.");
+ }
+
+ ///
+ /// To write the JSON string
+ ///
+ /// JSON writer
+ /// NumericFilters to be converted into a JSON string
+ /// JSON Serializer options
+ public override void Write(Utf8JsonWriter writer, NumericFilters value, JsonSerializerOptions options)
+ {
+ writer.WriteRawValue(value.ToJson());
+ }
+}
+
diff --git a/algoliasearch/Models/Composition/OptionalFilters.cs b/algoliasearch/Models/Composition/OptionalFilters.cs
new file mode 100644
index 00000000..89d25c7a
--- /dev/null
+++ b/algoliasearch/Models/Composition/OptionalFilters.cs
@@ -0,0 +1,210 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+using System.IO;
+using System.Reflection;
+using Algolia.Search.Models.Common;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don't exclude records from the search results. Records that match the optional filter rank before records that don't match. If you're using a negative filter `facet:-value`, matching records rank after records that don't match. - Optional filters don't work on virtual replicas. - Optional filters are applied _after_ sort-by attributes. - Optional filters are applied _before_ custom ranking attributes (in the default [ranking](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/)). - Optional filters don't work with numeric attributes.
+///
+[JsonConverter(typeof(OptionalFiltersJsonConverter))]
+public partial class OptionalFilters : AbstractSchema
+{
+ ///
+ /// Initializes a new instance of the OptionalFilters class
+ /// with a List{OptionalFilters}
+ ///
+ /// An instance of List.
+ public OptionalFilters(List actualInstance)
+ {
+ ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
+ }
+
+ ///
+ /// Initializes a new instance of the OptionalFilters class
+ /// with a string
+ ///
+ /// An instance of string.
+ public OptionalFilters(string actualInstance)
+ {
+ ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
+ }
+
+
+ ///
+ /// Gets or Sets ActualInstance
+ ///
+ public sealed override object ActualInstance { get; set; }
+
+ ///
+ /// Get the actual instance of `List{OptionalFilters}`. If the actual instance is not `List{OptionalFilters}`,
+ /// the InvalidClassException will be thrown
+ ///
+ /// An instance of List<OptionalFilters>
+ public List AsListOptionalFilters()
+ {
+ return (List)ActualInstance;
+ }
+
+ ///
+ /// Get the actual instance of `string`. If the actual instance is not `string`,
+ /// the InvalidClassException will be thrown
+ ///
+ /// An instance of string
+ public string AsString()
+ {
+ return (string)ActualInstance;
+ }
+
+
+ ///
+ /// Check if the actual instance is of `List{OptionalFilters}` type.
+ ///
+ /// Whether or not the instance is the type
+ public bool IsListOptionalFilters()
+ {
+ return ActualInstance.GetType() == typeof(List);
+ }
+
+ ///
+ /// Check if the actual instance is of `string` type.
+ ///
+ /// Whether or not the instance is the type
+ public bool IsString()
+ {
+ return ActualInstance.GetType() == typeof(string);
+ }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ var sb = new StringBuilder();
+ sb.Append("class OptionalFilters {\n");
+ sb.Append(" ActualInstance: ").Append(ActualInstance).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public override string ToJson()
+ {
+ return JsonSerializer.Serialize(ActualInstance, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not OptionalFilters input)
+ {
+ return false;
+ }
+
+ return ActualInstance.Equals(input.ActualInstance);
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (ActualInstance != null)
+ hashCode = hashCode * 59 + ActualInstance.GetHashCode();
+ return hashCode;
+ }
+ }
+}
+
+
+
+
+
+///
+/// Custom JSON converter for OptionalFilters
+///
+public class OptionalFiltersJsonConverter : JsonConverter
+{
+
+ ///
+ /// Check if the object can be converted
+ ///
+ /// Object type
+ /// True if the object can be converted
+ public override bool CanConvert(Type objectType)
+ {
+ return objectType == typeof(OptionalFilters);
+ }
+
+ ///
+ /// To convert a JSON string into an object
+ ///
+ /// JSON reader
+ /// Object type
+ /// Serializer options
+ /// The object converted from the JSON string
+ public override OptionalFilters Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ var jsonDocument = JsonDocument.ParseValue(ref reader);
+ var root = jsonDocument.RootElement;
+ if (root.ValueKind == JsonValueKind.Array)
+ {
+ try
+ {
+ return new OptionalFilters(jsonDocument.Deserialize>(JsonConfig.Options));
+ }
+ catch (Exception exception)
+ {
+ // deserialization failed, try the next one
+ System.Diagnostics.Debug.WriteLine($"Failed to deserialize into List: {exception}");
+ }
+ }
+ if (root.ValueKind == JsonValueKind.String)
+ {
+ try
+ {
+ return new OptionalFilters(jsonDocument.Deserialize(JsonConfig.Options));
+ }
+ catch (Exception exception)
+ {
+ // deserialization failed, try the next one
+ System.Diagnostics.Debug.WriteLine($"Failed to deserialize into string: {exception}");
+ }
+ }
+ throw new InvalidDataException($"The JSON string cannot be deserialized into any schema defined.");
+ }
+
+ ///
+ /// To write the JSON string
+ ///
+ /// JSON writer
+ /// OptionalFilters to be converted into a JSON string
+ /// JSON Serializer options
+ public override void Write(Utf8JsonWriter writer, OptionalFilters value, JsonSerializerOptions options)
+ {
+ writer.WriteRawValue(value.ToJson());
+ }
+}
+
diff --git a/algoliasearch/Models/Composition/Params.cs b/algoliasearch/Models/Composition/Params.cs
new file mode 100644
index 00000000..fa184bc8
--- /dev/null
+++ b/algoliasearch/Models/Composition/Params.cs
@@ -0,0 +1,374 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// Params
+///
+public partial class Params
+{
+ ///
+ /// Initializes a new instance of the Params class.
+ ///
+ public Params()
+ {
+ }
+
+ ///
+ /// Search query.
+ ///
+ /// Search query.
+ [JsonPropertyName("query")]
+ public string Query { get; set; }
+
+ ///
+ /// Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).
+ ///
+ /// Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** ` `, where `` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `: TO ` where `` and `` are the lower and upper limits of the range (inclusive). - **Facet filters.** `:` where `` is a facet attribute (case-sensitive) and `` a facet value. - **Tag filters.** `_tags:` or just `` (case-sensitive). - **Boolean filters.** `: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can't use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can't combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).
+ [JsonPropertyName("filters")]
+ public string Filters { get; set; }
+
+ ///
+ /// Page of search results to retrieve.
+ ///
+ /// Page of search results to retrieve.
+ [JsonPropertyName("page")]
+ public int? Page { get; set; }
+
+ ///
+ /// Whether the search response should include detailed ranking information.
+ ///
+ /// Whether the search response should include detailed ranking information.
+ [JsonPropertyName("getRankingInfo")]
+ public bool? GetRankingInfo { get; set; }
+
+ ///
+ /// Gets or Sets RelevancyStrictness
+ ///
+ [JsonPropertyName("relevancyStrictness")]
+ public int? RelevancyStrictness { get; set; }
+
+ ///
+ /// Gets or Sets FacetFilters
+ ///
+ [JsonPropertyName("facetFilters")]
+ public FacetFilters FacetFilters { get; set; }
+
+ ///
+ /// Gets or Sets OptionalFilters
+ ///
+ [JsonPropertyName("optionalFilters")]
+ public OptionalFilters OptionalFilters { get; set; }
+
+ ///
+ /// Gets or Sets NumericFilters
+ ///
+ [JsonPropertyName("numericFilters")]
+ public NumericFilters NumericFilters { get; set; }
+
+ ///
+ /// Number of hits per page.
+ ///
+ /// Number of hits per page.
+ [JsonPropertyName("hitsPerPage")]
+ public int? HitsPerPage { get; set; }
+
+ ///
+ /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within a circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`.
+ ///
+ /// Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within a circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`.
+ [JsonPropertyName("aroundLatLng")]
+ public string AroundLatLng { get; set; }
+
+ ///
+ /// Whether to obtain the coordinates from the request's IP address.
+ ///
+ /// Whether to obtain the coordinates from the request's IP address.
+ [JsonPropertyName("aroundLatLngViaIP")]
+ public bool? AroundLatLngViaIP { get; set; }
+
+ ///
+ /// Gets or Sets AroundRadius
+ ///
+ [JsonPropertyName("aroundRadius")]
+ public AroundRadius AroundRadius { get; set; }
+
+ ///
+ /// Gets or Sets AroundPrecision
+ ///
+ [JsonPropertyName("aroundPrecision")]
+ public AroundPrecision AroundPrecision { get; set; }
+
+ ///
+ /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set.
+ ///
+ /// Minimum radius (in meters) for a search around a location when `aroundRadius` isn't set.
+ [JsonPropertyName("minimumAroundRadius")]
+ public int? MinimumAroundRadius { get; set; }
+
+ ///
+ /// Gets or Sets InsideBoundingBox
+ ///
+ [JsonPropertyName("insideBoundingBox")]
+ public InsideBoundingBox InsideBoundingBox { get; set; }
+
+ ///
+ /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored if you also specify `insideBoundingBox`.
+ ///
+ /// Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored if you also specify `insideBoundingBox`.
+ [JsonPropertyName("insidePolygon")]
+ public List> InsidePolygon { get; set; }
+
+ ///
+ /// Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
+ ///
+ /// Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don't specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
+ [JsonPropertyName("queryLanguages")]
+ public List QueryLanguages { get; set; }
+
+ ///
+ /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`.
+ ///
+ /// ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`.
+ [JsonPropertyName("naturalLanguages")]
+ public List NaturalLanguages { get; set; }
+
+ ///
+ /// Whether to enable rules.
+ ///
+ /// Whether to enable rules.
+ [JsonPropertyName("enableRules")]
+ public bool? EnableRules { get; set; }
+
+ ///
+ /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules.
+ ///
+ /// Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules.
+ [JsonPropertyName("ruleContexts")]
+ public List RuleContexts { get; set; }
+
+ ///
+ /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
+ ///
+ /// Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
+ [JsonPropertyName("userToken")]
+ public string UserToken { get; set; }
+
+ ///
+ /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/).
+ ///
+ /// Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/).
+ [JsonPropertyName("clickAnalytics")]
+ public bool? ClickAnalytics { get; set; }
+
+ ///
+ /// Whether this search will be included in Analytics.
+ ///
+ /// Whether this search will be included in Analytics.
+ [JsonPropertyName("analytics")]
+ public bool? Analytics { get; set; }
+
+ ///
+ /// Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
+ ///
+ /// Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
+ [JsonPropertyName("analyticsTags")]
+ public List AnalyticsTags { get; set; }
+
+ ///
+ /// Whether to enable A/B testing for this search.
+ ///
+ /// Whether to enable A/B testing for this search.
+ [JsonPropertyName("enableABTest")]
+ public bool? EnableABTest { get; set; }
+
+ ///
+ /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard.
+ ///
+ /// Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard.
+ [JsonPropertyName("enableReRanking")]
+ public bool? EnableReRanking { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class Params {\n");
+ sb.Append(" Query: ").Append(Query).Append("\n");
+ sb.Append(" Filters: ").Append(Filters).Append("\n");
+ sb.Append(" Page: ").Append(Page).Append("\n");
+ sb.Append(" GetRankingInfo: ").Append(GetRankingInfo).Append("\n");
+ sb.Append(" RelevancyStrictness: ").Append(RelevancyStrictness).Append("\n");
+ sb.Append(" FacetFilters: ").Append(FacetFilters).Append("\n");
+ sb.Append(" OptionalFilters: ").Append(OptionalFilters).Append("\n");
+ sb.Append(" NumericFilters: ").Append(NumericFilters).Append("\n");
+ sb.Append(" HitsPerPage: ").Append(HitsPerPage).Append("\n");
+ sb.Append(" AroundLatLng: ").Append(AroundLatLng).Append("\n");
+ sb.Append(" AroundLatLngViaIP: ").Append(AroundLatLngViaIP).Append("\n");
+ sb.Append(" AroundRadius: ").Append(AroundRadius).Append("\n");
+ sb.Append(" AroundPrecision: ").Append(AroundPrecision).Append("\n");
+ sb.Append(" MinimumAroundRadius: ").Append(MinimumAroundRadius).Append("\n");
+ sb.Append(" InsideBoundingBox: ").Append(InsideBoundingBox).Append("\n");
+ sb.Append(" InsidePolygon: ").Append(InsidePolygon).Append("\n");
+ sb.Append(" QueryLanguages: ").Append(QueryLanguages).Append("\n");
+ sb.Append(" NaturalLanguages: ").Append(NaturalLanguages).Append("\n");
+ sb.Append(" EnableRules: ").Append(EnableRules).Append("\n");
+ sb.Append(" RuleContexts: ").Append(RuleContexts).Append("\n");
+ sb.Append(" UserToken: ").Append(UserToken).Append("\n");
+ sb.Append(" ClickAnalytics: ").Append(ClickAnalytics).Append("\n");
+ sb.Append(" Analytics: ").Append(Analytics).Append("\n");
+ sb.Append(" AnalyticsTags: ").Append(AnalyticsTags).Append("\n");
+ sb.Append(" EnableABTest: ").Append(EnableABTest).Append("\n");
+ sb.Append(" EnableReRanking: ").Append(EnableReRanking).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonSerializer.Serialize(this, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not Params input)
+ {
+ return false;
+ }
+
+ return
+ (Query == input.Query || (Query != null && Query.Equals(input.Query))) &&
+ (Filters == input.Filters || (Filters != null && Filters.Equals(input.Filters))) &&
+ (Page == input.Page || Page.Equals(input.Page)) &&
+ (GetRankingInfo == input.GetRankingInfo || GetRankingInfo.Equals(input.GetRankingInfo)) &&
+ (RelevancyStrictness == input.RelevancyStrictness || RelevancyStrictness.Equals(input.RelevancyStrictness)) &&
+ (FacetFilters == input.FacetFilters || (FacetFilters != null && FacetFilters.Equals(input.FacetFilters))) &&
+ (OptionalFilters == input.OptionalFilters || (OptionalFilters != null && OptionalFilters.Equals(input.OptionalFilters))) &&
+ (NumericFilters == input.NumericFilters || (NumericFilters != null && NumericFilters.Equals(input.NumericFilters))) &&
+ (HitsPerPage == input.HitsPerPage || HitsPerPage.Equals(input.HitsPerPage)) &&
+ (AroundLatLng == input.AroundLatLng || (AroundLatLng != null && AroundLatLng.Equals(input.AroundLatLng))) &&
+ (AroundLatLngViaIP == input.AroundLatLngViaIP || AroundLatLngViaIP.Equals(input.AroundLatLngViaIP)) &&
+ (AroundRadius == input.AroundRadius || (AroundRadius != null && AroundRadius.Equals(input.AroundRadius))) &&
+ (AroundPrecision == input.AroundPrecision || (AroundPrecision != null && AroundPrecision.Equals(input.AroundPrecision))) &&
+ (MinimumAroundRadius == input.MinimumAroundRadius || MinimumAroundRadius.Equals(input.MinimumAroundRadius)) &&
+ (InsideBoundingBox == input.InsideBoundingBox || (InsideBoundingBox != null && InsideBoundingBox.Equals(input.InsideBoundingBox))) &&
+ (InsidePolygon == input.InsidePolygon || InsidePolygon != null && input.InsidePolygon != null && InsidePolygon.SequenceEqual(input.InsidePolygon)) &&
+ (QueryLanguages == input.QueryLanguages || QueryLanguages != null && input.QueryLanguages != null && QueryLanguages.SequenceEqual(input.QueryLanguages)) &&
+ (NaturalLanguages == input.NaturalLanguages || NaturalLanguages != null && input.NaturalLanguages != null && NaturalLanguages.SequenceEqual(input.NaturalLanguages)) &&
+ (EnableRules == input.EnableRules || EnableRules.Equals(input.EnableRules)) &&
+ (RuleContexts == input.RuleContexts || RuleContexts != null && input.RuleContexts != null && RuleContexts.SequenceEqual(input.RuleContexts)) &&
+ (UserToken == input.UserToken || (UserToken != null && UserToken.Equals(input.UserToken))) &&
+ (ClickAnalytics == input.ClickAnalytics || ClickAnalytics.Equals(input.ClickAnalytics)) &&
+ (Analytics == input.Analytics || Analytics.Equals(input.Analytics)) &&
+ (AnalyticsTags == input.AnalyticsTags || AnalyticsTags != null && input.AnalyticsTags != null && AnalyticsTags.SequenceEqual(input.AnalyticsTags)) &&
+ (EnableABTest == input.EnableABTest || EnableABTest.Equals(input.EnableABTest)) &&
+ (EnableReRanking == input.EnableReRanking || EnableReRanking.Equals(input.EnableReRanking));
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (Query != null)
+ {
+ hashCode = (hashCode * 59) + Query.GetHashCode();
+ }
+ if (Filters != null)
+ {
+ hashCode = (hashCode * 59) + Filters.GetHashCode();
+ }
+ hashCode = (hashCode * 59) + Page.GetHashCode();
+ hashCode = (hashCode * 59) + GetRankingInfo.GetHashCode();
+ hashCode = (hashCode * 59) + RelevancyStrictness.GetHashCode();
+ if (FacetFilters != null)
+ {
+ hashCode = (hashCode * 59) + FacetFilters.GetHashCode();
+ }
+ if (OptionalFilters != null)
+ {
+ hashCode = (hashCode * 59) + OptionalFilters.GetHashCode();
+ }
+ if (NumericFilters != null)
+ {
+ hashCode = (hashCode * 59) + NumericFilters.GetHashCode();
+ }
+ hashCode = (hashCode * 59) + HitsPerPage.GetHashCode();
+ if (AroundLatLng != null)
+ {
+ hashCode = (hashCode * 59) + AroundLatLng.GetHashCode();
+ }
+ hashCode = (hashCode * 59) + AroundLatLngViaIP.GetHashCode();
+ if (AroundRadius != null)
+ {
+ hashCode = (hashCode * 59) + AroundRadius.GetHashCode();
+ }
+ if (AroundPrecision != null)
+ {
+ hashCode = (hashCode * 59) + AroundPrecision.GetHashCode();
+ }
+ hashCode = (hashCode * 59) + MinimumAroundRadius.GetHashCode();
+ if (InsideBoundingBox != null)
+ {
+ hashCode = (hashCode * 59) + InsideBoundingBox.GetHashCode();
+ }
+ if (InsidePolygon != null)
+ {
+ hashCode = (hashCode * 59) + InsidePolygon.GetHashCode();
+ }
+ if (QueryLanguages != null)
+ {
+ hashCode = (hashCode * 59) + QueryLanguages.GetHashCode();
+ }
+ if (NaturalLanguages != null)
+ {
+ hashCode = (hashCode * 59) + NaturalLanguages.GetHashCode();
+ }
+ hashCode = (hashCode * 59) + EnableRules.GetHashCode();
+ if (RuleContexts != null)
+ {
+ hashCode = (hashCode * 59) + RuleContexts.GetHashCode();
+ }
+ if (UserToken != null)
+ {
+ hashCode = (hashCode * 59) + UserToken.GetHashCode();
+ }
+ hashCode = (hashCode * 59) + ClickAnalytics.GetHashCode();
+ hashCode = (hashCode * 59) + Analytics.GetHashCode();
+ if (AnalyticsTags != null)
+ {
+ hashCode = (hashCode * 59) + AnalyticsTags.GetHashCode();
+ }
+ hashCode = (hashCode * 59) + EnableABTest.GetHashCode();
+ hashCode = (hashCode * 59) + EnableReRanking.GetHashCode();
+ return hashCode;
+ }
+ }
+
+}
+
diff --git a/algoliasearch/Models/Composition/Personalization.cs b/algoliasearch/Models/Composition/Personalization.cs
new file mode 100644
index 00000000..957aa674
--- /dev/null
+++ b/algoliasearch/Models/Composition/Personalization.cs
@@ -0,0 +1,106 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// Personalization
+///
+public partial class Personalization
+{
+ ///
+ /// Initializes a new instance of the Personalization class.
+ ///
+ public Personalization()
+ {
+ }
+
+ ///
+ /// The score of the filters.
+ ///
+ /// The score of the filters.
+ [JsonPropertyName("filtersScore")]
+ public int? FiltersScore { get; set; }
+
+ ///
+ /// The score of the ranking.
+ ///
+ /// The score of the ranking.
+ [JsonPropertyName("rankingScore")]
+ public int? RankingScore { get; set; }
+
+ ///
+ /// The score of the event.
+ ///
+ /// The score of the event.
+ [JsonPropertyName("score")]
+ public int? Score { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class Personalization {\n");
+ sb.Append(" FiltersScore: ").Append(FiltersScore).Append("\n");
+ sb.Append(" RankingScore: ").Append(RankingScore).Append("\n");
+ sb.Append(" Score: ").Append(Score).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonSerializer.Serialize(this, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not Personalization input)
+ {
+ return false;
+ }
+
+ return
+ (FiltersScore == input.FiltersScore || FiltersScore.Equals(input.FiltersScore)) &&
+ (RankingScore == input.RankingScore || RankingScore.Equals(input.RankingScore)) &&
+ (Score == input.Score || Score.Equals(input.Score));
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ hashCode = (hashCode * 59) + FiltersScore.GetHashCode();
+ hashCode = (hashCode * 59) + RankingScore.GetHashCode();
+ hashCode = (hashCode * 59) + Score.GetHashCode();
+ return hashCode;
+ }
+ }
+
+}
+
diff --git a/algoliasearch/Models/Composition/Range.cs b/algoliasearch/Models/Composition/Range.cs
new file mode 100644
index 00000000..45f8782c
--- /dev/null
+++ b/algoliasearch/Models/Composition/Range.cs
@@ -0,0 +1,96 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// Range object with lower and upper values in meters to define custom ranges.
+///
+public partial class Range
+{
+ ///
+ /// Initializes a new instance of the Range class.
+ ///
+ public Range()
+ {
+ }
+
+ ///
+ /// Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal.
+ ///
+ /// Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal.
+ [JsonPropertyName("from")]
+ public int? From { get; set; }
+
+ ///
+ /// Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal.
+ ///
+ /// Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal.
+ [JsonPropertyName("value")]
+ public int? Value { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class Range {\n");
+ sb.Append(" From: ").Append(From).Append("\n");
+ sb.Append(" Value: ").Append(Value).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonSerializer.Serialize(this, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not Range input)
+ {
+ return false;
+ }
+
+ return
+ (From == input.From || From.Equals(input.From)) &&
+ (Value == input.Value || Value.Equals(input.Value));
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ hashCode = (hashCode * 59) + From.GetHashCode();
+ hashCode = (hashCode * 59) + Value.GetHashCode();
+ return hashCode;
+ }
+ }
+
+}
+
diff --git a/algoliasearch/Models/Composition/Redirect.cs b/algoliasearch/Models/Composition/Redirect.cs
new file mode 100644
index 00000000..89a289ff
--- /dev/null
+++ b/algoliasearch/Models/Composition/Redirect.cs
@@ -0,0 +1,88 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// [Redirect results to a URL](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/redirects/), this this parameter is for internal use only.
+///
+public partial class Redirect
+{
+ ///
+ /// Initializes a new instance of the Redirect class.
+ ///
+ public Redirect()
+ {
+ }
+
+ ///
+ /// Gets or Sets Index
+ ///
+ [JsonPropertyName("index")]
+ public List Index { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class Redirect {\n");
+ sb.Append(" Index: ").Append(Index).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonSerializer.Serialize(this, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not Redirect input)
+ {
+ return false;
+ }
+
+ return
+ (Index == input.Index || Index != null && input.Index != null && Index.SequenceEqual(input.Index));
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (Index != null)
+ {
+ hashCode = (hashCode * 59) + Index.GetHashCode();
+ }
+ return hashCode;
+ }
+ }
+
+}
+
diff --git a/algoliasearch/Models/Composition/RedirectRuleIndexData.cs b/algoliasearch/Models/Composition/RedirectRuleIndexData.cs
new file mode 100644
index 00000000..0deab756
--- /dev/null
+++ b/algoliasearch/Models/Composition/RedirectRuleIndexData.cs
@@ -0,0 +1,95 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// Redirect rule data.
+///
+public partial class RedirectRuleIndexData
+{
+ ///
+ /// Initializes a new instance of the RedirectRuleIndexData class.
+ ///
+ [JsonConstructor]
+ public RedirectRuleIndexData() { }
+ ///
+ /// Initializes a new instance of the RedirectRuleIndexData class.
+ ///
+ /// ruleObjectID (required).
+ public RedirectRuleIndexData(string ruleObjectID)
+ {
+ RuleObjectID = ruleObjectID ?? throw new ArgumentNullException(nameof(ruleObjectID));
+ }
+
+ ///
+ /// Gets or Sets RuleObjectID
+ ///
+ [JsonPropertyName("ruleObjectID")]
+ public string RuleObjectID { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class RedirectRuleIndexData {\n");
+ sb.Append(" RuleObjectID: ").Append(RuleObjectID).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonSerializer.Serialize(this, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not RedirectRuleIndexData input)
+ {
+ return false;
+ }
+
+ return
+ (RuleObjectID == input.RuleObjectID || (RuleObjectID != null && RuleObjectID.Equals(input.RuleObjectID)));
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (RuleObjectID != null)
+ {
+ hashCode = (hashCode * 59) + RuleObjectID.GetHashCode();
+ }
+ return hashCode;
+ }
+ }
+
+}
+
diff --git a/algoliasearch/Models/Composition/RedirectRuleIndexMetadata.cs b/algoliasearch/Models/Composition/RedirectRuleIndexMetadata.cs
new file mode 100644
index 00000000..0e281a9c
--- /dev/null
+++ b/algoliasearch/Models/Composition/RedirectRuleIndexMetadata.cs
@@ -0,0 +1,152 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// RedirectRuleIndexMetadata
+///
+public partial class RedirectRuleIndexMetadata
+{
+ ///
+ /// Initializes a new instance of the RedirectRuleIndexMetadata class.
+ ///
+ [JsonConstructor]
+ public RedirectRuleIndexMetadata() { }
+ ///
+ /// Initializes a new instance of the RedirectRuleIndexMetadata class.
+ ///
+ /// Source index for the redirect rule. (required).
+ /// Destination index for the redirect rule. (required).
+ /// Reason for the redirect rule. (required).
+ /// Redirect rule status. (required).
+ /// data (required).
+ public RedirectRuleIndexMetadata(string source, string dest, string reason, bool succeed, RedirectRuleIndexData data)
+ {
+ Source = source ?? throw new ArgumentNullException(nameof(source));
+ Dest = dest ?? throw new ArgumentNullException(nameof(dest));
+ Reason = reason ?? throw new ArgumentNullException(nameof(reason));
+ Succeed = succeed;
+ Data = data ?? throw new ArgumentNullException(nameof(data));
+ }
+
+ ///
+ /// Source index for the redirect rule.
+ ///
+ /// Source index for the redirect rule.
+ [JsonPropertyName("source")]
+ public string Source { get; set; }
+
+ ///
+ /// Destination index for the redirect rule.
+ ///
+ /// Destination index for the redirect rule.
+ [JsonPropertyName("dest")]
+ public string Dest { get; set; }
+
+ ///
+ /// Reason for the redirect rule.
+ ///
+ /// Reason for the redirect rule.
+ [JsonPropertyName("reason")]
+ public string Reason { get; set; }
+
+ ///
+ /// Redirect rule status.
+ ///
+ /// Redirect rule status.
+ [JsonPropertyName("succeed")]
+ public bool Succeed { get; set; }
+
+ ///
+ /// Gets or Sets Data
+ ///
+ [JsonPropertyName("data")]
+ public RedirectRuleIndexData Data { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class RedirectRuleIndexMetadata {\n");
+ sb.Append(" Source: ").Append(Source).Append("\n");
+ sb.Append(" Dest: ").Append(Dest).Append("\n");
+ sb.Append(" Reason: ").Append(Reason).Append("\n");
+ sb.Append(" Succeed: ").Append(Succeed).Append("\n");
+ sb.Append(" Data: ").Append(Data).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonSerializer.Serialize(this, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not RedirectRuleIndexMetadata input)
+ {
+ return false;
+ }
+
+ return
+ (Source == input.Source || (Source != null && Source.Equals(input.Source))) &&
+ (Dest == input.Dest || (Dest != null && Dest.Equals(input.Dest))) &&
+ (Reason == input.Reason || (Reason != null && Reason.Equals(input.Reason))) &&
+ (Succeed == input.Succeed || Succeed.Equals(input.Succeed)) &&
+ (Data == input.Data || (Data != null && Data.Equals(input.Data)));
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (Source != null)
+ {
+ hashCode = (hashCode * 59) + Source.GetHashCode();
+ }
+ if (Dest != null)
+ {
+ hashCode = (hashCode * 59) + Dest.GetHashCode();
+ }
+ if (Reason != null)
+ {
+ hashCode = (hashCode * 59) + Reason.GetHashCode();
+ }
+ hashCode = (hashCode * 59) + Succeed.GetHashCode();
+ if (Data != null)
+ {
+ hashCode = (hashCode * 59) + Data.GetHashCode();
+ }
+ return hashCode;
+ }
+ }
+
+}
+
diff --git a/algoliasearch/Models/Composition/RedirectURL.cs b/algoliasearch/Models/Composition/RedirectURL.cs
new file mode 100644
index 00000000..227a860c
--- /dev/null
+++ b/algoliasearch/Models/Composition/RedirectURL.cs
@@ -0,0 +1,88 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// The redirect rule container.
+///
+public partial class RedirectURL
+{
+ ///
+ /// Initializes a new instance of the RedirectURL class.
+ ///
+ public RedirectURL()
+ {
+ }
+
+ ///
+ /// Gets or Sets Url
+ ///
+ [JsonPropertyName("url")]
+ public string Url { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class RedirectURL {\n");
+ sb.Append(" Url: ").Append(Url).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonSerializer.Serialize(this, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not RedirectURL input)
+ {
+ return false;
+ }
+
+ return
+ (Url == input.Url || (Url != null && Url.Equals(input.Url)));
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (Url != null)
+ {
+ hashCode = (hashCode * 59) + Url.GetHashCode();
+ }
+ return hashCode;
+ }
+ }
+
+}
+
diff --git a/algoliasearch/Models/Composition/RenderingContent.cs b/algoliasearch/Models/Composition/RenderingContent.cs
new file mode 100644
index 00000000..4861b8c8
--- /dev/null
+++ b/algoliasearch/Models/Composition/RenderingContent.cs
@@ -0,0 +1,112 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// Extra data that can be used in the search UI. You can use this to control aspects of your search UI, such as the order of facet names and values without changing your frontend code.
+///
+public partial class RenderingContent
+{
+ ///
+ /// Initializes a new instance of the RenderingContent class.
+ ///
+ public RenderingContent()
+ {
+ }
+
+ ///
+ /// Gets or Sets FacetOrdering
+ ///
+ [JsonPropertyName("facetOrdering")]
+ public FacetOrdering FacetOrdering { get; set; }
+
+ ///
+ /// Gets or Sets Redirect
+ ///
+ [JsonPropertyName("redirect")]
+ public RedirectURL Redirect { get; set; }
+
+ ///
+ /// Gets or Sets Widgets
+ ///
+ [JsonPropertyName("widgets")]
+ public Widgets Widgets { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class RenderingContent {\n");
+ sb.Append(" FacetOrdering: ").Append(FacetOrdering).Append("\n");
+ sb.Append(" Redirect: ").Append(Redirect).Append("\n");
+ sb.Append(" Widgets: ").Append(Widgets).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonSerializer.Serialize(this, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not RenderingContent input)
+ {
+ return false;
+ }
+
+ return
+ (FacetOrdering == input.FacetOrdering || (FacetOrdering != null && FacetOrdering.Equals(input.FacetOrdering))) &&
+ (Redirect == input.Redirect || (Redirect != null && Redirect.Equals(input.Redirect))) &&
+ (Widgets == input.Widgets || (Widgets != null && Widgets.Equals(input.Widgets)));
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (FacetOrdering != null)
+ {
+ hashCode = (hashCode * 59) + FacetOrdering.GetHashCode();
+ }
+ if (Redirect != null)
+ {
+ hashCode = (hashCode * 59) + Redirect.GetHashCode();
+ }
+ if (Widgets != null)
+ {
+ hashCode = (hashCode * 59) + Widgets.GetHashCode();
+ }
+ return hashCode;
+ }
+ }
+
+}
+
diff --git a/algoliasearch/Models/Composition/RequestBody.cs b/algoliasearch/Models/Composition/RequestBody.cs
new file mode 100644
index 00000000..dbe9c042
--- /dev/null
+++ b/algoliasearch/Models/Composition/RequestBody.cs
@@ -0,0 +1,88 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// RequestBody
+///
+public partial class RequestBody
+{
+ ///
+ /// Initializes a new instance of the RequestBody class.
+ ///
+ public RequestBody()
+ {
+ }
+
+ ///
+ /// Gets or Sets Params
+ ///
+ [JsonPropertyName("params")]
+ public Params Params { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class RequestBody {\n");
+ sb.Append(" Params: ").Append(Params).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonSerializer.Serialize(this, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not RequestBody input)
+ {
+ return false;
+ }
+
+ return
+ (Params == input.Params || (Params != null && Params.Equals(input.Params)));
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (Params != null)
+ {
+ hashCode = (hashCode * 59) + Params.GetHashCode();
+ }
+ return hashCode;
+ }
+ }
+
+}
+
diff --git a/algoliasearch/Models/Composition/ResultsCompositionInfoResponse.cs b/algoliasearch/Models/Composition/ResultsCompositionInfoResponse.cs
new file mode 100644
index 00000000..6a39e17f
--- /dev/null
+++ b/algoliasearch/Models/Composition/ResultsCompositionInfoResponse.cs
@@ -0,0 +1,95 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// ResultsCompositionInfoResponse
+///
+public partial class ResultsCompositionInfoResponse
+{
+ ///
+ /// Initializes a new instance of the ResultsCompositionInfoResponse class.
+ ///
+ [JsonConstructor]
+ public ResultsCompositionInfoResponse() { }
+ ///
+ /// Initializes a new instance of the ResultsCompositionInfoResponse class.
+ ///
+ /// injectedItems (required).
+ public ResultsCompositionInfoResponse(List injectedItems)
+ {
+ InjectedItems = injectedItems ?? throw new ArgumentNullException(nameof(injectedItems));
+ }
+
+ ///
+ /// Gets or Sets InjectedItems
+ ///
+ [JsonPropertyName("injectedItems")]
+ public List InjectedItems { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class ResultsCompositionInfoResponse {\n");
+ sb.Append(" InjectedItems: ").Append(InjectedItems).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonSerializer.Serialize(this, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not ResultsCompositionInfoResponse input)
+ {
+ return false;
+ }
+
+ return
+ (InjectedItems == input.InjectedItems || InjectedItems != null && input.InjectedItems != null && InjectedItems.SequenceEqual(input.InjectedItems));
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (InjectedItems != null)
+ {
+ hashCode = (hashCode * 59) + InjectedItems.GetHashCode();
+ }
+ return hashCode;
+ }
+ }
+
+}
+
diff --git a/algoliasearch/Models/Composition/ResultsInjectedItemAppliedRulesInfoResponse.cs b/algoliasearch/Models/Composition/ResultsInjectedItemAppliedRulesInfoResponse.cs
new file mode 100644
index 00000000..c708aef2
--- /dev/null
+++ b/algoliasearch/Models/Composition/ResultsInjectedItemAppliedRulesInfoResponse.cs
@@ -0,0 +1,96 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// ResultsInjectedItemAppliedRulesInfoResponse
+///
+public partial class ResultsInjectedItemAppliedRulesInfoResponse
+{
+ ///
+ /// Initializes a new instance of the ResultsInjectedItemAppliedRulesInfoResponse class.
+ ///
+ [JsonConstructor]
+ public ResultsInjectedItemAppliedRulesInfoResponse() { }
+ ///
+ /// Initializes a new instance of the ResultsInjectedItemAppliedRulesInfoResponse class.
+ ///
+ /// Unique record identifier. (required).
+ public ResultsInjectedItemAppliedRulesInfoResponse(string objectID)
+ {
+ ObjectID = objectID ?? throw new ArgumentNullException(nameof(objectID));
+ }
+
+ ///
+ /// Unique record identifier.
+ ///
+ /// Unique record identifier.
+ [JsonPropertyName("objectID")]
+ public string ObjectID { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class ResultsInjectedItemAppliedRulesInfoResponse {\n");
+ sb.Append(" ObjectID: ").Append(ObjectID).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonSerializer.Serialize(this, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not ResultsInjectedItemAppliedRulesInfoResponse input)
+ {
+ return false;
+ }
+
+ return
+ (ObjectID == input.ObjectID || (ObjectID != null && ObjectID.Equals(input.ObjectID)));
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (ObjectID != null)
+ {
+ hashCode = (hashCode * 59) + ObjectID.GetHashCode();
+ }
+ return hashCode;
+ }
+ }
+
+}
+
diff --git a/algoliasearch/Models/Composition/ResultsInjectedItemInfoResponse.cs b/algoliasearch/Models/Composition/ResultsInjectedItemInfoResponse.cs
new file mode 100644
index 00000000..91616105
--- /dev/null
+++ b/algoliasearch/Models/Composition/ResultsInjectedItemInfoResponse.cs
@@ -0,0 +1,123 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// ResultsInjectedItemInfoResponse
+///
+public partial class ResultsInjectedItemInfoResponse
+{
+ ///
+ /// Initializes a new instance of the ResultsInjectedItemInfoResponse class.
+ ///
+ [JsonConstructor]
+ public ResultsInjectedItemInfoResponse()
+ {
+ AdditionalProperties = new Dictionary();
+ }
+ ///
+ /// Initializes a new instance of the ResultsInjectedItemInfoResponse class.
+ ///
+ /// key (required).
+ public ResultsInjectedItemInfoResponse(string key)
+ {
+ Key = key ?? throw new ArgumentNullException(nameof(key));
+ AdditionalProperties = new Dictionary();
+ }
+
+ ///
+ /// Gets or Sets Key
+ ///
+ [JsonPropertyName("key")]
+ public string Key { get; set; }
+
+ ///
+ /// Gets or Sets AppliedRules
+ ///
+ [JsonPropertyName("appliedRules")]
+ public List AppliedRules { get; set; }
+
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class ResultsInjectedItemInfoResponse {\n");
+ sb.Append(" Key: ").Append(Key).Append("\n");
+ sb.Append(" AppliedRules: ").Append(AppliedRules).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonSerializer.Serialize(this, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not ResultsInjectedItemInfoResponse input)
+ {
+ return false;
+ }
+
+ return
+ (Key == input.Key || (Key != null && Key.Equals(input.Key))) &&
+ (AppliedRules == input.AppliedRules || AppliedRules != null && input.AppliedRules != null && AppliedRules.SequenceEqual(input.AppliedRules))
+ && (AdditionalProperties.Count == input.AdditionalProperties.Count && !AdditionalProperties.Except(input.AdditionalProperties).Any());
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (Key != null)
+ {
+ hashCode = (hashCode * 59) + Key.GetHashCode();
+ }
+ if (AppliedRules != null)
+ {
+ hashCode = (hashCode * 59) + AppliedRules.GetHashCode();
+ }
+ if (AdditionalProperties != null)
+ {
+ hashCode = (hashCode * 59) + AdditionalProperties.GetHashCode();
+ }
+ return hashCode;
+ }
+ }
+
+}
+
diff --git a/algoliasearch/Models/Composition/SearchForFacetValuesParams.cs b/algoliasearch/Models/Composition/SearchForFacetValuesParams.cs
new file mode 100644
index 00000000..151446eb
--- /dev/null
+++ b/algoliasearch/Models/Composition/SearchForFacetValuesParams.cs
@@ -0,0 +1,111 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// SearchForFacetValuesParams
+///
+public partial class SearchForFacetValuesParams
+{
+ ///
+ /// Initializes a new instance of the SearchForFacetValuesParams class.
+ ///
+ public SearchForFacetValuesParams()
+ {
+ }
+
+ ///
+ /// Search query.
+ ///
+ /// Search query.
+ [JsonPropertyName("query")]
+ public string Query { get; set; }
+
+ ///
+ /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
+ ///
+ /// Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
+ [JsonPropertyName("maxFacetHits")]
+ public int? MaxFacetHits { get; set; }
+
+ ///
+ /// Gets or Sets SearchQuery
+ ///
+ [JsonPropertyName("searchQuery")]
+ public Params SearchQuery { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class SearchForFacetValuesParams {\n");
+ sb.Append(" Query: ").Append(Query).Append("\n");
+ sb.Append(" MaxFacetHits: ").Append(MaxFacetHits).Append("\n");
+ sb.Append(" SearchQuery: ").Append(SearchQuery).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonSerializer.Serialize(this, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not SearchForFacetValuesParams input)
+ {
+ return false;
+ }
+
+ return
+ (Query == input.Query || (Query != null && Query.Equals(input.Query))) &&
+ (MaxFacetHits == input.MaxFacetHits || MaxFacetHits.Equals(input.MaxFacetHits)) &&
+ (SearchQuery == input.SearchQuery || (SearchQuery != null && SearchQuery.Equals(input.SearchQuery)));
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (Query != null)
+ {
+ hashCode = (hashCode * 59) + Query.GetHashCode();
+ }
+ hashCode = (hashCode * 59) + MaxFacetHits.GetHashCode();
+ if (SearchQuery != null)
+ {
+ hashCode = (hashCode * 59) + SearchQuery.GetHashCode();
+ }
+ return hashCode;
+ }
+ }
+
+}
+
diff --git a/algoliasearch/Models/Composition/SearchForFacetValuesRequest.cs b/algoliasearch/Models/Composition/SearchForFacetValuesRequest.cs
new file mode 100644
index 00000000..ce04ddf8
--- /dev/null
+++ b/algoliasearch/Models/Composition/SearchForFacetValuesRequest.cs
@@ -0,0 +1,88 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// SearchForFacetValuesRequest
+///
+public partial class SearchForFacetValuesRequest
+{
+ ///
+ /// Initializes a new instance of the SearchForFacetValuesRequest class.
+ ///
+ public SearchForFacetValuesRequest()
+ {
+ }
+
+ ///
+ /// Gets or Sets Params
+ ///
+ [JsonPropertyName("params")]
+ public SearchForFacetValuesParams Params { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class SearchForFacetValuesRequest {\n");
+ sb.Append(" Params: ").Append(Params).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonSerializer.Serialize(this, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not SearchForFacetValuesRequest input)
+ {
+ return false;
+ }
+
+ return
+ (Params == input.Params || (Params != null && Params.Equals(input.Params)));
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (Params != null)
+ {
+ hashCode = (hashCode * 59) + Params.GetHashCode();
+ }
+ return hashCode;
+ }
+ }
+
+}
+
diff --git a/algoliasearch/Models/Composition/SearchForFacetValuesResponse.cs b/algoliasearch/Models/Composition/SearchForFacetValuesResponse.cs
new file mode 100644
index 00000000..b1a6f2e9
--- /dev/null
+++ b/algoliasearch/Models/Composition/SearchForFacetValuesResponse.cs
@@ -0,0 +1,89 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// SearchForFacetValuesResponse
+///
+public partial class SearchForFacetValuesResponse
+{
+ ///
+ /// Initializes a new instance of the SearchForFacetValuesResponse class.
+ ///
+ public SearchForFacetValuesResponse()
+ {
+ }
+
+ ///
+ /// Search for facet values results.
+ ///
+ /// Search for facet values results.
+ [JsonPropertyName("results")]
+ public List Results { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class SearchForFacetValuesResponse {\n");
+ sb.Append(" Results: ").Append(Results).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonSerializer.Serialize(this, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not SearchForFacetValuesResponse input)
+ {
+ return false;
+ }
+
+ return
+ (Results == input.Results || Results != null && input.Results != null && Results.SequenceEqual(input.Results));
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (Results != null)
+ {
+ hashCode = (hashCode * 59) + Results.GetHashCode();
+ }
+ return hashCode;
+ }
+ }
+
+}
+
diff --git a/algoliasearch/Models/Composition/SearchForFacetValuesResults.cs b/algoliasearch/Models/Composition/SearchForFacetValuesResults.cs
new file mode 100644
index 00000000..94bb5251
--- /dev/null
+++ b/algoliasearch/Models/Composition/SearchForFacetValuesResults.cs
@@ -0,0 +1,132 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// SearchForFacetValuesResults
+///
+public partial class SearchForFacetValuesResults
+{
+ ///
+ /// Initializes a new instance of the SearchForFacetValuesResults class.
+ ///
+ [JsonConstructor]
+ public SearchForFacetValuesResults() { }
+ ///
+ /// Initializes a new instance of the SearchForFacetValuesResults class.
+ ///
+ /// indexName (required).
+ /// Matching facet values. (required).
+ /// Whether the facet count is exhaustive (true) or approximate (false). For more information, see [Why are my facet and hit counts not accurate](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). (required).
+ public SearchForFacetValuesResults(string indexName, List facetHits, bool exhaustiveFacetsCount)
+ {
+ IndexName = indexName ?? throw new ArgumentNullException(nameof(indexName));
+ FacetHits = facetHits ?? throw new ArgumentNullException(nameof(facetHits));
+ ExhaustiveFacetsCount = exhaustiveFacetsCount;
+ }
+
+ ///
+ /// Gets or Sets IndexName
+ ///
+ [JsonPropertyName("indexName")]
+ public string IndexName { get; set; }
+
+ ///
+ /// Matching facet values.
+ ///
+ /// Matching facet values.
+ [JsonPropertyName("facetHits")]
+ public List FacetHits { get; set; }
+
+ ///
+ /// Whether the facet count is exhaustive (true) or approximate (false). For more information, see [Why are my facet and hit counts not accurate](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-).
+ ///
+ /// Whether the facet count is exhaustive (true) or approximate (false). For more information, see [Why are my facet and hit counts not accurate](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-).
+ [JsonPropertyName("exhaustiveFacetsCount")]
+ public bool ExhaustiveFacetsCount { get; set; }
+
+ ///
+ /// Time the server took to process the request, in milliseconds.
+ ///
+ /// Time the server took to process the request, in milliseconds.
+ [JsonPropertyName("processingTimeMS")]
+ public int? ProcessingTimeMS { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class SearchForFacetValuesResults {\n");
+ sb.Append(" IndexName: ").Append(IndexName).Append("\n");
+ sb.Append(" FacetHits: ").Append(FacetHits).Append("\n");
+ sb.Append(" ExhaustiveFacetsCount: ").Append(ExhaustiveFacetsCount).Append("\n");
+ sb.Append(" ProcessingTimeMS: ").Append(ProcessingTimeMS).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonSerializer.Serialize(this, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not SearchForFacetValuesResults input)
+ {
+ return false;
+ }
+
+ return
+ (IndexName == input.IndexName || (IndexName != null && IndexName.Equals(input.IndexName))) &&
+ (FacetHits == input.FacetHits || FacetHits != null && input.FacetHits != null && FacetHits.SequenceEqual(input.FacetHits)) &&
+ (ExhaustiveFacetsCount == input.ExhaustiveFacetsCount || ExhaustiveFacetsCount.Equals(input.ExhaustiveFacetsCount)) &&
+ (ProcessingTimeMS == input.ProcessingTimeMS || ProcessingTimeMS.Equals(input.ProcessingTimeMS));
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (IndexName != null)
+ {
+ hashCode = (hashCode * 59) + IndexName.GetHashCode();
+ }
+ if (FacetHits != null)
+ {
+ hashCode = (hashCode * 59) + FacetHits.GetHashCode();
+ }
+ hashCode = (hashCode * 59) + ExhaustiveFacetsCount.GetHashCode();
+ hashCode = (hashCode * 59) + ProcessingTimeMS.GetHashCode();
+ return hashCode;
+ }
+ }
+
+}
+
diff --git a/algoliasearch/Models/Composition/SearchResponse.cs b/algoliasearch/Models/Composition/SearchResponse.cs
new file mode 100644
index 00000000..1deb9e84
--- /dev/null
+++ b/algoliasearch/Models/Composition/SearchResponse.cs
@@ -0,0 +1,124 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// SearchResponse
+///
+public partial class SearchResponse
+{
+ ///
+ /// Initializes a new instance of the SearchResponse class.
+ ///
+ [JsonConstructor]
+ public SearchResponse()
+ {
+ AdditionalProperties = new Dictionary();
+ }
+ ///
+ /// Initializes a new instance of the SearchResponse class.
+ ///
+ /// Search results. (required).
+ public SearchResponse(List> results)
+ {
+ Results = results ?? throw new ArgumentNullException(nameof(results));
+ AdditionalProperties = new Dictionary();
+ }
+
+ ///
+ /// Gets or Sets Compositions
+ ///
+ [JsonPropertyName("compositions")]
+ public CompositionsSearchResponse Compositions { get; set; }
+
+ ///
+ /// Search results.
+ ///
+ /// Search results.
+ [JsonPropertyName("results")]
+ public List> Results { get; set; }
+
+ ///
+ /// Gets or Sets additional properties
+ ///
+ [JsonExtensionData]
+ public IDictionary AdditionalProperties { get; set; }
+
+ ///
+ /// Returns the string presentation of the object
+ ///
+ /// String presentation of the object
+ public override string ToString()
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("class SearchResponse {\n");
+ sb.Append(" Compositions: ").Append(Compositions).Append("\n");
+ sb.Append(" Results: ").Append(Results).Append("\n");
+ sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
+ sb.Append("}\n");
+ return sb.ToString();
+ }
+
+ ///
+ /// Returns the JSON string presentation of the object
+ ///
+ /// JSON string presentation of the object
+ public virtual string ToJson()
+ {
+ return JsonSerializer.Serialize(this, JsonConfig.Options);
+ }
+
+ ///
+ /// Returns true if objects are equal
+ ///
+ /// Object to be compared
+ /// Boolean
+ public override bool Equals(object obj)
+ {
+ if (obj is not SearchResponse input)
+ {
+ return false;
+ }
+
+ return
+ (Compositions == input.Compositions || (Compositions != null && Compositions.Equals(input.Compositions))) &&
+ (Results == input.Results || Results != null && input.Results != null && Results.SequenceEqual(input.Results))
+ && (AdditionalProperties.Count == input.AdditionalProperties.Count && !AdditionalProperties.Except(input.AdditionalProperties).Any());
+ }
+
+ ///
+ /// Gets the hash code
+ ///
+ /// Hash code
+ public override int GetHashCode()
+ {
+ unchecked // Overflow is fine, just wrap
+ {
+ int hashCode = 41;
+ if (Compositions != null)
+ {
+ hashCode = (hashCode * 59) + Compositions.GetHashCode();
+ }
+ if (Results != null)
+ {
+ hashCode = (hashCode * 59) + Results.GetHashCode();
+ }
+ if (AdditionalProperties != null)
+ {
+ hashCode = (hashCode * 59) + AdditionalProperties.GetHashCode();
+ }
+ return hashCode;
+ }
+ }
+
+}
+
diff --git a/algoliasearch/Models/Composition/SearchResultsItem.cs b/algoliasearch/Models/Composition/SearchResultsItem.cs
new file mode 100644
index 00000000..ea43487c
--- /dev/null
+++ b/algoliasearch/Models/Composition/SearchResultsItem.cs
@@ -0,0 +1,501 @@
+//
+// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
+//
+using System;
+using System.Text;
+using System.Linq;
+using System.Text.Json.Serialization;
+using System.Collections.Generic;
+using Algolia.Search.Serializer;
+using System.Text.Json;
+
+namespace Algolia.Search.Models.Composition;
+
+///
+/// SearchResultsItem
+///
+public partial class SearchResultsItem
+{
+ ///
+ /// Initializes a new instance of the SearchResultsItem class.
+ ///
+ [JsonConstructor]
+ public SearchResultsItem() { }
+ ///
+ /// Initializes a new instance of the SearchResultsItem class.
+ ///
+ /// Time the server took to process the request, in milliseconds. (required).
+ /// Page of search results to retrieve. (required) (default to 0).
+ /// Number of results (hits). (required).
+ /// Number of pages of results. (required).
+ /// Number of hits per page. (required) (default to 20).
+ /// Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. (required).
+ /// Search query. (required) (default to "").
+ /// URL-encoded string of all search parameters. (required).
+ /// compositions (required).
+ public SearchResultsItem(int processingTimeMS, int page, int nbHits, int nbPages, int hitsPerPage, List hits, string query, string varParams, Dictionary compositions)
+ {
+ ProcessingTimeMS = processingTimeMS;
+ Page = page;
+ NbHits = nbHits;
+ NbPages = nbPages;
+ HitsPerPage = hitsPerPage;
+ Hits = hits ?? throw new ArgumentNullException(nameof(hits));
+ Query = query ?? throw new ArgumentNullException(nameof(query));
+ Params = varParams ?? throw new ArgumentNullException(nameof(varParams));
+ Compositions = compositions ?? throw new ArgumentNullException(nameof(compositions));
+ }
+
+ ///
+ /// A/B test ID. This is only included in the response for indices that are part of an A/B test.
+ ///
+ /// A/B test ID. This is only included in the response for indices that are part of an A/B test.
+ [JsonPropertyName("abTestID")]
+ public int? AbTestID { get; set; }
+
+ ///
+ /// Variant ID. This is only included in the response for indices that are part of an A/B test.
+ ///
+ /// Variant ID. This is only included in the response for indices that are part of an A/B test.
+ [JsonPropertyName("abTestVariantID")]
+ public int? AbTestVariantID { get; set; }
+
+ ///
+ /// Computed geographical location.
+ ///
+ /// Computed geographical location.
+ [JsonPropertyName("aroundLatLng")]
+ public string AroundLatLng { get; set; }
+
+ ///
+ /// Distance from a central coordinate provided by `aroundLatLng`.
+ ///
+ /// Distance from a central coordinate provided by `aroundLatLng`.
+ [JsonPropertyName("automaticRadius")]
+ public string AutomaticRadius { get; set; }
+
+ ///
+ /// Gets or Sets Exhaustive
+ ///
+ [JsonPropertyName("exhaustive")]
+ public Exhaustive Exhaustive { get; set; }
+
+ ///
+ /// Rules applied to the query.
+ ///
+ /// Rules applied to the query.
+ [JsonPropertyName("appliedRules")]
+ public List