Skip to content

Commit 0fd12dd

Browse files
feat(javascript): add replaceAllObjectsWithTransformation (generated)
algolia/api-clients-automation#5008 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 9021c51 commit 0fd12dd

File tree

1 file changed

+143
-0
lines changed

1 file changed

+143
-0
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+
}

0 commit comments

Comments
 (0)