Skip to main content

exocore_protos/generated/
exocore.apps.rs

1#[derive(Serialize, Deserialize)]
2#[allow(clippy::derive_partial_eq_without_eq)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct Manifest {
5    #[prost(string, tag = "1")]
6    pub name: ::prost::alloc::string::String,
7    #[prost(string, tag = "2")]
8    pub version: ::prost::alloc::string::String,
9    #[prost(string, tag = "3")]
10    pub public_key: ::prost::alloc::string::String,
11    #[prost(message, repeated, tag = "4")]
12    #[serde(default)]
13    pub schemas: ::prost::alloc::vec::Vec<ManifestSchema>,
14    #[prost(message, optional, tag = "5")]
15    pub module: ::core::option::Option<ManifestModule>,
16}
17#[derive(Serialize, Deserialize)]
18#[allow(clippy::derive_partial_eq_without_eq)]
19#[derive(Clone, PartialEq, ::prost::Message)]
20pub struct ManifestSchema {
21    #[prost(oneof = "manifest_schema::Source", tags = "1")]
22    #[serde(flatten)]
23    pub source: ::core::option::Option<manifest_schema::Source>,
24}
25/// Nested message and enum types in `ManifestSchema`.
26pub mod manifest_schema {
27    #[derive(Serialize, Deserialize)]
28    #[serde(rename_all = "lowercase")]
29    #[allow(clippy::derive_partial_eq_without_eq)]
30    #[derive(Clone, PartialEq, ::prost::Oneof)]
31    pub enum Source {
32        #[prost(string, tag = "1")]
33        File(::prost::alloc::string::String),
34    }
35}
36#[derive(Serialize, Deserialize)]
37#[allow(clippy::derive_partial_eq_without_eq)]
38#[derive(Clone, PartialEq, ::prost::Message)]
39pub struct ManifestModule {
40    #[prost(string, tag = "1")]
41    pub file: ::prost::alloc::string::String,
42    #[prost(string, tag = "2")]
43    #[serde(default)]
44    pub multihash: ::prost::alloc::string::String,
45}
46/// Message sent to application running in WASM from runtime.
47#[allow(clippy::derive_partial_eq_without_eq)]
48#[derive(Clone, PartialEq, ::prost::Message)]
49pub struct InMessage {
50    #[prost(enumeration = "in_message::InMessageType", tag = "1")]
51    pub r#type: i32,
52    /// if message is a response to a previous outgoing message, this identifier
53    /// will be the same as the outgoing message
54    #[prost(uint32, tag = "2")]
55    pub rendez_vous_id: u32,
56    #[prost(bytes = "vec", tag = "3")]
57    pub data: ::prost::alloc::vec::Vec<u8>,
58    #[prost(string, tag = "4")]
59    pub error: ::prost::alloc::string::String,
60}
61/// Nested message and enum types in `InMessage`.
62pub mod in_message {
63    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
64    #[repr(i32)]
65    pub enum InMessageType {
66        Invalid = 0,
67        StoreEntityResults = 1,
68        StoreMutationResult = 2,
69    }
70    impl InMessageType {
71        /// String value of the enum field names used in the ProtoBuf
72        /// definition.
73        ///
74        /// The values are not transformed in any way and thus are considered
75        /// stable (if the ProtoBuf definition does not change) and safe
76        /// for programmatic use.
77        pub fn as_str_name(&self) -> &'static str {
78            match self {
79                InMessageType::Invalid => "INVALID",
80                InMessageType::StoreEntityResults => "STORE_ENTITY_RESULTS",
81                InMessageType::StoreMutationResult => "STORE_MUTATION_RESULT",
82            }
83        }
84        /// Creates an enum from field names used in the ProtoBuf definition.
85        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
86            match value {
87                "INVALID" => Some(Self::Invalid),
88                "STORE_ENTITY_RESULTS" => Some(Self::StoreEntityResults),
89                "STORE_MUTATION_RESULT" => Some(Self::StoreMutationResult),
90                _ => None,
91            }
92        }
93    }
94}
95/// Message sent from application running in WASM to runtime.
96#[allow(clippy::derive_partial_eq_without_eq)]
97#[derive(Clone, PartialEq, ::prost::Message)]
98pub struct OutMessage {
99    #[prost(enumeration = "out_message::OutMessageType", tag = "1")]
100    pub r#type: i32,
101    /// if message require a response, id that will be used to match
102    /// response back to callee
103    #[prost(uint32, tag = "2")]
104    pub rendez_vous_id: u32,
105    #[prost(bytes = "vec", tag = "3")]
106    pub data: ::prost::alloc::vec::Vec<u8>,
107}
108/// Nested message and enum types in `OutMessage`.
109pub mod out_message {
110    #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
111    #[repr(i32)]
112    pub enum OutMessageType {
113        Invalid = 0,
114        StoreEntityQuery = 1,
115        StoreMutationRequest = 2,
116    }
117    impl OutMessageType {
118        /// String value of the enum field names used in the ProtoBuf
119        /// definition.
120        ///
121        /// The values are not transformed in any way and thus are considered
122        /// stable (if the ProtoBuf definition does not change) and safe
123        /// for programmatic use.
124        pub fn as_str_name(&self) -> &'static str {
125            match self {
126                OutMessageType::Invalid => "INVALID",
127                OutMessageType::StoreEntityQuery => "STORE_ENTITY_QUERY",
128                OutMessageType::StoreMutationRequest => "STORE_MUTATION_REQUEST",
129            }
130        }
131        /// Creates an enum from field names used in the ProtoBuf definition.
132        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
133            match value {
134                "INVALID" => Some(Self::Invalid),
135                "STORE_ENTITY_QUERY" => Some(Self::StoreEntityQuery),
136                "STORE_MUTATION_REQUEST" => Some(Self::StoreMutationRequest),
137                _ => None,
138            }
139        }
140    }
141}
142#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
143#[repr(i32)]
144pub enum MessageStatus {
145    Ok = 0,
146    Unhandled = 1,
147    DecodeError = 2,
148}
149impl MessageStatus {
150    /// String value of the enum field names used in the ProtoBuf definition.
151    ///
152    /// The values are not transformed in any way and thus are considered stable
153    /// (if the ProtoBuf definition does not change) and safe for programmatic
154    /// use.
155    pub fn as_str_name(&self) -> &'static str {
156        match self {
157            MessageStatus::Ok => "MESSAGE_STATUS_OK",
158            MessageStatus::Unhandled => "MESSAGE_STATUS_UNHANDLED",
159            MessageStatus::DecodeError => "MESSAGE_STATUS_DECODE_ERROR",
160        }
161    }
162    /// Creates an enum from field names used in the ProtoBuf definition.
163    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
164        match value {
165            "MESSAGE_STATUS_OK" => Some(Self::Ok),
166            "MESSAGE_STATUS_UNHANDLED" => Some(Self::Unhandled),
167            "MESSAGE_STATUS_DECODE_ERROR" => Some(Self::DecodeError),
168            _ => None,
169        }
170    }
171}