Skip to content

Commit

Permalink
fix(specs): enable watcher for push [skip-bc] (generated)
Browse files Browse the repository at this point in the history
algolia/api-clients-automation#4229

Co-authored-by: algolia-bot <[email protected]>
Co-authored-by: Clément Vannicatte <[email protected]>
  • Loading branch information
algolia-bot and shortcuts committed Dec 11, 2024
1 parent 778ae8d commit d060d5d
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 38 deletions.
56 changes: 28 additions & 28 deletions algoliasearch/Clients/IngestionClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1281,8 +1281,8 @@ public interface IIngestionClient
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
/// <returns>Task of RunResponse</returns>
Task<RunResponse> PushTaskAsync(string taskID, PushTaskPayload pushTaskPayload, bool? watch = default, RequestOptions options = null, CancellationToken cancellationToken = default);
/// <returns>Task of WatchResponse</returns>
Task<WatchResponse> PushTaskAsync(string taskID, PushTaskPayload pushTaskPayload, bool? watch = default, RequestOptions options = null, CancellationToken cancellationToken = default);

/// <summary>
/// Push a `batch` request payload through the Pipeline. You can check the status of task pushes with the observability endpoints. (Synchronous version)
Expand All @@ -1300,8 +1300,8 @@ public interface IIngestionClient
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
/// <returns>RunResponse</returns>
RunResponse PushTask(string taskID, PushTaskPayload pushTaskPayload, bool? watch = default, RequestOptions options = null, CancellationToken cancellationToken = default);
/// <returns>WatchResponse</returns>
WatchResponse PushTask(string taskID, PushTaskPayload pushTaskPayload, bool? watch = default, RequestOptions options = null, CancellationToken cancellationToken = default);

/// <summary>
/// Runs all tasks linked to a source, only available for Shopify sources. It will create 1 run per task.
Expand Down Expand Up @@ -1625,8 +1625,8 @@ public interface IIngestionClient
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
/// <returns>Task of SourceWatchResponse</returns>
Task<SourceWatchResponse> TriggerDockerSourceDiscoverAsync(string sourceID, RequestOptions options = null, CancellationToken cancellationToken = default);
/// <returns>Task of WatchResponse</returns>
Task<WatchResponse> TriggerDockerSourceDiscoverAsync(string sourceID, RequestOptions options = null, CancellationToken cancellationToken = default);

/// <summary>
/// Triggers a stream-listing request for a source. Triggering stream-listing requests only works with sources with `type: docker` and `imageType: singer`. (Synchronous version)
Expand All @@ -1642,8 +1642,8 @@ public interface IIngestionClient
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
/// <returns>SourceWatchResponse</returns>
SourceWatchResponse TriggerDockerSourceDiscover(string sourceID, RequestOptions options = null, CancellationToken cancellationToken = default);
/// <returns>WatchResponse</returns>
WatchResponse TriggerDockerSourceDiscover(string sourceID, RequestOptions options = null, CancellationToken cancellationToken = default);

/// <summary>
/// Try a transformation before creating it.
Expand Down Expand Up @@ -1915,8 +1915,8 @@ public interface IIngestionClient
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
/// <returns>Task of SourceWatchResponse</returns>
Task<SourceWatchResponse> ValidateSourceAsync(SourceCreate sourceCreate = default, RequestOptions options = null, CancellationToken cancellationToken = default);
/// <returns>Task of WatchResponse</returns>
Task<WatchResponse> ValidateSourceAsync(SourceCreate sourceCreate = default, RequestOptions options = null, CancellationToken cancellationToken = default);

/// <summary>
/// Validates a source payload to ensure it can be created and that the data source can be reached by Algolia. (Synchronous version)
Expand All @@ -1932,8 +1932,8 @@ public interface IIngestionClient
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
/// <returns>SourceWatchResponse</returns>
SourceWatchResponse ValidateSource(SourceCreate sourceCreate = default, RequestOptions options = null, CancellationToken cancellationToken = default);
/// <returns>WatchResponse</returns>
WatchResponse ValidateSource(SourceCreate sourceCreate = default, RequestOptions options = null, CancellationToken cancellationToken = default);

/// <summary>
/// Validates an update of a source payload to ensure it can be created and that the data source can be reached by Algolia.
Expand All @@ -1950,8 +1950,8 @@ public interface IIngestionClient
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
/// <returns>Task of SourceWatchResponse</returns>
Task<SourceWatchResponse> ValidateSourceBeforeUpdateAsync(string sourceID, SourceUpdate sourceUpdate, RequestOptions options = null, CancellationToken cancellationToken = default);
/// <returns>Task of WatchResponse</returns>
Task<WatchResponse> ValidateSourceBeforeUpdateAsync(string sourceID, SourceUpdate sourceUpdate, RequestOptions options = null, CancellationToken cancellationToken = default);

