Skip to content

Commit 0b5cf44

Browse files
feat(javascript): add replaceAllObjectsWithTransformation (#5008) (generated) [skip ci]
Co-authored-by: Clément Vannicatte <[email protected]>
1 parent a2ebbf4 commit 0b5cf44

File tree

28 files changed

+2316
-8
lines changed

28 files changed

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

clients/algoliasearch-client-dart/packages/client_search/lib/algolia_client_search.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ export 'src/model/remove_user_id_response.dart';
112112
export 'src/model/remove_words_if_no_results.dart';
113113
export 'src/model/rendering_content.dart';
114114
export 'src/model/replace_all_objects_response.dart';
115+
export 'src/model/replace_all_objects_with_transformation_response.dart';
115116
export 'src/model/replace_source_response.dart';
116117
export 'src/model/rule.dart';
117118
export 'src/model/save_object_response.dart';

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ import 'package:algolia_client_search/src/model/remove_user_id_response.dart';
105105
import 'package:algolia_client_search/src/model/remove_words_if_no_results.dart';
106106
import 'package:algolia_client_search/src/model/rendering_content.dart';
107107
import 'package:algolia_client_search/src/model/replace_all_objects_response.dart';
108+
import 'package:algolia_client_search/src/model/replace_all_objects_with_transformation_response.dart';
108109
import 'package:algolia_client_search/src/model/replace_source_response.dart';
109110
import 'package:algolia_client_search/src/model/rule.dart';
110111
import 'package:algolia_client_search/src/model/save_object_response.dart';
@@ -450,6 +451,9 @@ ReturnType deserialize<ReturnType, BaseType>(dynamic value, String targetType,
450451
case 'ReplaceAllObjectsResponse':
451452
return ReplaceAllObjectsResponse.fromJson(value as Map<String, dynamic>)
452453
as ReturnType;
454+
case 'ReplaceAllObjectsWithTransformationResponse':
455+
return ReplaceAllObjectsWithTransformationResponse.fromJson(
456+
value as Map<String, dynamic>) as ReturnType;
453457
case 'ReplaceSourceResponse':
454458
return ReplaceSourceResponse.fromJson(value as Map<String, dynamic>)
455459
as ReturnType;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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:algolia_client_search/src/model/updated_at_response.dart';
4+
import 'package:algolia_client_search/src/model/watch_response.dart';
5+
6+
import 'package:json_annotation/json_annotation.dart';
7+
8+
part 'replace_all_objects_with_transformation_response.g.dart';
9+
10+
@JsonSerializable()
11+
final class ReplaceAllObjectsWithTransformationResponse {
12+
/// Returns a new [ReplaceAllObjectsWithTransformationResponse] instance.
13+
const ReplaceAllObjectsWithTransformationResponse({
14+
required this.copyOperationResponse,
15+
required this.watchResponses,
16+
required this.moveOperationResponse,
17+
});
18+
19+
@JsonKey(name: r'copyOperationResponse')
20+
final UpdatedAtResponse copyOperationResponse;
21+
22+
/// The response of the `push` request(s).
23+
@JsonKey(name: r'watchResponses')
24+
final List<WatchResponse> watchResponses;
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 ReplaceAllObjectsWithTransformationResponse &&
33+
other.copyOperationResponse == copyOperationResponse &&
34+
other.watchResponses == watchResponses &&
35+
other.moveOperationResponse == moveOperationResponse;
36+
37+
@override
38+
int get hashCode =>
39+
copyOperationResponse.hashCode +
40+
watchResponses.hashCode +
41+
moveOperationResponse.hashCode;
42+
43+
factory ReplaceAllObjectsWithTransformationResponse.fromJson(
44+
Map<String, dynamic> json) =>
45+
_$ReplaceAllObjectsWithTransformationResponseFromJson(json);
46+
47+
Map<String, dynamic> toJson() =>
48+
_$ReplaceAllObjectsWithTransformationResponseToJson(this);
49+
50+
@override
51+
String toString() {
52+
return toJson().toString();
53+
}
54+
}

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

Lines changed: 38 additions & 0 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_replace_all_objects_with_transformation_response.go

Lines changed: 128 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)