-
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 v2 endpoints for ingestion
algolia/api-clients-automation#3416 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
- Loading branch information
1 parent
2713196
commit 8663dc7
Showing
4 changed files
with
345 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
// | ||
// 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> | ||
/// Type of indexing operation. | ||
/// </summary> | ||
/// <value>Type of indexing operation.</value> | ||
public enum Action | ||
{ | ||
/// <summary> | ||
/// Enum AddObject for value: addObject | ||
/// </summary> | ||
[JsonPropertyName("addObject")] | ||
AddObject = 1, | ||
|
||
/// <summary> | ||
/// Enum UpdateObject for value: updateObject | ||
/// </summary> | ||
[JsonPropertyName("updateObject")] | ||
UpdateObject = 2, | ||
|
||
/// <summary> | ||
/// Enum PartialUpdateObject for value: partialUpdateObject | ||
/// </summary> | ||
[JsonPropertyName("partialUpdateObject")] | ||
PartialUpdateObject = 3, | ||
|
||
/// <summary> | ||
/// Enum PartialUpdateObjectNoCreate for value: partialUpdateObjectNoCreate | ||
/// </summary> | ||
[JsonPropertyName("partialUpdateObjectNoCreate")] | ||
PartialUpdateObjectNoCreate = 4, | ||
|
||
/// <summary> | ||
/// Enum DeleteObject for value: deleteObject | ||
/// </summary> | ||
[JsonPropertyName("deleteObject")] | ||
DeleteObject = 5, | ||
|
||
/// <summary> | ||
/// Enum Delete for value: delete | ||
/// </summary> | ||
[JsonPropertyName("delete")] | ||
Delete = 6, | ||
|
||
/// <summary> | ||
/// Enum Clear for value: clear | ||
/// </summary> | ||
[JsonPropertyName("clear")] | ||
Clear = 7 | ||
} | ||
|
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,107 @@ | ||
// | ||
// 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> | ||
/// BatchRequest | ||
/// </summary> | ||
public partial class BatchRequest | ||
{ | ||
|
||
/// <summary> | ||
/// Gets or Sets Action | ||
/// </summary> | ||
[JsonPropertyName("action")] | ||
public Action? Action { get; set; } | ||
/// <summary> | ||
/// Initializes a new instance of the BatchRequest class. | ||
/// </summary> | ||
[JsonConstructor] | ||
public BatchRequest() { } | ||
/// <summary> | ||
/// Initializes a new instance of the BatchRequest class. | ||
/// </summary> | ||
/// <param name="action">action (required).</param> | ||
/// <param name="body">Operation arguments (varies with specified `action`). (required).</param> | ||
public BatchRequest(Action? action, object body) | ||
{ | ||
Action = action; | ||
Body = body ?? throw new ArgumentNullException(nameof(body)); | ||
} | ||
|
||
/// <summary> | ||
/// Operation arguments (varies with specified `action`). | ||
/// </summary> | ||
/// <value>Operation arguments (varies with specified `action`).</value> | ||
[JsonPropertyName("body")] | ||
public object Body { 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 BatchRequest {\n"); | ||
sb.Append(" Action: ").Append(Action).Append("\n"); | ||
sb.Append(" Body: ").Append(Body).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 BatchRequest input) | ||
{ | ||
return false; | ||
} | ||
|
||
return | ||
(Action == input.Action || Action.Equals(input.Action)) && | ||
(Body == input.Body || (Body != null && Body.Equals(input.Body))); | ||
} | ||
|
||
/// <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) + Action.GetHashCode(); | ||
if (Body != null) | ||
{ | ||
hashCode = (hashCode * 59) + Body.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,95 @@ | ||
// | ||
// 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> | ||
/// Batch parameters. | ||
/// </summary> | ||
public partial class BatchWriteParams | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the BatchWriteParams class. | ||
/// </summary> | ||
[JsonConstructor] | ||
public BatchWriteParams() { } | ||
/// <summary> | ||
/// Initializes a new instance of the BatchWriteParams class. | ||
/// </summary> | ||
/// <param name="requests">requests (required).</param> | ||
public BatchWriteParams(List<BatchRequest> requests) | ||
{ | ||
Requests = requests ?? throw new ArgumentNullException(nameof(requests)); | ||
} | ||
|
||
/// <summary> | ||
/// Gets or Sets Requests | ||
/// </summary> | ||
[JsonPropertyName("requests")] | ||
public List<BatchRequest> Requests { 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 BatchWriteParams {\n"); | ||
sb.Append(" Requests: ").Append(Requests).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 BatchWriteParams input) | ||
{ | ||
return false; | ||
} | ||
|
||
return | ||
(Requests == input.Requests || Requests != null && input.Requests != null && Requests.SequenceEqual(input.Requests)); | ||
} | ||
|
||
/// <summary> | ||
/// Gets the hash code | ||
/// </summary> | ||
/// <returns>Hash code</returns> | ||
public override int GetHashCode() | ||
{ | ||
unchecked // Overflow is fine, just wrap | ||
{ | ||
int hashCode = 41; | ||
if (Requests != null) | ||
{ | ||
hashCode = (hashCode * 59) + Requests.GetHashCode(); | ||
} | ||
return hashCode; | ||
} | ||
} | ||
|
||
} | ||
|