/// <summary>
/// Validates an update of a source payload to ensure it can be created and that the data source can be reached by Algolia. (Synchronous version)
Expand All @@ -1968,8 +1968,8 @@ public interface IIngestionClient
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
/// <returns>SourceWatchResponse</returns>
SourceWatchResponse ValidateSourceBeforeUpdate(string sourceID, SourceUpdate sourceUpdate, RequestOptions options = null, CancellationToken cancellationToken = default);
/// <returns>WatchResponse</returns>
WatchResponse ValidateSourceBeforeUpdate(string sourceID, SourceUpdate sourceUpdate, RequestOptions options = null, CancellationToken cancellationToken = default);

}

Expand Down Expand Up @@ -2804,7 +2804,7 @@ public ListTransformationsResponse ListTransformations(int? itemsPerPage = defau


/// <inheritdoc />
public async Task<RunResponse> PushTaskAsync(string taskID, PushTaskPayload pushTaskPayload, bool? watch = default, RequestOptions options = null, CancellationToken cancellationToken = default)
public async Task<WatchResponse> PushTaskAsync(string taskID, PushTaskPayload pushTaskPayload, bool? watch = default, RequestOptions options = null, CancellationToken cancellationToken = default)
{

if (taskID == null)
Expand All @@ -2820,12 +2820,12 @@ public async Task<RunResponse> PushTaskAsync(string taskID, PushTaskPayload push

requestOptions.AddQueryParameter("watch", watch);
requestOptions.Data = pushTaskPayload;
return await _transport.ExecuteRequestAsync<RunResponse>(new HttpMethod("POST"), "/2/tasks/{taskID}/push", requestOptions, cancellationToken).ConfigureAwait(false);
return await _transport.ExecuteRequestAsync<WatchResponse>(new HttpMethod("POST"), "/2/tasks/{taskID}/push", requestOptions, cancellationToken).ConfigureAwait(false);
}


/// <inheritdoc />
public RunResponse PushTask(string taskID, PushTaskPayload pushTaskPayload, bool? watch = default, RequestOptions options = null, CancellationToken cancellationToken = default) =>
public WatchResponse PushTask(string taskID, PushTaskPayload pushTaskPayload, bool? watch = default, RequestOptions options = null, CancellationToken cancellationToken = default) =>
AsyncHelper.RunSync(() => PushTaskAsync(taskID, pushTaskPayload, watch, options, cancellationToken));


Expand Down Expand Up @@ -3011,7 +3011,7 @@ public List<Transformation> SearchTransformations(TransformationSearch transform


/// <inheritdoc />
public async Task<SourceWatchResponse> TriggerDockerSourceDiscoverAsync(string sourceID, RequestOptions options = null, CancellationToken cancellationToken = default)
public async Task<WatchResponse> TriggerDockerSourceDiscoverAsync(string sourceID, RequestOptions options = null, CancellationToken cancellationToken = default)
{

if (sourceID == null)
Expand All @@ -3021,12 +3021,12 @@ public async Task<SourceWatchResponse> TriggerDockerSourceDiscoverAsync(string s

requestOptions.PathParameters.Add("sourceID", QueryStringHelper.ParameterToString(sourceID));

return await _transport.ExecuteRequestAsync<SourceWatchResponse>(new HttpMethod("POST"), "/1/sources/{sourceID}/discover", requestOptions, cancellationToken).ConfigureAwait(false);
return await _transport.ExecuteRequestAsync<WatchResponse>(new HttpMethod("POST"), "/1/sources/{sourceID}/discover", requestOptions, cancellationToken).ConfigureAwait(false);
}


/// <inheritdoc />
public SourceWatchResponse TriggerDockerSourceDiscover(string sourceID, RequestOptions options = null, CancellationToken cancellationToken = default) =>
public WatchResponse TriggerDockerSourceDiscover(string sourceID, RequestOptions options = null, CancellationToken cancellationToken = default) =>
AsyncHelper.RunSync(() => TriggerDockerSourceDiscoverAsync(sourceID, options, cancellationToken));


Expand Down Expand Up @@ -3226,23 +3226,23 @@ public TransformationUpdateResponse UpdateTransformation(string transformationID


/// <inheritdoc />
public async Task<SourceWatchResponse> ValidateSourceAsync(SourceCreate sourceCreate = default, RequestOptions options = null, CancellationToken cancellationToken = default)
public async Task<WatchResponse> ValidateSourceAsync(SourceCreate sourceCreate = default, RequestOptions options = null, CancellationToken cancellationToken = default)
{
var requestOptions = new InternalRequestOptions(options);


requestOptions.Data = sourceCreate;
return await _transport.ExecuteRequestAsync<SourceWatchResponse>(new HttpMethod("POST"), "/1/sources/validate", requestOptions, cancellationToken).ConfigureAwait(false);
return await _transport.ExecuteRequestAsync<WatchResponse>(new HttpMethod("POST"), "/1/sources/validate", requestOptions, cancellationToken).ConfigureAwait(false);
}


/// <inheritdoc />
public SourceWatchResponse ValidateSource(SourceCreate sourceCreate = default, RequestOptions options = null, CancellationToken cancellationToken = default) =>
public WatchResponse ValidateSource(SourceCreate sourceCreate = default, RequestOptions options = null, CancellationToken cancellationToken = default) =>
AsyncHelper.RunSync(() => ValidateSourceAsync(sourceCreate, options, cancellationToken));


/// <inheritdoc />
public async Task<SourceWatchResponse> ValidateSourceBeforeUpdateAsync(string sourceID, SourceUpdate sourceUpdate, RequestOptions options = null, CancellationToken cancellationToken = default)
public async Task<WatchResponse> ValidateSourceBeforeUpdateAsync(string sourceID, SourceUpdate sourceUpdate, RequestOptions options = null, CancellationToken cancellationToken = default)
{

if (sourceID == null)
Expand All @@ -3257,12 +3257,12 @@ public async Task<SourceWatchResponse> ValidateSourceBeforeUpdateAsync(string so
requestOptions.PathParameters.Add("sourceID", QueryStringHelper.ParameterToString(sourceID));

requestOptions.Data = sourceUpdate;
return await _transport.ExecuteRequestAsync<SourceWatchResponse>(new HttpMethod("POST"), "/1/sources/{sourceID}/validate", requestOptions, cancellationToken).ConfigureAwait(false);
return await _transport.ExecuteRequestAsync<WatchResponse>(new HttpMethod("POST"), "/1/sources/{sourceID}/validate", requestOptions, cancellationToken).ConfigureAwait(false);
}


/// <inheritdoc />
public SourceWatchResponse ValidateSourceBeforeUpdate(string sourceID, SourceUpdate sourceUpdate, RequestOptions options = null, CancellationToken cancellationToken = default) =>
public WatchResponse ValidateSourceBeforeUpdate(string sourceID, SourceUpdate sourceUpdate, RequestOptions options = null, CancellationToken cancellationToken = default) =>
AsyncHelper.RunSync(() => ValidateSourceBeforeUpdateAsync(sourceID, sourceUpdate, options, cancellationToken));

}
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@
namespace Algolia.Search.Models.Ingestion;

/// <summary>
/// SourceWatchResponse
/// WatchResponse
/// </summary>
public partial class SourceWatchResponse
public partial class WatchResponse
{
/// <summary>
/// Initializes a new instance of the SourceWatchResponse class.
/// Initializes a new instance of the WatchResponse class.
/// </summary>
[JsonConstructor]
public SourceWatchResponse() { }
public WatchResponse() { }
/// <summary>
/// Initializes a new instance of the SourceWatchResponse class.
/// Initializes a new instance of the WatchResponse class.
/// </summary>
/// <param name="message">a message describing the outcome of a validate run. (required).</param>
public SourceWatchResponse(string message)
public WatchResponse(string message)
{
Message = message ?? throw new ArgumentNullException(nameof(message));
}
Expand All @@ -38,9 +38,9 @@ public SourceWatchResponse(string message)
public string RunID { get; set; }

/// <summary>
/// depending on the source type, the validation returns sampling data of your source (JSON, CSV, BigQuery).
/// when used with discovering or validating sources, the sampled data of your source is returned.
/// </summary>
/// <value>depending on the source type, the validation returns sampling data of your source (JSON, CSV, BigQuery).</value>
/// <value>when used with discovering or validating sources, the sampled data of your source is returned.</value>
[JsonPropertyName("data")]
public List<object> Data { get; set; }

Expand All @@ -65,7 +65,7 @@ public SourceWatchResponse(string message)
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append("class SourceWatchResponse {\n");
sb.Append("class WatchResponse {\n");
sb.Append(" RunID: ").Append(RunID).Append("\n");
sb.Append(" Data: ").Append(Data).Append("\n");
sb.Append(" Events: ").Append(Events).Append("\n");
Expand All @@ -90,7 +90,7 @@ public virtual string ToJson()
/// <returns>Boolean</returns>
public override bool Equals(object obj)
{
if (obj is not SourceWatchResponse input)
if (obj is not WatchResponse input)
{
return false;
}
Expand Down

0 comments on commit d060d5d

Please sign in to comment.