Skip to content

Commit a11e02e

Browse files
fix(specs): make optional for tasks [skip-bc] (#4095) (generated) [skip ci]
Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 85a10bd commit a11e02e

File tree

22 files changed

+82
-74
lines changed

22 files changed

+82
-74
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,13 @@ public IngestionTask() { }
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>
3636
/// <param name="enabled">Whether the task is enabled. (required) (default to true).</param>
37-
/// <param name="action">action (required).</param>
3837
/// <param name="createdAt">Date of creation in RFC 3339 format. (required).</param>
39-
public IngestionTask(string taskID, string sourceID, string destinationID, bool enabled, ActionType? action, string createdAt)
38+
public IngestionTask(string taskID, string sourceID, string destinationID, bool enabled, string createdAt)
4039
{
4140
TaskID = taskID ?? throw new ArgumentNullException(nameof(taskID));
4241
SourceID = sourceID ?? throw new ArgumentNullException(nameof(sourceID));
4342
DestinationID = destinationID ?? throw new ArgumentNullException(nameof(destinationID));
4443
Enabled = enabled;
45-
Action = action;
4644
CreatedAt = createdAt ?? throw new ArgumentNullException(nameof(createdAt));
4745
}
4846

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,14 @@ public TaskV1() { }
3535
/// <param name="destinationID">Universally unique identifier (UUID) of a destination resource. (required).</param>
3636
/// <param name="trigger">trigger (required).</param>
3737
/// <param name="enabled">Whether the task is enabled. (required) (default to true).</param>
38-
/// <param name="action">action (required).</param>
3938
/// <param name="createdAt">Date of creation in RFC 3339 format. (required).</param>
40-
public TaskV1(string taskID, string sourceID, string destinationID, Trigger trigger, bool enabled, ActionType? action, string createdAt)
39+
public TaskV1(string taskID, string sourceID, string destinationID, Trigger trigger, bool enabled, 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));
4544
Trigger = trigger ?? throw new ArgumentNullException(nameof(trigger));
4645
Enabled = enabled;
47-
Action = action;
4846
CreatedAt = createdAt ?? throw new ArgumentNullException(nameof(createdAt));
4947
}
5048

clients/algoliasearch-client-go/algolia/ingestion/model_task.go

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

clients/algoliasearch-client-go/algolia/ingestion/model_task_v1.go

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

clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/ingestion/Task.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public Task setAction(ActionType action) {
157157
}
158158

159159
/** Get action */
160-
@javax.annotation.Nonnull
160+
@javax.annotation.Nullable
161161
public ActionType getAction() {
162162
return action;
163163
}

clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/ingestion/TaskV1.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public TaskV1 setAction(ActionType action) {
134134
}
135135

136136
/** Get action */
137-
@javax.annotation.Nonnull
137+
@javax.annotation.Nullable
138138
public ActionType getAction() {
139139
return action;
140140
}

