-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/DI-1832/chunkedbatch-php
- Loading branch information
Showing
116 changed files
with
3,543 additions
and
721 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.0.18 | ||
1.0.19 |
38 changes: 0 additions & 38 deletions
38
clients/algoliasearch-client-csharp/algoliasearch/Models/Common/SecuredApiKeyRestriction.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
clients/algoliasearch-client-csharp/algoliasearch/Models/Search/ApiKeyOperation.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// | ||
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. | ||
// | ||
using System; | ||
using System.Text; | ||
using System.Linq; | ||
using System.Text.Json.Serialization; | ||
using System.Collections.Generic; | ||
using Algolia.Search.Serializer; | ||
using System.Text.Json; | ||
|
||
namespace Algolia.Search.Models.Search; | ||
|
||
/// <summary> | ||
/// Defines apiKeyOperation | ||
/// </summary> | ||
public enum ApiKeyOperation | ||
{ | ||
/// <summary> | ||
/// Enum Add for value: add | ||
/// </summary> | ||
[JsonPropertyName("add")] | ||
Add = 1, | ||
|
||
/// <summary> | ||
/// Enum Delete for value: delete | ||
/// </summary> | ||
[JsonPropertyName("delete")] | ||
Delete = 2, | ||
|
||
/// <summary> | ||
/// Enum Update for value: update | ||
/// </summary> | ||
[JsonPropertyName("update")] | ||
Update = 3 | ||
} | ||
|
150 changes: 150 additions & 0 deletions
150
clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SecuredAPIKeyRestrictions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
// | ||
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. | ||
// | ||
using System; | ||
using System.Text; | ||
using System.Linq; | ||
using System.Text.Json.Serialization; | ||
using System.Collections.Generic; | ||
using Algolia.Search.Serializer; | ||
using System.Text.Json; | ||
|
||
namespace Algolia.Search.Models.Search; | ||
|
||
/// <summary> | ||
/// SecuredAPIKeyRestrictions | ||
/// </summary> | ||
public partial class SecuredAPIKeyRestrictions | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the SecuredAPIKeyRestrictions class. | ||
/// </summary> | ||
public SecuredAPIKeyRestrictions() | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Gets or Sets SearchParams | ||
/// </summary> | ||
[JsonPropertyName("searchParams")] | ||
public SearchParamsObject SearchParams { get; set; } | ||
|
||
/// <summary> | ||
/// Filters that apply to every search made with the secured API key. You can add extra filters at search time with the filters query parameter. For example, if you set the filter group:admin on your generated API key, and you add groups:press OR groups:visitors with the filters query parameter, your final search filter is equivalent to groups:admin AND (groups:press OR groups:visitors). | ||
/// </summary> | ||
/// <value>Filters that apply to every search made with the secured API key. You can add extra filters at search time with the filters query parameter. For example, if you set the filter group:admin on your generated API key, and you add groups:press OR groups:visitors with the filters query parameter, your final search filter is equivalent to groups:admin AND (groups:press OR groups:visitors). </value> | ||
[JsonPropertyName("filters")] | ||
public string Filters { get; set; } | ||
|
||
/// <summary> | ||
/// Unix timestamp used to set the expiration date of the API key. | ||
/// </summary> | ||
/// <value>Unix timestamp used to set the expiration date of the API key.</value> | ||
[JsonPropertyName("validUntil")] | ||
public decimal? ValidUntil { get; set; } | ||
|
||
/// <summary> | ||
/// Index names that can be queried. | ||
/// </summary> | ||
/// <value>Index names that can be queried.</value> | ||
[JsonPropertyName("restrictIndices")] | ||
public List<string> RestrictIndices { get; set; } | ||
|
||
/// <summary> | ||
/// IPv4 network allowed to use the generated key. Use this to protect against API key leaking and reuse. You can only provide a single source, but you can specify a range of IPs (for example, 192.168.1.0/24). | ||
/// </summary> | ||
/// <value>IPv4 network allowed to use the generated key. Use this to protect against API key leaking and reuse. You can only provide a single source, but you can specify a range of IPs (for example, 192.168.1.0/24). </value> | ||
[JsonPropertyName("restrictSources")] | ||
public string RestrictSources { get; set; } | ||
|
||
/// <summary> | ||
/// Unique user IP address. This can be useful when you want to impose a rate limit on specific users. By default, rate limits are set based on the IP address. This can become an issue when several users search from the same IP address. To avoid this, you can set a unique userToken for each user when generating their API key. This lets you restrict each user to a maximum number of API calls per hour, even if they share their IP with another user. Specifying the userToken in a secured API key is also a good security practice as it ensures users don't change it. Many features like Analytics, Personalization, and Dynamic Re-ranking rely on the authenticity of user identifiers. Setting the userToken at the API key level ensures that downstream services work as expected and prevents abuse. | ||
/// </summary> | ||
/// <value>Unique user IP address. This can be useful when you want to impose a rate limit on specific users. By default, rate limits are set based on the IP address. This can become an issue when several users search from the same IP address. To avoid this, you can set a unique userToken for each user when generating their API key. This lets you restrict each user to a maximum number of API calls per hour, even if they share their IP with another user. Specifying the userToken in a secured API key is also a good security practice as it ensures users don't change it. Many features like Analytics, Personalization, and Dynamic Re-ranking rely on the authenticity of user identifiers. Setting the userToken at the API key level ensures that downstream services work as expected and prevents abuse. </value> | ||
[JsonPropertyName("userToken")] | ||
public string UserToken { get; set; } | ||
|
||
/// <summary> | ||
/// Returns the string presentation of the object | ||
/// </summary> | ||
/// <returns>String presentation of the object</returns> | ||
public override string ToString() | ||
{ | ||
StringBuilder sb = new StringBuilder(); | ||
sb.Append("class SecuredAPIKeyRestrictions {\n"); | ||
sb.Append(" SearchParams: ").Append(SearchParams).Append("\n"); | ||
sb.Append(" Filters: ").Append(Filters).Append("\n"); | ||
sb.Append(" ValidUntil: ").Append(ValidUntil).Append("\n"); | ||
sb.Append(" RestrictIndices: ").Append(RestrictIndices).Append("\n"); | ||
sb.Append(" RestrictSources: ").Append(RestrictSources).Append("\n"); | ||
sb.Append(" UserToken: ").Append(UserToken).Append("\n"); | ||
sb.Append("}\n"); | ||
return sb.ToString(); | ||
} | ||
|
||
/// <summary> | ||
/// Returns the JSON string presentation of the object | ||
/// </summary> | ||
/// <returns>JSON string presentation of the object</returns> | ||
public virtual string ToJson() | ||
{ | ||
return JsonSerializer.Serialize(this, JsonConfig.Options); | ||
} | ||
|
||
/// <summary> | ||
/// Returns true if objects are equal | ||
/// </summary> | ||
/// <param name="obj">Object to be compared</param> | ||
/// <returns>Boolean</returns> | ||
public override bool Equals(object obj) | ||
{ | ||
if (obj is not SecuredAPIKeyRestrictions input) | ||
{ | ||
return false; | ||
} | ||
|
||
return | ||
(SearchParams == input.SearchParams || (SearchParams != null && SearchParams.Equals(input.SearchParams))) && | ||
(Filters == input.Filters || (Filters != null && Filters.Equals(input.Filters))) && | ||
(ValidUntil == input.ValidUntil || ValidUntil.Equals(input.ValidUntil)) && | ||
(RestrictIndices == input.RestrictIndices || RestrictIndices != null && input.RestrictIndices != null && RestrictIndices.SequenceEqual(input.RestrictIndices)) && | ||
(RestrictSources == input.RestrictSources || (RestrictSources != null && RestrictSources.Equals(input.RestrictSources))) && | ||
(UserToken == input.UserToken || (UserToken != null && UserToken.Equals(input.UserToken))); | ||
} | ||
|
||
/// <summary> | ||
/// Gets the hash code | ||
/// </summary> | ||
/// <returns>Hash code</returns> | ||
public override int GetHashCode() | ||
{ | ||
unchecked // Overflow is fine, just wrap | ||
{ | ||
int hashCode = 41; | ||
if (SearchParams != null) | ||
{ | ||
hashCode = (hashCode * 59) + SearchParams.GetHashCode(); | ||
} | ||
if (Filters != null) | ||
{ | ||
hashCode = (hashCode * 59) + Filters.GetHashCode(); | ||
} | ||
hashCode = (hashCode * 59) + ValidUntil.GetHashCode(); | ||
if (RestrictIndices != null) | ||
{ | ||
hashCode = (hashCode * 59) + RestrictIndices.GetHashCode(); | ||
} | ||
if (RestrictSources != null) | ||
{ | ||
hashCode = (hashCode * 59) + RestrictSources.GetHashCode(); | ||
} | ||
if (UserToken != null) | ||
{ | ||
hashCode = (hashCode * 59) + UserToken.GetHashCode(); | ||
} | ||
return hashCode; | ||
} | ||
} | ||
|
||
} | ||
|
20 changes: 0 additions & 20 deletions
20
clients/algoliasearch-client-csharp/algoliasearch/Utils/ApiKeyOperation.cs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.