// This file is @generated by prost-build.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApplicationFailureInfo {
    #[prost(string, tag = "1")]
    pub r#type: ::prost::alloc::string::String,
    #[prost(bool, tag = "2")]
    pub non_retryable: bool,
    #[prost(message, optional, tag = "3")]
    pub details: ::core::option::Option<super::super::common::v1::Payloads>,
    /// next_retry_delay can be used by the client to override the activity
    /// retry interval calculated by the retry policy. Retry attempts will
    /// still be subject to the maximum retries limit and total time limit
    /// defined by the policy.
    #[prost(message, optional, tag = "4")]
    pub next_retry_delay: ::core::option::Option<::prost_types::Duration>,
    #[prost(
        enumeration = "super::super::enums::v1::ApplicationErrorCategory",
        tag = "5"
    )]
    pub category: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TimeoutFailureInfo {
    #[prost(enumeration = "super::super::enums::v1::TimeoutType", tag = "1")]
    pub timeout_type: i32,
    #[prost(message, optional, tag = "2")]
    pub last_heartbeat_details: ::core::option::Option<
        super::super::common::v1::Payloads,
    >,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CanceledFailureInfo {
    #[prost(message, optional, tag = "1")]
    pub details: ::core::option::Option<super::super::common::v1::Payloads>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TerminatedFailureInfo {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ServerFailureInfo {
    #[prost(bool, tag = "1")]
    pub non_retryable: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResetWorkflowFailureInfo {
    #[prost(message, optional, tag = "1")]
    pub last_heartbeat_details: ::core::option::Option<
        super::super::common::v1::Payloads,
    >,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActivityFailureInfo {
    #[prost(int64, tag = "1")]
    pub scheduled_event_id: i64,
    #[prost(int64, tag = "2")]
    pub started_event_id: i64,
    #[prost(string, tag = "3")]
    pub identity: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "4")]
    pub activity_type: ::core::option::Option<super::super::common::v1::ActivityType>,
    #[prost(string, tag = "5")]
    pub activity_id: ::prost::alloc::string::String,
    #[prost(enumeration = "super::super::enums::v1::RetryState", tag = "6")]
    pub retry_state: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChildWorkflowExecutionFailureInfo {
    #[prost(string, tag = "1")]
    pub namespace: ::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>,
    #[prost(int64, tag = "4")]
    pub initiated_event_id: i64,
    #[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 NexusOperationFailureInfo {
    /// The NexusOperationScheduled event ID.
    #[prost(int64, tag = "1")]
    pub scheduled_event_id: i64,
    /// Endpoint name.
    #[prost(string, tag = "2")]
    pub endpoint: ::prost::alloc::string::String,
    /// Service name.
    #[prost(string, tag = "3")]
    pub service: ::prost::alloc::string::String,
    /// Operation name.
    #[prost(string, tag = "4")]
    pub operation: ::prost::alloc::string::String,
    /// Operation ID - may be empty if the operation completed synchronously.
    ///
    /// Deprecated. Renamed to operation_token.
    #[deprecated]
    #[prost(string, tag = "5")]
    pub operation_id: ::prost::alloc::string::String,
    /// Operation token - may be empty if the operation completed synchronously.
    #[prost(string, tag = "6")]
    pub operation_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NexusHandlerFailureInfo {
    /// The Nexus error type as defined in the spec:
    /// <https://github.com/nexus-rpc/api/blob/main/SPEC.md#predefined-handler-errors.>
    #[prost(string, tag = "1")]
    pub r#type: ::prost::alloc::string::String,
    /// Retry behavior, defaults to the retry behavior of the error type as defined in the spec.
    #[prost(
        enumeration = "super::super::enums::v1::NexusHandlerErrorRetryBehavior",
        tag = "2"
    )]
    pub retry_behavior: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Failure {
    #[prost(string, tag = "1")]
    pub message: ::prost::alloc::string::String,
    /// The source this Failure originated in, e.g. TypeScriptSDK / JavaSDK
    /// In some SDKs this is used to rehydrate the stack trace into an exception object.
    #[prost(string, tag = "2")]
    pub source: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub stack_trace: ::prost::alloc::string::String,
    /// Alternative way to supply `message` and `stack_trace` and possibly other attributes, used for encryption of
    /// errors originating in user code which might contain sensitive information.
    /// The `encoded_attributes` Payload could represent any serializable object, e.g. JSON object or a `Failure` proto
    /// message.
    ///
    /// SDK authors:
    /// - The SDK should provide a default `encodeFailureAttributes` and `decodeFailureAttributes` implementation that:
    ///    - Uses a JSON object to represent `{ message, stack_trace }`.
    ///    - Overwrites the original message with "Encoded failure" to indicate that more information could be extracted.
    ///    - Overwrites the original stack_trace with an empty string.
    ///    - The resulting JSON object is converted to Payload using the default PayloadConverter and should be processed
    ///      by the user-provided PayloadCodec
    ///
    /// - If there's demand, we could allow overriding the default SDK implementation to encode other opaque Failure attributes.
    /// (-- api-linter: core::0203::optional=disabled --)
    #[prost(message, optional, tag = "20")]
    pub encoded_attributes: ::core::option::Option<super::super::common::v1::Payload>,
    #[prost(message, optional, boxed, tag = "4")]
    pub cause: ::core::option::Option<::prost::alloc::boxed::Box<Failure>>,
    #[prost(oneof = "failure::FailureInfo", tags = "5, 6, 7, 8, 9, 10, 11, 12, 13, 14")]
    pub failure_info: ::core::option::Option<failure::FailureInfo>,
}
/// Nested message and enum types in `Failure`.
pub mod failure {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum FailureInfo {
        #[prost(message, tag = "5")]
        ApplicationFailureInfo(super::ApplicationFailureInfo),
        #[prost(message, tag = "6")]
        TimeoutFailureInfo(super::TimeoutFailureInfo),
        #[prost(message, tag = "7")]
        CanceledFailureInfo(super::CanceledFailureInfo),
        #[prost(message, tag = "8")]
        TerminatedFailureInfo(super::TerminatedFailureInfo),
        #[prost(message, tag = "9")]
        ServerFailureInfo(super::ServerFailureInfo),
        #[prost(message, tag = "10")]
        ResetWorkflowFailureInfo(super::ResetWorkflowFailureInfo),
        #[prost(message, tag = "11")]
        ActivityFailureInfo(super::ActivityFailureInfo),
        #[prost(message, tag = "12")]
        ChildWorkflowExecutionFailureInfo(super::ChildWorkflowExecutionFailureInfo),
        #[prost(message, tag = "13")]
        NexusOperationExecutionFailureInfo(super::NexusOperationFailureInfo),
        #[prost(message, tag = "14")]
        NexusHandlerFailureInfo(super::NexusHandlerFailureInfo),
    }
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MultiOperationExecutionAborted {}
