Skip to content

Commit 851e90a

Browse files
algolia-botFluf22
andcommitted
fix(clients): processingTimeMS should be optional (generated)
algolia/api-clients-automation#5004 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Thomas Raffray <[email protected]>
1 parent 7ab3672 commit 851e90a

File tree

4 files changed

+7
-16
lines changed

4 files changed

+7
-16
lines changed

algoliasearch/Models/Composition/SearchResultsItem.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ public SearchResultsItem() { }
2525
/// <summary>
2626
/// Initializes a new instance of the SearchResultsItem class.
2727
/// </summary>
28-
/// <param name="processingTimeMS">Time the server took to process the request, in milliseconds. (required).</param>
2928
/// <param name="page">Page of search results to retrieve. (required) (default to 0).</param>
3029
/// <param name="nbHits">Number of results (hits). (required).</param>
3130
/// <param name="nbPages">Number of pages of results. (required).</param>
@@ -35,7 +34,6 @@ public SearchResultsItem() { }
3534
/// <param name="varParams">URL-encoded string of all search parameters. (required).</param>
3635
/// <param name="compositions">compositions (required).</param>
3736
public SearchResultsItem(
38-
int processingTimeMS,
3937
int page,
4038
int nbHits,
4139
int nbPages,
@@ -46,7 +44,6 @@ public SearchResultsItem(
4644
Dictionary<string, ResultsCompositionInfoResponse> compositions
4745
)
4846
{
49-
ProcessingTimeMS = processingTimeMS;
5047
Page = page;
5148
NbHits = nbHits;
5249
NbPages = nbPages;
@@ -176,7 +173,7 @@ Dictionary<string, ResultsCompositionInfoResponse> compositions
176173
/// </summary>
177174
/// <value>Time the server took to process the request, in milliseconds.</value>
178175
[JsonPropertyName("processingTimeMS")]
179-
public int ProcessingTimeMS { get; set; }
176+
public int? ProcessingTimeMS { get; set; }
180177

181178
/// <summary>
182179
/// Experimental. List of processing steps and their times, in milliseconds. You can use this list to investigate performance issues.

algoliasearch/Models/Recommend/RecommendationsResults.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,9 @@ public RecommendationsResults() { }
2525
/// <summary>
2626
/// Initializes a new instance of the RecommendationsResults class.
2727
/// </summary>
28-
/// <param name="processingTimeMS">Time the server took to process the request, in milliseconds. (required).</param>
2928
/// <param name="hits">hits (required).</param>
30-
public RecommendationsResults(int processingTimeMS, List<RecommendationsHit> hits)
29+
public RecommendationsResults(List<RecommendationsHit> hits)
3130
{
32-
ProcessingTimeMS = processingTimeMS;
3331
Hits = hits ?? throw new ArgumentNullException(nameof(hits));
3432
}
3533

@@ -152,7 +150,7 @@ public RecommendationsResults(int processingTimeMS, List<RecommendationsHit> hit
152150
/// </summary>
153151
/// <value>Time the server took to process the request, in milliseconds.</value>
154152
[JsonPropertyName("processingTimeMS")]
155-
public int ProcessingTimeMS { get; set; }
153+
public int? ProcessingTimeMS { get; set; }
156154

157155
/// <summary>
158156
/// Experimental. List of processing steps and their times, in milliseconds. You can use this list to investigate performance issues.

algoliasearch/Models/Search/BrowseResponse.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,11 @@ public BrowseResponse() { }
2525
/// <summary>
2626
/// Initializes a new instance of the BrowseResponse class.
2727
/// </summary>
28-
/// <param name="processingTimeMS">Time the server took to process the request, in milliseconds. (required).</param>
2928
/// <param name="hits">Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. (required).</param>
3029
/// <param name="query">Search query. (required) (default to "").</param>
3130
/// <param name="varParams">URL-encoded string of all search parameters. (required).</param>
32-
public BrowseResponse(int processingTimeMS, List<T> hits, string query, string varParams)
31+
public BrowseResponse(List<T> hits, string query, string varParams)
3332
{
34-
ProcessingTimeMS = processingTimeMS;
3533
Hits = hits ?? throw new ArgumentNullException(nameof(hits));
3634
Query = query ?? throw new ArgumentNullException(nameof(query));
3735
Params = varParams ?? throw new ArgumentNullException(nameof(varParams));
@@ -156,7 +154,7 @@ public BrowseResponse(int processingTimeMS, List<T> hits, string query, string v
156154
/// </summary>
157155
/// <value>Time the server took to process the request, in milliseconds.</value>
158156
[JsonPropertyName("processingTimeMS")]
159-
public int ProcessingTimeMS { get; set; }
157+
public int? ProcessingTimeMS { get; set; }
160158

161159
/// <summary>
162160
/// Experimental. List of processing steps and their times, in milliseconds. You can use this list to investigate performance issues.

algoliasearch/Models/Search/SearchResponse.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,11 @@ public SearchResponse()
2828
/// <summary>
2929
/// Initializes a new instance of the SearchResponse class.
3030
/// </summary>
31-
/// <param name="processingTimeMS">Time the server took to process the request, in milliseconds. (required).</param>
3231
/// <param name="hits">Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. (required).</param>
3332
/// <param name="query">Search query. (required) (default to "").</param>
3433
/// <param name="varParams">URL-encoded string of all search parameters. (required).</param>
35-
public SearchResponse(int processingTimeMS, List<T> hits, string query, string varParams)
34+
public SearchResponse(List<T> hits, string query, string varParams)
3635
{
37-
ProcessingTimeMS = processingTimeMS;
3836
Hits = hits ?? throw new ArgumentNullException(nameof(hits));
3937
Query = query ?? throw new ArgumentNullException(nameof(query));
4038
Params = varParams ?? throw new ArgumentNullException(nameof(varParams));
@@ -160,7 +158,7 @@ public SearchResponse(int processingTimeMS, List<T> hits, string query, string v
160158
/// </summary>
161159
/// <value>Time the server took to process the request, in milliseconds.</value>
162160
[JsonPropertyName("processingTimeMS")]
163-
public int ProcessingTimeMS { get; set; }
161+
public int? ProcessingTimeMS { get; set; }
164162

165163
/// <summary>
166164
/// Experimental. List of processing steps and their times, in milliseconds. You can use this list to investigate performance issues.

0 commit comments

Comments
 (0)