[U] public async Task Urls() { var id = new TaskId("fakeid:1"); await UrlTester.GET($"/_tasks/fakeid%3A1") .Fluent(c => c.GetTask(id)) .Request(c => c.GetTask(new GetTaskRequest(id))) .FluentAsync(c => c.GetTaskAsync(id)) .RequestAsync(c => c.GetTaskAsync(new GetTaskRequest(id))) ; }
public ReindexRethrottleDescriptor TaskId(TaskId id) { this.RequestState.RouteValues.Required("task_id", id); return(this); }
/// <summary> /// Rethrottle an existing reindex or update by query task /// </summary> public Task <ReindexRethrottleResponse> RethrottleAsync(TaskId id, Func <ReindexRethrottleDescriptor, IReindexRethrottleRequest> selector = null, CancellationToken ct = default ) => RethrottleAsync(selector.InvokeOrDefault(new ReindexRethrottleDescriptor(id)), ct);
/// <summary> /// Rethrottle an existing reindex or update by query task /// </summary> public ReindexRethrottleResponse Rethrottle(TaskId id, Func <ReindexRethrottleDescriptor, IReindexRethrottleRequest> selector = null) => Rethrottle(selector.InvokeOrDefault(new ReindexRethrottleDescriptor(id)));
public static GetTaskResponse GetTask(this IElasticClient client, TaskId id, Func <GetTaskDescriptor, IGetTaskRequest> selector = null) => client.Tasks.GetTask(id, selector);
public static Task <GetTaskResponse> GetTaskAsync(this IElasticClient client, TaskId id, Func <GetTaskDescriptor, IGetTaskRequest> selector = null, CancellationToken ct = default ) => client.Tasks.GetTaskAsync(id, selector, ct);
///<summary>/_tasks/{task_id}</summary> ///<param name = "taskId">this parameter is required</param> public GetTaskDescriptor(TaskId taskId) : base(r => r.Required("task_id", taskId)) { }
/// <inheritdoc /> public Task <ListTasksResponse> DeleteByQueryRethrottleAsync( TaskId taskId, Func <DeleteByQueryRethrottleDescriptor, IDeleteByQueryRethrottleRequest> selector = null, CancellationToken ct = default ) => DeleteByQueryRethrottleAsync(selector.InvokeOrDefault(new DeleteByQueryRethrottleDescriptor(taskId)), ct);
///<summary>/_tasks/{task_id}/_cancel</summary> ///<param name = "taskId">Optional, accepts null</param> public CancelTasksDescriptor(TaskId taskId) : base(r => r.Optional("task_id", taskId)) { }
///<summary>/_tasks/{task_id}/_cancel</summary> ///<param name = "taskId">Optional, accepts null</param> public CancelTasksRequest(TaskId taskId) : base(r => r.Optional("task_id", taskId)) { }
public GetTaskDescriptor TaskId(TaskId taskId) => this.Assign(a => a.RouteValues.Required("task_id", taskId));
public Task <IGetTaskResponse> GetTaskAsync(TaskId id, Func <GetTaskDescriptor, IGetTaskRequest> selector = null, CancellationToken cancellationToken = default(CancellationToken) ) => GetTaskAsync(selector.InvokeOrDefault(new GetTaskDescriptor(id)), cancellationToken);
public IGetTaskResponse GetTask(TaskId id, Func <GetTaskDescriptor, IGetTaskRequest> selector = null) => GetTask(selector.InvokeOrDefault(new GetTaskDescriptor(id)));
public IGetTaskResponse GetTask(TaskId id, Func<GetTaskDescriptor, IGetTaskRequest> selector = null) => this.GetTask(selector.InvokeOrDefault(new GetTaskDescriptor().TaskId(id)));
///<summary>Cancel the task with specified task id (node_id:task_number)</summary> public CancelTasksDescriptor TaskId(TaskId taskId) => Assign(taskId, (a, v) => a.RouteValues.Optional("task_id", v));
public Task<IGetTaskResponse> GetTaskAsync(TaskId id, Func<GetTaskDescriptor, IGetTaskRequest> selector = null, CancellationToken cancellationToken = default(CancellationToken)) => this.GetTaskAsync(selector.InvokeOrDefault(new GetTaskDescriptor().TaskId(id)), cancellationToken);
/// <inheritdoc /> public ListTasksResponse DeleteByQueryRethrottle( TaskId taskId, Func <DeleteByQueryRethrottleDescriptor, IDeleteByQueryRethrottleRequest> selector = null ) => DeleteByQueryRethrottle(selector.InvokeOrDefault(new DeleteByQueryRethrottleDescriptor(taskId)));