// This file is @generated by prost-build.
/// Always the first event in workflow history
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowExecutionStartedEventAttributes {
    #[prost(message, optional, tag = "1")]
    pub workflow_type: ::core::option::Option<super::super::common::v1::WorkflowType>,
    /// If this workflow is a child, the namespace our parent lives in.
    /// SDKs and UI tools should use `parent_workflow_namespace` field but server must use `parent_workflow_namespace_id` only.
    #[prost(string, tag = "2")]
    pub parent_workflow_namespace: ::prost::alloc::string::String,
    #[prost(string, tag = "27")]
    pub parent_workflow_namespace_id: ::prost::alloc::string::String,
    /// Contains information about parent workflow execution that initiated the child workflow these attributes belong to.
    /// If the workflow these attributes belong to is not a child workflow of any other execution, this field will not be populated.
    #[prost(message, optional, tag = "3")]
    pub parent_workflow_execution: ::core::option::Option<
        super::super::common::v1::WorkflowExecution,
    >,
    /// EventID of the child execution initiated event in parent workflow
    #[prost(int64, tag = "4")]
    pub parent_initiated_event_id: i64,
    #[prost(message, optional, tag = "5")]
    pub task_queue: ::core::option::Option<super::super::taskqueue::v1::TaskQueue>,
    /// SDK will deserialize this and provide it as arguments to the workflow function
    #[prost(message, optional, tag = "6")]
    pub input: ::core::option::Option<super::super::common::v1::Payloads>,
    /// Total workflow execution timeout including retries and continue as new.
    #[prost(message, optional, tag = "7")]
    pub workflow_execution_timeout: ::core::option::Option<::prost_types::Duration>,
    /// Timeout of a single workflow run.
    #[prost(message, optional, tag = "8")]
    pub workflow_run_timeout: ::core::option::Option<::prost_types::Duration>,
    /// Timeout of a single workflow task.
    #[prost(message, optional, tag = "9")]
    pub workflow_task_timeout: ::core::option::Option<::prost_types::Duration>,
    /// Run id of the previous workflow which continued-as-new or retried or cron executed into this
    /// workflow.
    #[prost(string, tag = "10")]
    pub continued_execution_run_id: ::prost::alloc::string::String,
    #[prost(enumeration = "super::super::enums::v1::ContinueAsNewInitiator", tag = "11")]
    pub initiator: i32,
    #[prost(message, optional, tag = "12")]
    pub continued_failure: ::core::option::Option<super::super::failure::v1::Failure>,
    #[prost(message, optional, tag = "13")]
    pub last_completion_result: ::core::option::Option<
        super::super::common::v1::Payloads,
    >,
    /// This is the run id when the WorkflowExecutionStarted event was written.
    /// A workflow reset changes the execution run_id, but preserves this field.
    #[prost(string, tag = "14")]
    pub original_execution_run_id: ::prost::alloc::string::String,
    /// Identity of the client who requested this execution
    #[prost(string, tag = "15")]
    pub identity: ::prost::alloc::string::String,
    /// This is the very first runId along the chain of ContinueAsNew, Retry, Cron and Reset.
    /// Used to identify a chain.
    #[prost(string, tag = "16")]
    pub first_execution_run_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "17")]
    pub retry_policy: ::core::option::Option<super::super::common::v1::RetryPolicy>,
    /// Starting at 1, the number of times we have tried to execute this workflow
    #[prost(int32, tag = "18")]
    pub attempt: i32,
    /// The absolute time at which the workflow will be timed out.
    /// This is passed without change to the next run/retry of a workflow.
    #[prost(message, optional, tag = "19")]
    pub workflow_execution_expiration_time: ::core::option::Option<
        ::prost_types::Timestamp,
    >,
    /// If this workflow runs on a cron schedule, it will appear here
    #[prost(string, tag = "20")]
    pub cron_schedule: ::prost::alloc::string::String,
    /// For a cron workflow, this contains the amount of time between when this iteration of
    /// the cron workflow was scheduled and when it should run next per its cron_schedule.
    #[prost(message, optional, tag = "21")]
    pub first_workflow_task_backoff: ::core::option::Option<::prost_types::Duration>,
    #[prost(message, optional, tag = "22")]
    pub memo: ::core::option::Option<super::super::common::v1::Memo>,
    #[prost(message, optional, tag = "23")]
    pub search_attributes: ::core::option::Option<
        super::super::common::v1::SearchAttributes,
    >,
    #[prost(message, optional, tag = "24")]
    pub prev_auto_reset_points: ::core::option::Option<
        super::super::workflow::v1::ResetPoints,
    >,
    #[prost(message, optional, tag = "25")]
    pub header: ::core::option::Option<super::super::common::v1::Header>,
    /// Version of the child execution initiated event in parent workflow
    /// It should be used together with parent_initiated_event_id to identify
    /// a child initiated event for global namespace
    #[prost(int64, tag = "26")]
    pub parent_initiated_event_version: i64,
    /// This field is new in 1.21.
    #[prost(string, tag = "28")]
    pub workflow_id: ::prost::alloc::string::String,
    /// If this workflow intends to use anything other than the current overall default version for
    /// the queue, then we include it here.
    /// Deprecated. \[cleanup-experimental-wv\]
    #[deprecated]
    #[prost(message, optional, tag = "29")]
    pub source_version_stamp: ::core::option::Option<
        super::super::common::v1::WorkerVersionStamp,
    >,
    /// Completion callbacks attached when this workflow was started.
    #[prost(message, repeated, tag = "30")]
    pub completion_callbacks: ::prost::alloc::vec::Vec<
        super::super::common::v1::Callback,
    >,
    /// Contains information about the root workflow execution.
    /// The root workflow execution is defined as follows:
    ///    1. A workflow without parent workflow is its own root workflow.
    ///    2. A workflow that has a parent workflow has the same root workflow as its parent workflow.
    /// When the workflow is its own root workflow, then root_workflow_execution is nil.
    /// Note: workflows continued as new or reseted may or may not have parents, check examples below.
    ///
    /// Examples:
    ///    Scenario 1: Workflow W1 starts child workflow W2, and W2 starts child workflow W3.
    ///      - The root workflow of all three workflows is W1.
    ///      - W1 has root_workflow_execution set to nil.
    ///      - W2 and W3 have root_workflow_execution set to W1.
    ///    Scenario 2: Workflow W1 starts child workflow W2, and W2 continued as new W3.
    ///      - The root workflow of all three workflows is W1.
    ///      - W1 has root_workflow_execution set to nil.
    ///      - W2 and W3 have root_workflow_execution set to W1.
    ///    Scenario 3: Workflow W1 continued as new W2.
    ///      - The root workflow of W1 is W1 and the root workflow of W2 is W2.
    ///      - W1 and W2 have root_workflow_execution set to nil.
    ///    Scenario 4: Workflow W1 starts child workflow W2, and W2 is reseted, creating W3
    ///      - The root workflow of all three workflows is W1.
    ///      - W1 has root_workflow_execution set to nil.
    ///      - W2 and W3 have root_workflow_execution set to W1.
    ///    Scenario 5: Workflow W1 is reseted, creating W2.
    ///      - The root workflow of W1 is W1 and the root workflow of W2 is W2.
    ///      - W1 and W2 have root_workflow_execution set to nil.
    #[prost(message, optional, tag = "31")]
    pub root_workflow_execution: ::core::option::Option<
        super::super::common::v1::WorkflowExecution,
    >,
    /// When present, this execution is assigned to the build ID of its parent or previous execution.
    /// Deprecated. This field should be cleaned up when versioning-2 API is removed. \[cleanup-experimental-wv\]
    #[deprecated]
    #[prost(string, tag = "32")]
    pub inherited_build_id: ::prost::alloc::string::String,
    /// Versioning override applied to this workflow when it was started.
    /// Children, crons, retries, and continue-as-new will inherit source run's override if pinned
    /// and if the new workflow's Task Queue belongs to the override version.
    #[prost(message, optional, tag = "33")]
    pub versioning_override: ::core::option::Option<
        super::super::workflow::v1::VersioningOverride,
    >,
    /// When present, it means this is a child workflow of a parent that is Pinned to this Worker
    /// Deployment Version. In this case, child workflow will start as Pinned to this Version instead
    /// of starting on the Current Version of its Task Queue.
    /// This is set only if the child workflow is starting on a Task Queue belonging to the same
    /// Worker Deployment Version.
    /// Deprecated. Use `parent_versioning_info`.
    #[deprecated]
    #[prost(string, tag = "34")]
    pub parent_pinned_worker_deployment_version: ::prost::alloc::string::String,
    /// Priority metadata
    #[prost(message, optional, tag = "35")]
    pub priority: ::core::option::Option<super::super::common::v1::Priority>,
    /// If present, the new workflow should start on this version with pinned base behavior.
    /// Child of pinned parent will inherit the parent's version if the Child's Task Queue belongs to that version.
    ///
    /// A new run initiated by workflow ContinueAsNew of pinned run, will inherit the previous run's version if the
    /// new run's Task Queue belongs to that version.
    ///
    /// A new run initiated by workflow Cron will never inherit.
    ///
    /// A new run initiated by workflow Retry will only inherit if the retried run is effectively pinned at the time
    /// of retry, and the retried run inherited a pinned version when it started (ie. it is a child of a pinned
    /// parent, or a CaN of a pinned run, and is running on a Task Queue in the inherited version).
    ///
    /// Pinned override is inherited if Task Queue of new run is compatible with the override version.
    /// Override is inherited separately and takes precedence over inherited base version.
    ///
    /// Note: This field is mutually exclusive with inherited_auto_upgrade_info.
    /// Additionaly, versioning_override, if present, overrides this field during routing decisions.
    #[prost(message, optional, tag = "37")]
    pub inherited_pinned_version: ::core::option::Option<
        super::super::deployment::v1::WorkerDeploymentVersion,
    >,
    /// If present, the new workflow begins with AutoUpgrade behavior. Before dispatching the
    /// first workflow task, this field is set to the deployment version on which the parent/
    /// previous run was operating. This inheritance only happens when the task queues belong to
    /// the same deployment version. The first workflow task will then be dispatched to either
    /// this inherited deployment version, or the current deployment version of the task queue's
    /// Deployment. After the first workflow task, the effective behavior depends on worker-sent
    /// values in subsequent workflow tasks.
    ///
    /// Inheritance rules:
    ///    - ContinueAsNew and child workflows: inherit AutoUpgrade behavior and deployment version
    ///    - Cron: never inherits
    ///    - Retry: inherits only if the retried run is effectively AutoUpgrade at the time of
    ///      retry, and inherited AutoUpgrade behavior when it started (i.e. it is a child of an
    ///      AutoUpgrade parent or ContinueAsNew of an AutoUpgrade run, running on the same
    ///      deployment as the parent/previous run)
    ///
    /// Additional notes:
    /// - This field is mutually exclusive with `inherited_pinned_version`.
    /// - `versioning_override`, if present, overrides this field during routing decisions.
    /// - SDK implementations do not interact with this field and is only used internally by
    ///    the server to ensure task routing correctness.
    #[prost(message, optional, tag = "39")]
    pub inherited_auto_upgrade_info: ::core::option::Option<
        super::super::deployment::v1::InheritedAutoUpgradeInfo,
    >,
    /// A boolean indicating whether the SDK has asked to eagerly execute the first workflow task for this workflow and
    /// eager execution was accepted by the server.
    /// Only populated by server with version >= 1.29.0.
    #[prost(bool, tag = "38")]
    pub eager_execution_accepted: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowExecutionCompletedEventAttributes {
    /// Serialized result of workflow completion (ie: The return value of the workflow function)
    #[prost(message, optional, tag = "1")]
    pub result: ::core::option::Option<super::super::common::v1::Payloads>,
    /// The `WORKFLOW_TASK_COMPLETED` event which this command was reported with
    #[prost(int64, tag = "2")]
    pub workflow_task_completed_event_id: i64,
    /// If another run is started by cron, this contains the new run id.
    #[prost(string, tag = "3")]
    pub new_execution_run_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowExecutionFailedEventAttributes {
    /// Serialized result of workflow failure (ex: An exception thrown, or error returned)
    #[prost(message, optional, tag = "1")]
    pub failure: ::core::option::Option<super::super::failure::v1::Failure>,
    #[prost(enumeration = "super::super::enums::v1::RetryState", tag = "2")]
    pub retry_state: i32,
    /// The `WORKFLOW_TASK_COMPLETED` event which this command was reported with
    #[prost(int64, tag = "3")]
    pub workflow_task_completed_event_id: i64,
    /// If another run is started by cron or retry, this contains the new run id.
    #[prost(string, tag = "4")]
    pub new_execution_run_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowExecutionTimedOutEventAttributes {
    #[prost(enumeration = "super::super::enums::v1::RetryState", tag = "1")]
    pub retry_state: i32,
    /// If another run is started by cron or retry, this contains the new run id.
    #[prost(string, tag = "2")]
    pub new_execution_run_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowExecutionContinuedAsNewEventAttributes {
    /// The run ID of the new workflow started by this continue-as-new
    #[prost(string, tag = "1")]
    pub new_execution_run_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub workflow_type: ::core::option::Option<super::super::common::v1::WorkflowType>,
    #[prost(message, optional, tag = "3")]
    pub task_queue: ::core::option::Option<super::super::taskqueue::v1::TaskQueue>,
    #[prost(message, optional, tag = "4")]
    pub input: ::core::option::Option<super::super::common::v1::Payloads>,
    /// Timeout of a single workflow run.
    #[prost(message, optional, tag = "5")]
    pub workflow_run_timeout: ::core::option::Option<::prost_types::Duration>,
    /// Timeout of a single workflow task.
    #[prost(message, optional, tag = "6")]
    pub workflow_task_timeout: ::core::option::Option<::prost_types::Duration>,
    /// The `WORKFLOW_TASK_COMPLETED` event which this command was reported with
    #[prost(int64, tag = "7")]
    pub workflow_task_completed_event_id: i64,
    /// How long the server will wait before scheduling the first workflow task for the new run.
    /// Used for cron, retry, and other continue-as-new cases that server may enforce some minimal
    /// delay between new runs for system protection purpose.
    #[prost(message, optional, tag = "8")]
    pub backoff_start_interval: ::core::option::Option<::prost_types::Duration>,
    #[prost(enumeration = "super::super::enums::v1::ContinueAsNewInitiator", tag = "9")]
    pub initiator: i32,
    /// Deprecated. If a workflow's retry policy would cause a new run to start when the current one
    /// has failed, this field would be populated with that failure. Now (when supported by server
    /// and sdk) the final event will be `WORKFLOW_EXECUTION_FAILED` with `new_execution_run_id` set.
    #[deprecated]
    #[prost(message, optional, tag = "10")]
    pub failure: ::core::option::Option<super::super::failure::v1::Failure>,
    /// The result from the most recent completed run of this workflow. The SDK surfaces this to the
    /// new run via APIs such as `GetLastCompletionResult`.
    #[prost(message, optional, tag = "11")]
    pub last_completion_result: ::core::option::Option<
        super::super::common::v1::Payloads,
    >,
    #[prost(message, optional, tag = "12")]
    pub header: ::core::option::Option<super::super::common::v1::Header>,
    #[prost(message, optional, tag = "13")]
    pub memo: ::core::option::Option<super::super::common::v1::Memo>,
    #[prost(message, optional, tag = "14")]
    pub search_attributes: ::core::option::Option<
        super::super::common::v1::SearchAttributes,
    >,
    /// If this is set, the new execution inherits the Build ID of the current execution. Otherwise,
    /// the assignment rules will be used to independently assign a Build ID to the new execution.
    /// Deprecated. Only considered for versioning v0.2.
    #[deprecated]
    #[prost(bool, tag = "15")]
    pub inherit_build_id: bool,
    /// Experimental. Optionally decide the versioning behavior that the first task of the new run should use.
    /// For example, choose to AutoUpgrade on continue-as-new instead of inheriting the pinned version
    /// of the previous run.
    #[prost(
        enumeration = "super::super::enums::v1::ContinueAsNewVersioningBehavior",
        tag = "16"
    )]
    pub initial_versioning_behavior: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowTaskScheduledEventAttributes {
    /// The task queue this workflow task was enqueued in, which could be a normal or sticky queue
    #[prost(message, optional, tag = "1")]
    pub task_queue: ::core::option::Option<super::super::taskqueue::v1::TaskQueue>,
    /// How long the worker has to process this task once receiving it before it times out
    ///
    /// (-- api-linter: core::0140::prepositions=disabled
    ///      aip.dev/not-precedent: "to" is used to indicate interval. --)
    #[prost(message, optional, tag = "2")]
    pub start_to_close_timeout: ::core::option::Option<::prost_types::Duration>,
    /// Starting at 1, how many attempts there have been to complete this task
    #[prost(int32, tag = "3")]
    pub attempt: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowTaskStartedEventAttributes {
    /// The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to
    #[prost(int64, tag = "1")]
    pub scheduled_event_id: i64,
    /// Identity of the worker who picked up this task
    #[prost(string, tag = "2")]
    pub identity: ::prost::alloc::string::String,
    /// This field is populated from the RecordWorkflowTaskStartedRequest. Matching service would
    /// set the request_id on the RecordWorkflowTaskStartedRequest to a new UUID. This is useful
    /// in case a RecordWorkflowTaskStarted call succeed but matching doesn't get that response,
    /// so matching could retry and history service would return success if the request_id matches.
    /// In that case, matching will continue to deliver the task to worker. Without this field, history
    /// service would return AlreadyStarted error, and matching would drop the task.
    #[prost(string, tag = "3")]
    pub request_id: ::prost::alloc::string::String,
    /// True if this workflow should continue-as-new soon. See `suggest_continue_as_new_reasons` for why.
    #[prost(bool, tag = "4")]
    pub suggest_continue_as_new: bool,
    /// The reason(s) that suggest_continue_as_new is true, if it is.
    /// Unset if suggest_continue_as_new is false.
    #[prost(
        enumeration = "super::super::enums::v1::SuggestContinueAsNewReason",
        repeated,
        tag = "8"
    )]
    pub suggest_continue_as_new_reasons: ::prost::alloc::vec::Vec<i32>,
    /// Total history size in bytes, which the workflow might use to decide when to
    /// continue-as-new regardless of the suggestion. Note that history event count is
    /// just the event id of this event, so we don't include it explicitly here.
    #[prost(int64, tag = "5")]
    pub history_size_bytes: i64,
    /// Version info of the worker to whom this task was dispatched.
    /// Deprecated. This field should be cleaned up when versioning-2 API is removed. \[cleanup-experimental-wv\]
    #[deprecated]
    #[prost(message, optional, tag = "6")]
    pub worker_version: ::core::option::Option<
        super::super::common::v1::WorkerVersionStamp,
    >,
    /// Used by server internally to properly reapply build ID redirects to an execution
    /// when rebuilding it from events.
    /// Deprecated. This field should be cleaned up when versioning-2 API is removed. \[cleanup-experimental-wv\]
    #[deprecated]
    #[prost(int64, tag = "7")]
    pub build_id_redirect_counter: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowTaskCompletedEventAttributes {
    /// The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to
    #[prost(int64, tag = "1")]
    pub scheduled_event_id: i64,
    /// The id of the `WORKFLOW_TASK_STARTED` event this task corresponds to
    #[prost(int64, tag = "2")]
    pub started_event_id: i64,
    /// Identity of the worker who completed this task
    #[prost(string, tag = "3")]
    pub identity: ::prost::alloc::string::String,
    /// Binary ID of the worker who completed this task
    /// Deprecated. Replaced with `deployment_version`.
    #[deprecated]
    #[prost(string, tag = "4")]
    pub binary_checksum: ::prost::alloc::string::String,
    /// Version info of the worker who processed this workflow task. If present, the `build_id` field
    /// within is also used as `binary_checksum`, which may be omitted in that case (it may also be
    /// populated to preserve compatibility).
    /// Deprecated. Use `deployment_version` and `versioning_behavior` instead.
    #[deprecated]
    #[prost(message, optional, tag = "5")]
    pub worker_version: ::core::option::Option<
        super::super::common::v1::WorkerVersionStamp,
    >,
    /// Data the SDK wishes to record for itself, but server need not interpret, and does not
    /// directly impact workflow state.
    #[prost(message, optional, tag = "6")]
    pub sdk_metadata: ::core::option::Option<
        super::super::sdk::v1::WorkflowTaskCompletedMetadata,
    >,
    /// Local usage data sent during workflow task completion and recorded here for posterity
    #[prost(message, optional, tag = "13")]
    pub metering_metadata: ::core::option::Option<
        super::super::common::v1::MeteringMetadata,
    >,
    /// The deployment that completed this task. May or may not be set for unversioned workers,
    /// depending on whether a value is sent by the SDK. This value updates workflow execution's
    /// `versioning_info.deployment`.
    /// Deprecated. Replaced with `deployment_version`.
    #[deprecated]
    #[prost(message, optional, tag = "7")]
    pub deployment: ::core::option::Option<super::super::deployment::v1::Deployment>,
    /// Versioning behavior sent by the worker that completed this task for this particular workflow
    /// execution. UNSPECIFIED means the task was completed by an unversioned worker. This value
    /// updates workflow execution's `versioning_info.behavior`.
    #[prost(enumeration = "super::super::enums::v1::VersioningBehavior", tag = "8")]
    pub versioning_behavior: i32,
    /// The Worker Deployment Version that completed this task. Must be set if `versioning_behavior`
    /// is set. This value updates workflow execution's `versioning_info.version`.
    /// Experimental. Worker Deployments are experimental and might significantly change in the future.
    /// Deprecated. Replaced with `deployment_version`.
    #[deprecated]
    #[prost(string, tag = "9")]
    pub worker_deployment_version: ::prost::alloc::string::String,
    /// The name of Worker Deployment that completed this task. Must be set if `versioning_behavior`
    /// is set. This value updates workflow execution's `worker_deployment_name`.
    /// Experimental. Worker Deployments are experimental and might significantly change in the future.
    #[prost(string, tag = "10")]
    pub worker_deployment_name: ::prost::alloc::string::String,
    /// The Worker Deployment Version that completed this task. Must be set if `versioning_behavior`
    /// is set. This value updates workflow execution's `versioning_info.deployment_version`.
    /// Experimental. Worker Deployments are experimental and might significantly change in the future.
    #[prost(message, optional, tag = "11")]
    pub deployment_version: ::core::option::Option<
        super::super::deployment::v1::WorkerDeploymentVersion,
    >,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct WorkflowTaskTimedOutEventAttributes {
    /// The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to
    #[prost(int64, tag = "1")]
    pub scheduled_event_id: i64,
    /// The id of the `WORKFLOW_TASK_STARTED` event this task corresponds to
    #[prost(int64, tag = "2")]
    pub started_event_id: i64,
    #[prost(enumeration = "super::super::enums::v1::TimeoutType", tag = "3")]
    pub timeout_type: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowTaskFailedEventAttributes {
    /// The id of the `WORKFLOW_TASK_SCHEDULED` event this task corresponds to
    #[prost(int64, tag = "1")]
    pub scheduled_event_id: i64,
    /// The id of the `WORKFLOW_TASK_STARTED` event this task corresponds to
    #[prost(int64, tag = "2")]
    pub started_event_id: i64,
    #[prost(enumeration = "super::super::enums::v1::WorkflowTaskFailedCause", tag = "3")]
    pub cause: i32,
    /// The failure details
    #[prost(message, optional, tag = "4")]
    pub failure: ::core::option::Option<super::super::failure::v1::Failure>,
    /// If a worker explicitly failed this task, this field contains the worker's identity.
    /// When the server generates the failure internally this field is set as 'history-service'.
    #[prost(string, tag = "5")]
    pub identity: ::prost::alloc::string::String,
    /// The original run id of the workflow. For reset workflow.
    #[prost(string, tag = "6")]
    pub base_run_id: ::prost::alloc::string::String,
    /// If the workflow is being reset, the new run id.
    #[prost(string, tag = "7")]
    pub new_run_id: ::prost::alloc::string::String,
    /// Version of the event where the history branch was forked. Used by multi-cluster replication
    /// during resets to identify the correct history branch.
    #[prost(int64, tag = "8")]
    pub fork_event_version: i64,
    /// Deprecated. This field should be cleaned up when versioning-2 API is removed. \[cleanup-experimental-wv\]
    /// If a worker explicitly failed this task, its binary id
    #[deprecated]
    #[prost(string, tag = "9")]
    pub binary_checksum: ::prost::alloc::string::String,
    /// Version info of the worker who processed this workflow task. If present, the `build_id` field
    /// within is also used as `binary_checksum`, which may be omitted in that case (it may also be
    /// populated to preserve compatibility).
    /// Deprecated. This field should be cleaned up when versioning-2 API is removed. \[cleanup-experimental-wv\]
    #[deprecated]
    #[prost(message, optional, tag = "10")]
    pub worker_version: ::core::option::Option<
        super::super::common::v1::WorkerVersionStamp,
    >,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActivityTaskScheduledEventAttributes {
    /// The worker/user assigned identifier for the activity
    #[prost(string, tag = "1")]
    pub activity_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub activity_type: ::core::option::Option<super::super::common::v1::ActivityType>,
    #[prost(message, optional, tag = "4")]
    pub task_queue: ::core::option::Option<super::super::taskqueue::v1::TaskQueue>,
    #[prost(message, optional, tag = "5")]
    pub header: ::core::option::Option<super::super::common::v1::Header>,
    #[prost(message, optional, tag = "6")]
    pub input: ::core::option::Option<super::super::common::v1::Payloads>,
    /// Indicates how long the caller is willing to wait for an activity completion. Limits how long
    /// retries will be attempted. Either this or `start_to_close_timeout` must be specified.
    ///
    /// (-- api-linter: core::0140::prepositions=disabled
    ///      aip.dev/not-precedent: "to" is used to indicate interval. --)
    #[prost(message, optional, tag = "7")]
    pub schedule_to_close_timeout: ::core::option::Option<::prost_types::Duration>,
    /// Limits time an activity task can stay in a task queue before a worker picks it up. This
    /// timeout is always non retryable, as all a retry would achieve is to put it back into the same
    /// queue. Defaults to `schedule_to_close_timeout` or workflow execution timeout if not
    /// specified.
    ///
    /// (-- api-linter: core::0140::prepositions=disabled
    ///      aip.dev/not-precedent: "to" is used to indicate interval. --)
    #[prost(message, optional, tag = "8")]
    pub schedule_to_start_timeout: ::core::option::Option<::prost_types::Duration>,
    /// Maximum time an activity is allowed to execute after being picked up by a worker. This
    /// timeout is always retryable. Either this or `schedule_to_close_timeout` must be
    /// specified.
    ///
    /// (-- api-linter: core::0140::prepositions=disabled
    ///      aip.dev/not-precedent: "to" is used to indicate interval. --)
    #[prost(message, optional, tag = "9")]
    pub start_to_close_timeout: ::core::option::Option<::prost_types::Duration>,
    /// Maximum permitted time between successful worker heartbeats.
    #[prost(message, optional, tag = "10")]
    pub heartbeat_timeout: ::core::option::Option<::prost_types::Duration>,
    /// The `WORKFLOW_TASK_COMPLETED` event which this command was reported with
    #[prost(int64, tag = "11")]
    pub workflow_task_completed_event_id: i64,
    /// Activities are assigned a default retry policy controlled by the service's dynamic
    /// configuration. Retries will happen up to `schedule_to_close_timeout`. To disable retries set
    /// retry_policy.maximum_attempts to 1.
    #[prost(message, optional, tag = "12")]
    pub retry_policy: ::core::option::Option<super::super::common::v1::RetryPolicy>,
    /// If this is set, the activity would be assigned to the Build ID of the workflow. Otherwise,
    /// Assignment rules of the activity's Task Queue will be used to determine the Build ID.
    /// Deprecated. This field should be cleaned up when versioning-2 API is removed. \[cleanup-experimental-wv\]
    #[deprecated]
    #[prost(bool, tag = "13")]
    pub use_workflow_build_id: bool,
    /// Priority metadata. If this message is not present, or any fields are not
    /// present, they inherit the values from the workflow.
    #[prost(message, optional, tag = "14")]
    pub priority: ::core::option::Option<super::super::common::v1::Priority>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActivityTaskStartedEventAttributes {
    /// The id of the `ACTIVITY_TASK_SCHEDULED` event this task corresponds to
    #[prost(int64, tag = "1")]
    pub scheduled_event_id: i64,
    /// id of the worker that picked up this task
    #[prost(string, tag = "2")]
    pub identity: ::prost::alloc::string::String,
    /// This field is populated from the RecordActivityTaskStartedRequest. Matching service would
    /// set the request_id on the RecordActivityTaskStartedRequest to a new UUID. This is useful
    /// in case a RecordActivityTaskStarted call succeed but matching doesn't get that response,
    /// so matching could retry and history service would return success if the request_id matches.
    /// In that case, matching will continue to deliver the task to worker. Without this field, history
    /// service would return AlreadyStarted error, and matching would drop the task.
    #[prost(string, tag = "3")]
    pub request_id: ::prost::alloc::string::String,
    /// Starting at 1, the number of times this task has been attempted
    #[prost(int32, tag = "4")]
    pub attempt: i32,
    /// Will be set to the most recent failure details, if this task has previously failed and then
    /// been retried.
    #[prost(message, optional, tag = "5")]
    pub last_failure: ::core::option::Option<super::super::failure::v1::Failure>,
    /// Version info of the worker to whom this task was dispatched.
    /// Deprecated. This field should be cleaned up when versioning-2 API is removed. \[cleanup-experimental-wv\]
    #[deprecated]
    #[prost(message, optional, tag = "6")]
    pub worker_version: ::core::option::Option<
        super::super::common::v1::WorkerVersionStamp,
    >,
    /// Used by server internally to properly reapply build ID redirects to an execution
    /// when rebuilding it from events.
    /// Deprecated. This field should be cleaned up when versioning-2 API is removed. \[cleanup-experimental-wv\]
    #[deprecated]
    #[prost(int64, tag = "7")]
    pub build_id_redirect_counter: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActivityTaskCompletedEventAttributes {
    /// Serialized results of the activity. IE: The return value of the activity function
    #[prost(message, optional, tag = "1")]
    pub result: ::core::option::Option<super::super::common::v1::Payloads>,
    /// The id of the `ACTIVITY_TASK_SCHEDULED` event this completion corresponds to
    #[prost(int64, tag = "2")]
    pub scheduled_event_id: i64,
    /// The id of the `ACTIVITY_TASK_STARTED` event this completion corresponds to
    #[prost(int64, tag = "3")]
    pub started_event_id: i64,
    /// id of the worker that completed this task
    #[prost(string, tag = "4")]
    pub identity: ::prost::alloc::string::String,
    /// Version info of the worker who processed this workflow task.
    /// Deprecated. This field should be cleaned up when versioning-2 API is removed. \[cleanup-experimental-wv\]
    #[deprecated]
    #[prost(message, optional, tag = "5")]
    pub worker_version: ::core::option::Option<
        super::super::common::v1::WorkerVersionStamp,
    >,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActivityTaskFailedEventAttributes {
    /// Failure details
    #[prost(message, optional, tag = "1")]
    pub failure: ::core::option::Option<super::super::failure::v1::Failure>,
    /// The id of the `ACTIVITY_TASK_SCHEDULED` event this failure corresponds to
    #[prost(int64, tag = "2")]
    pub scheduled_event_id: i64,
    /// The id of the `ACTIVITY_TASK_STARTED` event this failure corresponds to
    #[prost(int64, tag = "3")]
    pub started_event_id: i64,
    /// id of the worker that failed this task
    #[prost(string, tag = "4")]
    pub identity: ::prost::alloc::string::String,
    #[prost(enumeration = "super::super::enums::v1::RetryState", tag = "5")]
    pub retry_state: i32,
    /// Version info of the worker who processed this workflow task.
    /// Deprecated. This field should be cleaned up when versioning-2 API is removed. \[cleanup-experimental-wv\]
    #[deprecated]
    #[prost(message, optional, tag = "6")]
    pub worker_version: ::core::option::Option<
        super::super::common::v1::WorkerVersionStamp,
    >,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActivityTaskTimedOutEventAttributes {
    /// If this activity had failed, was retried, and then timed out, that failure is stored as the
    /// `cause` in here.
    #[prost(message, optional, tag = "1")]
    pub failure: ::core::option::Option<super::super::failure::v1::Failure>,
    /// The id of the `ACTIVITY_TASK_SCHEDULED` event this timeout corresponds to
    #[prost(int64, tag = "2")]
    pub scheduled_event_id: i64,
    /// The id of the `ACTIVITY_TASK_STARTED` event this timeout corresponds to
    #[prost(int64, tag = "3")]
    pub started_event_id: i64,
    #[prost(enumeration = "super::super::enums::v1::RetryState", tag = "4")]
    pub retry_state: i32,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ActivityTaskCancelRequestedEventAttributes {
    /// The id of the `ACTIVITY_TASK_SCHEDULED` event this cancel request corresponds to
    #[prost(int64, tag = "1")]
    pub scheduled_event_id: i64,
    /// The `WORKFLOW_TASK_COMPLETED` event which this command was reported with
    #[prost(int64, tag = "2")]
    pub workflow_task_completed_event_id: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActivityTaskCanceledEventAttributes {
    /// Additional information that the activity reported upon confirming cancellation
    #[prost(message, optional, tag = "1")]
    pub details: ::core::option::Option<super::super::common::v1::Payloads>,
    /// id of the most recent `ACTIVITY_TASK_CANCEL_REQUESTED` event which refers to the same
    /// activity
    #[prost(int64, tag = "2")]
    pub latest_cancel_requested_event_id: i64,
    /// The id of the `ACTIVITY_TASK_SCHEDULED` event this cancel confirmation corresponds to
    #[prost(int64, tag = "3")]
    pub scheduled_event_id: i64,
    /// The id of the `ACTIVITY_TASK_STARTED` event this cancel confirmation corresponds to
    #[prost(int64, tag = "4")]
    pub started_event_id: i64,
    /// id of the worker who canceled this activity
    #[prost(string, tag = "5")]
    pub identity: ::prost::alloc::string::String,
    /// Version info of the worker who processed this workflow task.
    /// Deprecated. This field should be cleaned up when versioning-2 API is removed. \[cleanup-experimental-wv\]
    #[deprecated]
    #[prost(message, optional, tag = "6")]
    pub worker_version: ::core::option::Option<
        super::super::common::v1::WorkerVersionStamp,
    >,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TimerStartedEventAttributes {
    /// The worker/user assigned id for this timer
    #[prost(string, tag = "1")]
    pub timer_id: ::prost::alloc::string::String,
    /// How long until this timer fires
    ///
    /// (-- api-linter: core::0140::prepositions=disabled
    ///      aip.dev/not-precedent: "to" is used to indicate interval. --)
    #[prost(message, optional, tag = "2")]
    pub start_to_fire_timeout: ::core::option::Option<::prost_types::Duration>,
    /// The `WORKFLOW_TASK_COMPLETED` event which this command was reported with
    #[prost(int64, tag = "3")]
    pub workflow_task_completed_event_id: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TimerFiredEventAttributes {
    /// Will match the `timer_id` from `TIMER_STARTED` event for this timer
    #[prost(string, tag = "1")]
    pub timer_id: ::prost::alloc::string::String,
    /// The id of the `TIMER_STARTED` event itself
    #[prost(int64, tag = "2")]
    pub started_event_id: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TimerCanceledEventAttributes {
    /// Will match the `timer_id` from `TIMER_STARTED` event for this timer
    #[prost(string, tag = "1")]
    pub timer_id: ::prost::alloc::string::String,
    /// The id of the `TIMER_STARTED` event itself
    #[prost(int64, tag = "2")]
    pub started_event_id: i64,
    /// The `WORKFLOW_TASK_COMPLETED` event which this command was reported with
    #[prost(int64, tag = "3")]
    pub workflow_task_completed_event_id: i64,
    /// The id of the worker who requested this cancel
    #[prost(string, tag = "4")]
    pub identity: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowExecutionCancelRequestedEventAttributes {
    /// User provided reason for requesting cancellation
    #[prost(string, tag = "1")]
    pub cause: ::prost::alloc::string::String,
    /// The ID of the `REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event in the external
    /// workflow history when the cancellation was requested by another workflow.
    #[prost(int64, tag = "2")]
    pub external_initiated_event_id: i64,
    #[prost(message, optional, tag = "3")]
    pub external_workflow_execution: ::core::option::Option<
        super::super::common::v1::WorkflowExecution,
    >,
    /// id of the worker or client who requested this cancel
    #[prost(string, tag = "4")]
    pub identity: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowExecutionCanceledEventAttributes {
    /// The `WORKFLOW_TASK_COMPLETED` event which this command was reported with
    #[prost(int64, tag = "1")]
    pub workflow_task_completed_event_id: i64,
    #[prost(message, optional, tag = "2")]
    pub details: ::core::option::Option<super::super::common::v1::Payloads>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MarkerRecordedEventAttributes {
    /// Workers use this to identify the "types" of various markers. Ex: Local activity, side effect.
    #[prost(string, tag = "1")]
    pub marker_name: ::prost::alloc::string::String,
    /// Serialized information recorded in the marker
    #[prost(map = "string, message", tag = "2")]
    pub details: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        super::super::common::v1::Payloads,
    >,
    /// The `WORKFLOW_TASK_COMPLETED` event which this command was reported with
    #[prost(int64, tag = "3")]
    pub workflow_task_completed_event_id: i64,
    #[prost(message, optional, tag = "4")]
    pub header: ::core::option::Option<super::super::common::v1::Header>,
    /// Some uses of markers, like a local activity, could "fail". If they did that is recorded here.
    #[prost(message, optional, tag = "5")]
    pub failure: ::core::option::Option<super::super::failure::v1::Failure>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowExecutionSignaledEventAttributes {
    /// The name/type of the signal to fire
    #[prost(string, tag = "1")]
    pub signal_name: ::prost::alloc::string::String,
    /// Will be deserialized and provided as argument(s) to the signal handler
    #[prost(message, optional, tag = "2")]
    pub input: ::core::option::Option<super::super::common::v1::Payloads>,
    /// id of the worker/client who sent this signal
    #[prost(string, tag = "3")]
    pub identity: ::prost::alloc::string::String,
    /// Headers that were passed by the sender of the signal and copied by temporal
    /// server into the workflow task.
    #[prost(message, optional, tag = "4")]
    pub header: ::core::option::Option<super::super::common::v1::Header>,
    /// Deprecated. This field is never respected and should always be set to false.
    #[deprecated]
    #[prost(bool, tag = "5")]
    pub skip_generate_workflow_task: bool,
    /// When signal origin is a workflow execution, this field is set.
    #[prost(message, optional, tag = "6")]
    pub external_workflow_execution: ::core::option::Option<
        super::super::common::v1::WorkflowExecution,
    >,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowExecutionTerminatedEventAttributes {
    /// User/client provided reason for termination
    #[prost(string, tag = "1")]
    pub reason: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub details: ::core::option::Option<super::super::common::v1::Payloads>,
    /// id of the client who requested termination
    #[prost(string, tag = "3")]
    pub identity: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RequestCancelExternalWorkflowExecutionInitiatedEventAttributes {
    /// The `WORKFLOW_TASK_COMPLETED` event which this command was reported with
    #[prost(int64, tag = "1")]
    pub workflow_task_completed_event_id: i64,
    /// The namespace the workflow to be cancelled lives in.
    /// SDKs and UI tools should use `namespace` field but server must use `namespace_id` only.
    #[prost(string, tag = "2")]
    pub namespace: ::prost::alloc::string::String,
    #[prost(string, tag = "7")]
    pub namespace_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub workflow_execution: ::core::option::Option<
        super::super::common::v1::WorkflowExecution,
    >,
    /// Deprecated.
    #[deprecated]
    #[prost(string, tag = "4")]
    pub control: ::prost::alloc::string::String,
    /// Workers are expected to set this to true if the workflow they are requesting to cancel is
    /// a child of the workflow which issued the request
    #[prost(bool, tag = "5")]
    pub child_workflow_only: bool,
    /// Reason for requesting the cancellation
    #[prost(string, tag = "6")]
    pub reason: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RequestCancelExternalWorkflowExecutionFailedEventAttributes {
    #[prost(
        enumeration = "super::super::enums::v1::CancelExternalWorkflowExecutionFailedCause",
        tag = "1"
    )]
    pub cause: i32,
    /// The `WORKFLOW_TASK_COMPLETED` event which this command was reported with
    #[prost(int64, tag = "2")]
    pub workflow_task_completed_event_id: i64,
    /// Namespace of the workflow which failed to cancel.
    /// SDKs and UI tools should use `namespace` field but server must use `namespace_id` only.
    #[prost(string, tag = "3")]
    pub namespace: ::prost::alloc::string::String,
    #[prost(string, tag = "7")]
    pub namespace_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "4")]
    pub workflow_execution: ::core::option::Option<
        super::super::common::v1::WorkflowExecution,
    >,
    /// id of the `REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event this failure
    /// corresponds to
    #[prost(int64, tag = "5")]
    pub initiated_event_id: i64,
    /// Deprecated.
    #[deprecated]
    #[prost(string, tag = "6")]
    pub control: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExternalWorkflowExecutionCancelRequestedEventAttributes {
    /// id of the `REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event this event corresponds
    /// to
    #[prost(int64, tag = "1")]
    pub initiated_event_id: i64,
    /// Namespace of the to-be-cancelled workflow.
    /// SDKs and UI tools should use `namespace` field but server must use `namespace_id` only.
    #[prost(string, tag = "2")]
    pub namespace: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub namespace_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub workflow_execution: ::core::option::Option<
        super::super::common::v1::WorkflowExecution,
    >,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignalExternalWorkflowExecutionInitiatedEventAttributes {
    /// The `WORKFLOW_TASK_COMPLETED` event which this command was reported with
    #[prost(int64, tag = "1")]
    pub workflow_task_completed_event_id: i64,
    /// Namespace of the to-be-signalled workflow.
    /// SDKs and UI tools should use `namespace` field but server must use `namespace_id` only.
    #[prost(string, tag = "2")]
    pub namespace: ::prost::alloc::string::String,
    #[prost(string, tag = "9")]
    pub namespace_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub workflow_execution: ::core::option::Option<
        super::super::common::v1::WorkflowExecution,
    >,
    /// name/type of the signal to fire in the external workflow
    #[prost(string, tag = "4")]
    pub signal_name: ::prost::alloc::string::String,
    /// Serialized arguments to provide to the signal handler
    #[prost(message, optional, tag = "5")]
    pub input: ::core::option::Option<super::super::common::v1::Payloads>,
    /// Deprecated.
    #[deprecated]
    #[prost(string, tag = "6")]
    pub control: ::prost::alloc::string::String,
    /// Workers are expected to set this to true if the workflow they are requesting to cancel is
    /// a child of the workflow which issued the request
    #[prost(bool, tag = "7")]
    pub child_workflow_only: bool,
    #[prost(message, optional, tag = "8")]
    pub header: ::core::option::Option<super::super::common::v1::Header>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignalExternalWorkflowExecutionFailedEventAttributes {
    #[prost(
        enumeration = "super::super::enums::v1::SignalExternalWorkflowExecutionFailedCause",
        tag = "1"
    )]
    pub cause: i32,
    /// The `WORKFLOW_TASK_COMPLETED` event which this command was reported with
    #[prost(int64, tag = "2")]
    pub workflow_task_completed_event_id: i64,
    /// Namespace of the workflow which failed the signal.
    /// SDKs and UI tools should use `namespace` field but server must use `namespace_id` only.
    #[prost(string, tag = "3")]
    pub namespace: ::prost::alloc::string::String,
    #[prost(string, tag = "7")]
    pub namespace_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "4")]
    pub workflow_execution: ::core::option::Option<
        super::super::common::v1::WorkflowExecution,
    >,
    #[prost(int64, tag = "5")]
    pub initiated_event_id: i64,
    /// Deprecated.
    #[deprecated]
    #[prost(string, tag = "6")]
    pub control: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExternalWorkflowExecutionSignaledEventAttributes {
    /// id of the `SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event this event corresponds to
    #[prost(int64, tag = "1")]
    pub initiated_event_id: i64,
    /// Namespace of the workflow which was signaled.
    /// SDKs and UI tools should use `namespace` field but server must use `namespace_id` only.
    #[prost(string, tag = "2")]
    pub namespace: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub namespace_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub workflow_execution: ::core::option::Option<
        super::super::common::v1::WorkflowExecution,
    >,
    /// Deprecated.
    #[deprecated]
    #[prost(string, tag = "4")]
    pub control: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpsertWorkflowSearchAttributesEventAttributes {
    /// The `WORKFLOW_TASK_COMPLETED` event which this command was reported with
    #[prost(int64, tag = "1")]
    pub workflow_task_completed_event_id: i64,
    #[prost(message, optional, tag = "2")]
    pub search_attributes: ::core::option::Option<
        super::super::common::v1::SearchAttributes,
    >,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowPropertiesModifiedEventAttributes {
    /// The `WORKFLOW_TASK_COMPLETED` event which this command was reported with
    #[prost(int64, tag = "1")]
    pub workflow_task_completed_event_id: i64,
    /// If set, update the workflow memo with the provided values. The values will be merged with
    /// the existing memo. If the user wants to delete values, a default/empty Payload should be
    /// used as the value for the key being deleted.
    #[prost(message, optional, tag = "2")]
    pub upserted_memo: ::core::option::Option<super::super::common::v1::Memo>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartChildWorkflowExecutionInitiatedEventAttributes {
    /// Namespace of the child workflow.
    /// SDKs and UI tools should use `namespace` field but server must use `namespace_id` only.
    #[prost(string, tag = "1")]
    pub namespace: ::prost::alloc::string::String,
    #[prost(string, tag = "18")]
    pub namespace_id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub workflow_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub workflow_type: ::core::option::Option<super::super::common::v1::WorkflowType>,
    #[prost(message, optional, tag = "4")]
    pub task_queue: ::core::option::Option<super::super::taskqueue::v1::TaskQueue>,
    #[prost(message, optional, tag = "5")]
    pub input: ::core::option::Option<super::super::common::v1::Payloads>,
    /// Total workflow execution timeout including retries and continue as new.
    #[prost(message, optional, tag = "6")]
    pub workflow_execution_timeout: ::core::option::Option<::prost_types::Duration>,
    /// Timeout of a single workflow run.
    #[prost(message, optional, tag = "7")]
    pub workflow_run_timeout: ::core::option::Option<::prost_types::Duration>,
    /// Timeout of a single workflow task.
    #[prost(message, optional, tag = "8")]
    pub workflow_task_timeout: ::core::option::Option<::prost_types::Duration>,
    /// Default: PARENT_CLOSE_POLICY_TERMINATE.
    #[prost(enumeration = "super::super::enums::v1::ParentClosePolicy", tag = "9")]
    pub parent_close_policy: i32,
    /// Deprecated.
    #[deprecated]
    #[prost(string, tag = "10")]
    pub control: ::prost::alloc::string::String,
    /// The `WORKFLOW_TASK_COMPLETED` event which this command was reported with
    #[prost(int64, tag = "11")]
    pub workflow_task_completed_event_id: i64,
    /// Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE.
    #[prost(enumeration = "super::super::enums::v1::WorkflowIdReusePolicy", tag = "12")]
    pub workflow_id_reuse_policy: i32,
    #[prost(message, optional, tag = "13")]
    pub retry_policy: ::core::option::Option<super::super::common::v1::RetryPolicy>,
    /// If this child runs on a cron schedule, it will appear here
    #[prost(string, tag = "14")]
    pub cron_schedule: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "15")]
    pub header: ::core::option::Option<super::super::common::v1::Header>,
    #[prost(message, optional, tag = "16")]
    pub memo: ::core::option::Option<super::super::common::v1::Memo>,
    #[prost(message, optional, tag = "17")]
    pub search_attributes: ::core::option::Option<
        super::super::common::v1::SearchAttributes,
    >,
    /// If this is set, the child workflow inherits the Build ID of the parent. Otherwise, the assignment
    /// rules of the child's Task Queue will be used to independently assign a Build ID to it.
    /// Deprecated. Only considered for versioning v0.2.
    #[deprecated]
    #[prost(bool, tag = "19")]
    pub inherit_build_id: bool,
    /// Priority metadata
    #[prost(message, optional, tag = "20")]
    pub priority: ::core::option::Option<super::super::common::v1::Priority>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartChildWorkflowExecutionFailedEventAttributes {
    /// Namespace of the child workflow.
    /// SDKs and UI tools should use `namespace` field but server must use `namespace_id` only.
    #[prost(string, tag = "1")]
    pub namespace: ::prost::alloc::string::String,
    #[prost(string, tag = "8")]
    pub namespace_id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub workflow_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub workflow_type: ::core::option::Option<super::super::common::v1::WorkflowType>,
    #[prost(
        enumeration = "super::super::enums::v1::StartChildWorkflowExecutionFailedCause",
        tag = "4"
    )]
    pub cause: i32,
    /// Deprecated.
    #[deprecated]
    #[prost(string, tag = "5")]
    pub control: ::prost::alloc::string::String,
    /// Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to
    #[prost(int64, tag = "6")]
    pub initiated_event_id: i64,
    /// The `WORKFLOW_TASK_COMPLETED` event which this command was reported with
    #[prost(int64, tag = "7")]
    pub workflow_task_completed_event_id: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChildWorkflowExecutionStartedEventAttributes {
    /// Namespace of the child workflow.
    /// SDKs and UI tools should use `namespace` field but server must use `namespace_id` only.
    #[prost(string, tag = "1")]
    pub namespace: ::prost::alloc::string::String,
    #[prost(string, tag = "6")]
    pub namespace_id: ::prost::alloc::string::String,
    /// Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to
    #[prost(int64, tag = "2")]
    pub initiated_event_id: i64,
    #[prost(message, optional, tag = "3")]
    pub workflow_execution: ::core::option::Option<
        super::super::common::v1::WorkflowExecution,
    >,
    #[prost(message, optional, tag = "4")]
    pub workflow_type: ::core::option::Option<super::super::common::v1::WorkflowType>,
    #[prost(message, optional, tag = "5")]
    pub header: ::core::option::Option<super::super::common::v1::Header>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChildWorkflowExecutionCompletedEventAttributes {
    #[prost(message, optional, tag = "1")]
    pub result: ::core::option::Option<super::super::common::v1::Payloads>,
    /// Namespace of the child workflow.
    /// SDKs and UI tools should use `namespace` field but server must use `namespace_id` only.
    #[prost(string, tag = "2")]
    pub namespace: ::prost::alloc::string::String,
    #[prost(string, tag = "7")]
    pub namespace_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub workflow_execution: ::core::option::Option<
        super::super::common::v1::WorkflowExecution,
    >,
    #[prost(message, optional, tag = "4")]
    pub workflow_type: ::core::option::Option<super::super::common::v1::WorkflowType>,
    /// Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to
    #[prost(int64, tag = "5")]
    pub initiated_event_id: i64,
    /// Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to
    #[prost(int64, tag = "6")]
    pub started_event_id: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChildWorkflowExecutionFailedEventAttributes {
    #[prost(message, optional, tag = "1")]
    pub failure: ::core::option::Option<super::super::failure::v1::Failure>,
    /// Namespace of the child workflow.
    /// SDKs and UI tools should use `namespace` field but server must use `namespace_id` only.
    #[prost(string, tag = "2")]
    pub namespace: ::prost::alloc::string::String,
    #[prost(string, tag = "8")]
    pub namespace_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub workflow_execution: ::core::option::Option<
        super::super::common::v1::WorkflowExecution,
    >,
    #[prost(message, optional, tag = "4")]
    pub workflow_type: ::core::option::Option<super::super::common::v1::WorkflowType>,
    /// Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to
    #[prost(int64, tag = "5")]
    pub initiated_event_id: i64,
    /// Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to
    #[prost(int64, tag = "6")]
    pub started_event_id: i64,
    #[prost(enumeration = "super::super::enums::v1::RetryState", tag = "7")]
    pub retry_state: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChildWorkflowExecutionCanceledEventAttributes {
    #[prost(message, optional, tag = "1")]
    pub details: ::core::option::Option<super::super::common::v1::Payloads>,
    /// Namespace of the child workflow.
    /// SDKs and UI tools should use `namespace` field but server must use `namespace_id` only.
    #[prost(string, tag = "2")]
    pub namespace: ::prost::alloc::string::String,
    #[prost(string, tag = "7")]
    pub namespace_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub workflow_execution: ::core::option::Option<
        super::super::common::v1::WorkflowExecution,
    >,
    #[prost(message, optional, tag = "4")]
    pub workflow_type: ::core::option::Option<super::super::common::v1::WorkflowType>,
    /// Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to
    #[prost(int64, tag = "5")]
    pub initiated_event_id: i64,
    /// Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to
    #[prost(int64, tag = "6")]
    pub started_event_id: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChildWorkflowExecutionTimedOutEventAttributes {
    /// Namespace of the child workflow.
    /// SDKs and UI tools should use `namespace` field but server must use `namespace_id` only.
    #[prost(string, tag = "1")]
    pub namespace: ::prost::alloc::string::String,
    #[prost(string, tag = "7")]
    pub namespace_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub workflow_execution: ::core::option::Option<
        super::super::common::v1::WorkflowExecution,
    >,
    #[prost(message, optional, tag = "3")]
    pub workflow_type: ::core::option::Option<super::super::common::v1::WorkflowType>,
    /// Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to
    #[prost(int64, tag = "4")]
    pub initiated_event_id: i64,
    /// Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to
    #[prost(int64, tag = "5")]
    pub started_event_id: i64,
    #[prost(enumeration = "super::super::enums::v1::RetryState", tag = "6")]
    pub retry_state: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChildWorkflowExecutionTerminatedEventAttributes {
    /// Namespace of the child workflow.
    /// SDKs and UI tools should use `namespace` field but server must use `namespace_id` only.
    #[prost(string, tag = "1")]
    pub namespace: ::prost::alloc::string::String,
    #[prost(string, tag = "6")]
    pub namespace_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub workflow_execution: ::core::option::Option<
        super::super::common::v1::WorkflowExecution,
    >,
    #[prost(message, optional, tag = "3")]
    pub workflow_type: ::core::option::Option<super::super::common::v1::WorkflowType>,
    /// Id of the `START_CHILD_WORKFLOW_EXECUTION_INITIATED` event which this event corresponds to
    #[prost(int64, tag = "4")]
    pub initiated_event_id: i64,
    /// Id of the `CHILD_WORKFLOW_EXECUTION_STARTED` event which this event corresponds to
    #[prost(int64, tag = "5")]
    pub started_event_id: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowExecutionOptionsUpdatedEventAttributes {
    /// Versioning override upserted in this event.
    /// Ignored if nil or if unset_versioning_override is true.
    #[prost(message, optional, tag = "1")]
    pub versioning_override: ::core::option::Option<
        super::super::workflow::v1::VersioningOverride,
    >,
    /// Versioning override removed in this event.
    #[prost(bool, tag = "2")]
    pub unset_versioning_override: bool,
    /// Request ID attached to the running workflow execution so that subsequent requests with same
    /// request ID will be deduped.
    #[prost(string, tag = "3")]
    pub attached_request_id: ::prost::alloc::string::String,
    /// Completion callbacks attached to the running workflow execution.
    #[prost(message, repeated, tag = "4")]
    pub attached_completion_callbacks: ::prost::alloc::vec::Vec<
        super::super::common::v1::Callback,
    >,
    /// Optional. The identity of the client who initiated the request that created this event.
    #[prost(string, tag = "5")]
    pub identity: ::prost::alloc::string::String,
    /// Priority override upserted in this event. Represents the full priority; not just partial fields.
    /// Ignored if nil.
    #[prost(message, optional, tag = "6")]
    pub priority: ::core::option::Option<super::super::common::v1::Priority>,
}
/// Not used anywhere. Use case is replaced by WorkflowExecutionOptionsUpdatedEventAttributes
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowPropertiesModifiedExternallyEventAttributes {
    /// Not used.
    #[prost(string, tag = "1")]
    pub new_task_queue: ::prost::alloc::string::String,
    /// Not used.
    #[prost(message, optional, tag = "2")]
    pub new_workflow_task_timeout: ::core::option::Option<::prost_types::Duration>,
    /// Not used.
    #[prost(message, optional, tag = "3")]
    pub new_workflow_run_timeout: ::core::option::Option<::prost_types::Duration>,
    /// Not used.
    #[prost(message, optional, tag = "4")]
    pub new_workflow_execution_timeout: ::core::option::Option<::prost_types::Duration>,
    /// Not used.
    #[prost(message, optional, tag = "5")]
    pub upserted_memo: ::core::option::Option<super::super::common::v1::Memo>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActivityPropertiesModifiedExternallyEventAttributes {
    /// The id of the `ACTIVITY_TASK_SCHEDULED` event this modification corresponds to.
    #[prost(int64, tag = "1")]
    pub scheduled_event_id: i64,
    /// If set, update the retry policy of the activity, replacing it with the specified one.
    /// The number of attempts at the activity is preserved.
    #[prost(message, optional, tag = "2")]
    pub new_retry_policy: ::core::option::Option<super::super::common::v1::RetryPolicy>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowExecutionUpdateAcceptedEventAttributes {
    /// The instance ID of the update protocol that generated this event.
    #[prost(string, tag = "1")]
    pub protocol_instance_id: ::prost::alloc::string::String,
    /// The message ID of the original request message that initiated this
    /// update. Needed so that the worker can recreate and deliver that same
    /// message as part of replay.
    #[prost(string, tag = "2")]
    pub accepted_request_message_id: ::prost::alloc::string::String,
    /// The event ID used to sequence the original request message.
    #[prost(int64, tag = "3")]
    pub accepted_request_sequencing_event_id: i64,
    /// The message payload of the original request message that initiated this
    /// update.
    #[prost(message, optional, tag = "4")]
    pub accepted_request: ::core::option::Option<super::super::update::v1::Request>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowExecutionUpdateCompletedEventAttributes {
    /// The metadata about this update.
    #[prost(message, optional, tag = "1")]
    pub meta: ::core::option::Option<super::super::update::v1::Meta>,
    /// The event ID indicating the acceptance of this update.
    #[prost(int64, tag = "3")]
    pub accepted_event_id: i64,
    /// The outcome of executing the workflow update function.
    #[prost(message, optional, tag = "2")]
    pub outcome: ::core::option::Option<super::super::update::v1::Outcome>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowExecutionUpdateRejectedEventAttributes {
    /// The instance ID of the update protocol that generated this event.
    #[prost(string, tag = "1")]
    pub protocol_instance_id: ::prost::alloc::string::String,
    /// The message ID of the original request message that initiated this
    /// update. Needed so that the worker can recreate and deliver that same
    /// message as part of replay.
    #[prost(string, tag = "2")]
    pub rejected_request_message_id: ::prost::alloc::string::String,
    /// The event ID used to sequence the original request message.
    #[prost(int64, tag = "3")]
    pub rejected_request_sequencing_event_id: i64,
    /// The message payload of the original request message that initiated this
    /// update.
    #[prost(message, optional, tag = "4")]
    pub rejected_request: ::core::option::Option<super::super::update::v1::Request>,
    /// The cause of rejection.
    #[prost(message, optional, tag = "5")]
    pub failure: ::core::option::Option<super::super::failure::v1::Failure>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowExecutionUpdateAdmittedEventAttributes {
    /// The update request associated with this event.
    #[prost(message, optional, tag = "1")]
    pub request: ::core::option::Option<super::super::update::v1::Request>,
    /// An explanation of why this event was written to history.
    #[prost(
        enumeration = "super::super::enums::v1::UpdateAdmittedEventOrigin",
        tag = "2"
    )]
    pub origin: i32,
}
/// Attributes for an event marking that a workflow execution was paused.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowExecutionPausedEventAttributes {
    /// The identity of the client who paused the workflow execution.
    #[prost(string, tag = "1")]
    pub identity: ::prost::alloc::string::String,
    /// The reason for pausing the workflow execution.
    #[prost(string, tag = "2")]
    pub reason: ::prost::alloc::string::String,
    /// The request ID of the request that paused the workflow execution.
    #[prost(string, tag = "3")]
    pub request_id: ::prost::alloc::string::String,
}
/// Attributes for an event marking that a workflow execution was unpaused.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowExecutionUnpausedEventAttributes {
    /// The identity of the client who unpaused the workflow execution.
    #[prost(string, tag = "1")]
    pub identity: ::prost::alloc::string::String,
    /// The reason for unpausing the workflow execution.
    #[prost(string, tag = "2")]
    pub reason: ::prost::alloc::string::String,
    /// The request ID of the request that unpaused the workflow execution.
    #[prost(string, tag = "3")]
    pub request_id: ::prost::alloc::string::String,
}
/// Event marking that an operation was scheduled by a workflow via the ScheduleNexusOperation command.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NexusOperationScheduledEventAttributes {
    /// Endpoint name, must exist in the endpoint registry.
    #[prost(string, tag = "1")]
    pub endpoint: ::prost::alloc::string::String,
    /// Service name.
    #[prost(string, tag = "2")]
    pub service: ::prost::alloc::string::String,
    /// Operation name.
    #[prost(string, tag = "3")]
    pub operation: ::prost::alloc::string::String,
    /// Input for the operation. The server converts this into Nexus request content and the appropriate content headers
    /// internally when sending the StartOperation request. On the handler side, if it is also backed by Temporal, the
    /// content is transformed back to the original Payload stored in this event.
    #[prost(message, optional, tag = "4")]
    pub input: ::core::option::Option<super::super::common::v1::Payload>,
    /// Schedule-to-close timeout for this operation.
    /// Indicates how long the caller is willing to wait for operation completion.
    /// Calls are retried internally by the server.
    /// (-- api-linter: core::0140::prepositions=disabled
    ///      aip.dev/not-precedent: "to" is used to indicate interval. --)
    #[prost(message, optional, tag = "5")]
    pub schedule_to_close_timeout: ::core::option::Option<::prost_types::Duration>,
    /// Header to attach to the Nexus request. Note these headers are not the same as Temporal headers on internal
    /// activities and child workflows, these are transmitted to Nexus operations that may be external and are not
    /// traditional payloads.
    #[prost(map = "string, string", tag = "6")]
    pub nexus_header: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// The `WORKFLOW_TASK_COMPLETED` event that the corresponding ScheduleNexusOperation command was reported with.
    #[prost(int64, tag = "7")]
    pub workflow_task_completed_event_id: i64,
    /// A unique ID generated by the history service upon creation of this event.
    /// The ID will be transmitted with all nexus StartOperation requests and is used as an idempotentency key.
    #[prost(string, tag = "8")]
    pub request_id: ::prost::alloc::string::String,
    /// Endpoint ID as resolved in the endpoint registry at the time this event was generated.
    /// This is stored on the event and used internally by the server in case the endpoint is renamed from the time the
    /// event was originally scheduled.
    #[prost(string, tag = "9")]
    pub endpoint_id: ::prost::alloc::string::String,
    /// Schedule-to-start timeout for this operation.
    /// See ScheduleNexusOperationCommandAttributes.schedule_to_start_timeout for details.
    /// (-- api-linter: core::0140::prepositions=disabled
    ///      aip.dev/not-precedent: "to" is used to indicate interval. --)
    #[prost(message, optional, tag = "10")]
    pub schedule_to_start_timeout: ::core::option::Option<::prost_types::Duration>,
    /// Start-to-close timeout for this operation.
    /// See ScheduleNexusOperationCommandAttributes.start_to_close_timeout for details.
    /// (-- api-linter: core::0140::prepositions=disabled
    ///      aip.dev/not-precedent: "to" is used to indicate interval. --)
    #[prost(message, optional, tag = "11")]
    pub start_to_close_timeout: ::core::option::Option<::prost_types::Duration>,
}
/// Event marking an asynchronous operation was started by the responding Nexus handler.
/// If the operation completes synchronously, this event is not generated.
/// In rare situations, such as request timeouts, the service may fail to record the actual start time and will fabricate
/// this event upon receiving the operation completion via callback.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NexusOperationStartedEventAttributes {
    /// The ID of the `NEXUS_OPERATION_SCHEDULED` event this task corresponds to.
    #[prost(int64, tag = "1")]
    pub scheduled_event_id: i64,
    /// The operation ID returned by the Nexus handler in the response to the StartOperation request.
    /// This ID is used when canceling the operation.
    ///
    /// Deprecated: Renamed to operation_token.
    #[deprecated]
    #[prost(string, tag = "3")]
    pub operation_id: ::prost::alloc::string::String,
    /// The request ID allocated at schedule time.
    #[prost(string, tag = "4")]
    pub request_id: ::prost::alloc::string::String,
    /// The operation token returned by the Nexus handler in the response to the StartOperation request.
    /// This token is used when canceling the operation.
    #[prost(string, tag = "5")]
    pub operation_token: ::prost::alloc::string::String,
}
/// Nexus operation completed successfully.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NexusOperationCompletedEventAttributes {
    /// The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation.
    #[prost(int64, tag = "1")]
    pub scheduled_event_id: i64,
    /// Serialized result of the Nexus operation. The response of the Nexus handler.
    /// Delivered either via a completion callback or as a response to a synchronous operation.
    #[prost(message, optional, tag = "2")]
    pub result: ::core::option::Option<super::super::common::v1::Payload>,
    /// The request ID allocated at schedule time.
    #[prost(string, tag = "3")]
    pub request_id: ::prost::alloc::string::String,
}
/// Nexus operation failed.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NexusOperationFailedEventAttributes {
    /// The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation.
    #[prost(int64, tag = "1")]
    pub scheduled_event_id: i64,
    /// Failure details. A NexusOperationFailureInfo wrapping an ApplicationFailureInfo.
    #[prost(message, optional, tag = "2")]
    pub failure: ::core::option::Option<super::super::failure::v1::Failure>,
    /// The request ID allocated at schedule time.
    #[prost(string, tag = "3")]
    pub request_id: ::prost::alloc::string::String,
}
/// Nexus operation timed out.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NexusOperationTimedOutEventAttributes {
    /// The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation.
    #[prost(int64, tag = "1")]
    pub scheduled_event_id: i64,
    /// Failure details. A NexusOperationFailureInfo wrapping a CanceledFailureInfo.
    #[prost(message, optional, tag = "2")]
    pub failure: ::core::option::Option<super::super::failure::v1::Failure>,
    /// The request ID allocated at schedule time.
    #[prost(string, tag = "3")]
    pub request_id: ::prost::alloc::string::String,
}
/// Nexus operation completed as canceled. May or may not have been due to a cancellation request by the workflow.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NexusOperationCanceledEventAttributes {
    /// The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation.
    #[prost(int64, tag = "1")]
    pub scheduled_event_id: i64,
    /// Cancellation details.
    #[prost(message, optional, tag = "2")]
    pub failure: ::core::option::Option<super::super::failure::v1::Failure>,
    /// The request ID allocated at schedule time.
    #[prost(string, tag = "3")]
    pub request_id: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct NexusOperationCancelRequestedEventAttributes {
    /// The id of the `NEXUS_OPERATION_SCHEDULED` event this cancel request corresponds to.
    #[prost(int64, tag = "1")]
    pub scheduled_event_id: i64,
    /// The `WORKFLOW_TASK_COMPLETED` event that the corresponding RequestCancelNexusOperation command was reported
    /// with.
    #[prost(int64, tag = "2")]
    pub workflow_task_completed_event_id: i64,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct NexusOperationCancelRequestCompletedEventAttributes {
    /// The ID of the `NEXUS_OPERATION_CANCEL_REQUESTED` event.
    #[prost(int64, tag = "1")]
    pub requested_event_id: i64,
    /// The `WORKFLOW_TASK_COMPLETED` event that the corresponding RequestCancelNexusOperation command was reported
    /// with.
    #[prost(int64, tag = "2")]
    pub workflow_task_completed_event_id: i64,
    /// The id of the `NEXUS_OPERATION_SCHEDULED` event this cancel request corresponds to.
    #[prost(int64, tag = "3")]
    pub scheduled_event_id: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NexusOperationCancelRequestFailedEventAttributes {
    /// The ID of the `NEXUS_OPERATION_CANCEL_REQUESTED` event.
    #[prost(int64, tag = "1")]
    pub requested_event_id: i64,
    /// The `WORKFLOW_TASK_COMPLETED` event that the corresponding RequestCancelNexusOperation command was reported
    /// with.
    #[prost(int64, tag = "2")]
    pub workflow_task_completed_event_id: i64,
    /// Failure details. A NexusOperationFailureInfo wrapping a CanceledFailureInfo.
    #[prost(message, optional, tag = "3")]
    pub failure: ::core::option::Option<super::super::failure::v1::Failure>,
    /// The id of the `NEXUS_OPERATION_SCHEDULED` event this cancel request corresponds to.
    #[prost(int64, tag = "4")]
    pub scheduled_event_id: i64,
}
/// History events are the method by which Temporal SDKs advance (or recreate) workflow state.
/// See the `EventType` enum for more info about what each event is for.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistoryEvent {
    /// Monotonically increasing event number, starts at 1.
    #[prost(int64, tag = "1")]
    pub event_id: i64,
    #[prost(message, optional, tag = "2")]
    pub event_time: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(enumeration = "super::super::enums::v1::EventType", tag = "3")]
    pub event_type: i32,
    /// Failover version of the event, used by the server for multi-cluster replication and history
    /// versioning. SDKs generally ignore this field.
    #[prost(int64, tag = "4")]
    pub version: i64,
    /// Identifier used by the service to order replication and transfer tasks associated with this
    /// event. SDKs generally ignore this field.
    #[prost(int64, tag = "5")]
    pub task_id: i64,
    /// Set to true when the SDK may ignore the event as it does not impact workflow state or
    /// information in any way that the SDK need be concerned with. If an SDK encounters an event
    /// type which it does not understand, it must error unless this is true. If it is true, it's
    /// acceptable for the event type and/or attributes to be uninterpretable.
    #[prost(bool, tag = "300")]
    pub worker_may_ignore: bool,
    /// Metadata on the event. This is often carried over from commands and client calls. Most events
    /// won't have this information, and how this information is used is dependent upon the interface
    /// that reads it.
    ///
    /// Current well-known uses:
    ///   * workflow_execution_started_event_attributes - summary and details from start workflow.
    ///   * timer_started_event_attributes - summary represents an identifier for the timer for use by
    ///     user interfaces.
    #[prost(message, optional, tag = "301")]
    pub user_metadata: ::core::option::Option<super::super::sdk::v1::UserMetadata>,
    /// Links associated with the event.
    #[prost(message, repeated, tag = "302")]
    pub links: ::prost::alloc::vec::Vec<super::super::common::v1::Link>,
    /// The event details. The type must match that in `event_type`.
    #[prost(
        oneof = "history_event::Attributes",
        tags = "6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64"
    )]
    pub attributes: ::core::option::Option<history_event::Attributes>,
}
/// Nested message and enum types in `HistoryEvent`.
pub mod history_event {
    /// The event details. The type must match that in `event_type`.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Attributes {
        #[prost(message, tag = "6")]
        WorkflowExecutionStartedEventAttributes(
            super::WorkflowExecutionStartedEventAttributes,
        ),
        #[prost(message, tag = "7")]
        WorkflowExecutionCompletedEventAttributes(
            super::WorkflowExecutionCompletedEventAttributes,
        ),
        #[prost(message, tag = "8")]
        WorkflowExecutionFailedEventAttributes(
            super::WorkflowExecutionFailedEventAttributes,
        ),
        #[prost(message, tag = "9")]
        WorkflowExecutionTimedOutEventAttributes(
            super::WorkflowExecutionTimedOutEventAttributes,
        ),
        #[prost(message, tag = "10")]
        WorkflowTaskScheduledEventAttributes(
            super::WorkflowTaskScheduledEventAttributes,
        ),
        #[prost(message, tag = "11")]
        WorkflowTaskStartedEventAttributes(super::WorkflowTaskStartedEventAttributes),
        #[prost(message, tag = "12")]
        WorkflowTaskCompletedEventAttributes(
            super::WorkflowTaskCompletedEventAttributes,
        ),
        #[prost(message, tag = "13")]
        WorkflowTaskTimedOutEventAttributes(super::WorkflowTaskTimedOutEventAttributes),
        #[prost(message, tag = "14")]
        WorkflowTaskFailedEventAttributes(super::WorkflowTaskFailedEventAttributes),
        #[prost(message, tag = "15")]
        ActivityTaskScheduledEventAttributes(
            super::ActivityTaskScheduledEventAttributes,
        ),
        #[prost(message, tag = "16")]
        ActivityTaskStartedEventAttributes(super::ActivityTaskStartedEventAttributes),
        #[prost(message, tag = "17")]
        ActivityTaskCompletedEventAttributes(
            super::ActivityTaskCompletedEventAttributes,
        ),
        #[prost(message, tag = "18")]
        ActivityTaskFailedEventAttributes(super::ActivityTaskFailedEventAttributes),
        #[prost(message, tag = "19")]
        ActivityTaskTimedOutEventAttributes(super::ActivityTaskTimedOutEventAttributes),
        #[prost(message, tag = "20")]
        TimerStartedEventAttributes(super::TimerStartedEventAttributes),
        #[prost(message, tag = "21")]
        TimerFiredEventAttributes(super::TimerFiredEventAttributes),
        #[prost(message, tag = "22")]
        ActivityTaskCancelRequestedEventAttributes(
            super::ActivityTaskCancelRequestedEventAttributes,
        ),
        #[prost(message, tag = "23")]
        ActivityTaskCanceledEventAttributes(super::ActivityTaskCanceledEventAttributes),
        #[prost(message, tag = "24")]
        TimerCanceledEventAttributes(super::TimerCanceledEventAttributes),
        #[prost(message, tag = "25")]
        MarkerRecordedEventAttributes(super::MarkerRecordedEventAttributes),
        #[prost(message, tag = "26")]
        WorkflowExecutionSignaledEventAttributes(
            super::WorkflowExecutionSignaledEventAttributes,
        ),
        #[prost(message, tag = "27")]
        WorkflowExecutionTerminatedEventAttributes(
            super::WorkflowExecutionTerminatedEventAttributes,
        ),
        #[prost(message, tag = "28")]
        WorkflowExecutionCancelRequestedEventAttributes(
            super::WorkflowExecutionCancelRequestedEventAttributes,
        ),
        #[prost(message, tag = "29")]
        WorkflowExecutionCanceledEventAttributes(
            super::WorkflowExecutionCanceledEventAttributes,
        ),
        #[prost(message, tag = "30")]
        RequestCancelExternalWorkflowExecutionInitiatedEventAttributes(
            super::RequestCancelExternalWorkflowExecutionInitiatedEventAttributes,
        ),
        #[prost(message, tag = "31")]
        RequestCancelExternalWorkflowExecutionFailedEventAttributes(
            super::RequestCancelExternalWorkflowExecutionFailedEventAttributes,
        ),
        #[prost(message, tag = "32")]
        ExternalWorkflowExecutionCancelRequestedEventAttributes(
            super::ExternalWorkflowExecutionCancelRequestedEventAttributes,
        ),
        #[prost(message, tag = "33")]
        WorkflowExecutionContinuedAsNewEventAttributes(
            super::WorkflowExecutionContinuedAsNewEventAttributes,
        ),
        #[prost(message, tag = "34")]
        StartChildWorkflowExecutionInitiatedEventAttributes(
            super::StartChildWorkflowExecutionInitiatedEventAttributes,
        ),
        #[prost(message, tag = "35")]
        StartChildWorkflowExecutionFailedEventAttributes(
            super::StartChildWorkflowExecutionFailedEventAttributes,
        ),
        #[prost(message, tag = "36")]
        ChildWorkflowExecutionStartedEventAttributes(
            super::ChildWorkflowExecutionStartedEventAttributes,
        ),
        #[prost(message, tag = "37")]
        ChildWorkflowExecutionCompletedEventAttributes(
            super::ChildWorkflowExecutionCompletedEventAttributes,
        ),
        #[prost(message, tag = "38")]
        ChildWorkflowExecutionFailedEventAttributes(
            super::ChildWorkflowExecutionFailedEventAttributes,
        ),
        #[prost(message, tag = "39")]
        ChildWorkflowExecutionCanceledEventAttributes(
            super::ChildWorkflowExecutionCanceledEventAttributes,
        ),
        #[prost(message, tag = "40")]
        ChildWorkflowExecutionTimedOutEventAttributes(
            super::ChildWorkflowExecutionTimedOutEventAttributes,
        ),
        #[prost(message, tag = "41")]
        ChildWorkflowExecutionTerminatedEventAttributes(
            super::ChildWorkflowExecutionTerminatedEventAttributes,
        ),
        #[prost(message, tag = "42")]
        SignalExternalWorkflowExecutionInitiatedEventAttributes(
            super::SignalExternalWorkflowExecutionInitiatedEventAttributes,
        ),
        #[prost(message, tag = "43")]
        SignalExternalWorkflowExecutionFailedEventAttributes(
            super::SignalExternalWorkflowExecutionFailedEventAttributes,
        ),
        #[prost(message, tag = "44")]
        ExternalWorkflowExecutionSignaledEventAttributes(
            super::ExternalWorkflowExecutionSignaledEventAttributes,
        ),
        #[prost(message, tag = "45")]
        UpsertWorkflowSearchAttributesEventAttributes(
            super::UpsertWorkflowSearchAttributesEventAttributes,
        ),
        #[prost(message, tag = "46")]
        WorkflowExecutionUpdateAcceptedEventAttributes(
            super::WorkflowExecutionUpdateAcceptedEventAttributes,
        ),
        #[prost(message, tag = "47")]
        WorkflowExecutionUpdateRejectedEventAttributes(
            super::WorkflowExecutionUpdateRejectedEventAttributes,
        ),
        #[prost(message, tag = "48")]
        WorkflowExecutionUpdateCompletedEventAttributes(
            super::WorkflowExecutionUpdateCompletedEventAttributes,
        ),
        #[prost(message, tag = "49")]
        WorkflowPropertiesModifiedExternallyEventAttributes(
            super::WorkflowPropertiesModifiedExternallyEventAttributes,
        ),
        #[prost(message, tag = "50")]
        ActivityPropertiesModifiedExternallyEventAttributes(
            super::ActivityPropertiesModifiedExternallyEventAttributes,
        ),
        #[prost(message, tag = "51")]
        WorkflowPropertiesModifiedEventAttributes(
            super::WorkflowPropertiesModifiedEventAttributes,
        ),
        #[prost(message, tag = "52")]
        WorkflowExecutionUpdateAdmittedEventAttributes(
            super::WorkflowExecutionUpdateAdmittedEventAttributes,
        ),
        #[prost(message, tag = "53")]
        NexusOperationScheduledEventAttributes(
            super::NexusOperationScheduledEventAttributes,
        ),
        #[prost(message, tag = "54")]
        NexusOperationStartedEventAttributes(
            super::NexusOperationStartedEventAttributes,
        ),
        #[prost(message, tag = "55")]
        NexusOperationCompletedEventAttributes(
            super::NexusOperationCompletedEventAttributes,
        ),
        #[prost(message, tag = "56")]
        NexusOperationFailedEventAttributes(super::NexusOperationFailedEventAttributes),
        #[prost(message, tag = "57")]
        NexusOperationCanceledEventAttributes(
            super::NexusOperationCanceledEventAttributes,
        ),
        #[prost(message, tag = "58")]
        NexusOperationTimedOutEventAttributes(
            super::NexusOperationTimedOutEventAttributes,
        ),
        #[prost(message, tag = "59")]
        NexusOperationCancelRequestedEventAttributes(
            super::NexusOperationCancelRequestedEventAttributes,
        ),
        #[prost(message, tag = "60")]
        WorkflowExecutionOptionsUpdatedEventAttributes(
            super::WorkflowExecutionOptionsUpdatedEventAttributes,
        ),
        #[prost(message, tag = "61")]
        NexusOperationCancelRequestCompletedEventAttributes(
            super::NexusOperationCancelRequestCompletedEventAttributes,
        ),
        #[prost(message, tag = "62")]
        NexusOperationCancelRequestFailedEventAttributes(
            super::NexusOperationCancelRequestFailedEventAttributes,
        ),
        #[prost(message, tag = "63")]
        WorkflowExecutionPausedEventAttributes(
            super::WorkflowExecutionPausedEventAttributes,
        ),
        #[prost(message, tag = "64")]
        WorkflowExecutionUnpausedEventAttributes(
            super::WorkflowExecutionUnpausedEventAttributes,
        ),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct History {
    #[prost(message, repeated, tag = "1")]
    pub events: ::prost::alloc::vec::Vec<HistoryEvent>,
}
