syntax = "proto3";
package conductor.proto;

import "model/workflowtask.proto";
import "model/executionmetadata.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/any.proto";

option java_package = "com.netflix.conductor.proto";
option java_outer_classname = "TaskPb";
option go_package = "github.com/netflix/conductor/client/gogrpc/conductor/model";

message Task {
    enum Status {
        IN_PROGRESS = 0;
        CANCELED = 1;
        FAILED = 2;
        FAILED_WITH_TERMINAL_ERROR = 3;
        COMPLETED = 4;
        COMPLETED_WITH_ERRORS = 5;
        SCHEDULED = 6;
        TIMED_OUT = 7;
        SKIPPED = 8;
    }
    string task_type = 1;
    Task.Status status = 2;
    map<string, google.protobuf.Value> input_data = 3;
    string reference_task_name = 4;
    int32 retry_count = 5;
    int32 seq = 6;
    string correlation_id = 7;
    int32 poll_count = 8;
    string task_def_name = 9;
    int64 scheduled_time = 10;
    int64 start_time = 11;
    int64 end_time = 12;
    int64 update_time = 13;
    int32 start_delay_in_seconds = 14;
    string retried_task_id = 15;
    bool retried = 16;
    bool executed = 17;
    bool callback_from_worker = 18;
    int64 response_timeout_seconds = 19;
    string workflow_instance_id = 20;
    string workflow_type = 21;
    string task_id = 22;
    string reason_for_incompletion = 23;
    int64 callback_after_seconds = 24;
    string worker_id = 25;
    map<string, google.protobuf.Value> output_data = 26;
    WorkflowTask workflow_task = 27;
    string domain = 28;
    google.protobuf.Any input_message = 29;
    google.protobuf.Any output_message = 30;
    int32 rate_limit_per_frequency = 32;
    int32 rate_limit_frequency_in_seconds = 33;
    string external_input_payload_storage_path = 34;
    string external_output_payload_storage_path = 35;
    int32 workflow_priority = 36;
    string execution_name_space = 37;
    string isolation_group_id = 38;
    int32 iteration = 40;
    string sub_workflow_id = 41;
    bool subworkflow_changed = 42;
    int64 first_start_time = 43;
    ExecutionMetadata execution_metadata = 44;
    string parent_task_id = 45;
}
