// ###############################################################
// Copyright(c) Carl Zeiss AG, Germany. All Rights Reserved.
//
// Permission is granted to use and distribute this code,
// as long as this copyright notice remains part of the code.
// ###############################################################

syntax = "proto3";
package zen_api.workflows.v2;
import "zen_api/workflows/v1/start_job_options.proto";
import "zen_api/workflows/v2/job_info.proto";

// The WorkflowServiceGetJobInfoRequest class.
message WorkflowServiceGetJobInfoRequest {
   // Target Job ID.
   string job_id = 1;
}
// Response object representing the job info.
message WorkflowServiceGetJobInfoResponse {
   // The job info.
   JobInfo job_info = 1;
}
// The WorkflowServiceStartJobRequest class.
message WorkflowServiceStartJobRequest {
   // Job display name.
   string job_name = 1;
   // Job starting options.
   .zen_api.workflows.v1.StartJobOptions options = 2;
}
// Response object representing the starting of a job.
message WorkflowServiceStartJobResponse {
   // The job info.
   JobInfo job_info = 1;
}
// The WorkflowServiceStopJobRequest class.
message WorkflowServiceStopJobRequest {
   // Target Job ID.
   string job_id = 1;
}
// The WorkflowServiceStopJobResponse class.
message WorkflowServiceStopJobResponse {
}
// The WorkflowServiceWaitJobRequest class.
message WorkflowServiceWaitJobRequest {
   // Target Job ID.
   string job_id = 1;
}
// The WorkflowServiceWaitJobResponse class.
message WorkflowServiceWaitJobResponse {
}
// The IWorkflowService interface.
service WorkflowService {
   // Get Job information.
   rpc GetJobInfo (WorkflowServiceGetJobInfoRequest) returns (WorkflowServiceGetJobInfoResponse)
   {
      option idempotency_level = NO_SIDE_EFFECTS;
   }
   // Start Job execution.
   rpc StartJob (WorkflowServiceStartJobRequest) returns (WorkflowServiceStartJobResponse);
   // Stop the Job execution.
   rpc StopJob (WorkflowServiceStopJobRequest) returns (WorkflowServiceStopJobResponse);
   // Wait for the Job execution will be finished.
   rpc WaitJob (WorkflowServiceWaitJobRequest) returns (WorkflowServiceWaitJobResponse)
   {
      option idempotency_level = NO_SIDE_EFFECTS;
   }
}
