// This file is @generated by prost-build.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SerializableAsyncCall {
    #[prost(bytes = "bytes", tag = "1")]
    pub call_id: ::prost::bytes::Bytes,
    #[prost(enumeration = "SerializableAsyncCallStatus", tag = "2")]
    pub status: i32,
    #[prost(enumeration = "SerializableAsyncCallExecutionMode", tag = "3")]
    pub execution_mode: i32,
    #[prost(bytes = "bytes", tag = "5")]
    pub destination: ::prost::bytes::Bytes,
    #[prost(bytes = "bytes", tag = "6")]
    pub data: ::prost::bytes::Bytes,
    #[prost(uint64, tag = "7")]
    pub gas_limit: u64,
    #[prost(uint64, tag = "8")]
    pub gas_locked: u64,
    #[prost(bytes = "bytes", tag = "9")]
    pub value_bytes: ::prost::bytes::Bytes,
    #[prost(string, tag = "10")]
    pub success_callback: ::prost::alloc::string::String,
    #[prost(string, tag = "11")]
    pub error_callback: ::prost::alloc::string::String,
    #[prost(bytes = "bytes", tag = "12")]
    pub callback_closure: ::prost::bytes::Bytes,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SerializableAsyncCallGroup {
    #[prost(string, tag = "1")]
    pub callback: ::prost::alloc::string::String,
    #[prost(uint64, tag = "2")]
    pub gas_locked: u64,
    #[prost(bytes = "bytes", tag = "3")]
    pub callback_data: ::prost::bytes::Bytes,
    #[prost(string, tag = "4")]
    pub identifier: ::prost::alloc::string::String,
    #[prost(message, repeated, tag = "5")]
    pub async_calls: ::prost::alloc::vec::Vec<SerializableAsyncCall>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SerializableAsyncCallStatus {
    SerializableAsyncCallPending = 0,
    SerializableAsyncCallResolved = 1,
    SerializableAsyncCallRejected = 2,
}
impl SerializableAsyncCallStatus {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::SerializableAsyncCallPending => "SerializableAsyncCallPending",
            Self::SerializableAsyncCallResolved => "SerializableAsyncCallResolved",
            Self::SerializableAsyncCallRejected => "SerializableAsyncCallRejected",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "SerializableAsyncCallPending" => Some(Self::SerializableAsyncCallPending),
            "SerializableAsyncCallResolved" => Some(Self::SerializableAsyncCallResolved),
            "SerializableAsyncCallRejected" => Some(Self::SerializableAsyncCallRejected),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SerializableAsyncCallExecutionMode {
    SerializableSyncExecution = 0,
    SerializableAsyncBuiltinFuncIntraShard = 1,
    SerializableAsyncBuiltinFuncCrossShard = 2,
    SerializableAsyncUnknown = 3,
}
impl SerializableAsyncCallExecutionMode {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::SerializableSyncExecution => "SerializableSyncExecution",
            Self::SerializableAsyncBuiltinFuncIntraShard => {
                "SerializableAsyncBuiltinFuncIntraShard"
            }
            Self::SerializableAsyncBuiltinFuncCrossShard => {
                "SerializableAsyncBuiltinFuncCrossShard"
            }
            Self::SerializableAsyncUnknown => "SerializableAsyncUnknown",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "SerializableSyncExecution" => Some(Self::SerializableSyncExecution),
            "SerializableAsyncBuiltinFuncIntraShard" => {
                Some(Self::SerializableAsyncBuiltinFuncIntraShard)
            }
            "SerializableAsyncBuiltinFuncCrossShard" => {
                Some(Self::SerializableAsyncBuiltinFuncCrossShard)
            }
            "SerializableAsyncUnknown" => Some(Self::SerializableAsyncUnknown),
            _ => None,
        }
    }
}
