Skip to content

Commit e0459e3

Browse files
algolia-botkai687
andcommitted
chore: generated code for commit 200f07e. [skip ci]
Co-authored-by: Kai Welke <[email protected]>
1 parent 200f07e commit e0459e3

File tree

50 files changed

+13012
-38
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+13012
-38
lines changed

clients/algoliasearch-client-csharp/algoliasearch/Clients/SearchClient.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -800,8 +800,8 @@ public interface ISearchClient
800800
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
801801
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
802802
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
803-
/// <returns>Task of IndexSettings</returns>
804-
Task<IndexSettings> GetSettingsAsync(string indexName, RequestOptions options = null, CancellationToken cancellationToken = default);
803+
/// <returns>Task of SettingsResponse</returns>
804+
Task<SettingsResponse> GetSettingsAsync(string indexName, RequestOptions options = null, CancellationToken cancellationToken = default);
805805

806806
/// <summary>
807807
/// Retrieves an object with non-null index settings. (Synchronous version)
@@ -812,8 +812,8 @@ public interface ISearchClient
812812
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
813813
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
814814
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
815-
/// <returns>IndexSettings</returns>
816-
IndexSettings GetSettings(string indexName, RequestOptions options = null, CancellationToken cancellationToken = default);
815+
/// <returns>SettingsResponse</returns>
816+
SettingsResponse GetSettings(string indexName, RequestOptions options = null, CancellationToken cancellationToken = default);
817817

