-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(specs): add recommend batch rules endpoint (generated)
algolia/api-clients-automation#3782 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Raed <[email protected]> Co-authored-by: Pierre Millot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
- Loading branch information
1 parent
45e77b3
commit e430751
Showing
4 changed files
with
284 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
108 changes: 108 additions & 0 deletions
108
algoliasearch/Models/Recommend/RecommendUpdatedAtResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
// | ||
// 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.Recommend; | ||
|
||
/// <summary> | ||
/// Response, taskID, and update timestamp. | ||
/// </summary> | ||
public partial class RecommendUpdatedAtResponse | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the RecommendUpdatedAtResponse class. | ||
/// </summary> | ||
[JsonConstructor] | ||
public RecommendUpdatedAtResponse() { } | ||
/// <summary> | ||
/// Initializes a new instance of the RecommendUpdatedAtResponse class. | ||
/// </summary> | ||
/// <param name="taskID">Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. (required).</param> | ||
/// <param name="updatedAt">Date and time when the object was updated, in RFC 3339 format. (required).</param> | ||
public RecommendUpdatedAtResponse(long taskID, string updatedAt) | ||
{ | ||
TaskID = taskID; | ||
UpdatedAt = updatedAt ?? throw new ArgumentNullException(nameof(updatedAt)); | ||
} | ||
|
||
/// <summary> | ||
/// Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. | ||
/// </summary> | ||
/// <value>Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task's progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`. </value> | ||
[JsonPropertyName("taskID")] | ||
public long TaskID { get; set; } | ||
|
||
/// <summary> | ||
/// Date and time when the object was updated, in RFC 3339 format. | ||
/// </summary> | ||
/// <value>Date and time when the object was updated, in RFC 3339 format.</value> | ||
[JsonPropertyName("updatedAt")] | ||
public string UpdatedAt { 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 RecommendUpdatedAtResponse {\n"); | ||
sb.Append(" TaskID: ").Append(TaskID).Append("\n"); | ||
sb.Append(" UpdatedAt: ").Append(UpdatedAt).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 RecommendUpdatedAtResponse input) | ||
{ | ||
return false; | ||
} | ||
|
||
return | ||
(TaskID == input.TaskID || TaskID.Equals(input.TaskID)) && | ||
(UpdatedAt == input.UpdatedAt || (UpdatedAt != null && UpdatedAt.Equals(input.UpdatedAt))); | ||
} | ||
|
||
/// <summary> | ||
/// Gets the hash code | ||
/// </summary> | ||
/// <returns>Hash code</returns> | ||
public override int GetHashCode() | ||
{ | ||
unchecked // Overflow is fine, just wrap | ||
{ | ||
int hashCode = 41; | ||
hashCode = (hashCode * 59) + TaskID.GetHashCode(); | ||
if (UpdatedAt != null) | ||
{ | ||
hashCode = (hashCode * 59) + UpdatedAt.GetHashCode(); | ||
} | ||
return hashCode; | ||
} | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
// | ||
// 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.Recommend; | ||
|
||
/// <summary> | ||
/// TimeRange | ||
/// </summary> | ||
public partial class TimeRange | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the TimeRange class. | ||
/// </summary> | ||
[JsonConstructor] | ||
public TimeRange() { } | ||
/// <summary> | ||
/// Initializes a new instance of the TimeRange class. | ||
/// </summary> | ||
/// <param name="from">When the rule should start to be active, in Unix epoch time. (required).</param> | ||
/// <param name="until">When the rule should stop to be active, in Unix epoch time. (required).</param> | ||
public TimeRange(int from, int until) | ||
{ | ||
From = from; | ||
Until = until; | ||
} | ||
|
||
/// <summary> | ||
/// When the rule should start to be active, in Unix epoch time. | ||
/// </summary> | ||
/// <value>When the rule should start to be active, in Unix epoch time.</value> | ||
[JsonPropertyName("from")] | ||
public int From { get; set; } | ||
|
||
/// <summary> | ||
/// When the rule should stop to be active, in Unix epoch time. | ||
/// </summary> | ||
/// <value>When the rule should stop to be active, in Unix epoch time.</value> | ||
[JsonPropertyName("until")] | ||
public int Until { 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 TimeRange {\n"); | ||
sb.Append(" From: ").Append(From).Append("\n"); | ||
sb.Append(" Until: ").Append(Until).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 TimeRange input) | ||
{ | ||
return false; | ||
} | ||
|
||
return | ||
(From == input.From || From.Equals(input.From)) && | ||
(Until == input.Until || Until.Equals(input.Until)); | ||
} | ||
|
||
/// <summary> | ||
/// Gets the hash code | ||
/// </summary> | ||
/// <returns>Hash code</returns> | ||
public override int GetHashCode() | ||
{ | ||
unchecked // Overflow is fine, just wrap | ||
{ | ||
int hashCode = 41; | ||
hashCode = (hashCode * 59) + From.GetHashCode(); | ||
hashCode = (hashCode * 59) + Until.GetHashCode(); | ||
return hashCode; | ||
} | ||
} | ||
|
||
} | ||
|