/**
 * Tasks related methods within a service.
 */
syntax = "proto3";

package armonik.api.grpc.v1.tasks;

import "tasks_common.proto";

option csharp_namespace = "ArmoniK.Api.gRPC.V1.Tasks";

/**
 * Service for handling tasks.
 */
service Tasks {
  /**
   * Get a tasks list using pagination, filters and sorting.
   */
  rpc ListTasks(ListTasksRequest) returns (ListTasksResponse) {}

  /**
   * Get a tasks list using pagination, filters and sorting with complete metada.
   */
  rpc ListTasksDetailed(ListTasksRequest) returns (ListTasksDetailedResponse) {}

  /**
   * Get a task by its id.
   */
  rpc GetTask(GetTaskRequest) returns (GetTaskResponse) {}

  /**
   * Cancel tasks using ids.
   */
  rpc CancelTasks(CancelTasksRequest) returns (CancelTasksResponse) {}

  /**
   * Get ids of the result that tasks should produce.
   */
  rpc GetResultIds(GetResultIdsRequest) returns (GetResultIdsResponse);

  /**
   * Get count from tasks status.
   */
  rpc CountTasksByStatus(CountTasksByStatusRequest) returns (CountTasksByStatusResponse) {}

  /**
   * Create tasks metadata and submit task for processing.
   */
  rpc SubmitTasks(SubmitTasksRequest) returns (SubmitTasksResponse) {}
}
