Skip to content

Commit

Permalink
chore: generated code for commit 1dc0871. [skip ci]
Browse files Browse the repository at this point in the history
Co-authored-by: Clément Vannicatte <vannicattec@gmail.com>
  • Loading branch information
algolia-bot and shortcuts committed Jun 20, 2024
1 parent 1dc0871 commit 9cbe719
Show file tree
Hide file tree
Showing 23 changed files with 307 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@ public IngestionTask(string taskID, string sourceID, string destinationID, Trigg
[JsonPropertyName("failureThreshold")]
public int? FailureThreshold { get; set; }

/// <summary>
/// Date of the last cursor in RFC 3339 format.
/// </summary>
/// <value>Date of the last cursor in RFC 3339 format.</value>
[JsonPropertyName("cursor")]
public string Cursor { get; set; }

/// <summary>
/// Date of creation in RFC 3339 format.
/// </summary>
Expand Down Expand Up @@ -125,6 +132,7 @@ public override string ToString()
sb.Append(" Enabled: ").Append(Enabled).Append("\n");
sb.Append(" FailureThreshold: ").Append(FailureThreshold).Append("\n");
sb.Append(" Action: ").Append(Action).Append("\n");
sb.Append(" Cursor: ").Append(Cursor).Append("\n");
sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n");
sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n");
sb.Append("}\n");
Expand Down Expand Up @@ -161,6 +169,7 @@ public override bool Equals(object obj)
(Enabled == input.Enabled || Enabled.Equals(input.Enabled)) &&
(FailureThreshold == input.FailureThreshold || FailureThreshold.Equals(input.FailureThreshold)) &&
(Action == input.Action || Action.Equals(input.Action)) &&
(Cursor == input.Cursor || (Cursor != null && Cursor.Equals(input.Cursor))) &&
(CreatedAt == input.CreatedAt || (CreatedAt != null && CreatedAt.Equals(input.CreatedAt))) &&
(UpdatedAt == input.UpdatedAt || (UpdatedAt != null && UpdatedAt.Equals(input.UpdatedAt)));
}
Expand Down Expand Up @@ -197,6 +206,10 @@ public override int GetHashCode()
hashCode = (hashCode * 59) + Enabled.GetHashCode();
hashCode = (hashCode * 59) + FailureThreshold.GetHashCode();
hashCode = (hashCode * 59) + Action.GetHashCode();
if (Cursor != null)
{
hashCode = (hashCode * 59) + Cursor.GetHashCode();
}
if (CreatedAt != null)
{
hashCode = (hashCode * 59) + CreatedAt.GetHashCode();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ public TaskCreate(string sourceID, string destinationID, TaskCreateTrigger trigg
[JsonPropertyName("input")]
public TaskInput Input { get; set; }

/// <summary>
/// Date of the last cursor in RFC 3339 format.
/// </summary>
/// <value>Date of the last cursor in RFC 3339 format.</value>
[JsonPropertyName("cursor")]
public string Cursor { get; set; }

/// <summary>
/// Returns the string presentation of the object
/// </summary>
Expand All @@ -97,6 +104,7 @@ public override string ToString()
sb.Append(" Enabled: ").Append(Enabled).Append("\n");
sb.Append(" FailureThreshold: ").Append(FailureThreshold).Append("\n");
sb.Append(" Input: ").Append(Input).Append("\n");
sb.Append(" Cursor: ").Append(Cursor).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
Expand Down Expand Up @@ -129,7 +137,8 @@ public override bool Equals(object obj)
(Action == input.Action || Action.Equals(input.Action)) &&
(Enabled == input.Enabled || Enabled.Equals(input.Enabled)) &&
(FailureThreshold == input.FailureThreshold || FailureThreshold.Equals(input.FailureThreshold)) &&
(Input == input.Input || (Input != null && Input.Equals(input.Input)));
(Input == input.Input || (Input != null && Input.Equals(input.Input))) &&
(Cursor == input.Cursor || (Cursor != null && Cursor.Equals(input.Cursor)));
}

/// <summary>
Expand Down Expand Up @@ -160,6 +169,10 @@ public override int GetHashCode()
{
hashCode = (hashCode * 59) + Input.GetHashCode();
}
if (Cursor != null)
{
hashCode = (hashCode * 59) + Cursor.GetHashCode();
}
return hashCode;
}
}
Expand Down
45 changes: 45 additions & 0 deletions clients/algoliasearch-client-go/algolia/ingestion/model_task.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ public class Task {
@JsonProperty("action")
private ActionType action;

@JsonProperty("cursor")
private String cursor;

@JsonProperty("createdAt")
private String createdAt;

Expand Down Expand Up @@ -131,6 +134,17 @@ public ActionType getAction() {
return action;
}

public Task setCursor(String cursor) {
this.cursor = cursor;
return this;
}

/** Date of the last cursor in RFC 3339 format. */
@javax.annotation.Nullable
public String getCursor() {
return cursor;
}

public Task setCreatedAt(String createdAt) {
this.createdAt = createdAt;
return this;
Expand Down Expand Up @@ -171,14 +185,15 @@ public boolean equals(Object o) {
Objects.equals(this.enabled, task.enabled) &&
Objects.equals(this.failureThreshold, task.failureThreshold) &&
Objects.equals(this.action, task.action) &&
Objects.equals(this.cursor, task.cursor) &&
Objects.equals(this.createdAt, task.createdAt) &&
Objects.equals(this.updatedAt, task.updatedAt)
);
}

@Override
public int hashCode() {
return Objects.hash(taskID, sourceID, destinationID, trigger, input, enabled, failureThreshold, action, createdAt, updatedAt);
return Objects.hash(taskID, sourceID, destinationID, trigger, input, enabled, failureThreshold, action, cursor, createdAt, updatedAt);
}

@Override
Expand All @@ -193,6 +208,7 @@ public String toString() {
sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n");
sb.append(" failureThreshold: ").append(toIndentedString(failureThreshold)).append("\n");
sb.append(" action: ").append(toIndentedString(action)).append("\n");
sb.append(" cursor: ").append(toIndentedString(cursor)).append("\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
sb.append("}");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ public class TaskCreate {
@JsonProperty("input")
private TaskInput input;

@JsonProperty("cursor")
private String cursor;

public TaskCreate setSourceID(String sourceID) {
this.sourceID = sourceID;
return this;
Expand Down Expand Up @@ -111,6 +114,17 @@ public TaskInput getInput() {
return input;
}

public TaskCreate setCursor(String cursor) {
this.cursor = cursor;
return this;
}

/** Date of the last cursor in RFC 3339 format. */
@javax.annotation.Nullable
public String getCursor() {
return cursor;
}

@Override
public boolean equals(Object o) {
if (this == o) {
Expand All @@ -127,13 +141,14 @@ public boolean equals(Object o) {
Objects.equals(this.action, taskCreate.action) &&
Objects.equals(this.enabled, taskCreate.enabled) &&
Objects.equals(this.failureThreshold, taskCreate.failureThreshold) &&
Objects.equals(this.input, taskCreate.input)
Objects.equals(this.input, taskCreate.input) &&
Objects.equals(this.cursor, taskCreate.cursor)
);
}

@Override
public int hashCode() {
return Objects.hash(sourceID, destinationID, trigger, action, enabled, failureThreshold, input);
return Objects.hash(sourceID, destinationID, trigger, action, enabled, failureThreshold, input, cursor);
}

@Override
Expand All @@ -147,6 +162,7 @@ public String toString() {
sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n");
sb.append(" failureThreshold: ").append(toIndentedString(failureThreshold)).append("\n");
sb.append(" input: ").append(toIndentedString(input)).append("\n");
sb.append(" cursor: ").append(toIndentedString(cursor)).append("\n");
sb.append("}");
return sb.toString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ export type Task = {

action: ActionType;

/**
* Date of the last cursor in RFC 3339 format.
*/
cursor?: string;

/**
* Date of creation in RFC 3339 format.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,9 @@ export type TaskCreate = {
failureThreshold?: number;

input?: TaskInput;

/**
* Date of the last cursor in RFC 3339 format.
*/
cursor?: string;
};
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import kotlinx.serialization.json.*
* @param createdAt Date of creation in RFC 3339 format.
* @param input
* @param failureThreshold Maximum accepted percentage of failures for a task run to finish successfully.
* @param cursor Date of the last cursor in RFC 3339 format.
* @param updatedAt Date of last update in RFC 3339 format.
*/
@Serializable
Expand Down Expand Up @@ -45,6 +46,9 @@ public data class Task(
/** Maximum accepted percentage of failures for a task run to finish successfully. */
@SerialName(value = "failureThreshold") val failureThreshold: Int? = null,

/** Date of the last cursor in RFC 3339 format. */
@SerialName(value = "cursor") val cursor: String? = null,

/** Date of last update in RFC 3339 format. */
@SerialName(value = "updatedAt") val updatedAt: String? = null,
)
Loading

0 comments on commit 9cbe719

Please sign in to comment.