syntax = "proto3";

package coresdk.common;
option ruby_package = "Temporalio::Internal::Bridge::Api::Common";

import "google/protobuf/duration.proto";

// Identifying information about a particular workflow execution, including namespace
message NamespacedWorkflowExecution {
    // Namespace the workflow run is located in
    string namespace = 1;
    // Can never be empty
    string workflow_id = 2;
    // May be empty if the most recent run of the workflow with the given ID is being targeted
    string run_id = 3;
}

// An indication of user's intent concerning what Build ID versioning approach should be used for
// a specific command
enum VersioningIntent {
    // Indicates that core should choose the most sensible default behavior for the type of
    // command, accounting for whether the command will be run on the same task queue as the current
    // worker.
    UNSPECIFIED = 0;
    // Indicates that the command should run on a worker with compatible version if possible. It may
    // not be possible if the target task queue does not also have knowledge of the current worker's
    // build ID.
    COMPATIBLE = 1;
    // Indicates that the command should run on the target task queue's current overall-default
    // build ID.
    DEFAULT = 2;
}

message WorkerDeploymentVersion {
    string deployment_name = 1;
    string build_id = 2;
}