clients/algoliasearch-client-javascript/packages/ingestion/model/task.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export type Task = {
4646
*/
4747
failureThreshold?: number;
4848

49-
action: ActionType;
49+
action?: ActionType;
5050

5151
/**
5252
* Date of the last cursor in RFC 3339 format.

clients/algoliasearch-client-javascript/packages/ingestion/model/taskV1.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export type TaskV1 = {
3737
*/
3838
failureThreshold?: number;
3939

40-
action: ActionType;
40+
action?: ActionType;
4141

4242
/**
4343
* Date of the last cursor in RFC 3339 format.

clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/ingestion/Task.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ import kotlinx.serialization.json.*
1111
* @param sourceID Universally uniqud identifier (UUID) of a source.
1212
* @param destinationID Universally unique identifier (UUID) of a destination resource.
1313
* @param enabled Whether the task is enabled.
14-
* @param action
1514
* @param createdAt Date of creation in RFC 3339 format.
1615
* @param cron Cron expression for the task's schedule.
1716
* @param lastRun The last time the scheduled task ran in RFC 3339 format.
1817
* @param nextRun The next scheduled run of the task in RFC 3339 format.
1918
* @param input
2019
* @param failureThreshold Maximum accepted percentage of failures for a task run to finish successfully.
20+
* @param action
2121
* @param cursor Date of the last cursor in RFC 3339 format.
2222
* @param updatedAt Date of last update in RFC 3339 format.
2323
*/
@@ -36,8 +36,6 @@ public data class Task(
3636
/** Whether the task is enabled. */
3737
@SerialName(value = "enabled") val enabled: Boolean,
3838

39-
@SerialName(value = "action") val action: ActionType,
40-
4139
/** Date of creation in RFC 3339 format. */
4240
@SerialName(value = "createdAt") val createdAt: String,
4341

@@ -55,6 +53,8 @@ public data class Task(
5553
/** Maximum accepted percentage of failures for a task run to finish successfully. */
5654
@SerialName(value = "failureThreshold") val failureThreshold: Int? = null,
5755

56+
@SerialName(value = "action") val action: ActionType? = null,
57+
5858
/** Date of the last cursor in RFC 3339 format. */
5959
@SerialName(value = "cursor") val cursor: String? = null,
6060

clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/ingestion/TaskV1.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ import kotlinx.serialization.json.*
1212
* @param destinationID Universally unique identifier (UUID) of a destination resource.
1313
* @param trigger
1414
* @param enabled Whether the task is enabled.
15-
* @param action
1615
* @param createdAt Date of creation in RFC 3339 format.
1716
* @param input
1817
* @param failureThreshold Maximum accepted percentage of failures for a task run to finish successfully.
18+
* @param action
1919
* @param cursor Date of the last cursor in RFC 3339 format.
2020
* @param updatedAt Date of last update in RFC 3339 format.
2121
*/
@@ -37,8 +37,6 @@ public data class TaskV1(
3737
/** Whether the task is enabled. */
3838
@SerialName(value = "enabled") val enabled: Boolean,
3939

40-
@SerialName(value = "action") val action: ActionType,
41-
4240
/** Date of creation in RFC 3339 format. */
4341
@SerialName(value = "createdAt") val createdAt: String,
4442

@@ -47,6 +45,8 @@ public data class TaskV1(
4745
/** Maximum accepted percentage of failures for a task run to finish successfully. */
4846
@SerialName(value = "failureThreshold") val failureThreshold: Int? = null,
4947

48+
@SerialName(value = "action") val action: ActionType? = null,
49+
5050
/** Date of the last cursor in RFC 3339 format. */
5151
@SerialName(value = "cursor") val cursor: String? = null,
5252

clients/algoliasearch-client-php/lib/Model/Ingestion/Task.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,6 @@ public function listInvalidProperties()
247247
if (!isset($this->container['enabled']) || null === $this->container['enabled']) {
248248
$invalidProperties[] = "'enabled' can't be null";
249249
}
250-
if (!isset($this->container['action']) || null === $this->container['action']) {
251-
$invalidProperties[] = "'action' can't be null";
252-
}
253250
if (!isset($this->container['createdAt']) || null === $this->container['createdAt']) {
254251
$invalidProperties[] = "'createdAt' can't be null";
255252
}
@@ -487,7 +484,7 @@ public function setFailureThreshold($failureThreshold)
487484
/**
488485
* Gets action.
489486
*
490-
* @return ActionType
487+
* @return null|ActionType
491488
*/
492489
public function getAction()
493490
{
@@ -497,7 +494,7 @@ public function getAction()
497494
/**
498495
* Sets action.
499496
*
500-
* @param ActionType $action action
497+
* @param null|ActionType $action action
501498
*
502499
* @return self
503500
*/

clients/algoliasearch-client-php/lib/Model/Ingestion/TaskV1.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,6 @@ public function listInvalidProperties()
236236
if (!isset($this->container['enabled']) || null === $this->container['enabled']) {
237237
$invalidProperties[] = "'enabled' can't be null";
238238
}
239-
if (!isset($this->container['action']) || null === $this->container['action']) {
240-
$invalidProperties[] = "'action' can't be null";
241-
}
242239
if (!isset($this->container['createdAt']) || null === $this->container['createdAt']) {
243240
$invalidProperties[] = "'createdAt' can't be null";
244241
}
@@ -428,7 +425,7 @@ public function setFailureThreshold($failureThreshold)
428425
/**
429426
* Gets action.
430427
*
431-
* @return ActionType
428+
* @return null|ActionType
432429
*/
433430
public function getAction()
434431
{
@@ -438,7 +435,7 @@ public function getAction()
438435
/**
439436
* Sets action.
440437
*
441-
* @param ActionType $action action
438+
* @param null|ActionType $action action
442439
*
443440
* @return self
444441
*/

clients/algoliasearch-client-python/algoliasearch/ingestion/models/task.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class Task(BaseModel):
6464
""" Whether the task is enabled. """
6565
failure_threshold: Optional[int] = None
6666
""" Maximum accepted percentage of failures for a task run to finish successfully. """
67-
action: ActionType
67+
action: Optional[ActionType] = None
6868
cursor: Optional[str] = None
6969
""" Date of the last cursor in RFC 3339 format. """
7070
created_at: str

clients/algoliasearch-client-python/algoliasearch/ingestion/models/task_v1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class TaskV1(BaseModel):
5858
""" Whether the task is enabled. """
5959
failure_threshold: Optional[int] = None
6060
""" Maximum accepted percentage of failures for a task run to finish successfully. """
61-
action: ActionType
61+
action: Optional[ActionType] = None
6262
cursor: Optional[str] = None
6363
""" Date of the last cursor in RFC 3339 format. """
6464
created_at: str

0 commit comments

Comments
 (0)