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

package armonik.api.grpc.v1.sessions;

import "sessions_common.proto";

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

/**
 * Service for handling sessions.
 */
service Sessions {
  /**
   * Get a sessions list using pagination, filters and sorting.
   */
  rpc ListSessions(ListSessionsRequest) returns (ListSessionsResponse);

  /**
   * Get a session by its id.
   */
  rpc GetSession(GetSessionRequest) returns (GetSessionResponse) {}

  /**
   * Cancel a session by its id.
   */
  rpc CancelSession(CancelSessionRequest) returns (CancelSessionResponse) {}

  /**
   * Create a session
   */
  rpc CreateSession(CreateSessionRequest) returns (CreateSessionReply);

  /**
   * Pause a session by its id.
   */
  rpc PauseSession(PauseSessionRequest) returns (PauseSessionResponse);

  /**
   * Resume a paused session by its id.
   */
  rpc ResumeSession(ResumeSessionRequest) returns (ResumeSessionResponse);

  /**
   * Close a session by its id..
   */
  rpc CloseSession(CloseSessionRequest) returns (CloseSessionResponse);

  /**
   * Purge a session by its id. Removes Results data.
   */
  rpc PurgeSession(PurgeSessionRequest) returns (PurgeSessionResponse);

  /**
   * Delete a session by its id. Removes metadata from Results, Sessions and Tasks associated to the session.
   */
  rpc DeleteSession(DeleteSessionRequest) returns (DeleteSessionResponse);

  /**
   * Stops clients and/or workers from submitting new tasks in the given session.
   */
  rpc StopSubmission(StopSubmissionRequest) returns (StopSubmissionResponse);
}
