├── .csharpierignore ├── icon.png ├── .config └── dotnet-tools.json ├── algoliasearch ├── Transport │ ├── HttpScheme.cs │ ├── CallType.cs │ ├── StatefulHost.cs │ └── Compression.cs ├── Models │ ├── Common │ │ ├── CompressionType.cs │ │ ├── AbstractSchema.cs │ │ └── SecuredApiKeyRestrictionHelper.cs │ ├── Insights │ │ ├── ViewEvent.cs │ │ ├── ClickEvent.cs │ │ ├── PurchaseEvent.cs │ │ ├── AddToCartEvent.cs │ │ └── ConversionEvent.cs │ ├── Monitoring │ │ ├── Type.cs │ │ ├── ServerStatus.cs │ │ ├── Period.cs │ │ ├── Status.cs │ │ ├── Metric.cs │ │ └── LatencyResponse.cs │ ├── Ingestion │ │ ├── ScheduleTriggerType.cs │ │ ├── StreamingTriggerType.cs │ │ ├── MappingFormatSchema.cs │ │ ├── OnDemandTriggerType.cs │ │ ├── BigQueryDataType.cs │ │ ├── SubscriptionTriggerType.cs │ │ ├── PlatformNone.cs │ │ ├── RunOutcome.cs │ │ ├── OrderKeys.cs │ │ ├── EntityType.cs │ │ ├── MethodType.cs │ │ ├── DockerStreamsSyncMode.cs │ │ ├── TransformationType.cs │ │ ├── RecordType.cs │ │ ├── RunSortKeys.cs │ │ ├── EventSortKeys.cs │ │ ├── EventType.cs │ │ ├── DestinationType.cs │ │ ├── TransformationSortKeys.cs │ │ ├── RunStatus.cs │ │ ├── SourceSortKeys.cs │ │ ├── DestinationSortKeys.cs │ │ ├── Platform.cs │ │ ├── MappingTypeCSV.cs │ │ ├── RunType.cs │ │ ├── ActionType.cs │ │ ├── TaskSortKeys.cs │ │ ├── AuthenticationSortKeys.cs │ │ ├── EventStatus.cs │ │ ├── TriggerType.cs │ │ ├── AuthenticationType.cs │ │ ├── SourceType.cs │ │ └── RunReasonCode.cs │ ├── Analytics │ │ ├── Direction.cs │ │ ├── OrderBy.cs │ │ └── Operator.cs │ ├── Search │ │ ├── BooleanString.cs │ │ ├── AroundRadiusAll.cs │ │ ├── EditType.cs │ │ ├── OperationType.cs │ │ ├── AdvancedSyntaxFeatures.cs │ │ ├── DictionaryAction.cs │ │ ├── DictionaryEntryState.cs │ │ ├── ApiKeyOperation.cs │ │ ├── ScopeType.cs │ │ ├── DictionaryType.cs │ │ ├── TaskStatus.cs │ │ ├── SearchTypeFacet.cs │ │ ├── DictionaryEntryType.cs │ │ ├── SearchTypeDefault.cs │ │ ├── MatchLevel.cs │ │ ├── LogType.cs │ │ ├── EventType.cs │ │ ├── Mode.cs │ │ ├── SearchStrategy.cs │ │ ├── AlternativesAsExact.cs │ │ ├── EventStatus.cs │ │ ├── SortRemainingBy.cs │ │ ├── BuiltInOperationType.cs │ │ ├── Anchoring.cs │ │ ├── TypoToleranceEnum.cs │ │ ├── SynonymType.cs │ │ ├── QueryType.cs │ │ ├── RedirectURL.cs │ │ ├── BannerLink.cs │ │ └── BannerImageUrl.cs │ ├── Recommend │ │ ├── BooleanString.cs │ │ ├── AroundRadiusAll.cs │ │ ├── AdvancedSyntaxFeatures.cs │ │ ├── TrendingItemsModel.cs │ │ ├── TrendingFacetsModel.cs │ │ ├── FbtModel.cs │ │ ├── TaskStatus.cs │ │ ├── LookingSimilarModel.cs │ │ ├── MatchLevel.cs │ │ ├── RelatedModel.cs │ │ ├── RecommendModels.cs │ │ ├── AlternativesAsExact.cs │ │ ├── SortRemainingBy.cs │ │ ├── TypoToleranceEnum.cs │ │ ├── QueryType.cs │ │ ├── RedirectURL.cs │ │ ├── BannerLink.cs │ │ └── BannerImageUrl.cs │ ├── Composition │ │ ├── BooleanString.cs │ │ ├── AroundRadiusAll.cs │ │ ├── ExternalOrdering.cs │ │ ├── Action.cs │ │ ├── AdvancedSyntaxFeatures.cs │ │ ├── TaskStatus.cs │ │ ├── MatchLevel.cs │ │ ├── AlternativesAsExact.cs │ │ ├── SortRemainingBy.cs │ │ ├── Anchoring.cs │ │ ├── TypoToleranceEnum.cs │ │ ├── DedupPositioning.cs │ │ ├── QueryType.cs │ │ ├── RedirectURL.cs │ │ ├── BannerLink.cs │ │ ├── RequestBody.cs │ │ └── BannerImageUrl.cs │ ├── Personalization │ │ └── EventType.cs │ ├── AbtestingV3 │ │ ├── Direction.cs │ │ ├── ErrorCorrectionType.cs │ │ ├── EffectMetric.cs │ │ └── Status.cs │ ├── Abtesting │ │ ├── EffectMetric.cs │ │ ├── Status.cs │ │ └── Outliers.cs │ └── QuerySuggestions │ │ └── LogLevel.cs ├── Exceptions │ ├── AlgoliaUnreachableHostException.cs │ ├── AlgoliaApiException.cs │ └── AlgoliaException.cs ├── Utils │ ├── AsyncHelper.cs │ ├── ModelConverters.cs │ ├── DictionaryHelper.cs │ ├── HmacShaHelper.cs │ ├── Defaults.cs │ ├── ShuffleHelper.cs │ └── RetryHelper.cs ├── Serializer │ ├── JsonConfig.cs │ └── ISerializer.cs └── Http │ ├── AlgoliaHttpResponse.cs │ ├── IHttpRequester.cs │ ├── HttpRequestExtensions.cs │ ├── RequestOptions.cs │ ├── HttpRequestHeadersExtensions.cs │ ├── Request.cs │ ├── TimeoutHandler.cs │ ├── AlgoliaUserAgent.cs │ └── RequestOptionBuilder.cs ├── .github ├── workflows │ ├── release.yml │ ├── do-not-edit-this-repository.yml │ └── issue.yml └── ISSUE_TEMPLATE │ └── Bug_report.yml ├── Algolia.Search.sln └── LICENSE /.csharpierignore: -------------------------------------------------------------------------------- 1 | obj 2 | bin 3 | -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/algoliasearch-client-csharp/HEAD/icon.png -------------------------------------------------------------------------------- /.config/dotnet-tools.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "isRoot": true, 4 | "tools": { 5 | "csharpier": { 6 | "version": "1.2.1", 7 | "commands": [ 8 | "csharpier" 9 | ] 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /algoliasearch/Transport/HttpScheme.cs: -------------------------------------------------------------------------------- 1 | namespace Algolia.Search.Transport; 2 | 3 | /// 4 | /// Http Scheme 5 | /// 6 | public enum HttpScheme 7 | { 8 | /// 9 | /// Http 10 | /// 11 | Http, 12 | 13 | /// 14 | /// Https 15 | /// 16 | Https, 17 | } 18 | -------------------------------------------------------------------------------- /algoliasearch/Models/Common/CompressionType.cs: -------------------------------------------------------------------------------- 1 | namespace Algolia.Search.Models.Common; 2 | 3 | /// 4 | /// Compression type for outgoing HTTP requests 5 | /// 6 | public enum CompressionType 7 | { 8 | /// 9 | /// No compression 10 | /// 11 | None = 1, 12 | 13 | /// 14 | /// GZip Compression. Only supported by Search API. 15 | /// 16 | Gzip = 2, 17 | } 18 | -------------------------------------------------------------------------------- /algoliasearch/Transport/CallType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Algolia.Search.Transport; 4 | 5 | /// 6 | /// https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/enumeration-types 7 | /// Binary enums beware when adding new values 8 | /// 9 | [Flags] 10 | public enum CallType 11 | { 12 | /// 13 | /// Read Call 14 | /// 15 | Read = 1, 16 | 17 | /// 18 | /// Write Call 19 | /// 20 | Write = 2, 21 | } 22 | -------------------------------------------------------------------------------- /algoliasearch/Exceptions/AlgoliaUnreachableHostException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Algolia.Search.Exceptions; 4 | 5 | /// 6 | /// Exception thrown when an host in unreachable 7 | /// 8 | public class AlgoliaUnreachableHostException : Exception 9 | { 10 | /// 11 | /// Create a new AlgoliaUnreachableHostException. 12 | /// 13 | /// The exception details. 14 | public AlgoliaUnreachableHostException(string message) 15 | : base(message) { } 16 | } 17 | -------------------------------------------------------------------------------- /algoliasearch/Models/Common/AbstractSchema.cs: -------------------------------------------------------------------------------- 1 | namespace Algolia.Search.Models.Common; 2 | 3 | /// 4 | /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification 5 | /// 6 | public abstract class AbstractSchema 7 | { 8 | /// 9 | /// Gets or Sets the actual instance 10 | /// 11 | public abstract object ActualInstance { get; set; } 12 | 13 | /// 14 | /// Converts the instance into JSON string. 15 | /// 16 | public abstract string ToJson(); 17 | } 18 | -------------------------------------------------------------------------------- /algoliasearch/Exceptions/AlgoliaApiException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Algolia.Search.Exceptions; 4 | 5 | /// 6 | /// Exception sent by Algolia's API 7 | /// 8 | public class AlgoliaApiException : Exception 9 | { 10 | /// 11 | /// Http error code 12 | /// 13 | public int HttpErrorCode { get; set; } 14 | 15 | /// 16 | /// Create a new AlgoliaAPIException 17 | /// 18 | /// 19 | /// 20 | public AlgoliaApiException(string message, int httpErrorCode) 21 | : base(message) 22 | { 23 | HttpErrorCode = httpErrorCode; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release packages 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | release: 10 | name: Publish 11 | runs-on: ubuntu-22.04 12 | if: "startsWith(github.event.head_commit.message, 'chore: release')" 13 | steps: 14 | - uses: actions/checkout@v6 15 | 16 | - name: Setup .NET 17 | uses: actions/setup-dotnet@v5 18 | with: 19 | dotnet-version: 10.0.100 20 | 21 | - name: Create Nugget package 22 | run: dotnet pack --configuration Release --output nugget 23 | 24 | - name: Publish NuGet package 25 | run: dotnet nuget push "nugget/*.nupkg" --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate 26 | -------------------------------------------------------------------------------- /algoliasearch/Exceptions/AlgoliaException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Algolia.Search.Exceptions; 4 | 5 | /// 6 | /// Exception thrown when an error occurs in the Algolia client. 7 | /// 8 | public class AlgoliaException : Exception 9 | { 10 | /// 11 | /// Create a new Algolia exception. 12 | /// 13 | /// The exception details. 14 | public AlgoliaException(string message) 15 | : base(message) { } 16 | 17 | /// 18 | /// Create a new Algolia exception, with an inner exception. 19 | /// 20 | /// 21 | /// 22 | public AlgoliaException(string message, Exception inner) 23 | : base(message, inner) { } 24 | } 25 | -------------------------------------------------------------------------------- /algoliasearch/Utils/AsyncHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading; 3 | using System.Threading.Tasks; 4 | 5 | namespace Algolia.Search.Utils; 6 | 7 | /// 8 | /// Helper class to run async methods synchronously. 9 | /// 10 | internal static class AsyncHelper 11 | { 12 | private static readonly TaskFactory TaskFactory = new( 13 | CancellationToken.None, 14 | TaskCreationOptions.None, 15 | TaskContinuationOptions.None, 16 | TaskScheduler.Default 17 | ); 18 | 19 | internal static TResult RunSync(Func> func) => 20 | TaskFactory.StartNew(func).Unwrap().GetAwaiter().GetResult(); 21 | 22 | internal static void RunSync(Func func) => 23 | TaskFactory.StartNew(func).Unwrap().GetAwaiter().GetResult(); 24 | } 25 | -------------------------------------------------------------------------------- /algoliasearch/Models/Insights/ViewEvent.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Insights; 13 | 14 | /// 15 | /// Defines ViewEvent 16 | /// 17 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 18 | public enum ViewEvent 19 | { 20 | /// 21 | /// Enum View for value: view 22 | /// 23 | [JsonPropertyName("view")] 24 | View = 1, 25 | } 26 | -------------------------------------------------------------------------------- /algoliasearch/Models/Monitoring/Type.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Monitoring; 13 | 14 | /// 15 | /// Defines Type 16 | /// 17 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 18 | public enum Type 19 | { 20 | /// 21 | /// Enum Cluster for value: cluster 22 | /// 23 | [JsonPropertyName("cluster")] 24 | Cluster = 1, 25 | } 26 | -------------------------------------------------------------------------------- /algoliasearch/Models/Insights/ClickEvent.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Insights; 13 | 14 | /// 15 | /// Defines ClickEvent 16 | /// 17 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 18 | public enum ClickEvent 19 | { 20 | /// 21 | /// Enum Click for value: click 22 | /// 23 | [JsonPropertyName("click")] 24 | Click = 1, 25 | } 26 | -------------------------------------------------------------------------------- /algoliasearch/Models/Insights/PurchaseEvent.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Insights; 13 | 14 | /// 15 | /// Defines PurchaseEvent 16 | /// 17 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 18 | public enum PurchaseEvent 19 | { 20 | /// 21 | /// Enum Purchase for value: purchase 22 | /// 23 | [JsonPropertyName("purchase")] 24 | Purchase = 1, 25 | } 26 | -------------------------------------------------------------------------------- /algoliasearch/Models/Insights/AddToCartEvent.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Insights; 13 | 14 | /// 15 | /// Defines AddToCartEvent 16 | /// 17 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 18 | public enum AddToCartEvent 19 | { 20 | /// 21 | /// Enum AddToCart for value: addToCart 22 | /// 23 | [JsonPropertyName("addToCart")] 24 | AddToCart = 1, 25 | } 26 | -------------------------------------------------------------------------------- /algoliasearch/Models/Monitoring/ServerStatus.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Monitoring; 13 | 14 | /// 15 | /// Defines ServerStatus 16 | /// 17 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 18 | public enum ServerStatus 19 | { 20 | /// 21 | /// Enum PRODUCTION for value: PRODUCTION 22 | /// 23 | [JsonPropertyName("PRODUCTION")] 24 | PRODUCTION = 1, 25 | } 26 | -------------------------------------------------------------------------------- /algoliasearch/Serializer/JsonConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json; 2 | using System.Text.Json.Serialization; 3 | using Algolia.Search.Models.Search; 4 | 5 | namespace Algolia.Search.Serializer; 6 | 7 | /// 8 | /// Used to ensure that all the properties are serialized and deserialized well (because of Pascal and Camel Casing) 9 | /// 10 | internal static class JsonConfig 11 | { 12 | public const string JsonContentType = "application/json"; 13 | 14 | public static readonly JsonSerializerOptions Options = new() 15 | { 16 | PropertyNamingPolicy = JsonNamingPolicy.CamelCase, 17 | WriteIndented = false, 18 | DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, 19 | UnmappedMemberHandling = JsonUnmappedMemberHandling.Skip, 20 | Converters = { new SearchResultConverterFactory() }, 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /algoliasearch/Models/Insights/ConversionEvent.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Insights; 13 | 14 | /// 15 | /// Defines ConversionEvent 16 | /// 17 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 18 | public enum ConversionEvent 19 | { 20 | /// 21 | /// Enum Conversion for value: conversion 22 | /// 23 | [JsonPropertyName("conversion")] 24 | Conversion = 1, 25 | } 26 | -------------------------------------------------------------------------------- /algoliasearch/Http/AlgoliaHttpResponse.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | 3 | namespace Algolia.Search.Http; 4 | 5 | /// 6 | /// Response from Algolia's API 7 | /// 8 | public class AlgoliaHttpResponse 9 | { 10 | /// 11 | /// Http response code 12 | /// 13 | public int HttpStatusCode { get; set; } 14 | 15 | /// 16 | /// Stream Response body 17 | /// 18 | public Stream Body { get; set; } 19 | 20 | /// 21 | /// TimeOut 22 | /// 23 | public bool IsTimedOut { get; set; } 24 | 25 | /// 26 | /// Network connectivity, DNS failure, server certificate validation. 27 | /// 28 | public bool IsNetworkError { get; set; } 29 | 30 | /// 31 | /// Http Error message 32 | /// 33 | public string Error { get; set; } 34 | } 35 | -------------------------------------------------------------------------------- /algoliasearch/Serializer/ISerializer.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Threading.Tasks; 3 | 4 | namespace Algolia.Search.Serializer; 5 | 6 | /// 7 | /// Interface representing the expected behavior of the Serializer. 8 | /// 9 | internal interface ISerializer 10 | { 11 | /// 12 | /// Converts the value of a specified type into a JSON string. 13 | /// 14 | /// The value to convert and write. 15 | string Serialize(object data); 16 | 17 | /// 18 | /// Parses the stream into an instance of a specified type. 19 | /// 20 | /// The Stream containing the data to read. 21 | /// The type of the value to convert. 22 | /// 23 | Task Deserialize(Stream stream); 24 | } 25 | -------------------------------------------------------------------------------- /algoliasearch/Models/Ingestion/ScheduleTriggerType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Ingestion; 13 | 14 | /// 15 | /// Task runs on a schedule. 16 | /// 17 | /// Task runs on a schedule. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum ScheduleTriggerType 20 | { 21 | /// 22 | /// Enum Schedule for value: schedule 23 | /// 24 | [JsonPropertyName("schedule")] 25 | Schedule = 1, 26 | } 27 | -------------------------------------------------------------------------------- /algoliasearch/Utils/ModelConverters.cs: -------------------------------------------------------------------------------- 1 | using Algolia.Search.Models.Search; 2 | 3 | namespace Algolia.Search.Utils; 4 | 5 | /// 6 | /// A tool class to help model conversion 7 | /// 8 | public static class ModelConverters 9 | { 10 | /// 11 | /// Convert a GetApiKeyResponse to an ApiKey 12 | /// 13 | /// 14 | /// 15 | public static ApiKey ToApiKey(this GetApiKeyResponse apiKey) 16 | { 17 | return new ApiKey 18 | { 19 | Acl = apiKey.Acl, 20 | Description = apiKey.Description, 21 | Indexes = apiKey.Indexes, 22 | Referers = apiKey.Referers, 23 | Validity = apiKey.Validity, 24 | QueryParameters = apiKey.QueryParameters, 25 | MaxHitsPerQuery = apiKey.MaxHitsPerQuery, 26 | MaxQueriesPerIPPerHour = apiKey.MaxQueriesPerIPPerHour, 27 | }; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /algoliasearch/Models/Ingestion/StreamingTriggerType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Ingestion; 13 | 14 | /// 15 | /// Task runs continuously. 16 | /// 17 | /// Task runs continuously. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum StreamingTriggerType 20 | { 21 | /// 22 | /// Enum Streaming for value: streaming 23 | /// 24 | [JsonPropertyName("streaming")] 25 | Streaming = 1, 26 | } 27 | -------------------------------------------------------------------------------- /algoliasearch/Models/Ingestion/MappingFormatSchema.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Ingestion; 13 | 14 | /// 15 | /// Mapping format schema. 16 | /// 17 | /// Mapping format schema. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum MappingFormatSchema 20 | { 21 | /// 22 | /// Enum MappingkitV1 for value: mappingkit/v1 23 | /// 24 | [JsonPropertyName("mappingkit/v1")] 25 | MappingkitV1 = 1, 26 | } 27 | -------------------------------------------------------------------------------- /algoliasearch/Models/Analytics/Direction.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Analytics; 13 | 14 | /// 15 | /// Defines direction 16 | /// 17 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 18 | public enum Direction 19 | { 20 | /// 21 | /// Enum Asc for value: asc 22 | /// 23 | [JsonPropertyName("asc")] 24 | Asc = 1, 25 | 26 | /// 27 | /// Enum Desc for value: desc 28 | /// 29 | [JsonPropertyName("desc")] 30 | Desc = 2, 31 | } 32 | -------------------------------------------------------------------------------- /algoliasearch/Http/IHttpRequester.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading; 3 | using System.Threading.Tasks; 4 | 5 | namespace Algolia.Search.Http; 6 | 7 | /// 8 | /// Interface that allow users to inject their custom http requester 9 | /// Don't use directly, use AlgoliaClient to make request with the retry strategy 10 | /// 11 | public interface IHttpRequester 12 | { 13 | /// 14 | /// Sends the HTTP request 15 | /// 16 | /// Request object 17 | /// Request timeout 18 | /// Connect timeout 19 | /// Optional cancellation token 20 | /// 21 | Task SendRequestAsync( 22 | Request request, 23 | TimeSpan requestTimeout, 24 | TimeSpan connectTimeout, 25 | CancellationToken ct = default 26 | ); 27 | } 28 | -------------------------------------------------------------------------------- /algoliasearch/Models/Ingestion/OnDemandTriggerType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Ingestion; 13 | 14 | /// 15 | /// Task is run manually, with the `/run` endpoint. 16 | /// 17 | /// Task is run manually, with the `/run` endpoint. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum OnDemandTriggerType 20 | { 21 | /// 22 | /// Enum OnDemand for value: onDemand 23 | /// 24 | [JsonPropertyName("onDemand")] 25 | OnDemand = 1, 26 | } 27 | -------------------------------------------------------------------------------- /algoliasearch/Models/Search/BooleanString.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Search; 13 | 14 | /// 15 | /// Defines booleanString 16 | /// 17 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 18 | public enum BooleanString 19 | { 20 | /// 21 | /// Enum True for value: true 22 | /// 23 | [JsonPropertyName("true")] 24 | True = 1, 25 | 26 | /// 27 | /// Enum False for value: false 28 | /// 29 | [JsonPropertyName("false")] 30 | False = 2, 31 | } 32 | -------------------------------------------------------------------------------- /algoliasearch/Models/Recommend/BooleanString.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Recommend; 13 | 14 | /// 15 | /// Defines booleanString 16 | /// 17 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 18 | public enum BooleanString 19 | { 20 | /// 21 | /// Enum True for value: true 22 | /// 23 | [JsonPropertyName("true")] 24 | True = 1, 25 | 26 | /// 27 | /// Enum False for value: false 28 | /// 29 | [JsonPropertyName("false")] 30 | False = 2, 31 | } 32 | -------------------------------------------------------------------------------- /algoliasearch/Models/Composition/BooleanString.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Composition; 13 | 14 | /// 15 | /// Defines booleanString 16 | /// 17 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 18 | public enum BooleanString 19 | { 20 | /// 21 | /// Enum True for value: true 22 | /// 23 | [JsonPropertyName("true")] 24 | True = 1, 25 | 26 | /// 27 | /// Enum False for value: false 28 | /// 29 | [JsonPropertyName("false")] 30 | False = 2, 31 | } 32 | -------------------------------------------------------------------------------- /algoliasearch/Models/Ingestion/BigQueryDataType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Ingestion; 13 | 14 | /// 15 | /// Defines BigQueryDataType 16 | /// 17 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 18 | public enum BigQueryDataType 19 | { 20 | /// 21 | /// Enum Ga4 for value: ga4 22 | /// 23 | [JsonPropertyName("ga4")] 24 | Ga4 = 1, 25 | 26 | /// 27 | /// Enum Ga360 for value: ga360 28 | /// 29 | [JsonPropertyName("ga360")] 30 | Ga360 = 2, 31 | } 32 | -------------------------------------------------------------------------------- /algoliasearch/Models/Ingestion/SubscriptionTriggerType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Ingestion; 13 | 14 | /// 15 | /// Task runs after receiving subscribed event. 16 | /// 17 | /// Task runs after receiving subscribed event. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum SubscriptionTriggerType 20 | { 21 | /// 22 | /// Enum Subscription for value: subscription 23 | /// 24 | [JsonPropertyName("subscription")] 25 | Subscription = 1, 26 | } 27 | -------------------------------------------------------------------------------- /algoliasearch/Models/Search/AroundRadiusAll.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Search; 13 | 14 | /// 15 | /// Return all records with a valid `_geoloc` attribute. Don't filter by distance. 16 | /// 17 | /// Return all records with a valid `_geoloc` attribute. Don't filter by distance. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum AroundRadiusAll 20 | { 21 | /// 22 | /// Enum All for value: all 23 | /// 24 | [JsonPropertyName("all")] 25 | All = 1, 26 | } 27 | -------------------------------------------------------------------------------- /algoliasearch/Models/Ingestion/PlatformNone.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Ingestion; 13 | 14 | /// 15 | /// Authentication resource not tied to any ecommerce platform, used for filtering. 16 | /// 17 | /// Authentication resource not tied to any ecommerce platform, used for filtering. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum PlatformNone 20 | { 21 | /// 22 | /// Enum None for value: none 23 | /// 24 | [JsonPropertyName("none")] 25 | None = 1, 26 | } 27 | -------------------------------------------------------------------------------- /algoliasearch/Models/Recommend/AroundRadiusAll.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Recommend; 13 | 14 | /// 15 | /// Return all records with a valid `_geoloc` attribute. Don't filter by distance. 16 | /// 17 | /// Return all records with a valid `_geoloc` attribute. Don't filter by distance. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum AroundRadiusAll 20 | { 21 | /// 22 | /// Enum All for value: all 23 | /// 24 | [JsonPropertyName("all")] 25 | All = 1, 26 | } 27 | -------------------------------------------------------------------------------- /algoliasearch/Models/Composition/AroundRadiusAll.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Composition; 13 | 14 | /// 15 | /// Return all records with a valid `_geoloc` attribute. Don't filter by distance. 16 | /// 17 | /// Return all records with a valid `_geoloc` attribute. Don't filter by distance. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum AroundRadiusAll 20 | { 21 | /// 22 | /// Enum All for value: all 23 | /// 24 | [JsonPropertyName("all")] 25 | All = 1, 26 | } 27 | -------------------------------------------------------------------------------- /algoliasearch/Models/Search/EditType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Search; 13 | 14 | /// 15 | /// Type of edit. 16 | /// 17 | /// Type of edit. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum EditType 20 | { 21 | /// 22 | /// Enum Remove for value: remove 23 | /// 24 | [JsonPropertyName("remove")] 25 | Remove = 1, 26 | 27 | /// 28 | /// Enum Replace for value: replace 29 | /// 30 | [JsonPropertyName("replace")] 31 | Replace = 2, 32 | } 33 | -------------------------------------------------------------------------------- /algoliasearch/Models/Ingestion/RunOutcome.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Ingestion; 13 | 14 | /// 15 | /// Task run outcome. 16 | /// 17 | /// Task run outcome. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum RunOutcome 20 | { 21 | /// 22 | /// Enum Success for value: success 23 | /// 24 | [JsonPropertyName("success")] 25 | Success = 1, 26 | 27 | /// 28 | /// Enum Failure for value: failure 29 | /// 30 | [JsonPropertyName("failure")] 31 | Failure = 2, 32 | } 33 | -------------------------------------------------------------------------------- /algoliasearch/Models/Composition/ExternalOrdering.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Composition; 13 | 14 | /// 15 | /// Defines externalOrdering 16 | /// 17 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 18 | public enum ExternalOrdering 19 | { 20 | /// 21 | /// Enum Default for value: default 22 | /// 23 | [JsonPropertyName("default")] 24 | Default = 1, 25 | 26 | /// 27 | /// Enum UserDefined for value: userDefined 28 | /// 29 | [JsonPropertyName("userDefined")] 30 | UserDefined = 2, 31 | } 32 | -------------------------------------------------------------------------------- /algoliasearch/Models/Ingestion/OrderKeys.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Ingestion; 13 | 14 | /// 15 | /// Ascending or descending sort order. 16 | /// 17 | /// Ascending or descending sort order. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum OrderKeys 20 | { 21 | /// 22 | /// Enum Asc for value: asc 23 | /// 24 | [JsonPropertyName("asc")] 25 | Asc = 1, 26 | 27 | /// 28 | /// Enum Desc for value: desc 29 | /// 30 | [JsonPropertyName("desc")] 31 | Desc = 2, 32 | } 33 | -------------------------------------------------------------------------------- /algoliasearch/Models/Search/OperationType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Search; 13 | 14 | /// 15 | /// Operation to perform on the index. 16 | /// 17 | /// Operation to perform on the index. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum OperationType 20 | { 21 | /// 22 | /// Enum Move for value: move 23 | /// 24 | [JsonPropertyName("move")] 25 | Move = 1, 26 | 27 | /// 28 | /// Enum Copy for value: copy 29 | /// 30 | [JsonPropertyName("copy")] 31 | Copy = 2, 32 | } 33 | -------------------------------------------------------------------------------- /algoliasearch/Models/Composition/Action.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Composition; 13 | 14 | /// 15 | /// Type of Composition Batch operation. 16 | /// 17 | /// Type of Composition Batch operation. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum Action 20 | { 21 | /// 22 | /// Enum Upsert for value: upsert 23 | /// 24 | [JsonPropertyName("upsert")] 25 | Upsert = 1, 26 | 27 | /// 28 | /// Enum Delete for value: delete 29 | /// 30 | [JsonPropertyName("delete")] 31 | Delete = 2, 32 | } 33 | -------------------------------------------------------------------------------- /algoliasearch/Models/Ingestion/EntityType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Ingestion; 13 | 14 | /// 15 | /// Type of entity to update. 16 | /// 17 | /// Type of entity to update. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum EntityType 20 | { 21 | /// 22 | /// Enum Product for value: product 23 | /// 24 | [JsonPropertyName("product")] 25 | Product = 1, 26 | 27 | /// 28 | /// Enum Collection for value: collection 29 | /// 30 | [JsonPropertyName("collection")] 31 | Collection = 2, 32 | } 33 | -------------------------------------------------------------------------------- /algoliasearch/Models/Ingestion/MethodType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Ingestion; 13 | 14 | /// 15 | /// HTTP method to be used for retrieving your data. 16 | /// 17 | /// HTTP method to be used for retrieving your data. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum MethodType 20 | { 21 | /// 22 | /// Enum GET for value: GET 23 | /// 24 | [JsonPropertyName("GET")] 25 | GET = 1, 26 | 27 | /// 28 | /// Enum POST for value: POST 29 | /// 30 | [JsonPropertyName("POST")] 31 | POST = 2, 32 | } 33 | -------------------------------------------------------------------------------- /algoliasearch/Models/Search/AdvancedSyntaxFeatures.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Search; 13 | 14 | /// 15 | /// Defines advancedSyntaxFeatures 16 | /// 17 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 18 | public enum AdvancedSyntaxFeatures 19 | { 20 | /// 21 | /// Enum ExactPhrase for value: exactPhrase 22 | /// 23 | [JsonPropertyName("exactPhrase")] 24 | ExactPhrase = 1, 25 | 26 | /// 27 | /// Enum ExcludeWords for value: excludeWords 28 | /// 29 | [JsonPropertyName("excludeWords")] 30 | ExcludeWords = 2, 31 | } 32 | -------------------------------------------------------------------------------- /algoliasearch/Models/Search/DictionaryAction.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Search; 13 | 14 | /// 15 | /// Actions to perform. 16 | /// 17 | /// Actions to perform. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum DictionaryAction 20 | { 21 | /// 22 | /// Enum AddEntry for value: addEntry 23 | /// 24 | [JsonPropertyName("addEntry")] 25 | AddEntry = 1, 26 | 27 | /// 28 | /// Enum DeleteEntry for value: deleteEntry 29 | /// 30 | [JsonPropertyName("deleteEntry")] 31 | DeleteEntry = 2, 32 | } 33 | -------------------------------------------------------------------------------- /algoliasearch/Models/Composition/AdvancedSyntaxFeatures.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Composition; 13 | 14 | /// 15 | /// Defines advancedSyntaxFeatures 16 | /// 17 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 18 | public enum AdvancedSyntaxFeatures 19 | { 20 | /// 21 | /// Enum ExactPhrase for value: exactPhrase 22 | /// 23 | [JsonPropertyName("exactPhrase")] 24 | ExactPhrase = 1, 25 | 26 | /// 27 | /// Enum ExcludeWords for value: excludeWords 28 | /// 29 | [JsonPropertyName("excludeWords")] 30 | ExcludeWords = 2, 31 | } 32 | -------------------------------------------------------------------------------- /algoliasearch/Models/Recommend/AdvancedSyntaxFeatures.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Recommend; 13 | 14 | /// 15 | /// Defines advancedSyntaxFeatures 16 | /// 17 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 18 | public enum AdvancedSyntaxFeatures 19 | { 20 | /// 21 | /// Enum ExactPhrase for value: exactPhrase 22 | /// 23 | [JsonPropertyName("exactPhrase")] 24 | ExactPhrase = 1, 25 | 26 | /// 27 | /// Enum ExcludeWords for value: excludeWords 28 | /// 29 | [JsonPropertyName("excludeWords")] 30 | ExcludeWords = 2, 31 | } 32 | -------------------------------------------------------------------------------- /.github/workflows/do-not-edit-this-repository.yml: -------------------------------------------------------------------------------- 1 | name: Do not edit files in this repository 2 | 3 | on: 4 | pull_request_target: 5 | types: 6 | - opened 7 | - synchronize 8 | - reopened 9 | branches: 10 | - 'main' 11 | 12 | jobs: 13 | auto_close_pr: 14 | name: Close PR 15 | runs-on: ubuntu-latest 16 | steps: 17 | - uses: actions/checkout@v6 18 | 19 | - name: Close PR 20 | env: 21 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 22 | PR_NUMBER: ${{ github.event.pull_request.number }} 23 | run: | 24 | gh pr close "${PR_NUMBER}" -d -c "Thanks for contributing to our API clients! Sorry to close your PR, but this repository is fully generated, you can port your changes to [the API Clients Automation repository](https://github.com/algolia/api-clients-automation). If you need some guidance, feel free to [open an issue](https://github.com/algolia/api-clients-automation/issues) or [read our contribution guide](https://api-clients-automation.netlify.app/docs/introduction)." 25 | -------------------------------------------------------------------------------- /algoliasearch/Http/HttpRequestExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net.Http; 3 | 4 | namespace Algolia.Search.Http; 5 | 6 | /// 7 | /// This class allow to handle timeout per request 8 | /// https://www.thomaslevesque.com/2018/02/25/better-timeout-handling-with-httpclient/ 9 | /// 10 | internal static class HttpRequestExtensions 11 | { 12 | private const string TimeoutPropertyKey = "RequestTimeout"; 13 | 14 | internal static void SetTimeout(this HttpRequestMessage request, TimeSpan? timeout) 15 | { 16 | if (request == null) 17 | throw new ArgumentNullException(nameof(request)); 18 | request.Properties[TimeoutPropertyKey] = timeout; 19 | } 20 | 21 | internal static TimeSpan? GetTimeout(this HttpRequestMessage request) 22 | { 23 | if (request == null) 24 | throw new ArgumentNullException(nameof(request)); 25 | if ( 26 | request.Properties.TryGetValue(TimeoutPropertyKey, out var value) && value is TimeSpan timeout 27 | ) 28 | return timeout; 29 | return null; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Algolia.Search.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 12.00 2 | # Visual Studio 14 3 | VisualStudioVersion = 14.0.25420.1 4 | MinimumVisualStudioVersion = 10.0.40219.1 5 | Project("{C3F414F4-84DD-4E56-A1E7-34086763F07D}") = "Algolia.Search", "algoliasearch\Algolia.Search.csproj", "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" 6 | EndProject 7 | Global 8 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 9 | Debug|Any CPU = Debug|Any CPU 10 | Release|Any CPU = Release|Any CPU 11 | EndGlobalSection 12 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 13 | {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 14 | {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}.Debug|Any CPU.Build.0 = Debug|Any CPU 15 | {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}.Release|Any CPU.ActiveCfg = Release|Any CPU 16 | {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}.Release|Any CPU.Build.0 = Release|Any CPU 17 | EndGlobalSection 18 | GlobalSection(SolutionProperties) = preSolution 19 | HideSolutionNode = FALSE 20 | EndGlobalSection 21 | EndGlobal -------------------------------------------------------------------------------- /algoliasearch/Models/Search/DictionaryEntryState.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Search; 13 | 14 | /// 15 | /// Whether a dictionary entry is active. 16 | /// 17 | /// Whether a dictionary entry is active. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum DictionaryEntryState 20 | { 21 | /// 22 | /// Enum Enabled for value: enabled 23 | /// 24 | [JsonPropertyName("enabled")] 25 | Enabled = 1, 26 | 27 | /// 28 | /// Enum Disabled for value: disabled 29 | /// 30 | [JsonPropertyName("disabled")] 31 | Disabled = 2, 32 | } 33 | -------------------------------------------------------------------------------- /algoliasearch/Models/Recommend/TrendingItemsModel.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Recommend; 13 | 14 | /// 15 | /// Trending items model. Trending items are determined from the number of conversion events collected on them. 16 | /// 17 | /// Trending items model. Trending items are determined from the number of conversion events collected on them. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum TrendingItemsModel 20 | { 21 | /// 22 | /// Enum TrendingItems for value: trending-items 23 | /// 24 | [JsonPropertyName("trending-items")] 25 | TrendingItems = 1, 26 | } 27 | -------------------------------------------------------------------------------- /algoliasearch/Models/Recommend/TrendingFacetsModel.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Recommend; 13 | 14 | /// 15 | /// Trending facet values model. This model recommends trending facet values for the specified facet attribute. 16 | /// 17 | /// Trending facet values model. This model recommends trending facet values for the specified facet attribute. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum TrendingFacetsModel 20 | { 21 | /// 22 | /// Enum TrendingFacets for value: trending-facets 23 | /// 24 | [JsonPropertyName("trending-facets")] 25 | TrendingFacets = 1, 26 | } 27 | -------------------------------------------------------------------------------- /algoliasearch/Models/Ingestion/DockerStreamsSyncMode.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Ingestion; 13 | 14 | /// 15 | /// The strategy to use to fetch the data. 16 | /// 17 | /// The strategy to use to fetch the data. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum DockerStreamsSyncMode 20 | { 21 | /// 22 | /// Enum Incremental for value: incremental 23 | /// 24 | [JsonPropertyName("incremental")] 25 | Incremental = 1, 26 | 27 | /// 28 | /// Enum FullTable for value: fullTable 29 | /// 30 | [JsonPropertyName("fullTable")] 31 | FullTable = 2, 32 | } 33 | -------------------------------------------------------------------------------- /algoliasearch/Models/Search/ApiKeyOperation.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Search; 13 | 14 | /// 15 | /// Defines apiKeyOperation 16 | /// 17 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 18 | public enum ApiKeyOperation 19 | { 20 | /// 21 | /// Enum Add for value: add 22 | /// 23 | [JsonPropertyName("add")] 24 | Add = 1, 25 | 26 | /// 27 | /// Enum Delete for value: delete 28 | /// 29 | [JsonPropertyName("delete")] 30 | Delete = 2, 31 | 32 | /// 33 | /// Enum Update for value: update 34 | /// 35 | [JsonPropertyName("update")] 36 | Update = 3, 37 | } 38 | -------------------------------------------------------------------------------- /algoliasearch/Models/Search/ScopeType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Search; 13 | 14 | /// 15 | /// Defines scopeType 16 | /// 17 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 18 | public enum ScopeType 19 | { 20 | /// 21 | /// Enum Settings for value: settings 22 | /// 23 | [JsonPropertyName("settings")] 24 | Settings = 1, 25 | 26 | /// 27 | /// Enum Synonyms for value: synonyms 28 | /// 29 | [JsonPropertyName("synonyms")] 30 | Synonyms = 2, 31 | 32 | /// 33 | /// Enum Rules for value: rules 34 | /// 35 | [JsonPropertyName("rules")] 36 | Rules = 3, 37 | } 38 | -------------------------------------------------------------------------------- /algoliasearch/Models/Ingestion/TransformationType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Ingestion; 13 | 14 | /// 15 | /// The type of transformation, which can be either 'code' or 'noCode'. 16 | /// 17 | /// The type of transformation, which can be either 'code' or 'noCode'. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum TransformationType 20 | { 21 | /// 22 | /// Enum Code for value: code 23 | /// 24 | [JsonPropertyName("code")] 25 | Code = 1, 26 | 27 | /// 28 | /// Enum NoCode for value: noCode 29 | /// 30 | [JsonPropertyName("noCode")] 31 | NoCode = 2, 32 | } 33 | -------------------------------------------------------------------------------- /algoliasearch/Utils/DictionaryHelper.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | 4 | namespace Algolia.Search.Utils; 5 | 6 | /// 7 | /// Helper regarding dictionary merging 8 | /// 9 | public static class DictionaryHelper 10 | { 11 | /// 12 | /// Merge a into b removing the duplicates from b if they exists 13 | /// 14 | /// 15 | /// 16 | /// 17 | /// 18 | /// 19 | public static IDictionary MergeWith( 20 | this IDictionary a, 21 | Dictionary b 22 | ) 23 | { 24 | if (a == null && b != null) 25 | { 26 | return b; 27 | } 28 | 29 | if (a != null && b == null) 30 | { 31 | return a; 32 | } 33 | 34 | var mergeWith = a 35 | ?.Concat(b.Where(kvp => !a.ContainsKey(kvp.Key) && kvp.Value != null)) 36 | .ToDictionary(kvp => kvp.Key, kvp => kvp.Value); 37 | return mergeWith; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /algoliasearch/Models/Recommend/FbtModel.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Recommend; 13 | 14 | /// 15 | /// Frequently bought together model. This model recommends items that have been purchased within 1 day with the item with the ID `objectID`. 16 | /// 17 | /// Frequently bought together model. This model recommends items that have been purchased within 1 day with the item with the ID `objectID`. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum FbtModel 20 | { 21 | /// 22 | /// Enum BoughtTogether for value: bought-together 23 | /// 24 | [JsonPropertyName("bought-together")] 25 | BoughtTogether = 1, 26 | } 27 | -------------------------------------------------------------------------------- /algoliasearch/Models/Search/DictionaryType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Search; 13 | 14 | /// 15 | /// Defines dictionaryType 16 | /// 17 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 18 | public enum DictionaryType 19 | { 20 | /// 21 | /// Enum Plurals for value: plurals 22 | /// 23 | [JsonPropertyName("plurals")] 24 | Plurals = 1, 25 | 26 | /// 27 | /// Enum Stopwords for value: stopwords 28 | /// 29 | [JsonPropertyName("stopwords")] 30 | Stopwords = 2, 31 | 32 | /// 33 | /// Enum Compounds for value: compounds 34 | /// 35 | [JsonPropertyName("compounds")] 36 | Compounds = 3, 37 | } 38 | -------------------------------------------------------------------------------- /algoliasearch/Models/Personalization/EventType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Personalization; 13 | 14 | /// 15 | /// Event type. 16 | /// 17 | /// Event type. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum EventType 20 | { 21 | /// 22 | /// Enum Click for value: click 23 | /// 24 | [JsonPropertyName("click")] 25 | Click = 1, 26 | 27 | /// 28 | /// Enum Conversion for value: conversion 29 | /// 30 | [JsonPropertyName("conversion")] 31 | Conversion = 2, 32 | 33 | /// 34 | /// Enum View for value: view 35 | /// 36 | [JsonPropertyName("view")] 37 | View = 3, 38 | } 39 | -------------------------------------------------------------------------------- /algoliasearch/Models/Search/TaskStatus.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Search; 13 | 14 | /// 15 | /// Task status, `published` if the task is completed, `notPublished` otherwise. 16 | /// 17 | /// Task status, `published` if the task is completed, `notPublished` otherwise. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum TaskStatus 20 | { 21 | /// 22 | /// Enum Published for value: published 23 | /// 24 | [JsonPropertyName("published")] 25 | Published = 1, 26 | 27 | /// 28 | /// Enum NotPublished for value: notPublished 29 | /// 30 | [JsonPropertyName("notPublished")] 31 | NotPublished = 2, 32 | } 33 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2013-Present Algolia 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /algoliasearch/Models/Recommend/TaskStatus.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Recommend; 13 | 14 | /// 15 | /// Task status, `published` if the task is completed, `notPublished` otherwise. 16 | /// 17 | /// Task status, `published` if the task is completed, `notPublished` otherwise. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum TaskStatus 20 | { 21 | /// 22 | /// Enum Published for value: published 23 | /// 24 | [JsonPropertyName("published")] 25 | Published = 1, 26 | 27 | /// 28 | /// Enum NotPublished for value: notPublished 29 | /// 30 | [JsonPropertyName("notPublished")] 31 | NotPublished = 2, 32 | } 33 | -------------------------------------------------------------------------------- /algoliasearch/Transport/StatefulHost.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Algolia.Search.Transport; 4 | 5 | /// 6 | /// Algolia's stateful host 7 | /// 8 | public class StatefulHost 9 | { 10 | /// 11 | /// Url endpoint without the scheme and the port 12 | /// 13 | public string Url { get; set; } 14 | 15 | /// 16 | /// Scheme of the URL (Default: Https) 17 | /// 18 | public HttpScheme Scheme { get; set; } = HttpScheme.Https; 19 | 20 | /// 21 | /// Port of the URL (Optional) 22 | /// 23 | public int? Port { get; set; } 24 | 25 | /// 26 | /// Is the host up or not 27 | /// 28 | public bool Up { get; set; } = true; 29 | 30 | /// 31 | /// Retry count 32 | /// 33 | public int RetryCount { get; set; } 34 | 35 | /// 36 | /// Last time the host has been used 37 | /// 38 | public DateTime LastUse { get; set; } = DateTime.UtcNow; 39 | 40 | /// 41 | /// CallType accepted by the host 42 | /// 43 | public CallType Accept { get; set; } 44 | } 45 | -------------------------------------------------------------------------------- /algoliasearch/Models/Composition/TaskStatus.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Composition; 13 | 14 | /// 15 | /// Task status, `published` if the task is completed, `notPublished` otherwise. 16 | /// 17 | /// Task status, `published` if the task is completed, `notPublished` otherwise. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum TaskStatus 20 | { 21 | /// 22 | /// Enum Published for value: published 23 | /// 24 | [JsonPropertyName("published")] 25 | Published = 1, 26 | 27 | /// 28 | /// Enum NotPublished for value: notPublished 29 | /// 30 | [JsonPropertyName("notPublished")] 31 | NotPublished = 2, 32 | } 33 | -------------------------------------------------------------------------------- /algoliasearch/Utils/HmacShaHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Security.Cryptography; 3 | using System.Text; 4 | 5 | namespace Algolia.Search.Utils; 6 | 7 | /// 8 | /// Helper to compute HMAC SHA 256 9 | /// 10 | internal static class HmacShaHelper 11 | { 12 | private static readonly ASCIIEncoding Encoding = new(); 13 | 14 | internal static string GetHash(string key, string text) 15 | { 16 | var keyBytes = Encoding.GetBytes(key); 17 | var textBytes = Encoding.GetBytes(text); 18 | 19 | using var hmac = new HMACSHA256(keyBytes); 20 | var hmBytes = hmac.ComputeHash(textBytes); 21 | return ToHexString(hmBytes); 22 | } 23 | 24 | private static string ToHexString(byte[] array) 25 | { 26 | var hex = new StringBuilder(array.Length * 2); 27 | foreach (var b in array) 28 | { 29 | hex.AppendFormat("{0:x2}", b); 30 | } 31 | 32 | return hex.ToString(); 33 | } 34 | 35 | internal static string Base64Encode(string plainText) 36 | { 37 | var plainTextBytes = System.Text.Encoding.UTF8.GetBytes(plainText); 38 | return Convert.ToBase64String(plainTextBytes); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /algoliasearch/Models/Recommend/LookingSimilarModel.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Recommend; 13 | 14 | /// 15 | /// Looking similar model. This model recommends items that look similar to the item with the ID `objectID` based on image attributes in your index. 16 | /// 17 | /// Looking similar model. This model recommends items that look similar to the item with the ID `objectID` based on image attributes in your index. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum LookingSimilarModel 20 | { 21 | /// 22 | /// Enum LookingSimilar for value: looking-similar 23 | /// 24 | [JsonPropertyName("looking-similar")] 25 | LookingSimilar = 1, 26 | } 27 | -------------------------------------------------------------------------------- /algoliasearch/Models/Search/SearchTypeFacet.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Search; 13 | 14 | /// 15 | /// - `default`: perform a search query - `facet` [searches for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). 16 | /// 17 | /// - `default`: perform a search query - `facet` [searches for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum SearchTypeFacet 20 | { 21 | /// 22 | /// Enum Facet for value: facet 23 | /// 24 | [JsonPropertyName("facet")] 25 | Facet = 1, 26 | } 27 | -------------------------------------------------------------------------------- /algoliasearch/Models/Search/DictionaryEntryType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Search; 13 | 14 | /// 15 | /// Whether a dictionary entry is provided by Algolia (standard), or has been added by you (custom). 16 | /// 17 | /// Whether a dictionary entry is provided by Algolia (standard), or has been added by you (custom). 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum DictionaryEntryType 20 | { 21 | /// 22 | /// Enum Custom for value: custom 23 | /// 24 | [JsonPropertyName("custom")] 25 | Custom = 1, 26 | 27 | /// 28 | /// Enum Standard for value: standard 29 | /// 30 | [JsonPropertyName("standard")] 31 | Standard = 2, 32 | } 33 | -------------------------------------------------------------------------------- /algoliasearch/Models/Search/SearchTypeDefault.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Search; 13 | 14 | /// 15 | /// - `default`: perform a search query - `facet` [searches for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). 16 | /// 17 | /// - `default`: perform a search query - `facet` [searches for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values). 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum SearchTypeDefault 20 | { 21 | /// 22 | /// Enum Default for value: default 23 | /// 24 | [JsonPropertyName("default")] 25 | Default = 1, 26 | } 27 | -------------------------------------------------------------------------------- /algoliasearch/Utils/Defaults.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Algolia.Search.Utils; 4 | 5 | /// 6 | /// Holding all default values of the library 7 | /// 8 | internal static class Defaults 9 | { 10 | /// 11 | /// Read timeout 12 | /// 13 | public static TimeSpan ReadTimeout = TimeSpan.FromSeconds(5); 14 | 15 | /// 16 | /// Write timeout 17 | /// 18 | public static TimeSpan WriteTimeout = TimeSpan.FromSeconds(30); 19 | 20 | /// 21 | /// Connect timeout 22 | /// 23 | public static TimeSpan ConnectTimeout = TimeSpan.FromSeconds(2); 24 | 25 | public const string AcceptHeader = "Accept"; 26 | public const string AlgoliaApplicationHeader = "X-Algolia-Application-Id"; 27 | public const string AlgoliaApiKeyHeader = "X-Algolia-API-Key"; 28 | public const string UserAgentHeader = "User-Agent"; 29 | public const string Connection = "Connection"; 30 | public const string KeepAlive = "keep-alive"; 31 | public const string ContentType = "Content-Type"; 32 | public const string ApplicationJson = "application/json; charset=utf-8"; 33 | public const string GzipEncoding = "gzip"; 34 | } 35 | -------------------------------------------------------------------------------- /algoliasearch/Models/Ingestion/RecordType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Ingestion; 13 | 14 | /// 15 | /// Record type for ecommerce sources. 16 | /// 17 | /// Record type for ecommerce sources. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum RecordType 20 | { 21 | /// 22 | /// Enum Product for value: product 23 | /// 24 | [JsonPropertyName("product")] 25 | Product = 1, 26 | 27 | /// 28 | /// Enum Variant for value: variant 29 | /// 30 | [JsonPropertyName("variant")] 31 | Variant = 2, 32 | 33 | /// 34 | /// Enum Collection for value: collection 35 | /// 36 | [JsonPropertyName("collection")] 37 | Collection = 3, 38 | } 39 | -------------------------------------------------------------------------------- /algoliasearch/Models/Search/MatchLevel.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Search; 13 | 14 | /// 15 | /// Whether the whole query string matches or only a part. 16 | /// 17 | /// Whether the whole query string matches or only a part. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum MatchLevel 20 | { 21 | /// 22 | /// Enum None for value: none 23 | /// 24 | [JsonPropertyName("none")] 25 | None = 1, 26 | 27 | /// 28 | /// Enum Partial for value: partial 29 | /// 30 | [JsonPropertyName("partial")] 31 | Partial = 2, 32 | 33 | /// 34 | /// Enum Full for value: full 35 | /// 36 | [JsonPropertyName("full")] 37 | Full = 3, 38 | } 39 | -------------------------------------------------------------------------------- /algoliasearch/Models/AbtestingV3/Direction.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.AbtestingV3; 13 | 14 | /// 15 | /// Sort order for A/B tests by start date. Use 'asc' for ascending or 'desc' for descending. Active A/B tests are always listed first. 16 | /// 17 | /// Sort order for A/B tests by start date. Use 'asc' for ascending or 'desc' for descending. Active A/B tests are always listed first. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum Direction 20 | { 21 | /// 22 | /// Enum Asc for value: asc 23 | /// 24 | [JsonPropertyName("asc")] 25 | Asc = 1, 26 | 27 | /// 28 | /// Enum Desc for value: desc 29 | /// 30 | [JsonPropertyName("desc")] 31 | Desc = 2, 32 | } 33 | -------------------------------------------------------------------------------- /algoliasearch/Models/Recommend/MatchLevel.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Recommend; 13 | 14 | /// 15 | /// Whether the whole query string matches or only a part. 16 | /// 17 | /// Whether the whole query string matches or only a part. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum MatchLevel 20 | { 21 | /// 22 | /// Enum None for value: none 23 | /// 24 | [JsonPropertyName("none")] 25 | None = 1, 26 | 27 | /// 28 | /// Enum Partial for value: partial 29 | /// 30 | [JsonPropertyName("partial")] 31 | Partial = 2, 32 | 33 | /// 34 | /// Enum Full for value: full 35 | /// 36 | [JsonPropertyName("full")] 37 | Full = 3, 38 | } 39 | -------------------------------------------------------------------------------- /algoliasearch/Models/Search/LogType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Search; 13 | 14 | /// 15 | /// Defines logType 16 | /// 17 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 18 | public enum LogType 19 | { 20 | /// 21 | /// Enum All for value: all 22 | /// 23 | [JsonPropertyName("all")] 24 | All = 1, 25 | 26 | /// 27 | /// Enum Query for value: query 28 | /// 29 | [JsonPropertyName("query")] 30 | Query = 2, 31 | 32 | /// 33 | /// Enum Build for value: build 34 | /// 35 | [JsonPropertyName("build")] 36 | Build = 3, 37 | 38 | /// 39 | /// Enum Error for value: error 40 | /// 41 | [JsonPropertyName("error")] 42 | Error = 4, 43 | } 44 | -------------------------------------------------------------------------------- /algoliasearch/Utils/ShuffleHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace Algolia.Search.Utils; 6 | 7 | /// 8 | /// Extension method to shuffle List 9 | /// https://stackoverflow.com/questions/5807128/an-extension-method-on-ienumerable-needed-for-shuffling 10 | /// 11 | internal static class ShuffleHelper 12 | { 13 | internal static IEnumerable Shuffle(this IEnumerable source) 14 | { 15 | return source.Shuffle(new Random()); 16 | } 17 | 18 | private static IEnumerable Shuffle(this IEnumerable source, Random rng) 19 | { 20 | if (source == null) 21 | throw new ArgumentNullException(nameof(source)); 22 | if (rng == null) 23 | throw new ArgumentNullException(nameof(rng)); 24 | 25 | return source.ShuffleIterator(rng); 26 | } 27 | 28 | private static IEnumerable ShuffleIterator(this IEnumerable source, Random rng) 29 | { 30 | var buffer = source.ToList(); 31 | for (var i = 0; i < buffer.Count; i++) 32 | { 33 | var j = rng.Next(i, buffer.Count); 34 | yield return buffer[j]; 35 | 36 | buffer[j] = buffer[i]; 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /algoliasearch/Models/Composition/MatchLevel.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Composition; 13 | 14 | /// 15 | /// Whether the whole query string matches or only a part. 16 | /// 17 | /// Whether the whole query string matches or only a part. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum MatchLevel 20 | { 21 | /// 22 | /// Enum None for value: none 23 | /// 24 | [JsonPropertyName("none")] 25 | None = 1, 26 | 27 | /// 28 | /// Enum Partial for value: partial 29 | /// 30 | [JsonPropertyName("partial")] 31 | Partial = 2, 32 | 33 | /// 34 | /// Enum Full for value: full 35 | /// 36 | [JsonPropertyName("full")] 37 | Full = 3, 38 | } 39 | -------------------------------------------------------------------------------- /algoliasearch/Models/AbtestingV3/ErrorCorrectionType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.AbtestingV3; 13 | 14 | /// 15 | /// Multiple-testing correction method applied when evaluating metric significance. 16 | /// 17 | /// Multiple-testing correction method applied when evaluating metric significance. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum ErrorCorrectionType 20 | { 21 | /// 22 | /// Enum Bonferroni for value: bonferroni 23 | /// 24 | [JsonPropertyName("bonferroni")] 25 | Bonferroni = 1, 26 | 27 | /// 28 | /// Enum BenjaminiHochberg for value: benjamini-hochberg 29 | /// 30 | [JsonPropertyName("benjamini-hochberg")] 31 | BenjaminiHochberg = 2, 32 | } 33 | -------------------------------------------------------------------------------- /algoliasearch/Models/Ingestion/RunSortKeys.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Ingestion; 13 | 14 | /// 15 | /// Property by which to sort the list of task runs. 16 | /// 17 | /// Property by which to sort the list of task runs. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum RunSortKeys 20 | { 21 | /// 22 | /// Enum Status for value: status 23 | /// 24 | [JsonPropertyName("status")] 25 | Status = 1, 26 | 27 | /// 28 | /// Enum UpdatedAt for value: updatedAt 29 | /// 30 | [JsonPropertyName("updatedAt")] 31 | UpdatedAt = 2, 32 | 33 | /// 34 | /// Enum CreatedAt for value: createdAt 35 | /// 36 | [JsonPropertyName("createdAt")] 37 | CreatedAt = 3, 38 | } 39 | -------------------------------------------------------------------------------- /algoliasearch/Models/Search/EventType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Search; 13 | 14 | /// 15 | /// Defines EventType 16 | /// 17 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 18 | public enum EventType 19 | { 20 | /// 21 | /// Enum Fetch for value: fetch 22 | /// 23 | [JsonPropertyName("fetch")] 24 | Fetch = 1, 25 | 26 | /// 27 | /// Enum Record for value: record 28 | /// 29 | [JsonPropertyName("record")] 30 | Record = 2, 31 | 32 | /// 33 | /// Enum Log for value: log 34 | /// 35 | [JsonPropertyName("log")] 36 | Log = 3, 37 | 38 | /// 39 | /// Enum Transform for value: transform 40 | /// 41 | [JsonPropertyName("transform")] 42 | Transform = 4, 43 | } 44 | -------------------------------------------------------------------------------- /algoliasearch/Models/Ingestion/EventSortKeys.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Ingestion; 13 | 14 | /// 15 | /// Property by which to sort the list of task run events. 16 | /// 17 | /// Property by which to sort the list of task run events. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum EventSortKeys 20 | { 21 | /// 22 | /// Enum Status for value: status 23 | /// 24 | [JsonPropertyName("status")] 25 | Status = 1, 26 | 27 | /// 28 | /// Enum Type for value: type 29 | /// 30 | [JsonPropertyName("type")] 31 | Type = 2, 32 | 33 | /// 34 | /// Enum PublishedAt for value: publishedAt 35 | /// 36 | [JsonPropertyName("publishedAt")] 37 | PublishedAt = 3, 38 | } 39 | -------------------------------------------------------------------------------- /algoliasearch/Models/Ingestion/EventType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Ingestion; 13 | 14 | /// 15 | /// Defines EventType 16 | /// 17 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 18 | public enum EventType 19 | { 20 | /// 21 | /// Enum Fetch for value: fetch 22 | /// 23 | [JsonPropertyName("fetch")] 24 | Fetch = 1, 25 | 26 | /// 27 | /// Enum Record for value: record 28 | /// 29 | [JsonPropertyName("record")] 30 | Record = 2, 31 | 32 | /// 33 | /// Enum Log for value: log 34 | /// 35 | [JsonPropertyName("log")] 36 | Log = 3, 37 | 38 | /// 39 | /// Enum Transform for value: transform 40 | /// 41 | [JsonPropertyName("transform")] 42 | Transform = 4, 43 | } 44 | -------------------------------------------------------------------------------- /algoliasearch/Models/Recommend/RelatedModel.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Recommend; 13 | 14 | /// 15 | /// Related products or similar content model. This model recommends items that are similar to the item with the ID `objectID`. Similarity is determined from the user interactions and attributes. 16 | /// 17 | /// Related products or similar content model. This model recommends items that are similar to the item with the ID `objectID`. Similarity is determined from the user interactions and attributes. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum RelatedModel 20 | { 21 | /// 22 | /// Enum RelatedProducts for value: related-products 23 | /// 24 | [JsonPropertyName("related-products")] 25 | RelatedProducts = 1, 26 | } 27 | -------------------------------------------------------------------------------- /algoliasearch/Models/Ingestion/DestinationType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Ingestion; 13 | 14 | /// 15 | /// Destination type. - `search`. Data is stored in an Algolia index. - `insights`. Data is recorded as user events in the Insights API. 16 | /// 17 | /// Destination type. - `search`. Data is stored in an Algolia index. - `insights`. Data is recorded as user events in the Insights API. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum DestinationType 20 | { 21 | /// 22 | /// Enum Search for value: search 23 | /// 24 | [JsonPropertyName("search")] 25 | Search = 1, 26 | 27 | /// 28 | /// Enum Insights for value: insights 29 | /// 30 | [JsonPropertyName("insights")] 31 | Insights = 2, 32 | } 33 | -------------------------------------------------------------------------------- /algoliasearch/Models/Ingestion/TransformationSortKeys.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Ingestion; 13 | 14 | /// 15 | /// Property by which to sort the list of transformations. 16 | /// 17 | /// Property by which to sort the list of transformations. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum TransformationSortKeys 20 | { 21 | /// 22 | /// Enum Name for value: name 23 | /// 24 | [JsonPropertyName("name")] 25 | Name = 1, 26 | 27 | /// 28 | /// Enum UpdatedAt for value: updatedAt 29 | /// 30 | [JsonPropertyName("updatedAt")] 31 | UpdatedAt = 2, 32 | 33 | /// 34 | /// Enum CreatedAt for value: createdAt 35 | /// 36 | [JsonPropertyName("createdAt")] 37 | CreatedAt = 3, 38 | } 39 | -------------------------------------------------------------------------------- /algoliasearch/Models/Search/Mode.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Search; 13 | 14 | /// 15 | /// Search mode the index will use to query for results. This setting only applies to indices, for which Algolia enabled NeuralSearch for you. 16 | /// 17 | /// Search mode the index will use to query for results. This setting only applies to indices, for which Algolia enabled NeuralSearch for you. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum Mode 20 | { 21 | /// 22 | /// Enum NeuralSearch for value: neuralSearch 23 | /// 24 | [JsonPropertyName("neuralSearch")] 25 | NeuralSearch = 1, 26 | 27 | /// 28 | /// Enum KeywordSearch for value: keywordSearch 29 | /// 30 | [JsonPropertyName("keywordSearch")] 31 | KeywordSearch = 2, 32 | } 33 | -------------------------------------------------------------------------------- /algoliasearch/Models/Ingestion/RunStatus.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Ingestion; 13 | 14 | /// 15 | /// Task run status. 16 | /// 17 | /// Task run status. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum RunStatus 20 | { 21 | /// 22 | /// Enum Created for value: created 23 | /// 24 | [JsonPropertyName("created")] 25 | Created = 1, 26 | 27 | /// 28 | /// Enum Started for value: started 29 | /// 30 | [JsonPropertyName("started")] 31 | Started = 2, 32 | 33 | /// 34 | /// Enum Finished for value: finished 35 | /// 36 | [JsonPropertyName("finished")] 37 | Finished = 3, 38 | 39 | /// 40 | /// Enum Skipped for value: skipped 41 | /// 42 | [JsonPropertyName("skipped")] 43 | Skipped = 4, 44 | } 45 | -------------------------------------------------------------------------------- /algoliasearch/Http/RequestOptions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Algolia.Search.Http; 5 | 6 | /// 7 | /// Request option you can add to your queries 8 | /// Use to help you build this object 9 | /// 10 | public class RequestOptions 11 | { 12 | /// 13 | /// Custom headers will override default headers if they exist 14 | /// 15 | public IDictionary Headers { get; set; } 16 | 17 | /// 18 | /// Add custom queries parameters 19 | /// 20 | public IDictionary QueryParameters { get; set; } 21 | 22 | /// 23 | /// Request timeout 24 | /// 25 | public TimeSpan? ReadTimeout { get; set; } 26 | 27 | /// 28 | /// Request timeout 29 | /// 30 | public TimeSpan? WriteTimeout { get; set; } 31 | 32 | /// 33 | /// Request timeout 34 | /// 35 | public TimeSpan? ConnectTimeout { get; set; } 36 | 37 | /// 38 | /// Constructs a new instance of 39 | /// 40 | public RequestOptions() 41 | { 42 | QueryParameters = new Dictionary(); 43 | Headers = new Dictionary(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /algoliasearch/Models/Monitoring/Period.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Monitoring; 13 | 14 | /// 15 | /// Defines Period 16 | /// 17 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 18 | public enum Period 19 | { 20 | /// 21 | /// Enum Minute for value: minute 22 | /// 23 | [JsonPropertyName("minute")] 24 | Minute = 1, 25 | 26 | /// 27 | /// Enum Hour for value: hour 28 | /// 29 | [JsonPropertyName("hour")] 30 | Hour = 2, 31 | 32 | /// 33 | /// Enum Day for value: day 34 | /// 35 | [JsonPropertyName("day")] 36 | Day = 3, 37 | 38 | /// 39 | /// Enum Week for value: week 40 | /// 41 | [JsonPropertyName("week")] 42 | Week = 4, 43 | 44 | /// 45 | /// Enum Month for value: month 46 | /// 47 | [JsonPropertyName("month")] 48 | Month = 5, 49 | } 50 | -------------------------------------------------------------------------------- /algoliasearch/Transport/Compression.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.IO.Compression; 3 | using System.Text; 4 | using Algolia.Search.Models.Common; 5 | 6 | namespace Algolia.Search.Transport; 7 | 8 | internal static class Compression 9 | { 10 | private static readonly UTF8Encoding DefaultEncoding = new(false); 11 | 12 | private const int DefaultBufferSize = 1024; 13 | 14 | // Buffer sized as recommended by Bradley Grainger, http://faithlife.codes/blog/2012/06/always-wrap-gzipstream-with-bufferedstream/ 15 | private const int GZipBufferSize = 8192; 16 | 17 | public static MemoryStream CreateStream(string data, bool compress) 18 | { 19 | var stream = new MemoryStream(); 20 | 21 | var compressionType = compress ? CompressionType.Gzip : CompressionType.None; 22 | if (compressionType == CompressionType.Gzip) 23 | { 24 | using var gzipStream = new GZipStream(stream, CompressionMode.Compress, true); 25 | using var sw = new StreamWriter(gzipStream, DefaultEncoding, GZipBufferSize); 26 | sw.Write(data); 27 | sw.Flush(); 28 | } 29 | else 30 | { 31 | using var sw = new StreamWriter(stream, DefaultEncoding, DefaultBufferSize, true); 32 | sw.Write(data); 33 | sw.Flush(); 34 | } 35 | 36 | stream.Seek(0, SeekOrigin.Begin); 37 | return stream; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /algoliasearch/Http/HttpRequestHeadersExtensions.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using System.Net.Http.Headers; 4 | using Algolia.Search.Utils; 5 | 6 | namespace Algolia.Search.Http; 7 | 8 | internal static class HttpRequestHeadersExtensions 9 | { 10 | /// 11 | /// Extension method to easily fill the HttpRequesterHeaders object 12 | /// 13 | /// 14 | /// 15 | /// 16 | internal static void Fill(this HttpRequestHeaders headers, IDictionary dictionary) 17 | { 18 | foreach (var header in dictionary.ToList()) 19 | { 20 | headers.TryAddWithoutValidation(header.Key, header.Value); 21 | } 22 | } 23 | 24 | /// 25 | /// Extension method to easily fill HttpContentHeaders with the Request object 26 | /// 27 | /// 28 | /// 29 | internal static void Fill(this HttpContentHeaders headers, Request request) 30 | { 31 | if (request.Body == null) 32 | { 33 | return; 34 | } 35 | 36 | headers.Add(Defaults.ContentType, Defaults.ApplicationJson); 37 | 38 | if (request.CanCompress) 39 | { 40 | headers.ContentEncoding.Add(Defaults.GzipEncoding); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /algoliasearch/Models/Ingestion/SourceSortKeys.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Ingestion; 13 | 14 | /// 15 | /// Property by which to sort the list of sources. 16 | /// 17 | /// Property by which to sort the list of sources. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum SourceSortKeys 20 | { 21 | /// 22 | /// Enum Name for value: name 23 | /// 24 | [JsonPropertyName("name")] 25 | Name = 1, 26 | 27 | /// 28 | /// Enum Type for value: type 29 | /// 30 | [JsonPropertyName("type")] 31 | Type = 2, 32 | 33 | /// 34 | /// Enum UpdatedAt for value: updatedAt 35 | /// 36 | [JsonPropertyName("updatedAt")] 37 | UpdatedAt = 3, 38 | 39 | /// 40 | /// Enum CreatedAt for value: createdAt 41 | /// 42 | [JsonPropertyName("createdAt")] 43 | CreatedAt = 4, 44 | } 45 | -------------------------------------------------------------------------------- /algoliasearch/Models/Ingestion/DestinationSortKeys.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Ingestion; 13 | 14 | /// 15 | /// Property by which to sort the destinations. 16 | /// 17 | /// Property by which to sort the destinations. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum DestinationSortKeys 20 | { 21 | /// 22 | /// Enum Name for value: name 23 | /// 24 | [JsonPropertyName("name")] 25 | Name = 1, 26 | 27 | /// 28 | /// Enum Type for value: type 29 | /// 30 | [JsonPropertyName("type")] 31 | Type = 2, 32 | 33 | /// 34 | /// Enum UpdatedAt for value: updatedAt 35 | /// 36 | [JsonPropertyName("updatedAt")] 37 | UpdatedAt = 3, 38 | 39 | /// 40 | /// Enum CreatedAt for value: createdAt 41 | /// 42 | [JsonPropertyName("createdAt")] 43 | CreatedAt = 4, 44 | } 45 | -------------------------------------------------------------------------------- /algoliasearch/Models/Ingestion/Platform.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Ingestion; 13 | 14 | /// 15 | /// Name of an ecommerce platform with which to authenticate. This determines which authentication type you can select. 16 | /// 17 | /// Name of an ecommerce platform with which to authenticate. This determines which authentication type you can select. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum Platform 20 | { 21 | /// 22 | /// Enum Bigcommerce for value: bigcommerce 23 | /// 24 | [JsonPropertyName("bigcommerce")] 25 | Bigcommerce = 1, 26 | 27 | /// 28 | /// Enum Commercetools for value: commercetools 29 | /// 30 | [JsonPropertyName("commercetools")] 31 | Commercetools = 2, 32 | 33 | /// 34 | /// Enum Shopify for value: shopify 35 | /// 36 | [JsonPropertyName("shopify")] 37 | Shopify = 3, 38 | } 39 | -------------------------------------------------------------------------------- /algoliasearch/Models/Recommend/RecommendModels.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Recommend; 13 | 14 | /// 15 | /// Defines recommendModels 16 | /// 17 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 18 | public enum RecommendModels 19 | { 20 | /// 21 | /// Enum RelatedProducts for value: related-products 22 | /// 23 | [JsonPropertyName("related-products")] 24 | RelatedProducts = 1, 25 | 26 | /// 27 | /// Enum BoughtTogether for value: bought-together 28 | /// 29 | [JsonPropertyName("bought-together")] 30 | BoughtTogether = 2, 31 | 32 | /// 33 | /// Enum TrendingFacets for value: trending-facets 34 | /// 35 | [JsonPropertyName("trending-facets")] 36 | TrendingFacets = 3, 37 | 38 | /// 39 | /// Enum TrendingItems for value: trending-items 40 | /// 41 | [JsonPropertyName("trending-items")] 42 | TrendingItems = 4, 43 | } 44 | -------------------------------------------------------------------------------- /algoliasearch/Models/Ingestion/MappingTypeCSV.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Ingestion; 13 | 14 | /// 15 | /// Defines MappingTypeCSV 16 | /// 17 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 18 | public enum MappingTypeCSV 19 | { 20 | /// 21 | /// Enum String for value: string 22 | /// 23 | [JsonPropertyName("string")] 24 | String = 1, 25 | 26 | /// 27 | /// Enum Integer for value: integer 28 | /// 29 | [JsonPropertyName("integer")] 30 | Integer = 2, 31 | 32 | /// 33 | /// Enum Float for value: float 34 | /// 35 | [JsonPropertyName("float")] 36 | Float = 3, 37 | 38 | /// 39 | /// Enum Boolean for value: boolean 40 | /// 41 | [JsonPropertyName("boolean")] 42 | Boolean = 4, 43 | 44 | /// 45 | /// Enum Json for value: json 46 | /// 47 | [JsonPropertyName("json")] 48 | Json = 5, 49 | } 50 | -------------------------------------------------------------------------------- /algoliasearch/Models/Monitoring/Status.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Monitoring; 13 | 14 | /// 15 | /// Status of the cluster. 16 | /// 17 | /// Status of the cluster. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum Status 20 | { 21 | /// 22 | /// Enum Operational for value: operational 23 | /// 24 | [JsonPropertyName("operational")] 25 | Operational = 1, 26 | 27 | /// 28 | /// Enum DegradedPerformance for value: degraded_performance 29 | /// 30 | [JsonPropertyName("degraded_performance")] 31 | DegradedPerformance = 2, 32 | 33 | /// 34 | /// Enum PartialOutage for value: partial_outage 35 | /// 36 | [JsonPropertyName("partial_outage")] 37 | PartialOutage = 3, 38 | 39 | /// 40 | /// Enum MajorOutage for value: major_outage 41 | /// 42 | [JsonPropertyName("major_outage")] 43 | MajorOutage = 4, 44 | } 45 | -------------------------------------------------------------------------------- /algoliasearch/Models/Search/SearchStrategy.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Search; 13 | 14 | /// 15 | /// Strategy for multiple search queries: - `none`. Run all queries. - `stopIfEnoughMatches`. Run the queries one by one, stopping as soon as a query matches at least the `hitsPerPage` number of results. 16 | /// 17 | /// Strategy for multiple search queries: - `none`. Run all queries. - `stopIfEnoughMatches`. Run the queries one by one, stopping as soon as a query matches at least the `hitsPerPage` number of results. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum SearchStrategy 20 | { 21 | /// 22 | /// Enum None for value: none 23 | /// 24 | [JsonPropertyName("none")] 25 | None = 1, 26 | 27 | /// 28 | /// Enum StopIfEnoughMatches for value: stopIfEnoughMatches 29 | /// 30 | [JsonPropertyName("stopIfEnoughMatches")] 31 | StopIfEnoughMatches = 2, 32 | } 33 | -------------------------------------------------------------------------------- /algoliasearch/Models/Ingestion/RunType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Ingestion; 13 | 14 | /// 15 | /// Task run type. 16 | /// 17 | /// Task run type. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum RunType 20 | { 21 | /// 22 | /// Enum Reindex for value: reindex 23 | /// 24 | [JsonPropertyName("reindex")] 25 | Reindex = 1, 26 | 27 | /// 28 | /// Enum Update for value: update 29 | /// 30 | [JsonPropertyName("update")] 31 | Update = 2, 32 | 33 | /// 34 | /// Enum Discover for value: discover 35 | /// 36 | [JsonPropertyName("discover")] 37 | Discover = 3, 38 | 39 | /// 40 | /// Enum Validate for value: validate 41 | /// 42 | [JsonPropertyName("validate")] 43 | Validate = 4, 44 | 45 | /// 46 | /// Enum Push for value: push 47 | /// 48 | [JsonPropertyName("push")] 49 | Push = 5, 50 | } 51 | -------------------------------------------------------------------------------- /algoliasearch/Models/Search/AlternativesAsExact.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Search; 13 | 14 | /// 15 | /// Defines alternativesAsExact 16 | /// 17 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 18 | public enum AlternativesAsExact 19 | { 20 | /// 21 | /// Enum IgnorePlurals for value: ignorePlurals 22 | /// 23 | [JsonPropertyName("ignorePlurals")] 24 | IgnorePlurals = 1, 25 | 26 | /// 27 | /// Enum SingleWordSynonym for value: singleWordSynonym 28 | /// 29 | [JsonPropertyName("singleWordSynonym")] 30 | SingleWordSynonym = 2, 31 | 32 | /// 33 | /// Enum MultiWordsSynonym for value: multiWordsSynonym 34 | /// 35 | [JsonPropertyName("multiWordsSynonym")] 36 | MultiWordsSynonym = 3, 37 | 38 | /// 39 | /// Enum IgnoreConjugations for value: ignoreConjugations 40 | /// 41 | [JsonPropertyName("ignoreConjugations")] 42 | IgnoreConjugations = 4, 43 | } 44 | -------------------------------------------------------------------------------- /algoliasearch/Models/Recommend/AlternativesAsExact.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Recommend; 13 | 14 | /// 15 | /// Defines alternativesAsExact 16 | /// 17 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 18 | public enum AlternativesAsExact 19 | { 20 | /// 21 | /// Enum IgnorePlurals for value: ignorePlurals 22 | /// 23 | [JsonPropertyName("ignorePlurals")] 24 | IgnorePlurals = 1, 25 | 26 | /// 27 | /// Enum SingleWordSynonym for value: singleWordSynonym 28 | /// 29 | [JsonPropertyName("singleWordSynonym")] 30 | SingleWordSynonym = 2, 31 | 32 | /// 33 | /// Enum MultiWordsSynonym for value: multiWordsSynonym 34 | /// 35 | [JsonPropertyName("multiWordsSynonym")] 36 | MultiWordsSynonym = 3, 37 | 38 | /// 39 | /// Enum IgnoreConjugations for value: ignoreConjugations 40 | /// 41 | [JsonPropertyName("ignoreConjugations")] 42 | IgnoreConjugations = 4, 43 | } 44 | -------------------------------------------------------------------------------- /algoliasearch/Models/Composition/AlternativesAsExact.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Composition; 13 | 14 | /// 15 | /// Defines alternativesAsExact 16 | /// 17 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 18 | public enum AlternativesAsExact 19 | { 20 | /// 21 | /// Enum IgnorePlurals for value: ignorePlurals 22 | /// 23 | [JsonPropertyName("ignorePlurals")] 24 | IgnorePlurals = 1, 25 | 26 | /// 27 | /// Enum SingleWordSynonym for value: singleWordSynonym 28 | /// 29 | [JsonPropertyName("singleWordSynonym")] 30 | SingleWordSynonym = 2, 31 | 32 | /// 33 | /// Enum MultiWordsSynonym for value: multiWordsSynonym 34 | /// 35 | [JsonPropertyName("multiWordsSynonym")] 36 | MultiWordsSynonym = 3, 37 | 38 | /// 39 | /// Enum IgnoreConjugations for value: ignoreConjugations 40 | /// 41 | [JsonPropertyName("ignoreConjugations")] 42 | IgnoreConjugations = 4, 43 | } 44 | -------------------------------------------------------------------------------- /algoliasearch/Http/Request.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Net.Http; 5 | using Algolia.Search.Models.Common; 6 | 7 | namespace Algolia.Search.Http; 8 | 9 | /// 10 | /// Request to send to the API 11 | /// 12 | public class Request 13 | { 14 | /// 15 | /// The HTTP verb GET,POST etc. 16 | /// 17 | public HttpMethod Method { get; set; } 18 | 19 | /// 20 | /// Uri of the request 21 | /// 22 | public Uri Uri { get; set; } 23 | 24 | /// 25 | /// Headers 26 | /// 27 | public IDictionary Headers { get; set; } 28 | 29 | /// 30 | /// Body of the request 31 | /// 32 | public Stream Body { get; set; } 33 | 34 | /// 35 | /// Compression type of the request 36 | /// 37 | public CompressionType Compression { get; set; } 38 | 39 | /// 40 | /// Tells if the request can be compressed or not 41 | /// 42 | public bool CanCompress 43 | { 44 | get 45 | { 46 | if (Method == null) 47 | { 48 | return false; 49 | } 50 | 51 | var isMethodValid = Method.Equals(HttpMethod.Post) || Method.Equals(HttpMethod.Put); 52 | var isCompressionEnabled = Compression.Equals(CompressionType.Gzip); 53 | 54 | return isMethodValid && isCompressionEnabled; 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /algoliasearch/Models/Ingestion/ActionType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Ingestion; 13 | 14 | /// 15 | /// Action to perform on the Algolia index. 16 | /// 17 | /// Action to perform on the Algolia index. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum ActionType 20 | { 21 | /// 22 | /// Enum Replace for value: replace 23 | /// 24 | [JsonPropertyName("replace")] 25 | Replace = 1, 26 | 27 | /// 28 | /// Enum Save for value: save 29 | /// 30 | [JsonPropertyName("save")] 31 | Save = 2, 32 | 33 | /// 34 | /// Enum Partial for value: partial 35 | /// 36 | [JsonPropertyName("partial")] 37 | Partial = 3, 38 | 39 | /// 40 | /// Enum PartialNoCreate for value: partialNoCreate 41 | /// 42 | [JsonPropertyName("partialNoCreate")] 43 | PartialNoCreate = 4, 44 | 45 | /// 46 | /// Enum Append for value: append 47 | /// 48 | [JsonPropertyName("append")] 49 | Append = 5, 50 | } 51 | -------------------------------------------------------------------------------- /algoliasearch/Models/Abtesting/EffectMetric.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Abtesting; 13 | 14 | /// 15 | /// Metric for which you want to detect the smallest relative difference. 16 | /// 17 | /// Metric for which you want to detect the smallest relative difference. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum EffectMetric 20 | { 21 | /// 22 | /// Enum AddToCartRate for value: addToCartRate 23 | /// 24 | [JsonPropertyName("addToCartRate")] 25 | AddToCartRate = 1, 26 | 27 | /// 28 | /// Enum ClickThroughRate for value: clickThroughRate 29 | /// 30 | [JsonPropertyName("clickThroughRate")] 31 | ClickThroughRate = 2, 32 | 33 | /// 34 | /// Enum ConversionRate for value: conversionRate 35 | /// 36 | [JsonPropertyName("conversionRate")] 37 | ConversionRate = 3, 38 | 39 | /// 40 | /// Enum PurchaseRate for value: purchaseRate 41 | /// 42 | [JsonPropertyName("purchaseRate")] 43 | PurchaseRate = 4, 44 | } 45 | -------------------------------------------------------------------------------- /algoliasearch/Models/Ingestion/TaskSortKeys.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Ingestion; 13 | 14 | /// 15 | /// Property by which to sort the list of tasks. 16 | /// 17 | /// Property by which to sort the list of tasks. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum TaskSortKeys 20 | { 21 | /// 22 | /// Enum Enabled for value: enabled 23 | /// 24 | [JsonPropertyName("enabled")] 25 | Enabled = 1, 26 | 27 | /// 28 | /// Enum TriggerType for value: triggerType 29 | /// 30 | [JsonPropertyName("triggerType")] 31 | TriggerType = 2, 32 | 33 | /// 34 | /// Enum Action for value: action 35 | /// 36 | [JsonPropertyName("action")] 37 | Action = 3, 38 | 39 | /// 40 | /// Enum UpdatedAt for value: updatedAt 41 | /// 42 | [JsonPropertyName("updatedAt")] 43 | UpdatedAt = 4, 44 | 45 | /// 46 | /// Enum CreatedAt for value: createdAt 47 | /// 48 | [JsonPropertyName("createdAt")] 49 | CreatedAt = 5, 50 | } 51 | -------------------------------------------------------------------------------- /algoliasearch/Models/Ingestion/AuthenticationSortKeys.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Ingestion; 13 | 14 | /// 15 | /// Property by which to sort the list of authentications. 16 | /// 17 | /// Property by which to sort the list of authentications. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum AuthenticationSortKeys 20 | { 21 | /// 22 | /// Enum Name for value: name 23 | /// 24 | [JsonPropertyName("name")] 25 | Name = 1, 26 | 27 | /// 28 | /// Enum Type for value: type 29 | /// 30 | [JsonPropertyName("type")] 31 | Type = 2, 32 | 33 | /// 34 | /// Enum Platform for value: platform 35 | /// 36 | [JsonPropertyName("platform")] 37 | Platform = 3, 38 | 39 | /// 40 | /// Enum UpdatedAt for value: updatedAt 41 | /// 42 | [JsonPropertyName("updatedAt")] 43 | UpdatedAt = 4, 44 | 45 | /// 46 | /// Enum CreatedAt for value: createdAt 47 | /// 48 | [JsonPropertyName("createdAt")] 49 | CreatedAt = 5, 50 | } 51 | -------------------------------------------------------------------------------- /algoliasearch/Models/Search/EventStatus.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Search; 13 | 14 | /// 15 | /// Defines EventStatus 16 | /// 17 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 18 | public enum EventStatus 19 | { 20 | /// 21 | /// Enum Created for value: created 22 | /// 23 | [JsonPropertyName("created")] 24 | Created = 1, 25 | 26 | /// 27 | /// Enum Started for value: started 28 | /// 29 | [JsonPropertyName("started")] 30 | Started = 2, 31 | 32 | /// 33 | /// Enum Retried for value: retried 34 | /// 35 | [JsonPropertyName("retried")] 36 | Retried = 3, 37 | 38 | /// 39 | /// Enum Failed for value: failed 40 | /// 41 | [JsonPropertyName("failed")] 42 | Failed = 4, 43 | 44 | /// 45 | /// Enum Succeeded for value: succeeded 46 | /// 47 | [JsonPropertyName("succeeded")] 48 | Succeeded = 5, 49 | 50 | /// 51 | /// Enum Critical for value: critical 52 | /// 53 | [JsonPropertyName("critical")] 54 | Critical = 6, 55 | } 56 | -------------------------------------------------------------------------------- /algoliasearch/Models/Ingestion/EventStatus.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Ingestion; 13 | 14 | /// 15 | /// Defines EventStatus 16 | /// 17 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 18 | public enum EventStatus 19 | { 20 | /// 21 | /// Enum Created for value: created 22 | /// 23 | [JsonPropertyName("created")] 24 | Created = 1, 25 | 26 | /// 27 | /// Enum Started for value: started 28 | /// 29 | [JsonPropertyName("started")] 30 | Started = 2, 31 | 32 | /// 33 | /// Enum Retried for value: retried 34 | /// 35 | [JsonPropertyName("retried")] 36 | Retried = 3, 37 | 38 | /// 39 | /// Enum Failed for value: failed 40 | /// 41 | [JsonPropertyName("failed")] 42 | Failed = 4, 43 | 44 | /// 45 | /// Enum Succeeded for value: succeeded 46 | /// 47 | [JsonPropertyName("succeeded")] 48 | Succeeded = 5, 49 | 50 | /// 51 | /// Enum Critical for value: critical 52 | /// 53 | [JsonPropertyName("critical")] 54 | Critical = 6, 55 | } 56 | -------------------------------------------------------------------------------- /algoliasearch/Http/TimeoutHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net.Http; 3 | using System.Threading; 4 | using System.Threading.Tasks; 5 | 6 | namespace Algolia.Search.Http; 7 | 8 | /// 9 | /// This class allow to handle timeout per request 10 | /// https://www.thomaslevesque.com/2018/02/25/better-timeout-handling-with-httpclient/ 11 | /// 12 | internal class TimeoutHandler : DelegatingHandler 13 | { 14 | private TimeSpan DefaultTimeout { get; set; } = TimeSpan.FromSeconds(100); 15 | 16 | protected override async Task SendAsync( 17 | HttpRequestMessage request, 18 | CancellationToken cancellationToken 19 | ) 20 | { 21 | using var cts = GetCancellationTokenSource(request, cancellationToken); 22 | try 23 | { 24 | return await base.SendAsync(request, cts?.Token ?? cancellationToken).ConfigureAwait(false); 25 | } 26 | catch (OperationCanceledException) when (!cancellationToken.IsCancellationRequested) 27 | { 28 | throw new TimeoutException(); 29 | } 30 | } 31 | 32 | private CancellationTokenSource GetCancellationTokenSource( 33 | HttpRequestMessage request, 34 | CancellationToken cancellationToken 35 | ) 36 | { 37 | var timeout = request.GetTimeout() ?? DefaultTimeout; 38 | if (timeout == Timeout.InfiniteTimeSpan) 39 | { 40 | // No need to create a CTS if there's no timeout 41 | return null; 42 | } 43 | 44 | var cts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken); 45 | cts.CancelAfter(timeout); 46 | return cts; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /algoliasearch/Models/Monitoring/Metric.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Monitoring; 13 | 14 | /// 15 | /// Defines Metric 16 | /// 17 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 18 | public enum Metric 19 | { 20 | /// 21 | /// Enum AvgBuildTime for value: avg_build_time 22 | /// 23 | [JsonPropertyName("avg_build_time")] 24 | AvgBuildTime = 1, 25 | 26 | /// 27 | /// Enum SsdUsage for value: ssd_usage 28 | /// 29 | [JsonPropertyName("ssd_usage")] 30 | SsdUsage = 2, 31 | 32 | /// 33 | /// Enum RamSearchUsage for value: ram_search_usage 34 | /// 35 | [JsonPropertyName("ram_search_usage")] 36 | RamSearchUsage = 3, 37 | 38 | /// 39 | /// Enum RamIndexingUsage for value: ram_indexing_usage 40 | /// 41 | [JsonPropertyName("ram_indexing_usage")] 42 | RamIndexingUsage = 4, 43 | 44 | /// 45 | /// Enum CpuUsage for value: cpu_usage 46 | /// 47 | [JsonPropertyName("cpu_usage")] 48 | CpuUsage = 5, 49 | 50 | /// 51 | /// Enum Star for value: * 52 | /// 53 | [JsonPropertyName("*")] 54 | Star = 6, 55 | } 56 | -------------------------------------------------------------------------------- /algoliasearch/Models/Analytics/OrderBy.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Analytics; 13 | 14 | /// 15 | /// Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available. 16 | /// 17 | /// Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum OrderBy 20 | { 21 | /// 22 | /// Enum SearchCount for value: searchCount 23 | /// 24 | [JsonPropertyName("searchCount")] 25 | SearchCount = 1, 26 | 27 | /// 28 | /// Enum ClickThroughRate for value: clickThroughRate 29 | /// 30 | [JsonPropertyName("clickThroughRate")] 31 | ClickThroughRate = 2, 32 | 33 | /// 34 | /// Enum ConversionRate for value: conversionRate 35 | /// 36 | [JsonPropertyName("conversionRate")] 37 | ConversionRate = 3, 38 | 39 | /// 40 | /// Enum AverageClickPosition for value: averageClickPosition 41 | /// 42 | [JsonPropertyName("averageClickPosition")] 43 | AverageClickPosition = 4, 44 | } 45 | -------------------------------------------------------------------------------- /algoliasearch/Models/QuerySuggestions/LogLevel.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.QuerySuggestions; 13 | 14 | /// 15 | /// Type of log entry. - `SKIP`. A query is skipped because it doesn't match the conditions for successful inclusion. For example, when a query doesn't generate enough search results. - `INFO`. An informative log entry. - `ERROR`. The Query Suggestions process encountered an error. 16 | /// 17 | /// Type of log entry. - `SKIP`. A query is skipped because it doesn't match the conditions for successful inclusion. For example, when a query doesn't generate enough search results. - `INFO`. An informative log entry. - `ERROR`. The Query Suggestions process encountered an error. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum LogLevel 20 | { 21 | /// 22 | /// Enum SKIP for value: SKIP 23 | /// 24 | [JsonPropertyName("SKIP")] 25 | SKIP = 1, 26 | 27 | /// 28 | /// Enum INFO for value: INFO 29 | /// 30 | [JsonPropertyName("INFO")] 31 | INFO = 2, 32 | 33 | /// 34 | /// Enum ERROR for value: ERROR 35 | /// 36 | [JsonPropertyName("ERROR")] 37 | ERROR = 3, 38 | } 39 | -------------------------------------------------------------------------------- /algoliasearch/Models/AbtestingV3/EffectMetric.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.AbtestingV3; 13 | 14 | /// 15 | /// Metric for which you want to detect the smallest relative difference. 16 | /// 17 | /// Metric for which you want to detect the smallest relative difference. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum EffectMetric 20 | { 21 | /// 22 | /// Enum AddToCartRate for value: addToCartRate 23 | /// 24 | [JsonPropertyName("addToCartRate")] 25 | AddToCartRate = 1, 26 | 27 | /// 28 | /// Enum ClickThroughRate for value: clickThroughRate 29 | /// 30 | [JsonPropertyName("clickThroughRate")] 31 | ClickThroughRate = 2, 32 | 33 | /// 34 | /// Enum ConversionRate for value: conversionRate 35 | /// 36 | [JsonPropertyName("conversionRate")] 37 | ConversionRate = 3, 38 | 39 | /// 40 | /// Enum PurchaseRate for value: purchaseRate 41 | /// 42 | [JsonPropertyName("purchaseRate")] 43 | PurchaseRate = 4, 44 | 45 | /// 46 | /// Enum NoResultsRate for value: noResultsRate 47 | /// 48 | [JsonPropertyName("noResultsRate")] 49 | NoResultsRate = 5, 50 | } 51 | -------------------------------------------------------------------------------- /algoliasearch/Models/Search/SortRemainingBy.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Search; 13 | 14 | /// 15 | /// Order of facet values that aren't explicitly positioned with the `order` setting. - `count`. Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value. - `alpha`. Sort facet values alphabetically. - `hidden`. Don't show facet values that aren't explicitly positioned. 16 | /// 17 | /// Order of facet values that aren't explicitly positioned with the `order` setting. - `count`. Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value. - `alpha`. Sort facet values alphabetically. - `hidden`. Don't show facet values that aren't explicitly positioned. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum SortRemainingBy 20 | { 21 | /// 22 | /// Enum Count for value: count 23 | /// 24 | [JsonPropertyName("count")] 25 | Count = 1, 26 | 27 | /// 28 | /// Enum Alpha for value: alpha 29 | /// 30 | [JsonPropertyName("alpha")] 31 | Alpha = 2, 32 | 33 | /// 34 | /// Enum Hidden for value: hidden 35 | /// 36 | [JsonPropertyName("hidden")] 37 | Hidden = 3, 38 | } 39 | -------------------------------------------------------------------------------- /algoliasearch/Models/Recommend/SortRemainingBy.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Recommend; 13 | 14 | /// 15 | /// Order of facet values that aren't explicitly positioned with the `order` setting. - `count`. Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value. - `alpha`. Sort facet values alphabetically. - `hidden`. Don't show facet values that aren't explicitly positioned. 16 | /// 17 | /// Order of facet values that aren't explicitly positioned with the `order` setting. - `count`. Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value. - `alpha`. Sort facet values alphabetically. - `hidden`. Don't show facet values that aren't explicitly positioned. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum SortRemainingBy 20 | { 21 | /// 22 | /// Enum Count for value: count 23 | /// 24 | [JsonPropertyName("count")] 25 | Count = 1, 26 | 27 | /// 28 | /// Enum Alpha for value: alpha 29 | /// 30 | [JsonPropertyName("alpha")] 31 | Alpha = 2, 32 | 33 | /// 34 | /// Enum Hidden for value: hidden 35 | /// 36 | [JsonPropertyName("hidden")] 37 | Hidden = 3, 38 | } 39 | -------------------------------------------------------------------------------- /algoliasearch/Models/Composition/SortRemainingBy.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Composition; 13 | 14 | /// 15 | /// Order of facet values that aren't explicitly positioned with the `order` setting. - `count`. Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value. - `alpha`. Sort facet values alphabetically. - `hidden`. Don't show facet values that aren't explicitly positioned. 16 | /// 17 | /// Order of facet values that aren't explicitly positioned with the `order` setting. - `count`. Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value. - `alpha`. Sort facet values alphabetically. - `hidden`. Don't show facet values that aren't explicitly positioned. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum SortRemainingBy 20 | { 21 | /// 22 | /// Enum Count for value: count 23 | /// 24 | [JsonPropertyName("count")] 25 | Count = 1, 26 | 27 | /// 28 | /// Enum Alpha for value: alpha 29 | /// 30 | [JsonPropertyName("alpha")] 31 | Alpha = 2, 32 | 33 | /// 34 | /// Enum Hidden for value: hidden 35 | /// 36 | [JsonPropertyName("hidden")] 37 | Hidden = 3, 38 | } 39 | -------------------------------------------------------------------------------- /algoliasearch/Models/Search/BuiltInOperationType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Search; 13 | 14 | /// 15 | /// How to change the attribute. 16 | /// 17 | /// How to change the attribute. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum BuiltInOperationType 20 | { 21 | /// 22 | /// Enum Increment for value: Increment 23 | /// 24 | [JsonPropertyName("Increment")] 25 | Increment = 1, 26 | 27 | /// 28 | /// Enum Decrement for value: Decrement 29 | /// 30 | [JsonPropertyName("Decrement")] 31 | Decrement = 2, 32 | 33 | /// 34 | /// Enum Add for value: Add 35 | /// 36 | [JsonPropertyName("Add")] 37 | Add = 3, 38 | 39 | /// 40 | /// Enum Remove for value: Remove 41 | /// 42 | [JsonPropertyName("Remove")] 43 | Remove = 4, 44 | 45 | /// 46 | /// Enum AddUnique for value: AddUnique 47 | /// 48 | [JsonPropertyName("AddUnique")] 49 | AddUnique = 5, 50 | 51 | /// 52 | /// Enum IncrementFrom for value: IncrementFrom 53 | /// 54 | [JsonPropertyName("IncrementFrom")] 55 | IncrementFrom = 6, 56 | 57 | /// 58 | /// Enum IncrementSet for value: IncrementSet 59 | /// 60 | [JsonPropertyName("IncrementSet")] 61 | IncrementSet = 7, 62 | } 63 | -------------------------------------------------------------------------------- /algoliasearch/Models/Abtesting/Status.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Abtesting; 13 | 14 | /// 15 | /// A/B test status. - `active`. The A/B test is live and search traffic is split between the two variants. - `stopped`. You stopped the A/B test. The A/B test data is still available for analysis. - `expired`. The A/B test was automatically stopped after reaching its end date. - `failed`. Creating the A/B test failed. 16 | /// 17 | /// A/B test status. - `active`. The A/B test is live and search traffic is split between the two variants. - `stopped`. You stopped the A/B test. The A/B test data is still available for analysis. - `expired`. The A/B test was automatically stopped after reaching its end date. - `failed`. Creating the A/B test failed. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum Status 20 | { 21 | /// 22 | /// Enum Active for value: active 23 | /// 24 | [JsonPropertyName("active")] 25 | Active = 1, 26 | 27 | /// 28 | /// Enum Stopped for value: stopped 29 | /// 30 | [JsonPropertyName("stopped")] 31 | Stopped = 2, 32 | 33 | /// 34 | /// Enum Expired for value: expired 35 | /// 36 | [JsonPropertyName("expired")] 37 | Expired = 3, 38 | 39 | /// 40 | /// Enum Failed for value: failed 41 | /// 42 | [JsonPropertyName("failed")] 43 | Failed = 4, 44 | } 45 | -------------------------------------------------------------------------------- /algoliasearch/Models/AbtestingV3/Status.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.AbtestingV3; 13 | 14 | /// 15 | /// A/B test status. - `active`. The A/B test is live and search traffic is split between the two variants. - `stopped`. You stopped the A/B test. The A/B test data is still available for analysis. - `expired`. The A/B test was automatically stopped after reaching its end date. - `failed`. Creating the A/B test failed. 16 | /// 17 | /// A/B test status. - `active`. The A/B test is live and search traffic is split between the two variants. - `stopped`. You stopped the A/B test. The A/B test data is still available for analysis. - `expired`. The A/B test was automatically stopped after reaching its end date. - `failed`. Creating the A/B test failed. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum Status 20 | { 21 | /// 22 | /// Enum Active for value: active 23 | /// 24 | [JsonPropertyName("active")] 25 | Active = 1, 26 | 27 | /// 28 | /// Enum Stopped for value: stopped 29 | /// 30 | [JsonPropertyName("stopped")] 31 | Stopped = 2, 32 | 33 | /// 34 | /// Enum Expired for value: expired 35 | /// 36 | [JsonPropertyName("expired")] 37 | Expired = 3, 38 | 39 | /// 40 | /// Enum Failed for value: failed 41 | /// 42 | [JsonPropertyName("failed")] 43 | Failed = 4, 44 | } 45 | -------------------------------------------------------------------------------- /.github/workflows/issue.yml: -------------------------------------------------------------------------------- 1 | name: 'Issue sync with Jira' 2 | on: 3 | issues: 4 | types: [opened] 5 | 6 | permissions: 7 | issues: write 8 | contents: read 9 | 10 | jobs: 11 | sync: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - name: Create ticket 15 | uses: actions/github-script@v8 16 | with: 17 | script: | 18 | const action = context.payload.action; 19 | if (action !== 'opened') { 20 | return; 21 | } 22 | const title = context.payload.issue.title; 23 | const body = context.payload.issue.body; 24 | 25 | const res = await fetch('https://algolia.atlassian.net/rest/api/2/issue', { 26 | method: 'POST', 27 | headers: { 28 | 'Accept': 'application/json', 29 | 'Content-Type': 'application/json', 30 | 'Authorization': `Basic ${{ secrets.JIRA_TOKEN }}` 31 | }, 32 | body: JSON.stringify({ 33 | fields: { 34 | description: `Issue created by ${context.actor} at ${context.payload.issue.html_url} \n\n${body}`, 35 | issuetype: { 36 | id: '10001' 37 | }, 38 | parent: { 39 | key: 'API-1' 40 | }, 41 | project: { 42 | id: '11316' 43 | }, 44 | summary: `[GH-ISSUE] ${title}` 45 | }, 46 | update: {} 47 | }) 48 | }); 49 | 50 | if (!res.ok) { 51 | throw new Error(`Failed to create ticket: ${res.statusText} (${res.status}) - ${await res.text()}`); 52 | } 53 | 54 | const data = await res.json(); 55 | console.log(`Created ticket: ${data.key}`); 56 | -------------------------------------------------------------------------------- /algoliasearch/Models/Ingestion/TriggerType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Ingestion; 13 | 14 | /// 15 | /// Task trigger, describing when a task should run. - `onDemand`. Manually trigger the task with the `/run` endpoint. - `schedule`. Regularly trigger the task on a `cron` schedule. - `subscription`. Trigger the task after an event is received, such as, a webhook. - `streaming`. Run the task continuously. 16 | /// 17 | /// Task trigger, describing when a task should run. - `onDemand`. Manually trigger the task with the `/run` endpoint. - `schedule`. Regularly trigger the task on a `cron` schedule. - `subscription`. Trigger the task after an event is received, such as, a webhook. - `streaming`. Run the task continuously. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum TriggerType 20 | { 21 | /// 22 | /// Enum OnDemand for value: onDemand 23 | /// 24 | [JsonPropertyName("onDemand")] 25 | OnDemand = 1, 26 | 27 | /// 28 | /// Enum Schedule for value: schedule 29 | /// 30 | [JsonPropertyName("schedule")] 31 | Schedule = 2, 32 | 33 | /// 34 | /// Enum Subscription for value: subscription 35 | /// 36 | [JsonPropertyName("subscription")] 37 | Subscription = 3, 38 | 39 | /// 40 | /// Enum Streaming for value: streaming 41 | /// 42 | [JsonPropertyName("streaming")] 43 | Streaming = 4, 44 | } 45 | -------------------------------------------------------------------------------- /algoliasearch/Models/Search/Anchoring.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Search; 13 | 14 | /// 15 | /// Which part of the search query the pattern should match: - `startsWith`. The pattern must match the beginning of the query. - `endsWith`. The pattern must match the end of the query. - `is`. The pattern must match the query exactly. - `contains`. The pattern must match anywhere in the query. Empty queries are only allowed as patterns with `anchoring: is`. 16 | /// 17 | /// Which part of the search query the pattern should match: - `startsWith`. The pattern must match the beginning of the query. - `endsWith`. The pattern must match the end of the query. - `is`. The pattern must match the query exactly. - `contains`. The pattern must match anywhere in the query. Empty queries are only allowed as patterns with `anchoring: is`. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum Anchoring 20 | { 21 | /// 22 | /// Enum Is for value: is 23 | /// 24 | [JsonPropertyName("is")] 25 | Is = 1, 26 | 27 | /// 28 | /// Enum StartsWith for value: startsWith 29 | /// 30 | [JsonPropertyName("startsWith")] 31 | StartsWith = 2, 32 | 33 | /// 34 | /// Enum EndsWith for value: endsWith 35 | /// 36 | [JsonPropertyName("endsWith")] 37 | EndsWith = 3, 38 | 39 | /// 40 | /// Enum Contains for value: contains 41 | /// 42 | [JsonPropertyName("contains")] 43 | Contains = 4, 44 | } 45 | -------------------------------------------------------------------------------- /algoliasearch/Models/Composition/Anchoring.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Composition; 13 | 14 | /// 15 | /// Which part of the search query the pattern should match: - `startsWith`. The pattern must match the beginning of the query. - `endsWith`. The pattern must match the end of the query. - `is`. The pattern must match the query exactly. - `contains`. The pattern must match anywhere in the query. Empty queries are only allowed as patterns with `anchoring: is`. 16 | /// 17 | /// Which part of the search query the pattern should match: - `startsWith`. The pattern must match the beginning of the query. - `endsWith`. The pattern must match the end of the query. - `is`. The pattern must match the query exactly. - `contains`. The pattern must match anywhere in the query. Empty queries are only allowed as patterns with `anchoring: is`. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum Anchoring 20 | { 21 | /// 22 | /// Enum Is for value: is 23 | /// 24 | [JsonPropertyName("is")] 25 | Is = 1, 26 | 27 | /// 28 | /// Enum StartsWith for value: startsWith 29 | /// 30 | [JsonPropertyName("startsWith")] 31 | StartsWith = 2, 32 | 33 | /// 34 | /// Enum EndsWith for value: endsWith 35 | /// 36 | [JsonPropertyName("endsWith")] 37 | EndsWith = 3, 38 | 39 | /// 40 | /// Enum Contains for value: contains 41 | /// 42 | [JsonPropertyName("contains")] 43 | Contains = 4, 44 | } 45 | -------------------------------------------------------------------------------- /algoliasearch/Models/Ingestion/AuthenticationType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Ingestion; 13 | 14 | /// 15 | /// Type of authentication. This determines the type of credentials required in the `input` object. 16 | /// 17 | /// Type of authentication. This determines the type of credentials required in the `input` object. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum AuthenticationType 20 | { 21 | /// 22 | /// Enum GoogleServiceAccount for value: googleServiceAccount 23 | /// 24 | [JsonPropertyName("googleServiceAccount")] 25 | GoogleServiceAccount = 1, 26 | 27 | /// 28 | /// Enum Basic for value: basic 29 | /// 30 | [JsonPropertyName("basic")] 31 | Basic = 2, 32 | 33 | /// 34 | /// Enum ApiKey for value: apiKey 35 | /// 36 | [JsonPropertyName("apiKey")] 37 | ApiKey = 3, 38 | 39 | /// 40 | /// Enum Oauth for value: oauth 41 | /// 42 | [JsonPropertyName("oauth")] 43 | Oauth = 4, 44 | 45 | /// 46 | /// Enum Algolia for value: algolia 47 | /// 48 | [JsonPropertyName("algolia")] 49 | Algolia = 5, 50 | 51 | /// 52 | /// Enum AlgoliaInsights for value: algoliaInsights 53 | /// 54 | [JsonPropertyName("algoliaInsights")] 55 | AlgoliaInsights = 6, 56 | 57 | /// 58 | /// Enum Secrets for value: secrets 59 | /// 60 | [JsonPropertyName("secrets")] 61 | Secrets = 7, 62 | } 63 | -------------------------------------------------------------------------------- /algoliasearch/Models/Search/TypoToleranceEnum.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Search; 13 | 14 | /// 15 | /// - `min`. Return matches with the lowest number of typos. For example, if you have matches without typos, only include those. But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). - `strict`. Return matches with the two lowest numbers of typos. With `strict`, the Typo ranking criterion is applied first in the `ranking` setting. 16 | /// 17 | /// - `min`. Return matches with the lowest number of typos. For example, if you have matches without typos, only include those. But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). - `strict`. Return matches with the two lowest numbers of typos. With `strict`, the Typo ranking criterion is applied first in the `ranking` setting. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum TypoToleranceEnum 20 | { 21 | /// 22 | /// Enum Min for value: min 23 | /// 24 | [JsonPropertyName("min")] 25 | Min = 1, 26 | 27 | /// 28 | /// Enum Strict for value: strict 29 | /// 30 | [JsonPropertyName("strict")] 31 | Strict = 2, 32 | 33 | /// 34 | /// Enum True for value: true 35 | /// 36 | [JsonPropertyName("true")] 37 | True = 3, 38 | 39 | /// 40 | /// Enum False for value: false 41 | /// 42 | [JsonPropertyName("false")] 43 | False = 4, 44 | } 45 | -------------------------------------------------------------------------------- /algoliasearch/Models/Composition/TypoToleranceEnum.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Composition; 13 | 14 | /// 15 | /// - `min`. Return matches with the lowest number of typos. For example, if you have matches without typos, only include those. But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). - `strict`. Return matches with the two lowest numbers of typos. With `strict`, the Typo ranking criterion is applied first in the `ranking` setting. 16 | /// 17 | /// - `min`. Return matches with the lowest number of typos. For example, if you have matches without typos, only include those. But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). - `strict`. Return matches with the two lowest numbers of typos. With `strict`, the Typo ranking criterion is applied first in the `ranking` setting. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum TypoToleranceEnum 20 | { 21 | /// 22 | /// Enum Min for value: min 23 | /// 24 | [JsonPropertyName("min")] 25 | Min = 1, 26 | 27 | /// 28 | /// Enum Strict for value: strict 29 | /// 30 | [JsonPropertyName("strict")] 31 | Strict = 2, 32 | 33 | /// 34 | /// Enum True for value: true 35 | /// 36 | [JsonPropertyName("true")] 37 | True = 3, 38 | 39 | /// 40 | /// Enum False for value: false 41 | /// 42 | [JsonPropertyName("false")] 43 | False = 4, 44 | } 45 | -------------------------------------------------------------------------------- /algoliasearch/Models/Recommend/TypoToleranceEnum.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Recommend; 13 | 14 | /// 15 | /// - `min`. Return matches with the lowest number of typos. For example, if you have matches without typos, only include those. But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). - `strict`. Return matches with the two lowest numbers of typos. With `strict`, the Typo ranking criterion is applied first in the `ranking` setting. 16 | /// 17 | /// - `min`. Return matches with the lowest number of typos. For example, if you have matches without typos, only include those. But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). - `strict`. Return matches with the two lowest numbers of typos. With `strict`, the Typo ranking criterion is applied first in the `ranking` setting. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum TypoToleranceEnum 20 | { 21 | /// 22 | /// Enum Min for value: min 23 | /// 24 | [JsonPropertyName("min")] 25 | Min = 1, 26 | 27 | /// 28 | /// Enum Strict for value: strict 29 | /// 30 | [JsonPropertyName("strict")] 31 | Strict = 2, 32 | 33 | /// 34 | /// Enum True for value: true 35 | /// 36 | [JsonPropertyName("true")] 37 | True = 3, 38 | 39 | /// 40 | /// Enum False for value: false 41 | /// 42 | [JsonPropertyName("false")] 43 | False = 4, 44 | } 45 | -------------------------------------------------------------------------------- /algoliasearch/Http/AlgoliaUserAgent.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Reflection; 5 | using Algolia.Search.Clients; 6 | 7 | namespace Algolia.Search.Http; 8 | 9 | /// 10 | /// Represent the user-agent header 11 | /// 12 | public class AlgoliaUserAgent 13 | { 14 | private readonly IDictionary _segments = new Dictionary(); 15 | 16 | // Get the dotnet runtime version 17 | private static readonly string DotnetVersion = Environment.Version.ToString(); 18 | 19 | /// 20 | /// Create a new user-agent header 21 | /// 22 | /// The client name 23 | /// The client version 24 | public AlgoliaUserAgent(string clientName, string clientVersion) 25 | { 26 | AddSegment("Algolia for Csharp", $"({clientVersion})"); 27 | AddSegment(clientName, $"({clientVersion})"); 28 | AddSegment("Dotnet", $"({DotnetVersion})"); 29 | } 30 | 31 | /// 32 | /// Add a new segment to the user-agent header 33 | /// 34 | /// The segment key 35 | /// The segment value. Will be wrapped in parenthesis 36 | /// 37 | public void AddSegment(string key, string value) 38 | { 39 | if (string.IsNullOrEmpty(key) || string.IsNullOrEmpty(value)) 40 | { 41 | throw new ArgumentException("Key and value must be set"); 42 | } 43 | 44 | if (_segments.ContainsKey(key)) 45 | throw new ArgumentException("Key must be unique"); 46 | 47 | _segments.Add(new KeyValuePair(key, value)); 48 | } 49 | 50 | /// 51 | /// Create a valid user-agent header 52 | /// 53 | /// 54 | public override string ToString() 55 | { 56 | return string.Join("; ", _segments.Select(s => $"{s.Key} {s.Value}")); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /algoliasearch/Models/Common/SecuredApiKeyRestrictionHelper.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using System.Reflection; 4 | using System.Text.Json.Serialization; 5 | using Algolia.Search.Http; 6 | using Algolia.Search.Utils; 7 | 8 | namespace Algolia.Search.Models.Search; 9 | 10 | /// 11 | /// Secured Api Key restrictions 12 | /// 13 | public partial class SecuredApiKeyRestrictions 14 | { 15 | /// 16 | /// Transforms the restriction into a query string 17 | /// 18 | /// 19 | public string ToQueryString() 20 | { 21 | var restrictions = ToQueryMap(this, nameof(SearchParams)); 22 | if (SearchParams != null) 23 | { 24 | // merge SearchParams into restrictions 25 | restrictions = restrictions 26 | .Concat(ToQueryMap(SearchParams)) 27 | .ToDictionary(kvp => kvp.Key, kvp => kvp.Value); 28 | } 29 | 30 | return QueryStringHelper.ToQueryString( 31 | restrictions.OrderBy(x => x.Key).ToDictionary(kvp => kvp.Key, kvp => kvp.Value) 32 | ); 33 | } 34 | 35 | /// 36 | /// Transform a poco to a map of query parameters 37 | /// 38 | /// 39 | /// 40 | /// 41 | /// 42 | private static Dictionary ToQueryMap(T value, params string[] ignoreList) 43 | { 44 | return typeof(T) 45 | .GetTypeInfo() 46 | .DeclaredProperties.Where(p => 47 | p.GetValue(value, null) != null 48 | && !ignoreList.Contains(p.Name) 49 | && p.GetCustomAttribute() != null 50 | ) 51 | .Select(p => new 52 | { 53 | propsName = p.GetCustomAttribute().Name, 54 | value = QueryStringHelper.ParameterToString(p.GetValue(value, null)), 55 | }) 56 | .ToDictionary(p => p.propsName, p => p.value); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /algoliasearch/Models/Analytics/Operator.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Analytics; 13 | 14 | /// 15 | /// Character that characterizes how the filter is applied. For example, for a facet filter `facet:value`, `:` is the operator. For a numeric filter `count>50`, `>` is the operator. 16 | /// 17 | /// Character that characterizes how the filter is applied. For example, for a facet filter `facet:value`, `:` is the operator. For a numeric filter `count>50`, `>` is the operator. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum Operator 20 | { 21 | /// 22 | /// Enum Colon for value: : 23 | /// 24 | [JsonPropertyName(":")] 25 | Colon = 1, 26 | 27 | /// 28 | /// Enum LessThan for value: < 29 | /// 30 | [JsonPropertyName("<")] 31 | LessThan = 2, 32 | 33 | /// 34 | /// Enum LessThanOrEqualTo for value: <= 35 | /// 36 | [JsonPropertyName("<=")] 37 | LessThanOrEqualTo = 3, 38 | 39 | /// 40 | /// Enum Equal for value: = 41 | /// 42 | [JsonPropertyName("=")] 43 | Equal = 4, 44 | 45 | /// 46 | /// Enum NotEqual for value: != 47 | /// 48 | [JsonPropertyName("!=")] 49 | NotEqual = 5, 50 | 51 | /// 52 | /// Enum GreaterThan for value: > 53 | /// 54 | [JsonPropertyName(">")] 55 | GreaterThan = 6, 56 | 57 | /// 58 | /// Enum GreaterThanOrEqualTo for value: >= 59 | /// 60 | [JsonPropertyName(">=")] 61 | GreaterThanOrEqualTo = 7, 62 | } 63 | -------------------------------------------------------------------------------- /algoliasearch/Models/Ingestion/SourceType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Ingestion; 13 | 14 | /// 15 | /// Defines SourceType 16 | /// 17 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 18 | public enum SourceType 19 | { 20 | /// 21 | /// Enum Bigcommerce for value: bigcommerce 22 | /// 23 | [JsonPropertyName("bigcommerce")] 24 | Bigcommerce = 1, 25 | 26 | /// 27 | /// Enum Bigquery for value: bigquery 28 | /// 29 | [JsonPropertyName("bigquery")] 30 | Bigquery = 2, 31 | 32 | /// 33 | /// Enum Commercetools for value: commercetools 34 | /// 35 | [JsonPropertyName("commercetools")] 36 | Commercetools = 3, 37 | 38 | /// 39 | /// Enum Csv for value: csv 40 | /// 41 | [JsonPropertyName("csv")] 42 | Csv = 4, 43 | 44 | /// 45 | /// Enum Docker for value: docker 46 | /// 47 | [JsonPropertyName("docker")] 48 | Docker = 5, 49 | 50 | /// 51 | /// Enum Ga4BigqueryExport for value: ga4BigqueryExport 52 | /// 53 | [JsonPropertyName("ga4BigqueryExport")] 54 | Ga4BigqueryExport = 6, 55 | 56 | /// 57 | /// Enum Json for value: json 58 | /// 59 | [JsonPropertyName("json")] 60 | Json = 7, 61 | 62 | /// 63 | /// Enum Shopify for value: shopify 64 | /// 65 | [JsonPropertyName("shopify")] 66 | Shopify = 8, 67 | 68 | /// 69 | /// Enum Push for value: push 70 | /// 71 | [JsonPropertyName("push")] 72 | Push = 9, 73 | } 74 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/Bug_report.yml: -------------------------------------------------------------------------------- 1 | name: Bug Report 2 | description: File a bug report. 3 | title: '[bug]: ' 4 | labels: ['bug', 'triage'] 5 | body: 6 | - type: markdown 7 | attributes: 8 | value: | 9 | ## Please help us help you! 10 | 11 | > [!IMPORTANT] 12 | > This repository is fully generated and all pull request will be rejected. 13 | > If you wish to contribute, please refer to the [contribution guidelines](https://github.com/algolia/api-clients-automation/blob/main/CONTRIBUTING.md) on the `api-clients-automation` repository. 14 | 15 | Before filing your issue, ask yourself: 16 | - Is there an issue already opened for this bug? 17 | - Can I reproduce it? 18 | 19 | If you are not sure about the origin of the issue, or if it impacts your customer experience, please contact [our support team](https://alg.li/support). 20 | - type: textarea 21 | attributes: 22 | label: Description 23 | description: A clear and concise description of what the bug is. 24 | validations: 25 | required: true 26 | - type: dropdown 27 | id: client 28 | attributes: 29 | label: Client 30 | description: Which API are you targeting? 31 | options: 32 | - All 33 | - AB testing 34 | - Analytics 35 | - Ingestion 36 | - Insights 37 | - Monitoring 38 | - Personalization 39 | - Query-Suggestions 40 | - Recommend 41 | - Search 42 | - Crawler 43 | validations: 44 | required: true 45 | - type: input 46 | id: version 47 | attributes: 48 | label: Version 49 | description: The version of the client you are using. 50 | validations: 51 | required: true 52 | - type: textarea 53 | id: logs 54 | attributes: 55 | label: Relevant log output 56 | description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. 57 | render: shell 58 | -------------------------------------------------------------------------------- /algoliasearch/Models/Search/SynonymType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Search; 13 | 14 | /// 15 | /// Synonym type. 16 | /// 17 | /// Synonym type. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum SynonymType 20 | { 21 | /// 22 | /// Enum Synonym for value: synonym 23 | /// 24 | [JsonPropertyName("synonym")] 25 | Synonym = 1, 26 | 27 | /// 28 | /// Enum Onewaysynonym for value: onewaysynonym 29 | /// 30 | [JsonPropertyName("onewaysynonym")] 31 | Onewaysynonym = 2, 32 | 33 | /// 34 | /// Enum Altcorrection1 for value: altcorrection1 35 | /// 36 | [JsonPropertyName("altcorrection1")] 37 | Altcorrection1 = 3, 38 | 39 | /// 40 | /// Enum Altcorrection2 for value: altcorrection2 41 | /// 42 | [JsonPropertyName("altcorrection2")] 43 | Altcorrection2 = 4, 44 | 45 | /// 46 | /// Enum Placeholder for value: placeholder 47 | /// 48 | [JsonPropertyName("placeholder")] 49 | Placeholder = 5, 50 | 51 | /// 52 | /// Enum OneWaySynonym for value: oneWaySynonym 53 | /// 54 | [JsonPropertyName("oneWaySynonym")] 55 | OneWaySynonym = 6, 56 | 57 | /// 58 | /// Enum AltCorrection1 for value: altCorrection1 59 | /// 60 | [JsonPropertyName("altCorrection1")] 61 | AltCorrection1 = 7, 62 | 63 | /// 64 | /// Enum AltCorrection2 for value: altCorrection2 65 | /// 66 | [JsonPropertyName("altCorrection2")] 67 | AltCorrection2 = 8, 68 | } 69 | -------------------------------------------------------------------------------- /algoliasearch/Models/Composition/DedupPositioning.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Composition; 13 | 14 | /// 15 | /// Deduplication positioning configures how a duplicate result should be resolved between an injected item and main search results. Current configuration supports: - 'highest': always select the item in the highest position, and remove duplicates that appear lower in the results. - 'highestInjected': duplicate result will be moved to its highest possible injected position, but not higher. If a duplicate appears higher in main search results, it will be removed to stay it's intended group position (which could be lower than main). 16 | /// 17 | /// Deduplication positioning configures how a duplicate result should be resolved between an injected item and main search results. Current configuration supports: - 'highest': always select the item in the highest position, and remove duplicates that appear lower in the results. - 'highestInjected': duplicate result will be moved to its highest possible injected position, but not higher. If a duplicate appears higher in main search results, it will be removed to stay it's intended group position (which could be lower than main). 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum DedupPositioning 20 | { 21 | /// 22 | /// Enum Highest for value: highest 23 | /// 24 | [JsonPropertyName("highest")] 25 | Highest = 1, 26 | 27 | /// 28 | /// Enum HighestInjected for value: highestInjected 29 | /// 30 | [JsonPropertyName("highestInjected")] 31 | HighestInjected = 2, 32 | } 33 | -------------------------------------------------------------------------------- /algoliasearch/Models/Search/QueryType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Search; 13 | 14 | /// 15 | /// Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as a prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching). 16 | /// 17 | /// Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as a prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching). 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum QueryType 20 | { 21 | /// 22 | /// Enum PrefixLast for value: prefixLast 23 | /// 24 | [JsonPropertyName("prefixLast")] 25 | PrefixLast = 1, 26 | 27 | /// 28 | /// Enum PrefixAll for value: prefixAll 29 | /// 30 | [JsonPropertyName("prefixAll")] 31 | PrefixAll = 2, 32 | 33 | /// 34 | /// Enum PrefixNone for value: prefixNone 35 | /// 36 | [JsonPropertyName("prefixNone")] 37 | PrefixNone = 3, 38 | } 39 | -------------------------------------------------------------------------------- /algoliasearch/Models/Recommend/QueryType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Recommend; 13 | 14 | /// 15 | /// Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as a prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching). 16 | /// 17 | /// Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as a prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching). 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum QueryType 20 | { 21 | /// 22 | /// Enum PrefixLast for value: prefixLast 23 | /// 24 | [JsonPropertyName("prefixLast")] 25 | PrefixLast = 1, 26 | 27 | /// 28 | /// Enum PrefixAll for value: prefixAll 29 | /// 30 | [JsonPropertyName("prefixAll")] 31 | PrefixAll = 2, 32 | 33 | /// 34 | /// Enum PrefixNone for value: prefixNone 35 | /// 36 | [JsonPropertyName("prefixNone")] 37 | PrefixNone = 3, 38 | } 39 | -------------------------------------------------------------------------------- /algoliasearch/Models/Composition/QueryType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Composition; 13 | 14 | /// 15 | /// Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as a prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching). 16 | /// 17 | /// Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as a prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching). 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum QueryType 20 | { 21 | /// 22 | /// Enum PrefixLast for value: prefixLast 23 | /// 24 | [JsonPropertyName("prefixLast")] 25 | PrefixLast = 1, 26 | 27 | /// 28 | /// Enum PrefixAll for value: prefixAll 29 | /// 30 | [JsonPropertyName("prefixAll")] 31 | PrefixAll = 2, 32 | 33 | /// 34 | /// Enum PrefixNone for value: prefixNone 35 | /// 36 | [JsonPropertyName("prefixNone")] 37 | PrefixNone = 3, 38 | } 39 | -------------------------------------------------------------------------------- /algoliasearch/Utils/RetryHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading; 3 | using System.Threading.Tasks; 4 | using Algolia.Search.Exceptions; 5 | 6 | namespace Algolia.Search.Utils; 7 | 8 | /// 9 | /// A helper class to retry operations 10 | /// 11 | public static class RetryHelper 12 | { 13 | /// 14 | /// The default maximum number of retries 15 | /// 16 | public const int DefaultMaxRetries = 50; 17 | 18 | /// 19 | /// Retry the given function until the validation function returns true or the maximum number of retries is reached 20 | /// 21 | /// The type of the function's return value 22 | /// The function to retry 23 | /// The validation function 24 | /// The maximum number of retries 25 | /// A function that takes the retry count and returns the timeout in milliseconds before the next retry 26 | /// A cancellation token to cancel the operation 27 | /// The result of the function if the validation function returns true 28 | /// Thrown if the maximum number of retries is reached 29 | public static async Task RetryUntil( 30 | Func> func, 31 | Func validate, 32 | int maxRetries = DefaultMaxRetries, 33 | Func timeout = null, 34 | CancellationToken ct = default 35 | ) 36 | { 37 | timeout ??= NextDelay; 38 | 39 | var retryCount = 0; 40 | while (retryCount < maxRetries) 41 | { 42 | var resp = await func().ConfigureAwait(false); 43 | if (validate(resp)) 44 | { 45 | return resp; 46 | } 47 | 48 | await Task.Delay(timeout(retryCount), ct).ConfigureAwait(false); 49 | retryCount++; 50 | } 51 | 52 | throw new AlgoliaException( 53 | "The maximum number of retries exceeded. (" + (retryCount + 1) + "/" + maxRetries + ")" 54 | ); 55 | } 56 | 57 | private static int NextDelay(int retryCount) 58 | { 59 | return Math.Min(retryCount * 200, 5000); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /algoliasearch/Models/Ingestion/RunReasonCode.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Ingestion; 13 | 14 | /// 15 | /// A code for the task run's outcome. A readable description of the code is included in the `reason` response property. 16 | /// 17 | /// A code for the task run's outcome. A readable description of the code is included in the `reason` response property. 18 | [JsonConverter(typeof(Serializer.JsonStringEnumConverter))] 19 | public enum RunReasonCode 20 | { 21 | /// 22 | /// Enum Internal for value: internal 23 | /// 24 | [JsonPropertyName("internal")] 25 | Internal = 1, 26 | 27 | /// 28 | /// Enum Cancelled for value: cancelled 29 | /// 30 | [JsonPropertyName("cancelled")] 31 | Cancelled = 2, 32 | 33 | /// 34 | /// Enum Critical for value: critical 35 | /// 36 | [JsonPropertyName("critical")] 37 | Critical = 3, 38 | 39 | /// 40 | /// Enum NoEvents for value: no_events 41 | /// 42 | [JsonPropertyName("no_events")] 43 | NoEvents = 4, 44 | 45 | /// 46 | /// Enum TooManyErrors for value: too_many_errors 47 | /// 48 | [JsonPropertyName("too_many_errors")] 49 | TooManyErrors = 5, 50 | 51 | /// 52 | /// Enum LackingEvents for value: lacking_events 53 | /// 54 | [JsonPropertyName("lacking_events")] 55 | LackingEvents = 6, 56 | 57 | /// 58 | /// Enum Ok for value: ok 59 | /// 60 | [JsonPropertyName("ok")] 61 | Ok = 7, 62 | 63 | /// 64 | /// Enum Blocking for value: blocking 65 | /// 66 | [JsonPropertyName("blocking")] 67 | Blocking = 8, 68 | 69 | /// 70 | /// Enum Idle for value: idle 71 | /// 72 | [JsonPropertyName("idle")] 73 | Idle = 9, 74 | } 75 | -------------------------------------------------------------------------------- /algoliasearch/Models/Search/RedirectURL.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Search; 13 | 14 | /// 15 | /// The redirect rule container. 16 | /// 17 | public partial class RedirectURL 18 | { 19 | /// 20 | /// Initializes a new instance of the RedirectURL class. 21 | /// 22 | public RedirectURL() { } 23 | 24 | /// 25 | /// Gets or Sets Url 26 | /// 27 | [JsonPropertyName("url")] 28 | public string Url { get; set; } 29 | 30 | /// 31 | /// Returns the string presentation of the object 32 | /// 33 | /// String presentation of the object 34 | public override string ToString() 35 | { 36 | StringBuilder sb = new StringBuilder(); 37 | sb.Append("class RedirectURL {\n"); 38 | sb.Append(" Url: ").Append(Url).Append("\n"); 39 | sb.Append("}\n"); 40 | return sb.ToString(); 41 | } 42 | 43 | /// 44 | /// Returns the JSON string presentation of the object 45 | /// 46 | /// JSON string presentation of the object 47 | public virtual string ToJson() 48 | { 49 | return JsonSerializer.Serialize(this, JsonConfig.Options); 50 | } 51 | 52 | /// 53 | /// Returns true if objects are equal 54 | /// 55 | /// Object to be compared 56 | /// Boolean 57 | public override bool Equals(object obj) 58 | { 59 | if (obj is not RedirectURL input) 60 | { 61 | return false; 62 | } 63 | 64 | return (Url == input.Url || (Url != null && Url.Equals(input.Url))); 65 | } 66 | 67 | /// 68 | /// Gets the hash code 69 | /// 70 | /// Hash code 71 | public override int GetHashCode() 72 | { 73 | unchecked // Overflow is fine, just wrap 74 | { 75 | int hashCode = 41; 76 | if (Url != null) 77 | { 78 | hashCode = (hashCode * 59) + Url.GetHashCode(); 79 | } 80 | return hashCode; 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /algoliasearch/Models/Composition/RedirectURL.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Composition; 13 | 14 | /// 15 | /// The redirect rule container. 16 | /// 17 | public partial class RedirectURL 18 | { 19 | /// 20 | /// Initializes a new instance of the RedirectURL class. 21 | /// 22 | public RedirectURL() { } 23 | 24 | /// 25 | /// Gets or Sets Url 26 | /// 27 | [JsonPropertyName("url")] 28 | public string Url { get; set; } 29 | 30 | /// 31 | /// Returns the string presentation of the object 32 | /// 33 | /// String presentation of the object 34 | public override string ToString() 35 | { 36 | StringBuilder sb = new StringBuilder(); 37 | sb.Append("class RedirectURL {\n"); 38 | sb.Append(" Url: ").Append(Url).Append("\n"); 39 | sb.Append("}\n"); 40 | return sb.ToString(); 41 | } 42 | 43 | /// 44 | /// Returns the JSON string presentation of the object 45 | /// 46 | /// JSON string presentation of the object 47 | public virtual string ToJson() 48 | { 49 | return JsonSerializer.Serialize(this, JsonConfig.Options); 50 | } 51 | 52 | /// 53 | /// Returns true if objects are equal 54 | /// 55 | /// Object to be compared 56 | /// Boolean 57 | public override bool Equals(object obj) 58 | { 59 | if (obj is not RedirectURL input) 60 | { 61 | return false; 62 | } 63 | 64 | return (Url == input.Url || (Url != null && Url.Equals(input.Url))); 65 | } 66 | 67 | /// 68 | /// Gets the hash code 69 | /// 70 | /// Hash code 71 | public override int GetHashCode() 72 | { 73 | unchecked // Overflow is fine, just wrap 74 | { 75 | int hashCode = 41; 76 | if (Url != null) 77 | { 78 | hashCode = (hashCode * 59) + Url.GetHashCode(); 79 | } 80 | return hashCode; 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /algoliasearch/Models/Recommend/RedirectURL.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Recommend; 13 | 14 | /// 15 | /// The redirect rule container. 16 | /// 17 | public partial class RedirectURL 18 | { 19 | /// 20 | /// Initializes a new instance of the RedirectURL class. 21 | /// 22 | public RedirectURL() { } 23 | 24 | /// 25 | /// Gets or Sets Url 26 | /// 27 | [JsonPropertyName("url")] 28 | public string Url { get; set; } 29 | 30 | /// 31 | /// Returns the string presentation of the object 32 | /// 33 | /// String presentation of the object 34 | public override string ToString() 35 | { 36 | StringBuilder sb = new StringBuilder(); 37 | sb.Append("class RedirectURL {\n"); 38 | sb.Append(" Url: ").Append(Url).Append("\n"); 39 | sb.Append("}\n"); 40 | return sb.ToString(); 41 | } 42 | 43 | /// 44 | /// Returns the JSON string presentation of the object 45 | /// 46 | /// JSON string presentation of the object 47 | public virtual string ToJson() 48 | { 49 | return JsonSerializer.Serialize(this, JsonConfig.Options); 50 | } 51 | 52 | /// 53 | /// Returns true if objects are equal 54 | /// 55 | /// Object to be compared 56 | /// Boolean 57 | public override bool Equals(object obj) 58 | { 59 | if (obj is not RedirectURL input) 60 | { 61 | return false; 62 | } 63 | 64 | return (Url == input.Url || (Url != null && Url.Equals(input.Url))); 65 | } 66 | 67 | /// 68 | /// Gets the hash code 69 | /// 70 | /// Hash code 71 | public override int GetHashCode() 72 | { 73 | unchecked // Overflow is fine, just wrap 74 | { 75 | int hashCode = 41; 76 | if (Url != null) 77 | { 78 | hashCode = (hashCode * 59) + Url.GetHashCode(); 79 | } 80 | return hashCode; 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /algoliasearch/Models/Search/BannerLink.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Search; 13 | 14 | /// 15 | /// Link for a banner defined in the Merchandising Studio. 16 | /// 17 | public partial class BannerLink 18 | { 19 | /// 20 | /// Initializes a new instance of the BannerLink class. 21 | /// 22 | public BannerLink() { } 23 | 24 | /// 25 | /// Gets or Sets Url 26 | /// 27 | [JsonPropertyName("url")] 28 | public string Url { get; set; } 29 | 30 | /// 31 | /// Returns the string presentation of the object 32 | /// 33 | /// String presentation of the object 34 | public override string ToString() 35 | { 36 | StringBuilder sb = new StringBuilder(); 37 | sb.Append("class BannerLink {\n"); 38 | sb.Append(" Url: ").Append(Url).Append("\n"); 39 | sb.Append("}\n"); 40 | return sb.ToString(); 41 | } 42 | 43 | /// 44 | /// Returns the JSON string presentation of the object 45 | /// 46 | /// JSON string presentation of the object 47 | public virtual string ToJson() 48 | { 49 | return JsonSerializer.Serialize(this, JsonConfig.Options); 50 | } 51 | 52 | /// 53 | /// Returns true if objects are equal 54 | /// 55 | /// Object to be compared 56 | /// Boolean 57 | public override bool Equals(object obj) 58 | { 59 | if (obj is not BannerLink input) 60 | { 61 | return false; 62 | } 63 | 64 | return (Url == input.Url || (Url != null && Url.Equals(input.Url))); 65 | } 66 | 67 | /// 68 | /// Gets the hash code 69 | /// 70 | /// Hash code 71 | public override int GetHashCode() 72 | { 73 | unchecked // Overflow is fine, just wrap 74 | { 75 | int hashCode = 41; 76 | if (Url != null) 77 | { 78 | hashCode = (hashCode * 59) + Url.GetHashCode(); 79 | } 80 | return hashCode; 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /algoliasearch/Models/Composition/BannerLink.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Composition; 13 | 14 | /// 15 | /// Link for a banner defined in the Merchandising Studio. 16 | /// 17 | public partial class BannerLink 18 | { 19 | /// 20 | /// Initializes a new instance of the BannerLink class. 21 | /// 22 | public BannerLink() { } 23 | 24 | /// 25 | /// Gets or Sets Url 26 | /// 27 | [JsonPropertyName("url")] 28 | public string Url { get; set; } 29 | 30 | /// 31 | /// Returns the string presentation of the object 32 | /// 33 | /// String presentation of the object 34 | public override string ToString() 35 | { 36 | StringBuilder sb = new StringBuilder(); 37 | sb.Append("class BannerLink {\n"); 38 | sb.Append(" Url: ").Append(Url).Append("\n"); 39 | sb.Append("}\n"); 40 | return sb.ToString(); 41 | } 42 | 43 | /// 44 | /// Returns the JSON string presentation of the object 45 | /// 46 | /// JSON string presentation of the object 47 | public virtual string ToJson() 48 | { 49 | return JsonSerializer.Serialize(this, JsonConfig.Options); 50 | } 51 | 52 | /// 53 | /// Returns true if objects are equal 54 | /// 55 | /// Object to be compared 56 | /// Boolean 57 | public override bool Equals(object obj) 58 | { 59 | if (obj is not BannerLink input) 60 | { 61 | return false; 62 | } 63 | 64 | return (Url == input.Url || (Url != null && Url.Equals(input.Url))); 65 | } 66 | 67 | /// 68 | /// Gets the hash code 69 | /// 70 | /// Hash code 71 | public override int GetHashCode() 72 | { 73 | unchecked // Overflow is fine, just wrap 74 | { 75 | int hashCode = 41; 76 | if (Url != null) 77 | { 78 | hashCode = (hashCode * 59) + Url.GetHashCode(); 79 | } 80 | return hashCode; 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /algoliasearch/Models/Composition/RequestBody.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Composition; 13 | 14 | /// 15 | /// RequestBody 16 | /// 17 | public partial class RequestBody 18 | { 19 | /// 20 | /// Initializes a new instance of the RequestBody class. 21 | /// 22 | public RequestBody() { } 23 | 24 | /// 25 | /// Gets or Sets Params 26 | /// 27 | [JsonPropertyName("params")] 28 | public Params Params { get; set; } 29 | 30 | /// 31 | /// Returns the string presentation of the object 32 | /// 33 | /// String presentation of the object 34 | public override string ToString() 35 | { 36 | StringBuilder sb = new StringBuilder(); 37 | sb.Append("class RequestBody {\n"); 38 | sb.Append(" Params: ").Append(Params).Append("\n"); 39 | sb.Append("}\n"); 40 | return sb.ToString(); 41 | } 42 | 43 | /// 44 | /// Returns the JSON string presentation of the object 45 | /// 46 | /// JSON string presentation of the object 47 | public virtual string ToJson() 48 | { 49 | return JsonSerializer.Serialize(this, JsonConfig.Options); 50 | } 51 | 52 | /// 53 | /// Returns true if objects are equal 54 | /// 55 | /// Object to be compared 56 | /// Boolean 57 | public override bool Equals(object obj) 58 | { 59 | if (obj is not RequestBody input) 60 | { 61 | return false; 62 | } 63 | 64 | return (Params == input.Params || (Params != null && Params.Equals(input.Params))); 65 | } 66 | 67 | /// 68 | /// Gets the hash code 69 | /// 70 | /// Hash code 71 | public override int GetHashCode() 72 | { 73 | unchecked // Overflow is fine, just wrap 74 | { 75 | int hashCode = 41; 76 | if (Params != null) 77 | { 78 | hashCode = (hashCode * 59) + Params.GetHashCode(); 79 | } 80 | return hashCode; 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /algoliasearch/Models/Recommend/BannerLink.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Recommend; 13 | 14 | /// 15 | /// Link for a banner defined in the Merchandising Studio. 16 | /// 17 | public partial class BannerLink 18 | { 19 | /// 20 | /// Initializes a new instance of the BannerLink class. 21 | /// 22 | public BannerLink() { } 23 | 24 | /// 25 | /// Gets or Sets Url 26 | /// 27 | [JsonPropertyName("url")] 28 | public string Url { get; set; } 29 | 30 | /// 31 | /// Returns the string presentation of the object 32 | /// 33 | /// String presentation of the object 34 | public override string ToString() 35 | { 36 | StringBuilder sb = new StringBuilder(); 37 | sb.Append("class BannerLink {\n"); 38 | sb.Append(" Url: ").Append(Url).Append("\n"); 39 | sb.Append("}\n"); 40 | return sb.ToString(); 41 | } 42 | 43 | /// 44 | /// Returns the JSON string presentation of the object 45 | /// 46 | /// JSON string presentation of the object 47 | public virtual string ToJson() 48 | { 49 | return JsonSerializer.Serialize(this, JsonConfig.Options); 50 | } 51 | 52 | /// 53 | /// Returns true if objects are equal 54 | /// 55 | /// Object to be compared 56 | /// Boolean 57 | public override bool Equals(object obj) 58 | { 59 | if (obj is not BannerLink input) 60 | { 61 | return false; 62 | } 63 | 64 | return (Url == input.Url || (Url != null && Url.Equals(input.Url))); 65 | } 66 | 67 | /// 68 | /// Gets the hash code 69 | /// 70 | /// Hash code 71 | public override int GetHashCode() 72 | { 73 | unchecked // Overflow is fine, just wrap 74 | { 75 | int hashCode = 41; 76 | if (Url != null) 77 | { 78 | hashCode = (hashCode * 59) + Url.GetHashCode(); 79 | } 80 | return hashCode; 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /algoliasearch/Models/Search/BannerImageUrl.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Search; 13 | 14 | /// 15 | /// URL for an image to show inside a banner. 16 | /// 17 | public partial class BannerImageUrl 18 | { 19 | /// 20 | /// Initializes a new instance of the BannerImageUrl class. 21 | /// 22 | public BannerImageUrl() { } 23 | 24 | /// 25 | /// Gets or Sets Url 26 | /// 27 | [JsonPropertyName("url")] 28 | public string Url { get; set; } 29 | 30 | /// 31 | /// Returns the string presentation of the object 32 | /// 33 | /// String presentation of the object 34 | public override string ToString() 35 | { 36 | StringBuilder sb = new StringBuilder(); 37 | sb.Append("class BannerImageUrl {\n"); 38 | sb.Append(" Url: ").Append(Url).Append("\n"); 39 | sb.Append("}\n"); 40 | return sb.ToString(); 41 | } 42 | 43 | /// 44 | /// Returns the JSON string presentation of the object 45 | /// 46 | /// JSON string presentation of the object 47 | public virtual string ToJson() 48 | { 49 | return JsonSerializer.Serialize(this, JsonConfig.Options); 50 | } 51 | 52 | /// 53 | /// Returns true if objects are equal 54 | /// 55 | /// Object to be compared 56 | /// Boolean 57 | public override bool Equals(object obj) 58 | { 59 | if (obj is not BannerImageUrl input) 60 | { 61 | return false; 62 | } 63 | 64 | return (Url == input.Url || (Url != null && Url.Equals(input.Url))); 65 | } 66 | 67 | /// 68 | /// Gets the hash code 69 | /// 70 | /// Hash code 71 | public override int GetHashCode() 72 | { 73 | unchecked // Overflow is fine, just wrap 74 | { 75 | int hashCode = 41; 76 | if (Url != null) 77 | { 78 | hashCode = (hashCode * 59) + Url.GetHashCode(); 79 | } 80 | return hashCode; 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /algoliasearch/Models/Recommend/BannerImageUrl.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Recommend; 13 | 14 | /// 15 | /// URL for an image to show inside a banner. 16 | /// 17 | public partial class BannerImageUrl 18 | { 19 | /// 20 | /// Initializes a new instance of the BannerImageUrl class. 21 | /// 22 | public BannerImageUrl() { } 23 | 24 | /// 25 | /// Gets or Sets Url 26 | /// 27 | [JsonPropertyName("url")] 28 | public string Url { get; set; } 29 | 30 | /// 31 | /// Returns the string presentation of the object 32 | /// 33 | /// String presentation of the object 34 | public override string ToString() 35 | { 36 | StringBuilder sb = new StringBuilder(); 37 | sb.Append("class BannerImageUrl {\n"); 38 | sb.Append(" Url: ").Append(Url).Append("\n"); 39 | sb.Append("}\n"); 40 | return sb.ToString(); 41 | } 42 | 43 | /// 44 | /// Returns the JSON string presentation of the object 45 | /// 46 | /// JSON string presentation of the object 47 | public virtual string ToJson() 48 | { 49 | return JsonSerializer.Serialize(this, JsonConfig.Options); 50 | } 51 | 52 | /// 53 | /// Returns true if objects are equal 54 | /// 55 | /// Object to be compared 56 | /// Boolean 57 | public override bool Equals(object obj) 58 | { 59 | if (obj is not BannerImageUrl input) 60 | { 61 | return false; 62 | } 63 | 64 | return (Url == input.Url || (Url != null && Url.Equals(input.Url))); 65 | } 66 | 67 | /// 68 | /// Gets the hash code 69 | /// 70 | /// Hash code 71 | public override int GetHashCode() 72 | { 73 | unchecked // Overflow is fine, just wrap 74 | { 75 | int hashCode = 41; 76 | if (Url != null) 77 | { 78 | hashCode = (hashCode * 59) + Url.GetHashCode(); 79 | } 80 | return hashCode; 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /algoliasearch/Models/Composition/BannerImageUrl.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Composition; 13 | 14 | /// 15 | /// URL for an image to show inside a banner. 16 | /// 17 | public partial class BannerImageUrl 18 | { 19 | /// 20 | /// Initializes a new instance of the BannerImageUrl class. 21 | /// 22 | public BannerImageUrl() { } 23 | 24 | /// 25 | /// Gets or Sets Url 26 | /// 27 | [JsonPropertyName("url")] 28 | public string Url { get; set; } 29 | 30 | /// 31 | /// Returns the string presentation of the object 32 | /// 33 | /// String presentation of the object 34 | public override string ToString() 35 | { 36 | StringBuilder sb = new StringBuilder(); 37 | sb.Append("class BannerImageUrl {\n"); 38 | sb.Append(" Url: ").Append(Url).Append("\n"); 39 | sb.Append("}\n"); 40 | return sb.ToString(); 41 | } 42 | 43 | /// 44 | /// Returns the JSON string presentation of the object 45 | /// 46 | /// JSON string presentation of the object 47 | public virtual string ToJson() 48 | { 49 | return JsonSerializer.Serialize(this, JsonConfig.Options); 50 | } 51 | 52 | /// 53 | /// Returns true if objects are equal 54 | /// 55 | /// Object to be compared 56 | /// Boolean 57 | public override bool Equals(object obj) 58 | { 59 | if (obj is not BannerImageUrl input) 60 | { 61 | return false; 62 | } 63 | 64 | return (Url == input.Url || (Url != null && Url.Equals(input.Url))); 65 | } 66 | 67 | /// 68 | /// Gets the hash code 69 | /// 70 | /// Hash code 71 | public override int GetHashCode() 72 | { 73 | unchecked // Overflow is fine, just wrap 74 | { 75 | int hashCode = 41; 76 | if (Url != null) 77 | { 78 | hashCode = (hashCode * 59) + Url.GetHashCode(); 79 | } 80 | return hashCode; 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /algoliasearch/Http/RequestOptionBuilder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace Algolia.Search.Http; 5 | 6 | /// 7 | /// Request option you can add to your queries 8 | /// 9 | public class RequestOptionBuilder 10 | { 11 | private readonly RequestOptions _options; 12 | 13 | /// 14 | /// Constructs a new instance of 15 | /// 16 | public RequestOptionBuilder() 17 | { 18 | _options = new RequestOptions 19 | { 20 | Headers = new Dictionary(), 21 | QueryParameters = new Dictionary(), 22 | }; 23 | } 24 | 25 | /// 26 | /// Add extra headers to the request 27 | /// 28 | /// 29 | /// 30 | /// 31 | public RequestOptionBuilder AddExtraHeader(string key, string value) 32 | { 33 | _options.Headers.Add(key, value); 34 | return this; 35 | } 36 | 37 | /// 38 | /// Add extra query parameters to the request 39 | /// 40 | /// 41 | /// 42 | /// 43 | public RequestOptionBuilder AddExtraQueryParameters(string key, object value) 44 | { 45 | _options.QueryParameters.Add(key, value); 46 | return this; 47 | } 48 | 49 | /// 50 | /// Set the request read timeout 51 | /// 52 | /// 53 | /// 54 | public RequestOptionBuilder SetReadTimeout(TimeSpan timeout) 55 | { 56 | _options.ReadTimeout = timeout; 57 | return this; 58 | } 59 | 60 | /// 61 | /// Set the request write timeout 62 | /// 63 | /// 64 | /// 65 | public RequestOptionBuilder SetWriteTimeout(TimeSpan timeout) 66 | { 67 | _options.WriteTimeout = timeout; 68 | return this; 69 | } 70 | 71 | /// 72 | /// Set the request connect timeout 73 | /// 74 | /// 75 | /// 76 | public RequestOptionBuilder SetConnectTimeout(TimeSpan timeout) 77 | { 78 | _options.ConnectTimeout = timeout; 79 | return this; 80 | } 81 | 82 | /// 83 | /// Build the request options 84 | /// 85 | /// 86 | public RequestOptions Build() 87 | { 88 | return _options; 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /algoliasearch/Models/Monitoring/LatencyResponse.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Monitoring; 13 | 14 | /// 15 | /// LatencyResponse 16 | /// 17 | public partial class LatencyResponse 18 | { 19 | /// 20 | /// Initializes a new instance of the LatencyResponse class. 21 | /// 22 | public LatencyResponse() { } 23 | 24 | /// 25 | /// Gets or Sets Metrics 26 | /// 27 | [JsonPropertyName("metrics")] 28 | public LatencyMetric Metrics { get; set; } 29 | 30 | /// 31 | /// Returns the string presentation of the object 32 | /// 33 | /// String presentation of the object 34 | public override string ToString() 35 | { 36 | StringBuilder sb = new StringBuilder(); 37 | sb.Append("class LatencyResponse {\n"); 38 | sb.Append(" Metrics: ").Append(Metrics).Append("\n"); 39 | sb.Append("}\n"); 40 | return sb.ToString(); 41 | } 42 | 43 | /// 44 | /// Returns the JSON string presentation of the object 45 | /// 46 | /// JSON string presentation of the object 47 | public virtual string ToJson() 48 | { 49 | return JsonSerializer.Serialize(this, JsonConfig.Options); 50 | } 51 | 52 | /// 53 | /// Returns true if objects are equal 54 | /// 55 | /// Object to be compared 56 | /// Boolean 57 | public override bool Equals(object obj) 58 | { 59 | if (obj is not LatencyResponse input) 60 | { 61 | return false; 62 | } 63 | 64 | return (Metrics == input.Metrics || (Metrics != null && Metrics.Equals(input.Metrics))); 65 | } 66 | 67 | /// 68 | /// Gets the hash code 69 | /// 70 | /// Hash code 71 | public override int GetHashCode() 72 | { 73 | unchecked // Overflow is fine, just wrap 74 | { 75 | int hashCode = 41; 76 | if (Metrics != null) 77 | { 78 | hashCode = (hashCode * 59) + Metrics.GetHashCode(); 79 | } 80 | return hashCode; 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /algoliasearch/Models/Abtesting/Outliers.cs: -------------------------------------------------------------------------------- 1 | // 2 | // 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. 3 | // 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Text.Json; 9 | using System.Text.Json.Serialization; 10 | using Algolia.Search.Serializer; 11 | 12 | namespace Algolia.Search.Models.Abtesting; 13 | 14 | /// 15 | /// Configuration for handling outliers. 16 | /// 17 | public partial class Outliers 18 | { 19 | /// 20 | /// Initializes a new instance of the Outliers class. 21 | /// 22 | public Outliers() { } 23 | 24 | /// 25 | /// Whether to exclude outliers when calculating A/B test results. 26 | /// 27 | /// Whether to exclude outliers when calculating A/B test results. 28 | [JsonPropertyName("exclude")] 29 | public bool? Exclude { get; set; } 30 | 31 | /// 32 | /// Returns the string presentation of the object 33 | /// 34 | /// String presentation of the object 35 | public override string ToString() 36 | { 37 | StringBuilder sb = new StringBuilder(); 38 | sb.Append("class Outliers {\n"); 39 | sb.Append(" Exclude: ").Append(Exclude).Append("\n"); 40 | sb.Append("}\n"); 41 | return sb.ToString(); 42 | } 43 | 44 | /// 45 | /// Returns the JSON string presentation of the object 46 | /// 47 | /// JSON string presentation of the object 48 | public virtual string ToJson() 49 | { 50 | return JsonSerializer.Serialize(this, JsonConfig.Options); 51 | } 52 | 53 | /// 54 | /// Returns true if objects are equal 55 | /// 56 | /// Object to be compared 57 | /// Boolean 58 | public override bool Equals(object obj) 59 | { 60 | if (obj is not Outliers input) 61 | { 62 | return false; 63 | } 64 | 65 | return (Exclude == input.Exclude || Exclude.Equals(input.Exclude)); 66 | } 67 | 68 | /// 69 | /// Gets the hash code 70 | /// 71 | /// Hash code 72 | public override int GetHashCode() 73 | { 74 | unchecked // Overflow is fine, just wrap 75 | { 76 | int hashCode = 41; 77 | hashCode = (hashCode * 59) + Exclude.GetHashCode(); 78 | return hashCode; 79 | } 80 | } 81 | } 82 | --------------------------------------------------------------------------------