Skip to content

Commit 4b6c73b

Browse files
algolia-botmillotp
andcommitted
Merge branch 'main' into feat/task-email (generated)
Co-authored-by: Pierre Millot <[email protected]>
1 parent 441a31e commit 4b6c73b

File tree

94 files changed

+4044
-78
lines changed

Some content is hidden

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

94 files changed

+4044
-78
lines changed

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,6 +1139,7 @@ public interface IIngestionClient
11391139
/// <param name="sourceType">Filters the tasks with the specified source type. (optional)</param>
11401140
/// <param name="destinationID">Destination IDs for filtering the list of tasks. (optional)</param>
11411141
/// <param name="triggerType">Type of task trigger for filtering the list of tasks. (optional)</param>
1142+
/// <param name="withEmailNotifications">If specified, the response only includes tasks with notifications.email.enabled set to this value. (optional)</param>
11421143
/// <param name="sort">Property by which to sort the list of tasks. (optional)</param>
11431144
/// <param name="order">Sort order of the response, ascending or descending. (optional)</param>
11441145
/// <param name="options">Add extra http header or query parameters to Algolia.</param>
@@ -1147,7 +1148,7 @@ public interface IIngestionClient
11471148
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
11481149
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
11491150
/// <returns>Task of ListTasksResponse</returns>
1150-
Task<ListTasksResponse> ListTasksAsync(int? itemsPerPage = default, int? page = default, List<ActionType> action = default, bool? enabled = default, List<string> sourceID = default, List<SourceType> sourceType = default, List<string> destinationID = default, List<TriggerType> triggerType = default, TaskSortKeys? sort = default, OrderKeys? order = default, RequestOptions options = null, CancellationToken cancellationToken = default);
1151+
Task<ListTasksResponse> ListTasksAsync(int? itemsPerPage = default, int? page = default, List<ActionType> action = default, bool? enabled = default, List<string> sourceID = default, List<SourceType> sourceType = default, List<string> destinationID = default, List<TriggerType> triggerType = default, bool? withEmailNotifications = default, TaskSortKeys? sort = default, OrderKeys? order = default, RequestOptions options = null, CancellationToken cancellationToken = default);
11511152

11521153
/// <summary>
11531154
/// Retrieves a list of tasks. (Synchronous version)
@@ -1165,6 +1166,7 @@ public interface IIngestionClient
11651166
/// <param name="sourceType">Filters the tasks with the specified source type. (optional)</param>
11661167
/// <param name="destinationID">Destination IDs for filtering the list of tasks. (optional)</param>
11671168
/// <param name="triggerType">Type of task trigger for filtering the list of tasks. (optional)</param>
1169+
/// <param name="withEmailNotifications">If specified, the response only includes tasks with notifications.email.enabled set to this value. (optional)</param>
11681170
/// <param name="sort">Property by which to sort the list of tasks. (optional)</param>
11691171
/// <param name="order">Sort order of the response, ascending or descending. (optional)</param>
11701172
/// <param name="options">Add extra http header or query parameters to Algolia.</param>
@@ -1173,7 +1175,7 @@ public interface IIngestionClient
11731175
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
11741176
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
11751177
/// <returns>ListTasksResponse</returns>
1176-
ListTasksResponse ListTasks(int? itemsPerPage = default, int? page = default, List<ActionType> action = default, bool? enabled = default, List<string> sourceID = default, List<SourceType> sourceType = default, List<string> destinationID = default, List<TriggerType> triggerType = default, TaskSortKeys? sort = default, OrderKeys? order = default, RequestOptions options = null, CancellationToken cancellationToken = default);
1178+
ListTasksResponse ListTasks(int? itemsPerPage = default, int? page = default, List<ActionType> action = default, bool? enabled = default, List<string> sourceID = default, List<SourceType> sourceType = default, List<string> destinationID = default, List<TriggerType> triggerType = default, bool? withEmailNotifications = default, TaskSortKeys? sort = default, OrderKeys? order = default, RequestOptions options = null, CancellationToken cancellationToken = default);
11771179

