Skip to content

Commit

Permalink
Merge branch 'main' into fix/get-objects-response (generated)
Browse files Browse the repository at this point in the history
Co-authored-by: Clément Vannicatte <vannicattec@gmail.com>
  • Loading branch information
algolia-bot and shortcuts committed Oct 23, 2024
1 parent e95e085 commit c1e7505
Show file tree
Hide file tree
Showing 39 changed files with 265 additions and 200 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,15 @@ public partial class GetObjectsResponse<T>
/// <summary>
/// Initializes a new instance of the GetObjectsResponse class.
/// </summary>
public GetObjectsResponse()
[JsonConstructor]
public GetObjectsResponse() { }
/// <summary>
/// Initializes a new instance of the GetObjectsResponse class.
/// </summary>
/// <param name="results">Retrieved records. (required).</param>
public GetObjectsResponse(List<T> results)
{
Results = results ?? throw new ArgumentNullException(nameof(results));
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ part 'get_objects_response.g.dart';
final class GetObjectsResponse {
/// Returns a new [GetObjectsResponse] instance.
const GetObjectsResponse({
this.results,
required this.results,
});

/// Retrieved records.
@JsonKey(name: r'results')
final List<Object>? results;
final List<Object> results;

@override
bool operator ==(Object other) =>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions clients/algoliasearch-client-go/algolia/abtesting/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions clients/algoliasearch-client-go/algolia/analytics/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions clients/algoliasearch-client-go/algolia/ingestion/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions clients/algoliasearch-client-go/algolia/insights/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions clients/algoliasearch-client-go/algolia/monitoring/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions clients/algoliasearch-client-go/algolia/recommend/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,20 @@
public class GetObjectsResponse<T> {

@JsonProperty("results")
private List<T> results;
private List<T> results = new ArrayList<>();

public GetObjectsResponse<T> setResults(List<T> results) {
this.results = results;
return this;
}

public GetObjectsResponse<T> addResults(T resultsItem) {
if (this.results == null) {
this.results = new ArrayList<>();
}
this.results.add(resultsItem);
return this;
}

/** Retrieved records. */
@javax.annotation.Nullable
@javax.annotation.Nonnull
public List<T> getResults() {
return results;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ export type GetObjectsResponse<T = Record<string, unknown>> = {
/**
* Retrieved records.
*/
results?: T[];
results: T[];
};
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ import kotlinx.serialization.json.*
public data class GetObjectsResponse(

/** Retrieved records. */
@SerialName(value = "results") val results: List<JsonObject>? = null,
@SerialName(value = "results") val results: List<JsonObject>,
)
16 changes: 10 additions & 6 deletions clients/algoliasearch-client-php/lib/Api/AbtestingClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@

use Algolia\AlgoliaSearch\Algolia;
use Algolia\AlgoliaSearch\Configuration\AbtestingConfig;
use Algolia\AlgoliaSearch\Model\Abtesting\ABTest;
use Algolia\AlgoliaSearch\Model\Abtesting\ABTestResponse;
use Algolia\AlgoliaSearch\Model\Abtesting\AddABTestsRequest;
use Algolia\AlgoliaSearch\Model\Abtesting\ListABTestsResponse;
use Algolia\AlgoliaSearch\Model\Abtesting\ScheduleABTestResponse;
use Algolia\AlgoliaSearch\Model\Abtesting\ScheduleABTestsRequest;
use Algolia\AlgoliaSearch\ObjectSerializer;
use Algolia\AlgoliaSearch\RetryStrategy\ApiWrapper;
Expand Down Expand Up @@ -124,7 +128,7 @@ public function setClientApiKey($apiKey)
*
* @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions
*
* @return \Algolia\AlgoliaSearch\Model\Abtesting\ABTestResponse|array<string, mixed>
* @return ABTestResponse|array<string, mixed>
*/
public function addABTests($addABTestsRequest, $requestOptions = [])
{
Expand Down Expand Up @@ -310,7 +314,7 @@ public function customPut($path, $parameters = null, $body = null, $requestOptio
* @param int $id Unique A/B test identifier. (required)
* @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions
*
* @return \Algolia\AlgoliaSearch\Model\Abtesting\ABTestResponse|array<string, mixed>
* @return ABTestResponse|array<string, mixed>
*/
public function deleteABTest($id, $requestOptions = [])
{
Expand Down Expand Up @@ -347,7 +351,7 @@ public function deleteABTest($id, $requestOptions = [])
* @param int $id Unique A/B test identifier. (required)
* @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions
*
* @return \Algolia\AlgoliaSearch\Model\Abtesting\ABTest|array<string, mixed>
* @return ABTest|array<string, mixed>
*/
public function getABTest($id, $requestOptions = [])
{
Expand Down Expand Up @@ -387,7 +391,7 @@ public function getABTest($id, $requestOptions = [])
* @param string $indexSuffix Index name suffix. Only A/B tests for indices ending with this string are included in the response. (optional)
* @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions
*
* @return \Algolia\AlgoliaSearch\Model\Abtesting\ListABTestsResponse|array<string, mixed>
* @return array<string, mixed>|ListABTestsResponse
*/
public function listABTests($offset = null, $limit = null, $indexPrefix = null, $indexSuffix = null, $requestOptions = [])
{
Expand Down Expand Up @@ -431,7 +435,7 @@ public function listABTests($offset = null, $limit = null, $indexPrefix = null,
*
* @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions
*
* @return \Algolia\AlgoliaSearch\Model\Abtesting\ScheduleABTestResponse|array<string, mixed>
* @return array<string, mixed>|ScheduleABTestResponse
*/
public function scheduleABTest($scheduleABTestsRequest, $requestOptions = [])
{
Expand Down Expand Up @@ -459,7 +463,7 @@ public function scheduleABTest($scheduleABTestsRequest, $requestOptions = [])
* @param int $id Unique A/B test identifier. (required)
* @param array $requestOptions the requestOptions to send along with the query, they will be merged with the transporter requestOptions
*
* @return \Algolia\AlgoliaSearch\Model\Abtesting\ABTestResponse|array<string, mixed>
* @return ABTestResponse|array<string, mixed>
*/
public function stopABTest($id, $requestOptions = [])
{
Expand Down
Loading

0 comments on commit c1e7505

Please sign in to comment.