// This file is @generated by prost-build. /// Type: 0x0000 + 0 #[allow(dead_code)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct StartMessage { /// Unique id of the invocation. This id is unique across invocations and won't change when replaying the journal. #[prost(bytes = "bytes", tag = "1")] pub id: ::prost::bytes::Bytes, /// Invocation id that can be used for logging. /// The user can use this id to address this invocation in admin and status introspection apis. #[prost(string, tag = "2")] pub debug_id: ::prost::alloc::string::String, /// This is the sum of known commands + notifications #[prost(uint32, tag = "3")] pub known_entries: u32, /// protolint:disable:next REPEATED_FIELD_NAMES_PLURALIZED #[prost(message, repeated, tag = "4")] pub state_map: ::prost::alloc::vec::Vec, #[prost(bool, tag = "5")] pub partial_state: bool, /// If this invocation has a key associated (e.g. for objects and workflows), then this key is filled in. Empty otherwise. #[prost(string, tag = "6")] pub key: ::prost::alloc::string::String, /// Retry count since the last stored entry. /// /// Please note that this count might not be accurate, as it's not durably stored, /// thus it might get reset in case Restate crashes/changes leader. #[prost(uint32, tag = "7")] pub retry_count_since_last_stored_entry: u32, /// Duration since the last stored entry, in milliseconds. /// /// Please note this duration might not be accurate, /// and might change depending on which Restate replica executes the request. #[prost(uint64, tag = "8")] pub duration_since_last_stored_entry: u64, /// Random seed to use to seed the deterministic RNG exposed in the context API. /// This will be stable across restarts. #[prost(uint64, tag = "9")] pub random_seed: u64, /// If this invocation was called within a scope, returns the scope /// Since V7 #[prost(string, optional, tag = "10")] pub scope: ::core::option::Option<::prost::alloc::string::String>, /// If this invocation was called with a limit key, returns the limit key /// Since V7 #[prost(string, optional, tag = "11")] pub limit_key: ::core::option::Option<::prost::alloc::string::String>, /// If this invocation was called with an idempotency key, returns the idempotency key /// Since V7 #[prost(string, optional, tag = "12")] pub idempotency_key: ::core::option::Option<::prost::alloc::string::String>, } /// Nested message and enum types in `StartMessage`. pub mod start_message { #[allow(dead_code)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct StateEntry { #[prost(bytes = "bytes", tag = "1")] pub key: ::prost::bytes::Bytes, /// If value is an empty byte array, /// then it means the value is empty and not "missing" (e.g. empty string). #[prost(bytes = "bytes", tag = "2")] pub value: ::prost::bytes::Bytes, } } /// Recursively describes an await point as a tree of future combinators. /// /// Leaf data is the set of notification IDs this node is waiting for. /// For representation purposes, the list of notification ids is flattened in 3 lists to avoid a per-element oneof wrapper. /// Inner nodes combine their children (leaves + nested) via `combinator_type`. /// /// Example: Promise.all(\[completion_3, Promise.race([signal_1, signal_2\])]) becomes: /// /// Future { /// combinator_type: ALL_SUCCEEDED_OR_FIRST_FAILED /// waiting_completions: \[3\] /// nested: [ /// Future { /// combinator_type: FIRST_COMPLETED /// waiting_signals: \[1, 2\] /// } /// ] /// } #[allow(dead_code)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Future { #[prost(uint32, repeated, tag = "1")] pub waiting_completions: ::prost::alloc::vec::Vec, #[prost(uint32, repeated, tag = "2")] pub waiting_signals: ::prost::alloc::vec::Vec, #[prost(string, repeated, tag = "3")] pub waiting_named_signals: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, #[prost(message, repeated, tag = "4")] pub nested_futures: ::prost::alloc::vec::Vec, #[prost(enumeration = "CombinatorType", tag = "5")] pub combinator_type: i32, } /// Type: 0x0000 + 1 /// Implementations MUST send this message when suspending an invocation. #[allow(dead_code)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SuspensionMessage { /// Describes the await point. #[prost(message, optional, tag = "4")] pub awaiting_on: ::core::option::Option, } /// Type: 0x0000 + 2 #[allow(dead_code)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ErrorMessage { /// The code can be any HTTP status code, as described /// In addition, we define the following error codes that MAY be used by the SDK for better error reporting: /// * JOURNAL_MISMATCH = 570, that is when the SDK cannot replay a journal due to the mismatch between the journal and the actual code. /// * PROTOCOL_VIOLATION = 571, that is when the SDK receives an unexpected message or an expected message variant, given its state. #[prost(uint32, tag = "1")] pub code: u32, /// Contains a concise error message, e.g. Throwable#getMessage() in Java. #[prost(string, tag = "2")] pub message: ::prost::alloc::string::String, /// The exception stacktrace, if available. #[prost(string, tag = "3")] pub stacktrace: ::prost::alloc::string::String, /// Command that caused the failure. This may be outside the current stored journal size. /// If no specific entry caused the failure, the current replayed/processed entry can be used. #[prost(uint32, optional, tag = "4")] pub related_command_index: ::core::option::Option, /// Name of the entry that caused the failure. #[prost(string, optional, tag = "5")] pub related_command_name: ::core::option::Option<::prost::alloc::string::String>, /// Command type. #[prost(uint32, optional, tag = "6")] pub related_command_type: ::core::option::Option, /// Delay before executing the next retry, specified as duration in milliseconds. /// If provided, it will override the default retry policy used by Restate's invoker ONLY for the next retry attempt. /// /// This field is relevant only if behavior = RETRY. #[prost(uint64, optional, tag = "8")] pub next_retry_delay: ::core::option::Option, /// What to do in case of an ErrorMessage #[prost(enumeration = "ErrorBehavior", tag = "9")] pub behavior: i32, } /// Type: 0x0000 + 3 /// Implementations MUST send this message when the invocation lifecycle ends. #[allow(dead_code)] #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct EndMessage {} /// Type: 0x0000 + 4 #[allow(dead_code)] #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct CommandAckMessage { #[prost(uint32, tag = "1")] pub command_index: u32, } /// Type: 0x0000 + 5 /// /// This is a special control message to propose ctx.run completions to the runtime. /// This won't be written to the journal immediately, but will appear later as a new notification (meaning the result was stored). /// /// In response to this message, the SDK expects the runtime to either: /// * if requested_ack = true -> Send back ProposeRunCompletionAckMessage with the related completion_id /// * if requested_ack = false -> Send back the whole notification just proposed #[allow(dead_code)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ProposeRunCompletionMessage { #[prost(uint32, tag = "1")] pub result_completion_id: u32, #[prost(oneof = "propose_run_completion_message::Result", tags = "14, 15")] pub result: ::core::option::Option, } /// Nested message and enum types in `ProposeRunCompletionMessage`. pub mod propose_run_completion_message { #[allow(dead_code)] #[allow(clippy::enum_variant_names)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Result { #[prost(bytes, tag = "14")] Value(::prost::bytes::Bytes), #[prost(message, tag = "15")] Failure(super::Failure), } } /// Type: 0x0000 + 6 /// The SDK MAY send this message to the runtime when inside an await point, to notify what the user code is currently blocked awaiting on. /// This information SHOULD be considered outdated by the runtime as soon as a notification in the future tree is sent over. #[allow(dead_code)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AwaitingOnMessage { /// Describes the await point. #[prost(message, optional, tag = "1")] pub awaiting_on: ::core::option::Option, /// True if any of the notifications the SDK is awaiting on are side effects the SDK is currently executing. #[prost(bool, tag = "2")] pub executing_side_effects: bool, } /// /// This message will only ever be sent as response to ProposeRunCompletionMessage, and will be sent only in the PROCESSING phase of the protocol, never during REPLAY. #[allow(dead_code)] #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ProposeRunCompletionAckMessage { #[prost(uint32, tag = "1")] pub completion_id: u32, } /// A notification message follows the following duck-type: /// #[allow(dead_code)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct NotificationTemplate { #[prost(oneof = "notification_template::Id", tags = "1, 2, 3")] pub id: ::core::option::Option, #[prost(oneof = "notification_template::Result", tags = "4, 5, 6, 16, 17")] pub result: ::core::option::Option, } /// Nested message and enum types in `NotificationTemplate`. pub mod notification_template { #[allow(dead_code)] #[allow(clippy::enum_variant_names)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)] pub enum Id { #[prost(uint32, tag = "1")] CompletionId(u32), #[prost(uint32, tag = "2")] SignalId(u32), #[prost(string, tag = "3")] SignalName(::prost::alloc::string::String), } #[allow(dead_code)] #[allow(clippy::enum_variant_names)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Result { #[prost(message, tag = "4")] Void(super::Void), #[prost(message, tag = "5")] Value(super::Value), #[prost(message, tag = "6")] Failure(super::Failure), /// Used by specific commands #[prost(string, tag = "16")] InvocationId(::prost::alloc::string::String), #[prost(message, tag = "17")] StateKeys(super::StateKeys), } } /// Completable: No /// Fallible: No /// Type: 0x0400 + 0 #[allow(dead_code)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct InputCommandMessage { #[prost(message, repeated, tag = "1")] pub headers: ::prost::alloc::vec::Vec
, #[prost(message, optional, tag = "14")] pub value: ::core::option::Option, /// Entry name #[prost(string, tag = "12")] pub name: ::prost::alloc::string::String, } /// Completable: No /// Fallible: No /// Type: 0x0400 + 1 #[allow(dead_code)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct OutputCommandMessage { /// Entry name #[prost(string, tag = "12")] pub name: ::prost::alloc::string::String, #[prost(oneof = "output_command_message::Result", tags = "14, 15")] pub result: ::core::option::Option, } /// Nested message and enum types in `OutputCommandMessage`. pub mod output_command_message { #[allow(dead_code)] #[allow(clippy::enum_variant_names)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Result { #[prost(message, tag = "14")] Value(super::Value), #[prost(message, tag = "15")] Failure(super::Failure), } } /// Completable: Yes /// Fallible: No /// Type: 0x0400 + 2 #[allow(dead_code)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetLazyStateCommandMessage { #[prost(bytes = "bytes", tag = "1")] pub key: ::prost::bytes::Bytes, #[prost(uint32, tag = "11")] pub result_completion_id: u32, #[prost(string, tag = "12")] pub name: ::prost::alloc::string::String, } /// Notification for GetLazyStateCommandMessage /// Type: 0x8000 + 2 #[allow(dead_code)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetLazyStateCompletionNotificationMessage { #[prost(uint32, tag = "1")] pub completion_id: u32, #[prost( oneof = "get_lazy_state_completion_notification_message::Result", tags = "4, 5" )] pub result: ::core::option::Option< get_lazy_state_completion_notification_message::Result, >, } /// Nested message and enum types in `GetLazyStateCompletionNotificationMessage`. pub mod get_lazy_state_completion_notification_message { #[allow(dead_code)] #[allow(clippy::enum_variant_names)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)] pub enum Result { #[prost(message, tag = "4")] Void(super::Void), #[prost(message, tag = "5")] Value(super::Value), } } /// Completable: No /// Fallible: No /// Type: 0x0400 + 3 #[allow(dead_code)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct SetStateCommandMessage { #[prost(bytes = "bytes", tag = "1")] pub key: ::prost::bytes::Bytes, #[prost(message, optional, tag = "3")] pub value: ::core::option::Option, /// Entry name #[prost(string, tag = "12")] pub name: ::prost::alloc::string::String, } /// Completable: No /// Fallible: No /// Type: 0x0400 + 4 #[allow(dead_code)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ClearStateCommandMessage { #[prost(bytes = "bytes", tag = "1")] pub key: ::prost::bytes::Bytes, /// Entry name #[prost(string, tag = "12")] pub name: ::prost::alloc::string::String, } /// Completable: No /// Fallible: No /// Type: 0x0400 + 5 #[allow(dead_code)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct ClearAllStateCommandMessage { /// Entry name #[prost(string, tag = "12")] pub name: ::prost::alloc::string::String, } /// Completable: Yes /// Fallible: No /// Type: 0x0400 + 6 #[allow(dead_code)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetLazyStateKeysCommandMessage { #[prost(uint32, tag = "11")] pub result_completion_id: u32, #[prost(string, tag = "12")] pub name: ::prost::alloc::string::String, } /// Notification for GetLazyStateKeysCommandMessage /// Type: 0x8000 + 6 #[allow(dead_code)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetLazyStateKeysCompletionNotificationMessage { #[prost(uint32, tag = "1")] pub completion_id: u32, #[prost(message, optional, tag = "17")] pub state_keys: ::core::option::Option, } /// Completable: No /// Fallible: No /// Type: 0x0400 + 7 #[allow(dead_code)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetEagerStateCommandMessage { #[prost(bytes = "bytes", tag = "1")] pub key: ::prost::bytes::Bytes, /// Entry name #[prost(string, tag = "12")] pub name: ::prost::alloc::string::String, #[prost(oneof = "get_eager_state_command_message::Result", tags = "13, 14")] pub result: ::core::option::Option, } /// Nested message and enum types in `GetEagerStateCommandMessage`. pub mod get_eager_state_command_message { #[allow(dead_code)] #[allow(clippy::enum_variant_names)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)] pub enum Result { #[prost(message, tag = "13")] Void(super::Void), #[prost(message, tag = "14")] Value(super::Value), } } /// Completable: No /// Fallible: No /// Type: 0x0400 + 8 #[allow(dead_code)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetEagerStateKeysCommandMessage { #[prost(message, optional, tag = "14")] pub value: ::core::option::Option, /// Entry name #[prost(string, tag = "12")] pub name: ::prost::alloc::string::String, } /// Completable: Yes /// Fallible: No /// Type: 0x0400 + 9 #[allow(dead_code)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetPromiseCommandMessage { #[prost(string, tag = "1")] pub key: ::prost::alloc::string::String, #[prost(uint32, tag = "11")] pub result_completion_id: u32, #[prost(string, tag = "12")] pub name: ::prost::alloc::string::String, } /// Notification for GetPromiseCommandMessage /// Type: 0x8000 + 9 #[allow(dead_code)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetPromiseCompletionNotificationMessage { #[prost(uint32, tag = "1")] pub completion_id: u32, #[prost( oneof = "get_promise_completion_notification_message::Result", tags = "5, 6" )] pub result: ::core::option::Option< get_promise_completion_notification_message::Result, >, } /// Nested message and enum types in `GetPromiseCompletionNotificationMessage`. pub mod get_promise_completion_notification_message { #[allow(dead_code)] #[allow(clippy::enum_variant_names)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Result { #[prost(message, tag = "5")] Value(super::Value), #[prost(message, tag = "6")] Failure(super::Failure), } } /// Completable: Yes /// Fallible: No /// Type: 0x0400 + A #[allow(dead_code)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct PeekPromiseCommandMessage { #[prost(string, tag = "1")] pub key: ::prost::alloc::string::String, #[prost(uint32, tag = "11")] pub result_completion_id: u32, #[prost(string, tag = "12")] pub name: ::prost::alloc::string::String, } /// Notification for PeekPromiseCommandMessage /// Type: 0x8000 + A #[allow(dead_code)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct PeekPromiseCompletionNotificationMessage { #[prost(uint32, tag = "1")] pub completion_id: u32, #[prost( oneof = "peek_promise_completion_notification_message::Result", tags = "4, 5, 6" )] pub result: ::core::option::Option< peek_promise_completion_notification_message::Result, >, } /// Nested message and enum types in `PeekPromiseCompletionNotificationMessage`. pub mod peek_promise_completion_notification_message { #[allow(dead_code)] #[allow(clippy::enum_variant_names)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Result { #[prost(message, tag = "4")] Void(super::Void), #[prost(message, tag = "5")] Value(super::Value), #[prost(message, tag = "6")] Failure(super::Failure), } } /// Completable: Yes /// Fallible: No /// Type: 0x0400 + B #[allow(dead_code)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CompletePromiseCommandMessage { #[prost(string, tag = "1")] pub key: ::prost::alloc::string::String, #[prost(uint32, tag = "11")] pub result_completion_id: u32, #[prost(string, tag = "12")] pub name: ::prost::alloc::string::String, /// The value to use to complete the promise #[prost(oneof = "complete_promise_command_message::Completion", tags = "2, 3")] pub completion: ::core::option::Option, } /// Nested message and enum types in `CompletePromiseCommandMessage`. pub mod complete_promise_command_message { /// The value to use to complete the promise #[allow(dead_code)] #[allow(clippy::enum_variant_names)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Completion { #[prost(message, tag = "2")] CompletionValue(super::Value), #[prost(message, tag = "3")] CompletionFailure(super::Failure), } } /// Notification for CompletePromiseCommandMessage /// Type: 0x8000 + B #[allow(dead_code)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CompletePromiseCompletionNotificationMessage { #[prost(uint32, tag = "1")] pub completion_id: u32, #[prost( oneof = "complete_promise_completion_notification_message::Result", tags = "4, 6" )] pub result: ::core::option::Option< complete_promise_completion_notification_message::Result, >, } /// Nested message and enum types in `CompletePromiseCompletionNotificationMessage`. pub mod complete_promise_completion_notification_message { #[allow(dead_code)] #[allow(clippy::enum_variant_names)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Result { #[prost(message, tag = "4")] Void(super::Void), #[prost(message, tag = "6")] Failure(super::Failure), } } /// Completable: Yes /// Fallible: No /// Type: 0x0400 + C #[allow(dead_code)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct SleepCommandMessage { /// Wake up time. /// The time is set as duration since UNIX Epoch. #[prost(uint64, tag = "1")] pub wake_up_time: u64, #[prost(uint32, tag = "11")] pub result_completion_id: u32, #[prost(string, tag = "12")] pub name: ::prost::alloc::string::String, } /// Notification for SleepCommandMessage /// Type: 0x8000 + C #[allow(dead_code)] #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct SleepCompletionNotificationMessage { #[prost(uint32, tag = "1")] pub completion_id: u32, #[prost(message, optional, tag = "4")] pub void: ::core::option::Option, } /// Completable: Yes (two notifications: one with invocation id, then one with the actual result) /// Fallible: Yes /// Type: 0x0400 + D #[allow(dead_code)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CallCommandMessage { #[prost(string, tag = "1")] pub service_name: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub handler_name: ::prost::alloc::string::String, #[prost(bytes = "bytes", tag = "3")] pub parameter: ::prost::bytes::Bytes, #[prost(message, repeated, tag = "4")] pub headers: ::prost::alloc::vec::Vec
, /// If this invocation has a key associated (e.g. for objects and workflows), then this key is filled in. Empty otherwise. #[prost(string, tag = "5")] pub key: ::prost::alloc::string::String, /// If present, it must be non empty. #[prost(string, optional, tag = "6")] pub idempotency_key: ::core::option::Option<::prost::alloc::string::String>, /// Scope for the invocation target. Empty string means no scope (unscoped invocation). /// Since V7. #[prost(string, optional, tag = "7")] pub scope: ::core::option::Option<::prost::alloc::string::String>, /// Limit key for the invocation. Empty string means no limit key. /// A limit key is only valid if scope is set. /// Since V7. #[prost(string, optional, tag = "8")] pub limit_key: ::core::option::Option<::prost::alloc::string::String>, #[prost(uint32, tag = "10")] pub invocation_id_notification_idx: u32, #[prost(uint32, tag = "11")] pub result_completion_id: u32, #[prost(string, tag = "12")] pub name: ::prost::alloc::string::String, } /// Notification for CallCommandMessage and OneWayCallCommandMessage /// Type: 0x8000 + E #[allow(dead_code)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct CallInvocationIdCompletionNotificationMessage { #[prost(uint32, tag = "1")] pub completion_id: u32, #[prost(string, tag = "16")] pub invocation_id: ::prost::alloc::string::String, } /// Notification for CallCommandMessage /// Type: 0x8000 + D #[allow(dead_code)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CallCompletionNotificationMessage { #[prost(uint32, tag = "1")] pub completion_id: u32, #[prost(oneof = "call_completion_notification_message::Result", tags = "5, 6")] pub result: ::core::option::Option, } /// Nested message and enum types in `CallCompletionNotificationMessage`. pub mod call_completion_notification_message { #[allow(dead_code)] #[allow(clippy::enum_variant_names)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Result { #[prost(message, tag = "5")] Value(super::Value), #[prost(message, tag = "6")] Failure(super::Failure), } } /// Completable: Yes (only one notification with invocation id) /// Fallible: Yes /// Type: 0x0400 + E #[allow(dead_code)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct OneWayCallCommandMessage { #[prost(string, tag = "1")] pub service_name: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub handler_name: ::prost::alloc::string::String, #[prost(bytes = "bytes", tag = "3")] pub parameter: ::prost::bytes::Bytes, /// Time when this BackgroundInvoke should be executed. /// The time is set as duration since UNIX Epoch. /// If this value is not set, equal to 0, or past in time, /// the runtime will execute this BackgroundInvoke as soon as possible. #[prost(uint64, tag = "4")] pub invoke_time: u64, #[prost(message, repeated, tag = "5")] pub headers: ::prost::alloc::vec::Vec
, /// If this invocation has a key associated (e.g. for objects and workflows), then this key is filled in. Empty otherwise. #[prost(string, tag = "6")] pub key: ::prost::alloc::string::String, /// If present, it must be non empty. #[prost(string, optional, tag = "7")] pub idempotency_key: ::core::option::Option<::prost::alloc::string::String>, /// Scope for the invocation target. Empty string means no scope (unscoped invocation). /// Since V7. #[prost(string, optional, tag = "8")] pub scope: ::core::option::Option<::prost::alloc::string::String>, /// Limit key for the invocation. Empty string means no limit key. /// A limit key is only valid if scope is set. /// Since V7. #[prost(string, optional, tag = "9")] pub limit_key: ::core::option::Option<::prost::alloc::string::String>, #[prost(uint32, tag = "10")] pub invocation_id_notification_idx: u32, #[prost(string, tag = "12")] pub name: ::prost::alloc::string::String, } /// Completable: No /// Fallible: Yes /// Type: 0x04000 + 10 #[allow(dead_code)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SendSignalCommandMessage { #[prost(string, tag = "1")] pub target_invocation_id: ::prost::alloc::string::String, /// Cannot use the field 'name' here because used above #[prost(string, tag = "12")] pub entry_name: ::prost::alloc::string::String, #[prost(oneof = "send_signal_command_message::SignalId", tags = "2, 3")] pub signal_id: ::core::option::Option, #[prost(oneof = "send_signal_command_message::Result", tags = "4, 5, 6")] pub result: ::core::option::Option, } /// Nested message and enum types in `SendSignalCommandMessage`. pub mod send_signal_command_message { #[allow(dead_code)] #[allow(clippy::enum_variant_names)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)] pub enum SignalId { #[prost(uint32, tag = "2")] Idx(u32), #[prost(string, tag = "3")] Name(::prost::alloc::string::String), } #[allow(dead_code)] #[allow(clippy::enum_variant_names)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Result { #[prost(message, tag = "4")] Void(super::Void), #[prost(message, tag = "5")] Value(super::Value), #[prost(message, tag = "6")] Failure(super::Failure), } } /// Proposals for Run completions are sent through ProposeRunCompletionMessage /// /// Completable: Yes /// Fallible: No /// Type: 0x0400 + 11 #[allow(dead_code)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct RunCommandMessage { #[prost(uint32, tag = "11")] pub result_completion_id: u32, #[prost(string, tag = "12")] pub name: ::prost::alloc::string::String, } /// Notification for RunCommandMessage /// Type: 0x8000 + 11 #[allow(dead_code)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RunCompletionNotificationMessage { #[prost(uint32, tag = "1")] pub completion_id: u32, #[prost(oneof = "run_completion_notification_message::Result", tags = "5, 6")] pub result: ::core::option::Option, } /// Nested message and enum types in `RunCompletionNotificationMessage`. pub mod run_completion_notification_message { #[allow(dead_code)] #[allow(clippy::enum_variant_names)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Result { #[prost(message, tag = "5")] Value(super::Value), #[prost(message, tag = "6")] Failure(super::Failure), } } /// Completable: Yes /// Fallible: Yes /// Type: 0x0400 + 12 #[allow(dead_code)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct AttachInvocationCommandMessage { #[prost(uint32, tag = "11")] pub result_completion_id: u32, #[prost(string, tag = "12")] pub name: ::prost::alloc::string::String, #[prost(oneof = "attach_invocation_command_message::Target", tags = "1, 3, 4")] pub target: ::core::option::Option, } /// Nested message and enum types in `AttachInvocationCommandMessage`. pub mod attach_invocation_command_message { #[allow(dead_code)] #[allow(clippy::enum_variant_names)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)] pub enum Target { /// Target invocation id #[prost(string, tag = "1")] InvocationId(::prost::alloc::string::String), /// Target idempotent request #[prost(message, tag = "3")] IdempotentRequestTarget(super::IdempotentRequestTarget), /// Target workflow target #[prost(message, tag = "4")] WorkflowTarget(super::WorkflowTarget), } } /// Notification for AttachInvocationCommandMessage /// Type: 0x8000 + 12 #[allow(dead_code)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AttachInvocationCompletionNotificationMessage { #[prost(uint32, tag = "1")] pub completion_id: u32, #[prost( oneof = "attach_invocation_completion_notification_message::Result", tags = "5, 6" )] pub result: ::core::option::Option< attach_invocation_completion_notification_message::Result, >, } /// Nested message and enum types in `AttachInvocationCompletionNotificationMessage`. pub mod attach_invocation_completion_notification_message { #[allow(dead_code)] #[allow(clippy::enum_variant_names)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Result { #[prost(message, tag = "5")] Value(super::Value), #[prost(message, tag = "6")] Failure(super::Failure), } } /// Completable: Yes /// Fallible: Yes /// Type: 0x0400 + 13 #[allow(dead_code)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct GetInvocationOutputCommandMessage { #[prost(uint32, tag = "11")] pub result_completion_id: u32, #[prost(string, tag = "12")] pub name: ::prost::alloc::string::String, #[prost(oneof = "get_invocation_output_command_message::Target", tags = "1, 3, 4")] pub target: ::core::option::Option, } /// Nested message and enum types in `GetInvocationOutputCommandMessage`. pub mod get_invocation_output_command_message { #[allow(dead_code)] #[allow(clippy::enum_variant_names)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)] pub enum Target { /// Target invocation id #[prost(string, tag = "1")] InvocationId(::prost::alloc::string::String), /// Target idempotent request #[prost(message, tag = "3")] IdempotentRequestTarget(super::IdempotentRequestTarget), /// Target workflow target #[prost(message, tag = "4")] WorkflowTarget(super::WorkflowTarget), } } /// Notification for GetInvocationOutputCommandMessage /// Type: 0x8000 + 13 #[allow(dead_code)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GetInvocationOutputCompletionNotificationMessage { #[prost(uint32, tag = "1")] pub completion_id: u32, #[prost( oneof = "get_invocation_output_completion_notification_message::Result", tags = "4, 5, 6" )] pub result: ::core::option::Option< get_invocation_output_completion_notification_message::Result, >, } /// Nested message and enum types in `GetInvocationOutputCompletionNotificationMessage`. pub mod get_invocation_output_completion_notification_message { #[allow(dead_code)] #[allow(clippy::enum_variant_names)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Result { #[prost(message, tag = "4")] Void(super::Void), #[prost(message, tag = "5")] Value(super::Value), #[prost(message, tag = "6")] Failure(super::Failure), } } /// We have this for backward compatibility, because we need to parse both old and new awakeable id. /// Completable: No /// Fallible: Yes /// Type: 0x0400 + 14 #[allow(dead_code)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct CompleteAwakeableCommandMessage { #[prost(string, tag = "1")] pub awakeable_id: ::prost::alloc::string::String, /// Cannot use the field 'name' here because used above #[prost(string, tag = "12")] pub name: ::prost::alloc::string::String, #[prost(oneof = "complete_awakeable_command_message::Result", tags = "2, 3")] pub result: ::core::option::Option, } /// Nested message and enum types in `CompleteAwakeableCommandMessage`. pub mod complete_awakeable_command_message { #[allow(dead_code)] #[allow(clippy::enum_variant_names)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Result { #[prost(message, tag = "2")] Value(super::Value), #[prost(message, tag = "3")] Failure(super::Failure), } } /// Notification message for signals /// Type: 0xFBFF #[allow(dead_code)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SignalNotificationMessage { #[prost(oneof = "signal_notification_message::SignalId", tags = "2, 3")] pub signal_id: ::core::option::Option, #[prost(oneof = "signal_notification_message::Result", tags = "4, 5, 6")] pub result: ::core::option::Option, } /// Nested message and enum types in `SignalNotificationMessage`. pub mod signal_notification_message { #[allow(dead_code)] #[allow(clippy::enum_variant_names)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)] pub enum SignalId { #[prost(uint32, tag = "2")] Idx(u32), #[prost(string, tag = "3")] Name(::prost::alloc::string::String), } #[allow(dead_code)] #[allow(clippy::enum_variant_names)] #[derive(Clone, PartialEq, ::prost::Oneof)] pub enum Result { #[prost(message, tag = "4")] Void(super::Void), #[prost(message, tag = "5")] Value(super::Value), #[prost(message, tag = "6")] Failure(super::Failure), } } #[allow(dead_code)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct StateKeys { #[prost(bytes = "bytes", repeated, tag = "1")] pub keys: ::prost::alloc::vec::Vec<::prost::bytes::Bytes>, } #[allow(dead_code)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Value { #[prost(bytes = "bytes", tag = "1")] pub content: ::prost::bytes::Bytes, } /// This failure object carries user visible errors, /// e.g. invocation failure return value or failure result of an InvokeCommandMessage. #[allow(dead_code)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Failure { /// The code can be any HTTP status code, as described #[prost(uint32, tag = "1")] pub code: u32, /// Contains a concise error message, e.g. Throwable#getMessage() in Java. #[prost(string, tag = "2")] pub message: ::prost::alloc::string::String, /// Error metadata #[prost(message, repeated, tag = "3")] pub metadata: ::prost::alloc::vec::Vec, } #[allow(dead_code)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct FailureMetadata { #[prost(string, tag = "1")] pub key: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub value: ::prost::alloc::string::String, } #[allow(dead_code)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Header { #[prost(string, tag = "1")] pub key: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub value: ::prost::alloc::string::String, } #[allow(dead_code)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct WorkflowTarget { #[prost(string, tag = "1")] pub workflow_name: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub workflow_key: ::prost::alloc::string::String, /// Scope for the invocation target. Empty string means no scope (unscoped invocation). /// Since V7. #[prost(string, optional, tag = "3")] pub scope: ::core::option::Option<::prost::alloc::string::String>, } #[allow(dead_code)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct IdempotentRequestTarget { #[prost(string, tag = "1")] pub service_name: ::prost::alloc::string::String, #[prost(string, optional, tag = "2")] pub service_key: ::core::option::Option<::prost::alloc::string::String>, #[prost(string, tag = "3")] pub handler_name: ::prost::alloc::string::String, #[prost(string, tag = "4")] pub idempotency_key: ::prost::alloc::string::String, /// Scope for the invocation target. Empty string means no scope (unscoped invocation). /// Since V7. #[prost(string, optional, tag = "5")] pub scope: ::core::option::Option<::prost::alloc::string::String>, } #[allow(dead_code)] #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct Void {} /// Service protocol version. #[allow(dead_code)] #[allow(clippy::enum_variant_names)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum ServiceProtocolVersion { Unspecified = 0, /// initial service protocol version V1 = 1, /// Added /// * Entry retry mechanism: ErrorMessage.next_retry_delay, StartMessage.retry_count_since_last_stored_entry and StartMessage.duration_since_last_stored_entry V2 = 2, /// **Yanked** V3 = 3, /// **Yanked** V4 = 4, /// Immutable journal. Added: /// * New command to cancel invocations /// * Both Call and Send commands now return an additional notification to return the invocation id /// * New field to set idempotency key for Call/Send commands /// * New command to attach to existing invocation /// * New command to get output of existing invocation V5 = 5, /// Added: /// * StartMessage.random_seed /// * Failure.metadata V6 = 6, /// Added: /// * Future & AwaitingOnMessage + Changed the SuspensionMessage /// * CallCommandMessage.scope and CallCommandMessage.limit_key /// * OneWayCallCommandMessage.scope and OneWayCallCommandMessage.limit_key /// * WorkflowTarget.scope /// * IdempotentRequestTarget.scope /// * StartMessage.scope, StartMessage.limit_key and StartMessage.idempotency_key /// * Semantic changes to Run proposal response, introduced ProposeRunCompletionAckMessage /// * ErrorMessage.behavior to customize retry behavior V7 = 7, } impl ServiceProtocolVersion { /// String value of the enum field names used in the ProtoBuf definition. /// /// The values are not transformed in any way and thus are considered stable /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { Self::Unspecified => "SERVICE_PROTOCOL_VERSION_UNSPECIFIED", Self::V1 => "V1", Self::V2 => "V2", Self::V3 => "V3", Self::V4 => "V4", Self::V5 => "V5", Self::V6 => "V6", Self::V7 => "V7", } } /// Creates an enum from field names used in the ProtoBuf definition. pub fn from_str_name(value: &str) -> ::core::option::Option { match value { "SERVICE_PROTOCOL_VERSION_UNSPECIFIED" => Some(Self::Unspecified), "V1" => Some(Self::V1), "V2" => Some(Self::V2), "V3" => Some(Self::V3), "V4" => Some(Self::V4), "V5" => Some(Self::V5), "V6" => Some(Self::V6), "V7" => Some(Self::V7), _ => None, } } } /// Defines how a set of child futures are combined. #[allow(dead_code)] #[allow(clippy::enum_variant_names)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum CombinatorType { /// Should be treated as FIRST_COMPLETED. Unknown = 0, /// Resolve as soon as any one child future completes with success, or with failure (same as JS Promise.race). FirstCompleted = 1, /// Wait for every child to complete, regardless of success or failure (same as JS Promise.allSettled). AllCompleted = 2, /// Resolve on the first success; fail only if all children fail (same as JS Promise.any). FirstSucceededOrAllFailed = 3, /// Resolve when all children succeed; short-circuit on the first failure (same as JS Promise.all). AllSucceededOrFirstFailed = 4, } impl CombinatorType { /// String value of the enum field names used in the ProtoBuf definition. /// /// The values are not transformed in any way and thus are considered stable /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { Self::Unknown => "COMBINATOR_TYPE_UNKNOWN", Self::FirstCompleted => "FIRST_COMPLETED", Self::AllCompleted => "ALL_COMPLETED", Self::FirstSucceededOrAllFailed => "FIRST_SUCCEEDED_OR_ALL_FAILED", Self::AllSucceededOrFirstFailed => "ALL_SUCCEEDED_OR_FIRST_FAILED", } } /// Creates an enum from field names used in the ProtoBuf definition. pub fn from_str_name(value: &str) -> ::core::option::Option { match value { "COMBINATOR_TYPE_UNKNOWN" => Some(Self::Unknown), "FIRST_COMPLETED" => Some(Self::FirstCompleted), "ALL_COMPLETED" => Some(Self::AllCompleted), "FIRST_SUCCEEDED_OR_ALL_FAILED" => Some(Self::FirstSucceededOrAllFailed), "ALL_SUCCEEDED_OR_FIRST_FAILED" => Some(Self::AllSucceededOrFirstFailed), _ => None, } } } /// What to do in case of an ErrorMessage. #[allow(dead_code)] #[allow(clippy::enum_variant_names)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum ErrorBehavior { /// Retry this invocation. /// /// When retrying, next_retry_delay will be used if set, otherwise the runtime will follow the currently used retry policy. /// /// We use 0 for this so that unset `behavior` field is interpreter as RETRY, /// which matches the default behavior in previous service protocols. Retry = 0, /// Pause the invocation. Pause = 1, /// Fail this invocation, without retrying. Fail = 2, } impl ErrorBehavior { /// String value of the enum field names used in the ProtoBuf definition. /// /// The values are not transformed in any way and thus are considered stable /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { Self::Retry => "RETRY", Self::Pause => "PAUSE", Self::Fail => "FAIL", } } /// Creates an enum from field names used in the ProtoBuf definition. pub fn from_str_name(value: &str) -> ::core::option::Option { match value { "RETRY" => Some(Self::Retry), "PAUSE" => Some(Self::Pause), "FAIL" => Some(Self::Fail), _ => None, } } } #[allow(dead_code)] #[allow(clippy::enum_variant_names)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum BuiltInSignal { SignalUnknown = 0, Cancel = 1, } impl BuiltInSignal { /// String value of the enum field names used in the ProtoBuf definition. /// /// The values are not transformed in any way and thus are considered stable /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { Self::SignalUnknown => "SIGNAL_UNKNOWN", Self::Cancel => "CANCEL", } } /// Creates an enum from field names used in the ProtoBuf definition. pub fn from_str_name(value: &str) -> ::core::option::Option { match value { "SIGNAL_UNKNOWN" => Some(Self::SignalUnknown), "CANCEL" => Some(Self::Cancel), _ => None, } } }