Skip to content

Commit

Permalink
chore: generated code for commit fe6f5ed. [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 Jul 24, 2024
1 parent fe6f5ed commit 316e90a
Show file tree
Hide file tree
Showing 114 changed files with 25,683 additions and 6,397 deletions.
2,069 changes: 1,368 additions & 701 deletions clients/algoliasearch-client-csharp/algoliasearch/Clients/IngestionClient.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,14 @@ public IngestionTask() { }
/// <param name="taskID">Universally unique identifier (UUID) of a task. (required).</param>
/// <param name="sourceID">Universally uniqud identifier (UUID) of a source. (required).</param>
/// <param name="destinationID">Universally unique identifier (UUID) of a destination resource. (required).</param>
/// <param name="trigger">trigger (required).</param>
/// <param name="enabled">Whether the task is enabled. (required) (default to true).</param>
/// <param name="action">action (required).</param>
/// <param name="createdAt">Date of creation in RFC 3339 format. (required).</param>
public IngestionTask(string taskID, string sourceID, string destinationID, Trigger trigger, bool enabled, ActionType? action, string createdAt)
public IngestionTask(string taskID, string sourceID, string destinationID, bool enabled, ActionType? action, string createdAt)
{
TaskID = taskID ?? throw new ArgumentNullException(nameof(taskID));
SourceID = sourceID ?? throw new ArgumentNullException(nameof(sourceID));
DestinationID = destinationID ?? throw new ArgumentNullException(nameof(destinationID));
Trigger = trigger ?? throw new ArgumentNullException(nameof(trigger));
Enabled = enabled;
Action = action;
CreatedAt = createdAt ?? throw new ArgumentNullException(nameof(createdAt));
Expand Down Expand Up @@ -70,10 +68,25 @@ public IngestionTask(string taskID, string sourceID, string destinationID, Trigg
public string DestinationID { get; set; }

/// <summary>
/// Gets or Sets Trigger
/// Cron expression for the task's schedule.
/// </summary>
[JsonPropertyName("trigger")]
public Trigger Trigger { get; set; }
/// <value>Cron expression for the task's schedule.</value>
[JsonPropertyName("cron")]
public string Cron { get; set; }

/// <summary>
/// The last time the scheduled task ran in RFC 3339 format.
/// </summary>
/// <value>The last time the scheduled task ran in RFC 3339 format.</value>
[JsonPropertyName("lastRun")]
public string LastRun { get; set; }

/// <summary>
/// The next scheduled run of the task in RFC 3339 format.
/// </summary>
/// <value>The next scheduled run of the task in RFC 3339 format.</value>
[JsonPropertyName("nextRun")]
public string NextRun { get; set; }

/// <summary>
/// Gets or Sets Input
Expand Down Expand Up @@ -127,7 +140,9 @@ public override string ToString()
sb.Append(" TaskID: ").Append(TaskID).Append("\n");
sb.Append(" SourceID: ").Append(SourceID).Append("\n");
sb.Append(" DestinationID: ").Append(DestinationID).Append("\n");
sb.Append(" Trigger: ").Append(Trigger).Append("\n");
sb.Append(" Cron: ").Append(Cron).Append("\n");
sb.Append(" LastRun: ").Append(LastRun).Append("\n");
sb.Append(" NextRun: ").Append(NextRun).Append("\n");
sb.Append(" Input: ").Append(Input).Append("\n");
sb.Append(" Enabled: ").Append(Enabled).Append("\n");
sb.Append(" FailureThreshold: ").Append(FailureThreshold).Append("\n");
Expand Down Expand Up @@ -164,7 +179,9 @@ public override bool Equals(object obj)
(TaskID == input.TaskID || (TaskID != null && TaskID.Equals(input.TaskID))) &&
(SourceID == input.SourceID || (SourceID != null && SourceID.Equals(input.SourceID))) &&
(DestinationID == input.DestinationID || (DestinationID != null && DestinationID.Equals(input.DestinationID))) &&
(Trigger == input.Trigger || (Trigger != null && Trigger.Equals(input.Trigger))) &&
(Cron == input.Cron || (Cron != null && Cron.Equals(input.Cron))) &&
(LastRun == input.LastRun || (LastRun != null && LastRun.Equals(input.LastRun))) &&
(NextRun == input.NextRun || (NextRun != null && NextRun.Equals(input.NextRun))) &&
(Input == input.Input || (Input != null && Input.Equals(input.Input))) &&
(Enabled == input.Enabled || Enabled.Equals(input.Enabled)) &&
(FailureThreshold == input.FailureThreshold || FailureThreshold.Equals(input.FailureThreshold)) &&
Expand Down Expand Up @@ -195,9 +212,17 @@ public override int GetHashCode()
{
hashCode = (hashCode * 59) + DestinationID.GetHashCode();
}
if (Trigger != null)
if (Cron != null)
{
hashCode = (hashCode * 59) + Cron.GetHashCode();
}
if (LastRun != null)
{
hashCode = (hashCode * 59) + LastRun.GetHashCode();
}
if (NextRun != null)
{
hashCode = (hashCode * 59) + Trigger.GetHashCode();
hashCode = (hashCode * 59) + NextRun.GetHashCode();
}
if (Input != null)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
//
// 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.
//
using System;
using System.Text;
using System.Linq;
using System.Text.Json.Serialization;
using System.Collections.Generic;
using Algolia.Search.Serializer;
using System.Text.Json;

namespace Algolia.Search.Models.Ingestion;

/// <summary>
/// Configured tasks and pagination information.
/// </summary>
public partial class ListTasksResponseV1
{
/// <summary>
/// Initializes a new instance of the ListTasksResponseV1 class.
/// </summary>
[JsonConstructor]
public ListTasksResponseV1() { }
/// <summary>
/// Initializes a new instance of the ListTasksResponseV1 class.
/// </summary>
/// <param name="tasks">tasks (required).</param>
/// <param name="pagination">pagination (required).</param>
public ListTasksResponseV1(List<TaskV1> tasks, Pagination pagination)
{
Tasks = tasks ?? throw new ArgumentNullException(nameof(tasks));
Pagination = pagination ?? throw new ArgumentNullException(nameof(pagination));
}

/// <summary>
/// Gets or Sets Tasks
/// </summary>
[JsonPropertyName("tasks")]
public List<TaskV1> Tasks { get; set; }

/// <summary>
/// Gets or Sets Pagination
/// </summary>
[JsonPropertyName("pagination")]
public Pagination Pagination { get; set; }

/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class ListTasksResponseV1 {\n");
sb.Append(" Tasks: ").Append(Tasks).Append("\n");
sb.Append(" Pagination: ").Append(Pagination).Append("\n");
sb.Append("}\n");
return sb.ToString();
}

/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public virtual string ToJson()
{
return JsonSerializer.Serialize(this, JsonConfig.Options);
}

/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="obj">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object obj)
{
if (obj is not ListTasksResponseV1 input)
{
return false;
}

return
(Tasks == input.Tasks || Tasks != null && input.Tasks != null && Tasks.SequenceEqual(input.Tasks)) &&
(Pagination == input.Pagination || (Pagination != null && Pagination.Equals(input.Pagination)));
}

/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (Tasks != null)
{
hashCode = (hashCode * 59) + Tasks.GetHashCode();
}
if (Pagination != null)
{
hashCode = (hashCode * 59) + Pagination.GetHashCode();
}
return hashCode;
}
}

}

Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,11 @@ public TaskCreate() { }
/// </summary>
/// <param name="sourceID">Universally uniqud identifier (UUID) of a source. (required).</param>
/// <param name="destinationID">Universally unique identifier (UUID) of a destination resource. (required).</param>
/// <param name="trigger">trigger (required).</param>
/// <param name="action">action (required).</param>
public TaskCreate(string sourceID, string destinationID, TaskCreateTrigger trigger, ActionType? action)
public TaskCreate(string sourceID, string destinationID, ActionType? action)
{
SourceID = sourceID ?? throw new ArgumentNullException(nameof(sourceID));
DestinationID = destinationID ?? throw new ArgumentNullException(nameof(destinationID));
Trigger = trigger ?? throw new ArgumentNullException(nameof(trigger));
Action = action;
}

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