818818
/// <summary>
819819
/// Retrieves all allowed IP addresses with access to your application.
@@ -3077,8 +3077,8 @@ public Rule GetRule(string indexName, string objectID, RequestOptions options =
30773077
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
30783078
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
30793079
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
3080-
/// <returns>Task of IndexSettings</returns>
3081-
public async Task<IndexSettings> GetSettingsAsync(string indexName, RequestOptions options = null, CancellationToken cancellationToken = default)
3080+
/// <returns>Task of SettingsResponse</returns>
3081+
public async Task<SettingsResponse> GetSettingsAsync(string indexName, RequestOptions options = null, CancellationToken cancellationToken = default)
30823082
{
30833083

30843084
if (indexName == null)
@@ -3088,7 +3088,7 @@ public async Task<IndexSettings> GetSettingsAsync(string indexName, RequestOptio
30883088

30893089
requestOptions.PathParameters.Add("indexName", QueryStringHelper.ParameterToString(indexName));
30903090

3091-
return await _transport.ExecuteRequestAsync<IndexSettings>(new HttpMethod("GET"), "/1/indexes/{indexName}/settings", requestOptions, cancellationToken).ConfigureAwait(false);
3091+
return await _transport.ExecuteRequestAsync<SettingsResponse>(new HttpMethod("GET"), "/1/indexes/{indexName}/settings", requestOptions, cancellationToken).ConfigureAwait(false);
30923092
}
30933093

30943094

@@ -3104,8 +3104,8 @@ public async Task<IndexSettings> GetSettingsAsync(string indexName, RequestOptio
31043104
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
31053105
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
31063106
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
3107-
/// <returns>IndexSettings</returns>
3108-
public IndexSettings GetSettings(string indexName, RequestOptions options = null, CancellationToken cancellationToken = default) =>
3107+
/// <returns>SettingsResponse</returns>
3108+
public SettingsResponse GetSettings(string indexName, RequestOptions options = null, CancellationToken cancellationToken = default) =>
31093109
AsyncHelper.RunSync(() => GetSettingsAsync(indexName, options, cancellationToken));
31103110

31113111

clients/algoliasearch-client-csharp/algoliasearch/Models/Search/SettingsResponse.cs

Lines changed: 805 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
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.Text;
6+
using System.Linq;
7+
using System.Text.Json.Serialization;
8+
using System.Collections.Generic;
9+
using Algolia.Search.Serializer;
10+
using System.Text.Json;
11+
12+
namespace Algolia.Search.Models.Search;
13+
14+
/// <summary>
15+
/// WithPrimary
16+
/// </summary>
17+
public partial class WithPrimary
18+
{
19+
/// <summary>
20+
/// Initializes a new instance of the WithPrimary class.
21+
/// </summary>
22+
public WithPrimary()
23+
{
24+
}
25+
26+
/// <summary>
27+
/// Replica indices only: the name of the primary index for this replica.
28+
/// </summary>
29+
/// <value>Replica indices only: the name of the primary index for this replica. </value>
30+
[JsonPropertyName("primary")]
31+
public string Primary { get; set; }
32+
33+
/// <summary>
34+
/// Returns the string presentation of the object
35+
/// </summary>
36+
/// <returns>String presentation of the object</returns>
37+
public override string ToString()
38+
{
39+
StringBuilder sb = new StringBuilder();
40+
sb.Append("class WithPrimary {\n");
41+
sb.Append(" Primary: ").Append(Primary).Append("\n");
42+
sb.Append("}\n");
43+
return sb.ToString();
44+
}
45+
46+
/// <summary>
47+
/// Returns the JSON string presentation of the object
48+
/// </summary>
49+
/// <returns>JSON string presentation of the object</returns>
50+
public virtual string ToJson()
51+
{
52+
return JsonSerializer.Serialize(this, JsonConfig.Options);
53+
}
54+
55+
/// <summary>
56+
/// Returns true if objects are equal
57+
/// </summary>
58+
/// <param name="obj">Object to be compared</param>
59+
/// <returns>Boolean</returns>
60+
public override bool Equals(object obj)
61+
{
62+
if (obj is not WithPrimary input)
63+
{
64+
return false;
65+
}
66+
67+
return
68+
(Primary == input.Primary || (Primary != null && Primary.Equals(input.Primary)));
69+
}
70+
71+
/// <summary>
72+
/// Gets the hash code
73+
/// </summary>
74+
/// <returns>Hash code</returns>
75+
public override int GetHashCode()
76+
{
77+
unchecked // Overflow is fine, just wrap
78+
{
79+
int hashCode = 41;
80+
if (Primary != null)
81+
{
82+
hashCode = (hashCode * 59) + Primary.GetHashCode();
83+
}
84+
return hashCode;
85+
}
86+
}
87+
88+
}
89+

clients/algoliasearch-client-dart/packages/algoliasearch/lib/algoliasearch_lite.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ export 'src/model/search_strategy.dart';
8686
export 'src/model/search_type_default.dart';
8787
export 'src/model/search_type_facet.dart';
8888
export 'src/model/semantic_search.dart';
89+
export 'src/model/settings_response.dart';
8990
export 'src/model/snippet_result_option.dart';
9091
export 'src/model/sort_remaining_by.dart';
9192
export 'src/model/supported_language.dart';
@@ -98,5 +99,6 @@ export 'src/model/trending_items_model.dart';
9899
export 'src/model/trending_items_query.dart';
99100
export 'src/model/typo_tolerance_enum.dart';
100101
export 'src/model/value.dart';
102+
export 'src/model/with_primary.dart';
101103

102104
export 'src/extension.dart';

clients/algoliasearch-client-dart/packages/algoliasearch/lib/src/deserialize.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ import 'package:algoliasearch/src/model/search_strategy.dart';
7979
import 'package:algoliasearch/src/model/search_type_default.dart';
8080
import 'package:algoliasearch/src/model/search_type_facet.dart';
8181
import 'package:algoliasearch/src/model/semantic_search.dart';
82+
import 'package:algoliasearch/src/model/settings_response.dart';
8283
import 'package:algoliasearch/src/model/snippet_result_option.dart';
8384
import 'package:algoliasearch/src/model/sort_remaining_by.dart';
8485
import 'package:algoliasearch/src/model/supported_language.dart';
@@ -91,6 +92,7 @@ import 'package:algoliasearch/src/model/trending_items_model.dart';
9192
import 'package:algoliasearch/src/model/trending_items_query.dart';
9293
import 'package:algoliasearch/src/model/typo_tolerance_enum.dart';
9394
import 'package:algoliasearch/src/model/value.dart';
95+
import 'package:algoliasearch/src/model/with_primary.dart';
9496

9597
final _regList = RegExp(r'^List<(.*)>$');
9698
final _regSet = RegExp(r'^Set<(.*)>$');
@@ -320,6 +322,9 @@ ReturnType deserialize<ReturnType, BaseType>(dynamic value, String targetType,
320322
case 'SemanticSearch':
321323
return SemanticSearch.fromJson(value as Map<String, dynamic>)
322324
as ReturnType;
325+
case 'SettingsResponse':
326+
return SettingsResponse.fromJson(value as Map<String, dynamic>)
327+
as ReturnType;
323328
case 'SnippetResultOption':
324329
return SnippetResultOption.fromJson(value as Map<String, dynamic>)
325330
as ReturnType;
@@ -350,6 +355,8 @@ ReturnType deserialize<ReturnType, BaseType>(dynamic value, String targetType,
350355
return TypoToleranceEnum.fromJson(value) as ReturnType;
351356
case 'Value':
352357
return Value.fromJson(value as Map<String, dynamic>) as ReturnType;
358+
case 'WithPrimary':
359+
return WithPrimary.fromJson(value as Map<String, dynamic>) as ReturnType;
353360
default:
354361
RegExpMatch? match;
355362

0 commit comments

Comments
 (0)