Skip to content

Commit 6470b87

Browse files
algolia-botmillotp
andcommitted
chore: generated code for commit 53ef92d. [skip ci]
Co-authored-by: Pierre Millot <[email protected]>
1 parent 53ef92d commit 6470b87

File tree

35 files changed

+1913
-86
lines changed

35 files changed

+1913
-86
lines changed
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
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+
/// ReplaceAllObjectsResponse
16+
/// </summary>
17+
public partial class ReplaceAllObjectsResponse
18+
{
19+
/// <summary>
20+
/// Initializes a new instance of the ReplaceAllObjectsResponse class.
21+
/// </summary>
22+
[JsonConstructor]
23+
public ReplaceAllObjectsResponse() { }
24+
/// <summary>
25+
/// Initializes a new instance of the ReplaceAllObjectsResponse class.
26+
/// </summary>
27+
/// <param name="copyOperationResponse">copyOperationResponse (required).</param>
28+
/// <param name="batchResponses">The response of the &#x60;batch&#x60; request(s). (required).</param>
29+
/// <param name="moveOperationResponse">moveOperationResponse (required).</param>
30+
public ReplaceAllObjectsResponse(UpdatedAtResponse copyOperationResponse, List<BatchResponse> batchResponses, UpdatedAtResponse moveOperationResponse)
31+
{
32+
CopyOperationResponse = copyOperationResponse ?? throw new ArgumentNullException(nameof(copyOperationResponse));
33+
BatchResponses = batchResponses ?? throw new ArgumentNullException(nameof(batchResponses));
34+
MoveOperationResponse = moveOperationResponse ?? throw new ArgumentNullException(nameof(moveOperationResponse));
35+
}
36+
37+
/// <summary>
38+
/// Gets or Sets CopyOperationResponse
39+
/// </summary>
40+
[JsonPropertyName("copyOperationResponse")]
41+
public UpdatedAtResponse CopyOperationResponse { get; set; }
42+
43+
/// <summary>
44+
/// The response of the `batch` request(s).
45+
/// </summary>
46+
/// <value>The response of the `batch` request(s).</value>
47+
[JsonPropertyName("batchResponses")]
48+
public List<BatchResponse> BatchResponses { get; set; }
49+
50+
/// <summary>
51+
/// Gets or Sets MoveOperationResponse
52+
/// </summary>
53+
[JsonPropertyName("moveOperationResponse")]
54+
public UpdatedAtResponse MoveOperationResponse { get; set; }
55+
56+
/// <summary>
57+
/// Returns the string presentation of the object
58+
/// </summary>
59+
/// <returns>String presentation of the object</returns>
60+
public override string ToString()
61+
{
62+
StringBuilder sb = new StringBuilder();
63+
sb.Append("class ReplaceAllObjectsResponse {\n");
64+
sb.Append(" CopyOperationResponse: ").Append(CopyOperationResponse).Append("\n");
65+
sb.Append(" BatchResponses: ").Append(BatchResponses).Append("\n");
66+
sb.Append(" MoveOperationResponse: ").Append(MoveOperationResponse).Append("\n");
67+
sb.Append("}\n");
68+
return sb.ToString();
69+
}
70+
71+
/// <summary>
72+
/// Returns the JSON string presentation of the object
73+
/// </summary>
74+
/// <returns>JSON string presentation of the object</returns>
75+
public virtual string ToJson()
76+
{
77+
return JsonSerializer.Serialize(this, JsonConfig.Options);
78+
}
79+
80+
/// <summary>
81+
/// Returns true if objects are equal
82+
/// </summary>
83+
/// <param name="obj">Object to be compared</param>
84+
/// <returns>Boolean</returns>
85+
public override bool Equals(object obj)
86+
{
87+
if (obj is not ReplaceAllObjectsResponse input)
88+
{
89+
return false;
90+
}
91+
92+
return
93+
(CopyOperationResponse == input.CopyOperationResponse || (CopyOperationResponse != null && CopyOperationResponse.Equals(input.CopyOperationResponse))) &&
94+
(BatchResponses == input.BatchResponses || BatchResponses != null && input.BatchResponses != null && BatchResponses.SequenceEqual(input.BatchResponses)) &&
95+
(MoveOperationResponse == input.MoveOperationResponse || (MoveOperationResponse != null && MoveOperationResponse.Equals(input.MoveOperationResponse)));
96+
}
97+
98+
/// <summary>
99+
/// Gets the hash code
100+
/// </summary>
101+
/// <returns>Hash code</returns>
102+
public override int GetHashCode()
103+
{
104+
unchecked // Overflow is fine, just wrap
105+
{
106+
int hashCode = 41;
107+
if (CopyOperationResponse != null)
108+
{
109+
hashCode = (hashCode * 59) + CopyOperationResponse.GetHashCode();
110+
}
111+
if (BatchResponses != null)
112+
{
113+
hashCode = (hashCode * 59) + BatchResponses.GetHashCode();
114+
}
115+
if (MoveOperationResponse != null)
116+
{
117+
hashCode = (hashCode * 59) + MoveOperationResponse.GetHashCode();
118+
}
119+
return hashCode;
120+
}
121+
}
122+
123+
}
124+

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export 'src/model/base_index_settings.dart';
2121
export 'src/model/base_search_params.dart';
2222
export 'src/model/base_search_params_without_query.dart';
2323
export 'src/model/base_search_response.dart';
24+
export 'src/model/batch_response.dart';
2425
export 'src/model/browse_params_object.dart';
2526
export 'src/model/browse_response.dart';
2627
export 'src/model/built_in_operation.dart';
@@ -70,6 +71,7 @@ export 'src/model/redirect_rule_index_metadata.dart';
7071
export 'src/model/redirect_rule_index_metadata_data.dart';
7172
export 'src/model/remove_words_if_no_results.dart';
7273
export 'src/model/rendering_content.dart';
74+
export 'src/model/replace_all_objects_response.dart';
7375
export 'src/model/rule.dart';
7476
export 'src/model/scope_type.dart';
7577
export 'src/model/search_dictionary_entries_response.dart';
@@ -101,6 +103,7 @@ export 'src/model/synonym_type.dart';
101103
export 'src/model/task_status.dart';
102104
export 'src/model/time_range.dart';
103105
export 'src/model/typo_tolerance_enum.dart';
106+
export 'src/model/updated_at_response.dart';
104107
export 'src/model/updated_rule_response.dart';
105108
export 'src/model/user_id.dart';
106109
export 'src/model/value.dart';

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import 'package:algoliasearch/src/model/base_index_settings.dart';
1414
import 'package:algoliasearch/src/model/base_search_params.dart';
1515
import 'package:algoliasearch/src/model/base_search_params_without_query.dart';
1616
import 'package:algoliasearch/src/model/base_search_response.dart';
17+
import 'package:algoliasearch/src/model/batch_response.dart';
1718
import 'package:algoliasearch/src/model/browse_params_object.dart';
1819
import 'package:algoliasearch/src/model/browse_response.dart';
1920
import 'package:algoliasearch/src/model/built_in_operation.dart';
@@ -63,6 +64,7 @@ import 'package:algoliasearch/src/model/redirect_rule_index_metadata.dart';
6364
import 'package:algoliasearch/src/model/redirect_rule_index_metadata_data.dart';
6465
import 'package:algoliasearch/src/model/remove_words_if_no_results.dart';
6566
import 'package:algoliasearch/src/model/rendering_content.dart';
67+
import 'package:algoliasearch/src/model/replace_all_objects_response.dart';
6668
import 'package:algoliasearch/src/model/rule.dart';
6769
import 'package:algoliasearch/src/model/scope_type.dart';
6870
import 'package:algoliasearch/src/model/search_dictionary_entries_response.dart';
@@ -94,6 +96,7 @@ import 'package:algoliasearch/src/model/synonym_type.dart';
9496
import 'package:algoliasearch/src/model/task_status.dart';
9597
import 'package:algoliasearch/src/model/time_range.dart';
9698
import 'package:algoliasearch/src/model/typo_tolerance_enum.dart';
99+
import 'package:algoliasearch/src/model/updated_at_response.dart';
97100
import 'package:algoliasearch/src/model/updated_rule_response.dart';
98101
import 'package:algoliasearch/src/model/user_id.dart';
99102
import 'package:algoliasearch/src/model/value.dart';
@@ -157,6 +160,9 @@ ReturnType deserialize<ReturnType, BaseType>(dynamic value, String targetType,
157160
case 'BaseSearchResponse':
158161
return BaseSearchResponse.fromJson(value as Map<String, dynamic>)
159162
as ReturnType;
163+
case 'BatchResponse':
164+
return BatchResponse.fromJson(value as Map<String, dynamic>)
165+
as ReturnType;
160166
case 'BrowseParamsObject':
161167
return BrowseParamsObject.fromJson(value as Map<String, dynamic>)
162168
as ReturnType;
@@ -277,6 +283,9 @@ ReturnType deserialize<ReturnType, BaseType>(dynamic value, String targetType,
277283
case 'RenderingContent':
278284
return RenderingContent.fromJson(value as Map<String, dynamic>)
279285
as ReturnType;
286+
case 'ReplaceAllObjectsResponse':
287+
return ReplaceAllObjectsResponse.fromJson(value as Map<String, dynamic>)
288+
as ReturnType;
280289
case 'Rule':
281290
return Rule.fromJson(value as Map<String, dynamic>) as ReturnType;
282291
case 'ScopeType':
@@ -356,6 +365,9 @@ ReturnType deserialize<ReturnType, BaseType>(dynamic value, String targetType,
356365
return TimeRange.fromJson(value as Map<String, dynamic>) as ReturnType;
357366
case 'TypoToleranceEnum':
358367
return TypoToleranceEnum.fromJson(value) as ReturnType;
368+
case 'UpdatedAtResponse':
369+
return UpdatedAtResponse.fromJson(value as Map<String, dynamic>)
370+
as ReturnType;
359371
case 'UpdatedRuleResponse':
360372
return UpdatedRuleResponse.fromJson(value as Map<String, dynamic>)
361373
as ReturnType;
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// 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.
2+
// ignore_for_file: unused_element
3+
4+
import 'package:json_annotation/json_annotation.dart';
5+
6+
part 'batch_response.g.dart';
7+
8+
@JsonSerializable()
9+
final class BatchResponse {
10+
/// Returns a new [BatchResponse] instance.
11+
const BatchResponse({
12+
required this.taskID,
13+
required this.objectIDs,
14+
});
15+
16+
/// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`.
17+
@JsonKey(name: r'taskID')
18+
final int taskID;
19+
20+
/// Unique record identifiers.
21+
@JsonKey(name: r'objectIDs')
22+
final List<String> objectIDs;
23+
24+
@override
25+
bool operator ==(Object other) =>
26+
identical(this, other) ||
27+
other is BatchResponse &&
28+
other.taskID == taskID &&
29+
other.objectIDs == objectIDs;
30+
31+
@override
32+
int get hashCode => taskID.hashCode + objectIDs.hashCode;
33+
34+
factory BatchResponse.fromJson(Map<String, dynamic> json) =>
35+
_$BatchResponseFromJson(json);
36+
37+
Map<String, dynamic> toJson() => _$BatchResponseToJson(this);
38+
39+
@override
40+
String toString() {
41+
return toJson().toString();
42+
}
43+
}

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

Lines changed: 27 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
// 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.
2+
// ignore_for_file: unused_element
3+
import 'package:algoliasearch/src/model/updated_at_response.dart';
4+
import 'package:algoliasearch/src/model/batch_response.dart';
5+
6+
import 'package:json_annotation/json_annotation.dart';
7+
8+
part 'replace_all_objects_response.g.dart';
9+
10+
@JsonSerializable()
11+
final class ReplaceAllObjectsResponse {
12+
/// Returns a new [ReplaceAllObjectsResponse] instance.
13+
const ReplaceAllObjectsResponse({
14+
required this.copyOperationResponse,
15+
required this.batchResponses,
16+
required this.moveOperationResponse,
17+
});
18+
19+
@JsonKey(name: r'copyOperationResponse')
20+
final UpdatedAtResponse copyOperationResponse;
21+
22+
/// The response of the `batch` request(s).
23+
@JsonKey(name: r'batchResponses')
24+
final List<BatchResponse> batchResponses;
25+
26+
@JsonKey(name: r'moveOperationResponse')
27+
final UpdatedAtResponse moveOperationResponse;
28+
29+
@override
30+
bool operator ==(Object other) =>
31+
identical(this, other) ||
32+
other is ReplaceAllObjectsResponse &&
33+
other.copyOperationResponse == copyOperationResponse &&
34+
other.batchResponses == batchResponses &&
35+
other.moveOperationResponse == moveOperationResponse;
36+
37+
@override
38+
int get hashCode =>
39+
copyOperationResponse.hashCode +
40+
batchResponses.hashCode +
41+
moveOperationResponse.hashCode;
42+
43+
factory ReplaceAllObjectsResponse.fromJson(Map<String, dynamic> json) =>
44+
_$ReplaceAllObjectsResponseFromJson(json);
45+
46+
Map<String, dynamic> toJson() => _$ReplaceAllObjectsResponseToJson(this);
47+
48+
@override
49+
String toString() {
50+
return toJson().toString();
51+
}
52+
}

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

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

0 commit comments

Comments
 (0)