11781180
/// <summary>
11791181
/// Retrieves a list of tasks using the v1 endpoint, please use `getTasks` instead.
@@ -2736,7 +2738,7 @@ public ListSourcesResponse ListSources(int? itemsPerPage = default, int? page =
27362738

27372739

27382740
/// <inheritdoc />
2739-
public async Task<ListTasksResponse> ListTasksAsync(int? itemsPerPage = default, int? page = default, List<ActionType> action = default, bool? enabled = default, List<string> sourceID = default, List<SourceType> sourceType = default, List<string> destinationID = default, List<TriggerType> triggerType = default, TaskSortKeys? sort = default, OrderKeys? order = default, RequestOptions options = null, CancellationToken cancellationToken = default)
2741+
public async Task<ListTasksResponse> ListTasksAsync(int? itemsPerPage = default, int? page = default, List<ActionType> action = default, bool? enabled = default, List<string> sourceID = default, List<SourceType> sourceType = default, List<string> destinationID = default, List<TriggerType> triggerType = default, bool? withEmailNotifications = default, TaskSortKeys? sort = default, OrderKeys? order = default, RequestOptions options = null, CancellationToken cancellationToken = default)
27402742
{
27412743
var requestOptions = new InternalRequestOptions(options);
27422744

@@ -2749,15 +2751,16 @@ public async Task<ListTasksResponse> ListTasksAsync(int? itemsPerPage = default,
27492751
requestOptions.AddQueryParameter("sourceType", sourceType);
27502752
requestOptions.AddQueryParameter("destinationID", destinationID);
27512753
requestOptions.AddQueryParameter("triggerType", triggerType);
2754+
requestOptions.AddQueryParameter("withEmailNotifications", withEmailNotifications);
27522755
requestOptions.AddQueryParameter("sort", sort);
27532756
requestOptions.AddQueryParameter("order", order);
27542757
return await _transport.ExecuteRequestAsync<ListTasksResponse>(new HttpMethod("GET"), "/2/tasks", requestOptions, cancellationToken).ConfigureAwait(false);
27552758
}
27562759

27572760

27582761
/// <inheritdoc />
2759-
public ListTasksResponse ListTasks(int? itemsPerPage = default, int? page = default, List<ActionType> action = default, bool? enabled = default, List<string> sourceID = default, List<SourceType> sourceType = default, List<string> destinationID = default, List<TriggerType> triggerType = default, TaskSortKeys? sort = default, OrderKeys? order = default, RequestOptions options = null, CancellationToken cancellationToken = default) =>
2760-
AsyncHelper.RunSync(() => ListTasksAsync(itemsPerPage, page, action, enabled, sourceID, sourceType, destinationID, triggerType, sort, order, options, cancellationToken));
2762+
public ListTasksResponse ListTasks(int? itemsPerPage = default, int? page = default, List<ActionType> action = default, bool? enabled = default, List<string> sourceID = default, List<SourceType> sourceType = default, List<string> destinationID = default, List<TriggerType> triggerType = default, bool? withEmailNotifications = default, TaskSortKeys? sort = default, OrderKeys? order = default, RequestOptions options = null, CancellationToken cancellationToken = default) =>
2763+
AsyncHelper.RunSync(() => ListTasksAsync(itemsPerPage, page, action, enabled, sourceID, sourceType, destinationID, triggerType, withEmailNotifications, sort, order, options, cancellationToken));
27612764

27622765

27632766
/// <inheritdoc />
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
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+
/// EmailNotifications
16+
/// </summary>
17+
public partial class EmailNotifications
18+
{
19+
/// <summary>
20+
/// Initializes a new instance of the EmailNotifications class.
21+
/// </summary>
22+
public EmailNotifications()
23+
{
24+
}
25+
26+
/// <summary>
27+
/// Whether to send email notifications, note that this doesn't prevent the task from being blocked.
28+
/// </summary>
29+
/// <value>Whether to send email notifications, note that this doesn't prevent the task from being blocked.</value>
30+
[JsonPropertyName("enabled")]
31+
public bool? Enabled { get; set; }
32+
33+
/// <summary>
34+
/// Returns the string presentation of the object
35+
/// </summary>
36+
/// <returns>String presentation of the object</returns>
37+
public override string ToString()
38+
{
39+
StringBuilder sb = new StringBuilder();
40+
sb.Append("class EmailNotifications {\n");
41+
sb.Append(" Enabled: ").Append(Enabled).Append("\n");
42+
sb.Append("}\n");
43+
return sb.ToString();
44+
}
45+
46+
/// <summary>
47+
/// Returns the JSON string presentation of the object
48+
/// </summary>
49+
/// <returns>JSON string presentation of the object</returns>
50+
public virtual string ToJson()
51+
{
52+
return JsonSerializer.Serialize(this, JsonConfig.Options);
53+
}
54+
55+
/// <summary>
56+
/// Returns true if objects are equal
57+
/// </summary>
58+
/// <param name="obj">Object to be compared</param>
59+
/// <returns>Boolean</returns>
60+
public override bool Equals(object obj)
61+
{
62+
if (obj is not EmailNotifications input)
63+
{
64+
return false;
65+
}
66+
67+
return
68+
(Enabled == input.Enabled || Enabled.Equals(input.Enabled));
69+
}
70+
71+
/// <summary>
72+
/// Gets the hash code
73+
/// </summary>
74+
/// <returns>Hash code</returns>
75+
public override int GetHashCode()
76+
{
77+
unchecked // Overflow is fine, just wrap
78+
{
79+
int hashCode = 41;
80+
hashCode = (hashCode * 59) + Enabled.GetHashCode();
81+
return hashCode;
82+
}
83+
}
84+
85+
}
86+

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,18 @@ public IngestionTask(string taskID, string sourceID, string destinationID, bool
113113
[JsonPropertyName("cursor")]
114114
public string Cursor { get; set; }
115115

116+
/// <summary>
117+
/// Gets or Sets Notifications
118+
/// </summary>
119+
[JsonPropertyName("notifications")]
120+
public Notifications Notifications { get; set; }
121+
122+
/// <summary>
123+
/// Gets or Sets Policies
124+
/// </summary>
125+
[JsonPropertyName("policies")]
126+
public Policies Policies { get; set; }
127+
116128
/// <summary>
117129
/// Date of creation in RFC 3339 format.
118130
/// </summary>
@@ -146,6 +158,8 @@ public override string ToString()
146158
sb.Append(" FailureThreshold: ").Append(FailureThreshold).Append("\n");
147159
sb.Append(" Action: ").Append(Action).Append("\n");
148160
sb.Append(" Cursor: ").Append(Cursor).Append("\n");
161+
sb.Append(" Notifications: ").Append(Notifications).Append("\n");
162+
sb.Append(" Policies: ").Append(Policies).Append("\n");
149163
sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n");
150164
sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n");
151165
sb.Append("}\n");
@@ -185,6 +199,8 @@ public override bool Equals(object obj)
185199
(FailureThreshold == input.FailureThreshold || FailureThreshold.Equals(input.FailureThreshold)) &&
186200
(Action == input.Action || Action.Equals(input.Action)) &&
187201
(Cursor == input.Cursor || (Cursor != null && Cursor.Equals(input.Cursor))) &&
202+
(Notifications == input.Notifications || (Notifications != null && Notifications.Equals(input.Notifications))) &&
203+
(Policies == input.Policies || (Policies != null && Policies.Equals(input.Policies))) &&
188204
(CreatedAt == input.CreatedAt || (CreatedAt != null && CreatedAt.Equals(input.CreatedAt))) &&
189205
(UpdatedAt == input.UpdatedAt || (UpdatedAt != null && UpdatedAt.Equals(input.UpdatedAt)));
190206
}
@@ -233,6 +249,14 @@ public override int GetHashCode()
233249
{
234250
hashCode = (hashCode * 59) + Cursor.GetHashCode();
235251
}
252+
if (Notifications != null)
253+
{
254+
hashCode = (hashCode * 59) + Notifications.GetHashCode();
255+
}
256+
if (Policies != null)
257+
{
258+
hashCode = (hashCode * 59) + Policies.GetHashCode();
259+
}
236260
if (CreatedAt != null)
237261
{
238262
hashCode = (hashCode * 59) + CreatedAt.GetHashCode();
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
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+
/// Notifications settings for a task.
16+
/// </summary>
17+
public partial class Notifications
18+
{
19+
/// <summary>
20+
/// Initializes a new instance of the Notifications class.
21+
/// </summary>
22+
[JsonConstructor]
23+
public Notifications() { }
24+
/// <summary>
25+
/// Initializes a new instance of the Notifications class.
26+
/// </summary>
27+
/// <param name="email">email (required).</param>
28+
public Notifications(EmailNotifications email)
29+
{
30+
Email = email ?? throw new ArgumentNullException(nameof(email));
31+
}
32+
33+
/// <summary>
34+
/// Gets or Sets Email
35+
/// </summary>
36+
[JsonPropertyName("email")]
37+
public EmailNotifications Email { get; set; }
38+
39+
/// <summary>
40+
/// Returns the string presentation of the object
41+
/// </summary>
42+
/// <returns>String presentation of the object</returns>
43+
public override string ToString()
44+
{
45+
StringBuilder sb = new StringBuilder();
46+
sb.Append("class Notifications {\n");
47+
sb.Append(" Email: ").Append(Email).Append("\n");
48+
sb.Append("}\n");
49+
return sb.ToString();
50+
}
51+
52+
/// <summary>
53+
/// Returns the JSON string presentation of the object
54+
/// </summary>
55+
/// <returns>JSON string presentation of the object</returns>
56+
public virtual string ToJson()
57+
{
58+
return JsonSerializer.Serialize(this, JsonConfig.Options);
59+
}
60+
61+
/// <summary>
62+
/// Returns true if objects are equal
63+
/// </summary>
64+
/// <param name="obj">Object to be compared</param>
65+
/// <returns>Boolean</returns>
66+
public override bool Equals(object obj)
67+
{
68+
if (obj is not Notifications input)
69+
{
70+
return false;
71+
}
72+
73+
return
74+
(Email == input.Email || (Email != null && Email.Equals(input.Email)));
75+
}
76+
77+
/// <summary>
78+
/// Gets the hash code
79+
/// </summary>
80+
/// <returns>Hash code</returns>
81+
public override int GetHashCode()
82+
{
83+
unchecked // Overflow is fine, just wrap
84+
{
85+
int hashCode = 41;
86+
if (Email != null)
87+
{
88+
hashCode = (hashCode * 59) + Email.GetHashCode();
89+
}
90+
return hashCode;
91+
}
92+
}
93+
94+
}
95+
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
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+
/// Set of rules for a task.
16+
/// </summary>
17+
public partial class Policies
18+
{
19+
/// <summary>
20+
/// Initializes a new instance of the Policies class.
21+
/// </summary>
22+
public Policies()
23+
{
24+
}
25+
26+
/// <summary>
27+
/// The number of critical failures in a row before blocking the task and sending a notification.
28+
/// </summary>
29+
/// <value>The number of critical failures in a row before blocking the task and sending a notification.</value>
30+
[JsonPropertyName("criticalThreshold")]
31+
public int? CriticalThreshold { get; set; }
32+
33+
/// <summary>
34+
/// Returns the string presentation of the object
35+
/// </summary>
36+
/// <returns>String presentation of the object</returns>
37+
public override string ToString()
38+
{
39+
StringBuilder sb = new StringBuilder();
40+
sb.Append("class Policies {\n");
41+
sb.Append(" CriticalThreshold: ").Append(CriticalThreshold).Append("\n");
42+
sb.Append("}\n");
43+
return sb.ToString();
44+
}
45+
46+
/// <summary>
47+
/// Returns the JSON string presentation of the object
48+
/// </summary>
49+
/// <returns>JSON string presentation of the object</returns>
50+
public virtual string ToJson()
51+
{
52+
return JsonSerializer.Serialize(this, JsonConfig.Options);
53+
}
54+
55+
/// <summary>
56+
/// Returns true if objects are equal
57+
/// </summary>
58+
/// <param name="obj">Object to be compared</param>
59+
/// <returns>Boolean</returns>
60+
public override bool Equals(object obj)
61+
{
62+
if (obj is not Policies input)
63+
{
64+
return false;
65+
}
66+
67+
return
68+
(CriticalThreshold == input.CriticalThreshold || CriticalThreshold.Equals(input.CriticalThreshold));
69+
}
70+
71+
/// <summary>
72+
/// Gets the hash code
73+
/// </summary>
74+
/// <returns>Hash code</returns>
75+
public override int GetHashCode()
76+
{
77+
unchecked // Overflow is fine, just wrap
78+
{
79+
int hashCode = 41;
80+
hashCode = (hashCode * 59) + CriticalThreshold.GetHashCode();
81+
return hashCode;
82+
}
83+
}
84+
85+
}
86+

0 commit comments

Comments
 (0)