Skip to content

Commit 3f7620c

Browse files
fix(specs): nb_api_calls in getLogs response is optional (generated)
Co-authored-by: shortcuts <[email protected]>
1 parent cd0cd49 commit 3f7620c

File tree

39 files changed

+262
-182
lines changed

39 files changed

+262
-182
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@ public Log() { }
3333
/// <param name="ip">IP address of the client that performed the request. (required).</param>
3434
/// <param name="queryHeaders">Request headers (API keys are obfuscated). (required).</param>
3535
/// <param name="sha1">SHA1 signature of the log entry. (required).</param>
36-
/// <param name="nbApiCalls">Number of API requests. (required).</param>
3736
/// <param name="processingTimeMs">Processing time for the query in milliseconds. This doesn't include latency due to the network. (required).</param>
38-
public Log(string timestamp, string method, string answerCode, string queryBody, string answer, string url, string ip, string queryHeaders, string sha1, string nbApiCalls, string processingTimeMs)
37+
public Log(string timestamp, string method, string answerCode, string queryBody, string answer, string url, string ip, string queryHeaders, string sha1, string processingTimeMs)
3938
{
4039
Timestamp = timestamp ?? throw new ArgumentNullException(nameof(timestamp));
4140
Method = method ?? throw new ArgumentNullException(nameof(method));
@@ -46,7 +45,6 @@ public Log(string timestamp, string method, string answerCode, string queryBody,
4645
Ip = ip ?? throw new ArgumentNullException(nameof(ip));
4746
QueryHeaders = queryHeaders ?? throw new ArgumentNullException(nameof(queryHeaders));
4847
Sha1 = sha1 ?? throw new ArgumentNullException(nameof(sha1));
49-
NbApiCalls = nbApiCalls ?? throw new ArgumentNullException(nameof(nbApiCalls));
5048
ProcessingTimeMs = processingTimeMs ?? throw new ArgumentNullException(nameof(processingTimeMs));
5149
}
5250

clients/algoliasearch-client-dart/packages/client_search/lib/src/model/log.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ final class Log {
1919
required this.ip,
2020
required this.queryHeaders,
2121
required this.sha1,
22-
required this.nbApiCalls,
22+
this.nbApiCalls,
2323
required this.processingTimeMs,
2424
this.index,
2525
this.queryParams,
@@ -65,7 +65,7 @@ final class Log {
6565

6666
/// Number of API requests.
6767
@JsonKey(name: r'nb_api_calls')
68-
final String nbApiCalls;
68+
final String? nbApiCalls;
6969

7070
/// Processing time for the query in milliseconds. This doesn't include latency due to the network.
7171
@JsonKey(name: r'processing_time_ms')

clients/algoliasearch-client-dart/packages/client_search/lib/src/model/log.g.dart

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/algoliasearch-client-go/algolia/abtesting/client.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/algoliasearch-client-go/algolia/analytics/client.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/algoliasearch-client-go/algolia/ingestion/client.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/algoliasearch-client-go/algolia/insights/client.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/algoliasearch-client-go/algolia/monitoring/client.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/algoliasearch-client-go/algolia/personalization/client.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/algoliasearch-client-go/algolia/query-suggestions/client.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/algoliasearch-client-go/algolia/recommend/client.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/algoliasearch-client-go/algolia/search/model_log.go

Lines changed: 26 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/search/Log.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public Log setNbApiCalls(String nbApiCalls) {
163163
}
164164

165165
/** Number of API requests. */
166-
@javax.annotation.Nonnull
166+
@javax.annotation.Nullable
167167
public String getNbApiCalls() {
168168
return nbApiCalls;
169169
}

clients/algoliasearch-client-javascript/packages/client-search/model/log.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export type Log = {
5151
/**
5252
* Number of API requests.
5353
*/
54-
nb_api_calls: string;
54+
nb_api_calls?: string;
5555

5656
/**
5757
* Processing time for the query in milliseconds. This doesn\'t include latency due to the network.

clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/search/Log.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import kotlinx.serialization.json.*
1616
* @param ip IP address of the client that performed the request.
1717
* @param queryHeaders Request headers (API keys are obfuscated).
1818
* @param sha1 SHA1 signature of the log entry.
19-
* @param nbApiCalls Number of API requests.
2019
* @param processingTimeMs Processing time for the query in milliseconds. This doesn't include latency due to the network.
20+
* @param nbApiCalls Number of API requests.
2121
* @param index Index targeted by the query.
2222
* @param queryParams Query parameters sent with the request.
2323
* @param queryNbHits Number of search results (hits) returned for the query.
@@ -53,12 +53,12 @@ public data class Log(
5353
/** SHA1 signature of the log entry. */
5454
@SerialName(value = "sha1") val sha1: String,
5555

56-
/** Number of API requests. */
57-
@SerialName(value = "nb_api_calls") val nbApiCalls: String,
58-
5956
/** Processing time for the query in milliseconds. This doesn't include latency due to the network. */
6057
@SerialName(value = "processing_time_ms") val processingTimeMs: String,
6158

59+
/** Number of API requests. */
60+
@SerialName(value = "nb_api_calls") val nbApiCalls: String? = null,
61+
6262
/** Index targeted by the query. */
6363
@SerialName(value = "index") val index: String? = null,
6464

0 commit comments

Comments
 (0)