/// <summary>
/// Gets or Sets Trigger
/// Cron expression for the task's schedule.
/// </summary>
[JsonPropertyName("trigger")]
public TaskCreateTrigger Trigger { get; set; }
/// <value>Cron expression for the task's schedule.</value>
[JsonPropertyName("cron")]
public string Cron { get; set; }

/// <summary>
/// Whether the task is enabled.
Expand Down Expand Up @@ -99,8 +98,8 @@ public override string ToString()
sb.Append("class TaskCreate {\n");
sb.Append(" SourceID: ").Append(SourceID).Append("\n");
sb.Append(" DestinationID: ").Append(DestinationID).Append("\n");
sb.Append(" Trigger: ").Append(Trigger).Append("\n");
sb.Append(" Action: ").Append(Action).Append("\n");
sb.Append(" Cron: ").Append(Cron).Append("\n");
sb.Append(" Enabled: ").Append(Enabled).Append("\n");
sb.Append(" FailureThreshold: ").Append(FailureThreshold).Append("\n");
sb.Append(" Input: ").Append(Input).Append("\n");
Expand Down Expand Up @@ -133,8 +132,8 @@ public override bool Equals(object obj)
return
(SourceID == input.SourceID || (SourceID != null && SourceID.Equals(input.SourceID))) &&
(DestinationID == input.DestinationID || (DestinationID != null && DestinationID.Equals(input.DestinationID))) &&
(Trigger == input.Trigger || (Trigger != null && Trigger.Equals(input.Trigger))) &&
(Action == input.Action || Action.Equals(input.Action)) &&
(Cron == input.Cron || (Cron != null && Cron.Equals(input.Cron))) &&
(Enabled == input.Enabled || Enabled.Equals(input.Enabled)) &&
(FailureThreshold == input.FailureThreshold || FailureThreshold.Equals(input.FailureThreshold)) &&
(Input == input.Input || (Input != null && Input.Equals(input.Input))) &&
Expand All @@ -158,11 +157,11 @@ public override int GetHashCode()
{
hashCode = (hashCode * 59) + DestinationID.GetHashCode();
}
if (Trigger != null)
hashCode = (hashCode * 59) + Action.GetHashCode();
if (Cron != null)
{
hashCode = (hashCode * 59) + Trigger.GetHashCode();
hashCode = (hashCode * 59) + Cron.GetHashCode();
}
hashCode = (hashCode * 59) + Action.GetHashCode();
hashCode = (hashCode * 59) + Enabled.GetHashCode();
hashCode = (hashCode * 59) + FailureThreshold.GetHashCode();
if (Input != null)
Expand Down
Loading

0 comments on commit 316e90a

Please sign in to comment.