Skip to content

Commit 316e90a

Browse files
chore: generated code for commit fe6f5ed. [skip ci]
Co-authored-by: Clément Vannicatte <[email protected]>
1 parent fe6f5ed commit 316e90a

File tree

114 files changed

+25683
-6397
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+25683
-6397
lines changed

clients/algoliasearch-client-csharp/algoliasearch/Clients/IngestionClient.cs

Lines changed: 1368 additions & 701 deletions
Large diffs are not rendered by default.

clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/IngestionTask.cs

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,14 @@ public IngestionTask() { }
3333
/// <param name="taskID">Universally unique identifier (UUID) of a task. (required).</param>
3434
/// <param name="sourceID">Universally uniqud identifier (UUID) of a source. (required).</param>
3535
/// <param name="destinationID">Universally unique identifier (UUID) of a destination resource. (required).</param>
36-
/// <param name="trigger">trigger (required).</param>
3736
/// <param name="enabled">Whether the task is enabled. (required) (default to true).</param>
3837
/// <param name="action">action (required).</param>
3938
/// <param name="createdAt">Date of creation in RFC 3339 format. (required).</param>
40-
public IngestionTask(string taskID, string sourceID, string destinationID, Trigger trigger, bool enabled, ActionType? action, string createdAt)
39+
public IngestionTask(string taskID, string sourceID, string destinationID, bool enabled, ActionType? action, string createdAt)
4140
{
4241
TaskID = taskID ?? throw new ArgumentNullException(nameof(taskID));
4342
SourceID = sourceID ?? throw new ArgumentNullException(nameof(sourceID));
4443
DestinationID = destinationID ?? throw new ArgumentNullException(nameof(destinationID));
45-
Trigger = trigger ?? throw new ArgumentNullException(nameof(trigger));
4644
Enabled = enabled;
4745
Action = action;
4846
CreatedAt = createdAt ?? throw new ArgumentNullException(nameof(createdAt));
@@ -70,10 +68,25 @@ public IngestionTask(string taskID, string sourceID, string destinationID, Trigg
7068
public string DestinationID { get; set; }
7169

7270
/// <summary>
73-
/// Gets or Sets Trigger
71+
/// Cron expression for the task's schedule.
7472
/// </summary>
75-
[JsonPropertyName("trigger")]
76-
public Trigger Trigger { get; set; }
73+
/// <value>Cron expression for the task's schedule.</value>
74+
[JsonPropertyName("cron")]
75+
public string Cron { get; set; }
76+
77+
/// <summary>
78+
/// The last time the scheduled task ran in RFC 3339 format.
79+
/// </summary>
80+
/// <value>The last time the scheduled task ran in RFC 3339 format.</value>
81+
[JsonPropertyName("lastRun")]
82+
public string LastRun { get; set; }
83+
84+
/// <summary>
85+
/// The next scheduled run of the task in RFC 3339 format.
86+
/// </summary>
87+
/// <value>The next scheduled run of the task in RFC 3339 format.</value>
88+
[JsonPropertyName("nextRun")]
89+
public string NextRun { get; set; }
7790

7891
/// <summary>
7992
/// Gets or Sets Input
@@ -127,7 +140,9 @@ public override string ToString()
127140
sb.Append(" TaskID: ").Append(TaskID).Append("\n");
128141
sb.Append(" SourceID: ").Append(SourceID).Append("\n");
129142
sb.Append(" DestinationID: ").Append(DestinationID).Append("\n");
130-
sb.Append(" Trigger: ").Append(Trigger).Append("\n");
143+
sb.Append(" Cron: ").Append(Cron).Append("\n");
144+
sb.Append(" LastRun: ").Append(LastRun).Append("\n");
145+
sb.Append(" NextRun: ").Append(NextRun).Append("\n");
131146
sb.Append(" Input: ").Append(Input).Append("\n");
132147
sb.Append(" Enabled: ").Append(Enabled).Append("\n");
133148
sb.Append(" FailureThreshold: ").Append(FailureThreshold).Append("\n");
@@ -164,7 +179,9 @@ public override bool Equals(object obj)
164179
(TaskID == input.TaskID || (TaskID != null && TaskID.Equals(input.TaskID))) &&
165180
(SourceID == input.SourceID || (SourceID != null && SourceID.Equals(input.SourceID))) &&
166181
(DestinationID == input.DestinationID || (DestinationID != null && DestinationID.Equals(input.DestinationID))) &&
167-
(Trigger == input.Trigger || (Trigger != null && Trigger.Equals(input.Trigger))) &&
182+
(Cron == input.Cron || (Cron != null && Cron.Equals(input.Cron))) &&
183+
(LastRun == input.LastRun || (LastRun != null && LastRun.Equals(input.LastRun))) &&
184+
(NextRun == input.NextRun || (NextRun != null && NextRun.Equals(input.NextRun))) &&
168185
(Input == input.Input || (Input != null && Input.Equals(input.Input))) &&
169186
(Enabled == input.Enabled || Enabled.Equals(input.Enabled)) &&
170187
(FailureThreshold == input.FailureThreshold || FailureThreshold.Equals(input.FailureThreshold)) &&
@@ -195,9 +212,17 @@ public override int GetHashCode()
195212
{
196213
hashCode = (hashCode * 59) + DestinationID.GetHashCode();
197214
}
198-
if (Trigger != null)
215+
if (Cron != null)
216+
{
217+
hashCode = (hashCode * 59) + Cron.GetHashCode();
218+
}
219+
if (LastRun != null)
220+
{
221+
hashCode = (hashCode * 59) + LastRun.GetHashCode();
222+
}
223+
if (NextRun != null)
199224
{
200-
hashCode = (hashCode * 59) + Trigger.GetHashCode();
225+
hashCode = (hashCode * 59) + NextRun.GetHashCode();
201226
}
202227
if (Input != null)
203228
{
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
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.Ingestion;
13+
14+
/// <summary>
15+
/// Configured tasks and pagination information.
16+
/// </summary>
17+
public partial class ListTasksResponseV1
18+
{
19+
/// <summary>
20+
/// Initializes a new instance of the ListTasksResponseV1 class.
21+
/// </summary>
22+
[JsonConstructor]
23+
public ListTasksResponseV1() { }
24+
/// <summary>
25+
/// Initializes a new instance of the ListTasksResponseV1 class.
26+
/// </summary>
27+
/// <param name="tasks">tasks (required).</param>
28+
/// <param name="pagination">pagination (required).</param>
29+
public ListTasksResponseV1(List<TaskV1> tasks, Pagination pagination)
30+
{
31+
Tasks = tasks ?? throw new ArgumentNullException(nameof(tasks));
32+
Pagination = pagination ?? throw new ArgumentNullException(nameof(pagination));
33+
}
34+
35+
/// <summary>
36+
/// Gets or Sets Tasks
37+
/// </summary>
38+
[JsonPropertyName("tasks")]
39+
public List<TaskV1> Tasks { get; set; }
40+
41+
/// <summary>
42+
/// Gets or Sets Pagination
43+
/// </summary>
44+
[JsonPropertyName("pagination")]
45+
public Pagination Pagination { get; set; }
46+
47+
/// <summary>
48+
/// Returns the string presentation of the object
49+
/// </summary>
50+
/// <returns>String presentation of the object</returns>
51+
public override string ToString()
52+
{
53+
StringBuilder sb = new StringBuilder();
54+
sb.Append("class ListTasksResponseV1 {\n");
55+
sb.Append(" Tasks: ").Append(Tasks).Append("\n");
56+
sb.Append(" Pagination: ").Append(Pagination).Append("\n");
57+
sb.Append("}\n");
58+
return sb.ToString();
59+
}
60+
61+
/// <summary>
62+
/// Returns the JSON string presentation of the object
63+
/// </summary>
64+
/// <returns>JSON string presentation of the object</returns>
65+
public virtual string ToJson()
66+
{
67+
return JsonSerializer.Serialize(this, JsonConfig.Options);
68+
}
69+
70+
/// <summary>
71+
/// Returns true if objects are equal
72+
/// </summary>
73+
/// <param name="obj">Object to be compared</param>
74+
/// <returns>Boolean</returns>
75+
public override bool Equals(object obj)
76+
{
77+
if (obj is not ListTasksResponseV1 input)
78+
{
79+
return false;
80+
}
81+
82+
return
83+
(Tasks == input.Tasks || Tasks != null && input.Tasks != null && Tasks.SequenceEqual(input.Tasks)) &&
84+
(Pagination == input.Pagination || (Pagination != null && Pagination.Equals(input.Pagination)));
85+
}
86+
87+
/// <summary>
88+
/// Gets the hash code
89+
/// </summary>
90+
/// <returns>Hash code</returns>
91+
public override int GetHashCode()
92+
{
93+
unchecked // Overflow is fine, just wrap
94+
{
95+
int hashCode = 41;
96+
if (Tasks != null)
97+
{
98+
hashCode = (hashCode * 59) + Tasks.GetHashCode();
99+
}
100+
if (Pagination != null)
101+
{
102+
hashCode = (hashCode * 59) + Pagination.GetHashCode();
103+
}
104+
return hashCode;
105+
}
106+
}
107+
108+
}
109+

clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/TaskCreate.cs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,11 @@ public TaskCreate() { }
3232
/// </summary>
3333
/// <param name="sourceID">Universally uniqud identifier (UUID) of a source. (required).</param>
3434
/// <param name="destinationID">Universally unique identifier (UUID) of a destination resource. (required).</param>
35-
/// <param name="trigger">trigger (required).</param>
3635
/// <param name="action">action (required).</param>
37-
public TaskCreate(string sourceID, string destinationID, TaskCreateTrigger trigger, ActionType? action)
36+
public TaskCreate(string sourceID, string destinationID, ActionType? action)
3837
{
3938
SourceID = sourceID ?? throw new ArgumentNullException(nameof(sourceID));
4039
DestinationID = destinationID ?? throw new ArgumentNullException(nameof(destinationID));
41-
Trigger = trigger ?? throw new ArgumentNullException(nameof(trigger));
4240
Action = action;
4341
}
4442

@@ -57,10 +55,11 @@ public TaskCreate(string sourceID, string destinationID, TaskCreateTrigger trigg
5755
public string DestinationID { get; set; }
5856

5957
/// <summary>
60-
/// Gets or Sets Trigger
58+
/// Cron expression for the task's schedule.
6159
/// </summary>
62-
[JsonPropertyName("trigger")]
63-
public TaskCreateTrigger Trigger { get; set; }
60+
/// <value>Cron expression for the task's schedule.</value>
61+
[JsonPropertyName("cron")]
62+
public string Cron { get; set; }
6463

6564
/// <summary>
6665
/// Whether the task is enabled.
@@ -99,8 +98,8 @@ public override string ToString()
9998
sb.Append("class TaskCreate {\n");
10099
sb.Append(" SourceID: ").Append(SourceID).Append("\n");
101100
sb.Append(" DestinationID: ").Append(DestinationID).Append("\n");
102-
sb.Append(" Trigger: ").Append(Trigger).Append("\n");
103101
sb.Append(" Action: ").Append(Action).Append("\n");
102+
sb.Append(" Cron: ").Append(Cron).Append("\n");
104103
sb.Append(" Enabled: ").Append(Enabled).Append("\n");
105104
sb.Append(" FailureThreshold: ").Append(FailureThreshold).Append("\n");
106105
sb.Append(" Input: ").Append(Input).Append("\n");
@@ -133,8 +132,8 @@ public override bool Equals(object obj)
133132
return
134133
(SourceID == input.SourceID || (SourceID != null && SourceID.Equals(input.SourceID))) &&
135134
(DestinationID == input.DestinationID || (DestinationID != null && DestinationID.Equals(input.DestinationID))) &&
136-
(Trigger == input.Trigger || (Trigger != null && Trigger.Equals(input.Trigger))) &&
137135
(Action == input.Action || Action.Equals(input.Action)) &&
136+
(Cron == input.Cron || (Cron != null && Cron.Equals(input.Cron))) &&
138137
(Enabled == input.Enabled || Enabled.Equals(input.Enabled)) &&
139138
(FailureThreshold == input.FailureThreshold || FailureThreshold.Equals(input.FailureThreshold)) &&
140139
(Input == input.Input || (Input != null && Input.Equals(input.Input))) &&
@@ -158,11 +157,11 @@ public override int GetHashCode()
158157
{
159158
hashCode = (hashCode * 59) + DestinationID.GetHashCode();
160159
}
161-
if (Trigger != null)
160+
hashCode = (hashCode * 59) + Action.GetHashCode();
161+
if (Cron != null)
162162
{
163-
hashCode = (hashCode * 59) + Trigger.GetHashCode();
163+
hashCode = (hashCode * 59) + Cron.GetHashCode();
164164
}
165-
hashCode = (hashCode * 59) + Action.GetHashCode();
166165
hashCode = (hashCode * 59) + Enabled.GetHashCode();
167166
hashCode = (hashCode * 59) + FailureThreshold.GetHashCode();
168167
if (Input != null)

0 commit comments

Comments
 (0)