Skip to main content

harmos_protocol/
host.rs

1// This file is @generated by prost-build.
2/// Carries the operation identity, expected contract fingerprint and encoded payload for Invocations.Create.
3#[allow(clippy::all)]
4#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5pub struct InvocationsCreateRequest {
6    /// Complete admitted operation routing identity; no provider prefix or provider selection is added.
7    #[prost(string, tag = "1")]
8    pub operation: ::prost::alloc::string::String,
9    /// Expected operation contract digest used for admission; incompatible definitions refuse rather than invoking another shape.
10    #[prost(bytes = "vec", tag = "2")]
11    pub fingerprint: ::prost::alloc::vec::Vec<u8>,
12    /// Encoded request of operation under the supplied contract fingerprint.
13    #[prost(bytes = "vec", tag = "3")]
14    pub payload: ::prost::alloc::vec::Vec<u8>,
15}
16/// Carries the declared operation's encoded unary result after admission and execution.
17#[allow(clippy::all)]
18#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
19pub struct InvocationsCreateResponse {
20    /// Encoded unary response of the invoked operation, including empty bytes for an empty success message.
21    #[prost(bytes = "vec", tag = "1")]
22    pub payload: ::prost::alloc::vec::Vec<u8>,
23}
24/// Carries the invocation handle for Invocations.Get.
25#[allow(clippy::all)]
26#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
27pub struct InvocationsGetRequest {
28    /// Host-issued invocation handle; lifecycle access is restricted to the caller that owns the instance.
29    #[prost(uint64, tag = "1")]
30    pub instance: u64,
31}
32/// Reports the caller-owned invocation's current lifecycle state without returning its operation payload.
33#[allow(clippy::all)]
34#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
35pub struct InvocationsGetResponse {
36    /// Current lifecycle state of the caller-owned instance; this does not carry its operation response payload.
37    #[prost(message, optional, tag = "1")]
38    pub invocation: ::core::option::Option<crate::model::InstanceState>,
39}
40/// Carries the invocation handle and reason text for Invocations.Cancel.
41#[allow(clippy::all)]
42#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
43pub struct InvocationsCancelRequest {
44    /// Host-issued invocation handle; lifecycle access is restricted to the caller that owns the instance.
45    #[prost(uint64, tag = "1")]
46    pub instance: u64,
47    #[prost(string, tag = "2")]
48    pub reason: ::prost::alloc::string::String,
49}
50/// Reports lifecycle state after requesting cancellation; a cooperative handler may still produce its final result.
51#[allow(clippy::all)]
52#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
53pub struct InvocationsCancelResponse {
54    /// Current lifecycle state of the caller-owned instance; this does not carry its operation response payload.
55    #[prost(message, optional, tag = "1")]
56    pub invocation: ::core::option::Option<crate::model::InstanceState>,
57}
58/// Carries the invocation handle for Invocations.Watch.
59#[allow(clippy::all)]
60#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
61pub struct InvocationsWatchRequest {
62    /// Host-issued invocation handle; lifecycle access is restricted to the caller that owns the instance.
63    #[prost(uint64, tag = "1")]
64    pub instance: u64,
65}
66/// Reports a lifecycle state observed while following the caller-owned invocation through settlement.
67#[allow(clippy::all)]
68#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
69pub struct InvocationsWatchResponse {
70    /// Current lifecycle state of the caller-owned instance; this does not carry its operation response payload.
71    #[prost(message, optional, tag = "1")]
72    pub invocation: ::core::option::Option<crate::model::InstanceState>,
73}
74/// Requests the calling party's complete admitted operation inventory.
75#[allow(clippy::all)]
76#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
77pub struct OperationsListRequest {}
78/// Returns typed admitted operations and their owner, generation, projections and caller-specific grants.
79#[allow(clippy::all)]
80#[derive(Clone, PartialEq, ::prost::Message)]
81pub struct OperationsListResponse {
82    #[prost(message, repeated, tag = "1")]
83    pub operations: ::prost::alloc::vec::Vec<crate::model::DiscoveredOperation>,
84}
85/// Selects one complete operation identity from the admitted registry.
86#[allow(clippy::all)]
87#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
88pub struct OperationsGetRequest {
89    #[prost(string, tag = "1")]
90    pub id: ::prost::alloc::string::String,
91}
92/// Returns the selected operation's contract and caller-specific discovery metadata.
93#[allow(clippy::all)]
94#[derive(Clone, PartialEq, ::prost::Message)]
95pub struct OperationsGetResponse {
96    #[prost(message, optional, tag = "1")]
97    pub operation: ::core::option::Option<crate::model::DiscoveredOperation>,
98}
99/// Carries the resource name and read boundary for Plugins.Get.
100#[allow(clippy::all)]
101#[derive(Clone, PartialEq, ::prost::Message)]
102pub struct PluginsGetRequest {
103    /// Persisted management entry identity, distinct from an advertised plugin/declarations ID.
104    #[prost(string, tag = "1")]
105    pub name: ::prost::alloc::string::String,
106    /// Unset selects the latest manager snapshot; otherwise use an issued retained manager cut. Foreign, expired and unissued cuts refuse.
107    #[prost(message, optional, tag = "2")]
108    pub at: ::core::option::Option<crate::model::ReadCut>,
109}
110/// Returns one entry from the selected retained manager snapshot with its cut.
111#[allow(clippy::all)]
112#[derive(Clone, PartialEq, ::prost::Message)]
113pub struct PluginsGetResponse {
114    #[prost(message, optional, tag = "1")]
115    pub entry: ::core::option::Option<PluginEntry>,
116    /// Issued boundary actually selected for this response; retain and resend it unchanged to continue the same read.
117    #[prost(message, optional, tag = "2")]
118    pub resolved_at: ::core::option::Option<crate::model::ReadCut>,
119}
120/// Carries the read boundary for Plugins.List.
121#[allow(clippy::all)]
122#[derive(Clone, PartialEq, ::prost::Message)]
123pub struct PluginsListRequest {
124    /// Unset selects the latest manager snapshot; otherwise use an issued retained manager cut. Foreign, expired and unissued cuts refuse.
125    #[prost(message, optional, tag = "1")]
126    pub at: ::core::option::Option<crate::model::ReadCut>,
127}
128/// Returns the complete selected manager inventory with its cut.
129#[allow(clippy::all)]
130#[derive(Clone, PartialEq, ::prost::Message)]
131pub struct PluginsListResponse {
132    #[prost(message, repeated, tag = "1")]
133    pub entries: ::prost::alloc::vec::Vec<PluginEntry>,
134    /// Issued boundary actually selected for this response; retain and resend it unchanged to continue the same read.
135    #[prost(message, optional, tag = "2")]
136    pub resolved_at: ::core::option::Option<crate::model::ReadCut>,
137}
138/// Carries the resource name and read boundary for Plugins.Watch.
139#[allow(clippy::all)]
140#[derive(Clone, PartialEq, ::prost::Message)]
141pub struct PluginsWatchRequest {
142    /// Empty watches all entries; otherwise selects this exact management entry name.
143    #[prost(string, optional, tag = "1")]
144    pub name: ::core::option::Option<::prost::alloc::string::String>,
145    /// Unset selects the latest manager snapshot; otherwise use an issued retained manager cut. Foreign, expired and unissued cuts refuse.
146    #[prost(message, optional, tag = "2")]
147    pub at: ::core::option::Option<crate::model::ReadCut>,
148}
149/// Distinguishes an opening snapshot, entry changes and a requirement to restart the read.
150#[allow(clippy::all)]
151#[derive(Clone, PartialEq, ::prost::Message)]
152pub struct PluginsWatchResponse {
153    /// Issued boundary actually selected for this response; retain and resend it unchanged to continue the same read.
154    #[prost(message, optional, tag = "1")]
155    pub resolved_at: ::core::option::Option<crate::model::ReadCut>,
156    /// Selects one variant; an unset discriminator carries no selected value.
157    #[prost(oneof = "plugins_watch_response::Event", tags = "2, 3, 4")]
158    pub event: ::core::option::Option<plugins_watch_response::Event>,
159}
160/// Nested message and enum types in `PluginsWatchResponse`.
161pub mod plugins_watch_response {
162    /// Selects one variant; an unset discriminator carries no selected value.
163    #[allow(clippy::all)]
164    #[derive(Clone, PartialEq, ::prost::Oneof)]
165    pub enum Event {
166        /// Required retained snapshot handle issued by this owner; preserve its token and original position.
167        #[prost(message, tag = "2")]
168        Snapshot(super::PluginSnapshot),
169        #[prost(message, tag = "3")]
170        Change(super::PluginChange),
171        /// Continuity is unavailable; open a fresh read instead of treating this event as a successful continuation.
172        #[prost(string, tag = "4")]
173        ResyncRequired(::prost::alloc::string::String),
174    }
175}
176/// Carries the request id, resource name, placement and replacement value for Plugins.Create.
177#[allow(clippy::all)]
178#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
179pub struct PluginsCreateRequest {
180    /// Nonempty caller-chosen identity for Create replay. Identical input returns its original response; reuse with changed input refuses.
181    #[prost(string, tag = "1")]
182    pub request_id: ::prost::alloc::string::String,
183    /// Persisted management entry identity, distinct from an advertised plugin/declarations ID.
184    #[prost(string, tag = "2")]
185    pub name: ::prost::alloc::string::String,
186    #[prost(message, optional, tag = "3")]
187    pub placement: ::core::option::Option<PluginPlacement>,
188    #[prost(message, optional, tag = "4")]
189    pub value: ::core::option::Option<PluginValue>,
190    /// Opaque creator-chosen label; empty or absent means unspecified and replacement preserves it.
191    #[prost(string, optional, tag = "5")]
192    pub origin: ::core::option::Option<::prost::alloc::string::String>,
193}
194/// Returns the created entry and persisted receipt; identical request-ID replay returns this original response.
195#[allow(clippy::all)]
196#[derive(Clone, PartialEq, ::prost::Message)]
197pub struct PluginsCreateResponse {
198    #[prost(message, optional, tag = "1")]
199    pub entry: ::core::option::Option<PluginEntry>,
200    #[prost(message, optional, tag = "2")]
201    pub receipt: ::core::option::Option<crate::model::Receipt>,
202}
203/// Carries the resource name, replacement value and expected revision for Plugins.Set.
204#[allow(clippy::all)]
205#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
206pub struct PluginsSetRequest {
207    /// Persisted management entry identity, distinct from an advertised plugin/declarations ID.
208    #[prost(string, tag = "1")]
209    pub name: ::prost::alloc::string::String,
210    #[prost(message, optional, tag = "2")]
211    pub value: ::core::option::Option<PluginValue>,
212    /// Exact revision returned by the corresponding read. A mismatch refuses; read again before retrying with changed input.
213    #[prost(bytes = "vec", tag = "3")]
214    pub expected_revision: ::prost::alloc::vec::Vec<u8>,
215}
216/// Returns the resulting entry and mutation receipt after applying its complete writable value.
217#[allow(clippy::all)]
218#[derive(Clone, PartialEq, ::prost::Message)]
219pub struct PluginsSetResponse {
220    #[prost(message, optional, tag = "1")]
221    pub entry: ::core::option::Option<PluginEntry>,
222    #[prost(message, optional, tag = "2")]
223    pub receipt: ::core::option::Option<crate::model::Receipt>,
224}
225/// Carries the resource name and expected revision for Plugins.Delete.
226#[allow(clippy::all)]
227#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
228pub struct PluginsDeleteRequest {
229    /// Persisted management entry identity, distinct from an advertised plugin/declarations ID.
230    #[prost(string, tag = "1")]
231    pub name: ::prost::alloc::string::String,
232    /// Exact revision returned by the corresponding read. A mismatch refuses; read again before retrying with changed input.
233    #[prost(bytes = "vec", tag = "2")]
234    pub expected_revision: ::prost::alloc::vec::Vec<u8>,
235}
236/// Returns the durable management deletion receipt without exposing retired installation content.
237#[allow(clippy::all)]
238#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
239pub struct PluginsDeleteResponse {
240    #[prost(message, optional, tag = "1")]
241    pub receipt: ::core::option::Option<crate::model::Receipt>,
242}
243/// Carries the resource name and expected revision for Plugins.Restart.
244#[allow(clippy::all)]
245#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
246pub struct PluginsRestartRequest {
247    /// Persisted management entry identity, distinct from an advertised plugin/declarations ID.
248    #[prost(string, tag = "1")]
249    pub name: ::prost::alloc::string::String,
250    /// Exact revision returned by the corresponding read. A mismatch refuses; read again before retrying with changed input.
251    #[prost(bytes = "vec", tag = "2")]
252    pub expected_revision: ::prost::alloc::vec::Vec<u8>,
253}
254/// Returns the entry with its replacement activation initiated; connection readiness is observed separately.
255#[allow(clippy::all)]
256#[derive(Clone, PartialEq, ::prost::Message)]
257pub struct PluginsRestartResponse {
258    #[prost(message, optional, tag = "1")]
259    pub entry: ::core::option::Option<PluginEntry>,
260}
261/// Carries the existing entry name, new managed placement, expected revision and replay identity.
262#[allow(clippy::all)]
263#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
264pub struct PluginsReplaceRequest {
265    #[prost(string, tag = "1")]
266    pub name: ::prost::alloc::string::String,
267    /// Required managed placement; replacement does not turn a remote entry into a managed one.
268    #[prost(message, optional, tag = "2")]
269    pub placement: ::core::option::Option<PluginPlacement>,
270    /// Issued entry revision; a conflict requires getting the entry again before retrying.
271    #[prost(bytes = "vec", tag = "3")]
272    pub expected_revision: ::prost::alloc::vec::Vec<u8>,
273    /// Nonempty request identity; identical input replays the original outcome and changed input refuses.
274    #[prost(string, tag = "4")]
275    pub request_id: ::prost::alloc::string::String,
276}
277/// Returns the replaced entry and its persisted mutation receipt.
278#[allow(clippy::all)]
279#[derive(Clone, PartialEq, ::prost::Message)]
280pub struct PluginsReplaceResponse {
281    #[prost(message, optional, tag = "1")]
282    pub entry: ::core::option::Option<PluginEntry>,
283    #[prost(message, optional, tag = "2")]
284    pub receipt: ::core::option::Option<crate::model::Receipt>,
285}
286/// Contains the writable enablement state of a managed plugin entry.
287#[allow(clippy::all)]
288#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
289pub struct PluginValue {
290    #[prost(bool, tag = "1")]
291    pub enabled: bool,
292}
293/// Captures the running plugin's advertised identity, process start, negotiated revision and declarations.
294#[allow(clippy::all)]
295#[derive(Clone, PartialEq, ::prost::Message)]
296pub struct PluginDescription {
297    /// Plugin-advertised identity, distinct from the persisted management entry name.
298    #[prost(string, tag = "1")]
299    pub id: ::prost::alloc::string::String,
300    /// Plugin-advertised semantic version, distinct from the negotiated protocol revision.
301    #[prost(string, tag = "2")]
302    pub version: ::prost::alloc::string::String,
303    /// Plugin process startup timestamp, stable across connections to that process.
304    #[prost(message, optional, tag = "3")]
305    pub started_at: ::core::option::Option<::prost_types::Timestamp>,
306    #[prost(message, optional, tag = "4")]
307    pub declarations: ::core::option::Option<crate::model::Declarations>,
308    /// Negotiated protocol revision, not a conditional management revision.
309    #[prost(uint32, tag = "5")]
310    pub revision: u32,
311    #[prost(string, tag = "6")]
312    pub sdk: ::prost::alloc::string::String,
313    #[prost(string, tag = "7")]
314    pub sdk_version: ::prost::alloc::string::String,
315}
316/// Connects the host to a remote plain HTTP plugin endpoint; the manager validates endpoint syntax.
317#[allow(clippy::all)]
318#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
319pub struct PluginRemote {
320    #[prost(string, tag = "1")]
321    pub url: ::prost::alloc::string::String,
322}
323/// Content references resolve through the library's in-process content owner; uploading belongs to the product.
324#[allow(clippy::all)]
325#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
326pub struct PluginManaged {
327    #[prost(message, optional, tag = "1")]
328    pub content: ::core::option::Option<crate::model::FileReference>,
329    /// Expected 32-byte digest of the uploaded executable content.
330    #[prost(bytes = "vec", tag = "2")]
331    pub sha256: ::prost::alloc::vec::Vec<u8>,
332}
333/// Marks a WebAssembly module registered in-process by the host. The host owns module loading and re-registration after restart.
334#[allow(clippy::all)]
335#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
336pub struct PluginGuest {}
337/// Chooses managed uploaded content, a remote process or a host-registered WebAssembly guest.
338#[allow(clippy::all)]
339#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
340pub struct PluginPlacement {
341    /// Selects one variant; an unset discriminator carries no selected value.
342    #[prost(oneof = "plugin_placement::Kind", tags = "1, 2, 3")]
343    pub kind: ::core::option::Option<plugin_placement::Kind>,
344}
345/// Nested message and enum types in `PluginPlacement`.
346pub mod plugin_placement {
347    /// Selects one variant; an unset discriminator carries no selected value.
348    #[allow(clippy::all)]
349    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
350    pub enum Kind {
351        #[prost(message, tag = "1")]
352        Managed(super::PluginManaged),
353        #[prost(message, tag = "2")]
354        Remote(super::PluginRemote),
355        #[prost(message, tag = "3")]
356        Guest(super::PluginGuest),
357    }
358}
359/// Reports the managed child process identity, executable digest and process start time.
360#[allow(clippy::all)]
361#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
362pub struct PluginProcess {
363    /// Native managed child process ID; absent process metadata does not imply a remote process ID.
364    #[prost(uint32, tag = "1")]
365    pub id: u32,
366    /// Digest of the managed executable selected for this process.
367    #[prost(bytes = "vec", tag = "2")]
368    pub executable_digest: ::prost::alloc::vec::Vec<u8>,
369    /// Managed process start timestamp, distinct from activation/reconnect identity.
370    #[prost(message, optional, tag = "3")]
371    pub started_at: ::core::option::Option<::prost_types::Timestamp>,
372}
373/// Combines persisted management state with observed activation, process and failure information.
374#[allow(clippy::all)]
375#[derive(Clone, PartialEq, ::prost::Message)]
376pub struct PluginEntry {
377    /// Persisted management entry identity, distinct from the plugin's advertised declarations ID.
378    #[prost(string, tag = "1")]
379    pub name: ::prost::alloc::string::String,
380    #[prost(message, optional, tag = "2")]
381    pub placement: ::core::option::Option<PluginPlacement>,
382    #[prost(message, optional, tag = "3")]
383    pub value: ::core::option::Option<PluginValue>,
384    /// Opaque conditional revision of the management value; resend it unchanged to Set/Delete/Restart.
385    #[prost(bytes = "vec", tag = "4")]
386    pub revision: ::prost::alloc::vec::Vec<u8>,
387    #[prost(enumeration = "PluginState", tag = "5")]
388    pub state: i32,
389    /// Absent when the entry has no reported failure; failures retain machine classification and diagnostics.
390    #[prost(message, optional, tag = "6")]
391    pub failure: ::core::option::Option<crate::model::Failure>,
392    /// Advertised description when an activation has supplied it; absent before discovery is available.
393    #[prost(message, optional, tag = "7")]
394    pub description: ::core::option::Option<PluginDescription>,
395    /// Digest of the declarations observed for this entry's activation.
396    #[prost(bytes = "vec", tag = "8")]
397    pub declarations_digest: ::prost::alloc::vec::Vec<u8>,
398    /// Managed process metadata when available; remote placement does not supply managed process metadata.
399    #[prost(message, optional, tag = "9")]
400    pub process: ::core::option::Option<PluginProcess>,
401    /// Generation of the entry's activation; old calls and handles do not follow its replacement.
402    #[prost(uint64, tag = "10")]
403    pub activation: u64,
404    /// Opaque creator-chosen label; empty means unspecified and only Delete then Create can change it.
405    #[prost(string, tag = "11")]
406    pub origin: ::prost::alloc::string::String,
407}
408/// Carries the entries selected at the opening boundary of a plugin watch.
409#[allow(clippy::all)]
410#[derive(Clone, PartialEq, ::prost::Message)]
411pub struct PluginSnapshot {
412    #[prost(message, repeated, tag = "1")]
413    pub entries: ::prost::alloc::vec::Vec<PluginEntry>,
414}
415/// Replaces one entry or identifies an entry removed from the manager.
416#[allow(clippy::all)]
417#[derive(Clone, PartialEq, ::prost::Message)]
418pub struct PluginChange {
419    /// Selects one variant; an unset discriminator carries no selected value.
420    #[prost(oneof = "plugin_change::Kind", tags = "1, 2")]
421    pub kind: ::core::option::Option<plugin_change::Kind>,
422}
423/// Nested message and enum types in `PluginChange`.
424pub mod plugin_change {
425    /// Selects one variant; an unset discriminator carries no selected value.
426    #[allow(clippy::all)]
427    #[derive(Clone, PartialEq, ::prost::Oneof)]
428    pub enum Kind {
429        #[prost(message, tag = "1")]
430        Entry(super::PluginEntry),
431        #[prost(string, tag = "2")]
432        Deleted(::prost::alloc::string::String),
433    }
434}
435/// The Persisted Entry Lifecycle, Independent of Its Placement.
436#[allow(clippy::all)]
437#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
438#[repr(i32)]
439pub enum PluginState {
440    Unspecified = 0,
441    Connecting = 1,
442    Ready = 2,
443    Unavailable = 3,
444    Stopped = 4,
445    Stopping = 5,
446}
447impl PluginState {
448    /// String value of the enum field names used in the ProtoBuf definition.
449    ///
450    /// The values are not transformed in any way and thus are considered stable
451    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
452    pub fn as_str_name(&self) -> &'static str {
453        match self {
454            Self::Unspecified => "PLUGIN_STATE_UNSPECIFIED",
455            Self::Connecting => "PLUGIN_STATE_CONNECTING",
456            Self::Ready => "PLUGIN_STATE_READY",
457            Self::Unavailable => "PLUGIN_STATE_UNAVAILABLE",
458            Self::Stopped => "PLUGIN_STATE_STOPPED",
459            Self::Stopping => "PLUGIN_STATE_STOPPING",
460        }
461    }
462    /// Creates an enum from field names used in the ProtoBuf definition.
463    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
464        match value {
465            "PLUGIN_STATE_UNSPECIFIED" => Some(Self::Unspecified),
466            "PLUGIN_STATE_CONNECTING" => Some(Self::Connecting),
467            "PLUGIN_STATE_READY" => Some(Self::Ready),
468            "PLUGIN_STATE_UNAVAILABLE" => Some(Self::Unavailable),
469            "PLUGIN_STATE_STOPPED" => Some(Self::Stopped),
470            "PLUGIN_STATE_STOPPING" => Some(Self::Stopping),
471            _ => None,
472        }
473    }
474}
475/// Identifies a persisted schema revision and its payload encoding; version numbers are identity, not a conversion request.
476#[allow(clippy::all)]
477#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
478pub struct SchemaKey {
479    /// Persistent schema identity; a type change does not silently reinterpret previously stored payloads.
480    #[prost(string, tag = "1")]
481    pub id: ::prost::alloc::string::String,
482    /// Opaque schema revision identity, including derived stream revisions; numeric ordering does not select current.
483    #[prost(uint32, tag = "2")]
484    pub version: u32,
485    #[prost(enumeration = "PayloadEncoding", tag = "3")]
486    pub payload_encoding: i32,
487}
488/// Describes a persisted field's name, tag, scalar kind, cardinality and optional referenced definition.
489#[allow(clippy::all)]
490#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
491pub struct SchemaField {
492    /// Persisted field name used by schema traversal and query field paths.
493    #[prost(string, tag = "1")]
494    pub name: ::prost::alloc::string::String,
495    /// Field/variant tag retained by the persisted schema.
496    #[prost(uint32, tag = "2")]
497    pub tag: u32,
498    #[prost(enumeration = "SchemaKind", tag = "3")]
499    pub kind: i32,
500    #[prost(enumeration = "SchemaCardinality", tag = "4")]
501    pub cardinality: i32,
502    /// Index into SchemaGraph.definitions for MESSAGE fields; required for messages and refused on scalar fields.
503    #[prost(uint64, optional, tag = "5")]
504    pub definition: ::core::option::Option<u64>,
505}
506/// Keeps a definition's fields in payload order; reordering can change Postcard decoding.
507#[allow(clippy::all)]
508#[derive(Clone, PartialEq, ::prost::Message)]
509pub struct SchemaDefinition {
510    #[prost(message, repeated, tag = "1")]
511    pub fields: ::prost::alloc::vec::Vec<SchemaField>,
512}
513/// Retains serialization form, tagging and omission metadata for one schema definition.
514#[allow(clippy::all)]
515#[derive(Clone, PartialEq, ::prost::Message)]
516pub struct SchemaRepresentation {
517    /// Index of the definition described by this representation.
518    #[prost(uint64, tag = "1")]
519    pub definition: u64,
520    #[prost(enumeration = "SchemaForm", tag = "2")]
521    pub form: i32,
522    /// Serialization tag name when present; unset supplies no explicit tag.
523    #[prost(string, optional, tag = "3")]
524    pub tag: ::core::option::Option<::prost::alloc::string::String>,
525    /// Serialization content-field name when present; unset supplies no explicit content field.
526    #[prost(string, optional, tag = "4")]
527    pub content: ::core::option::Option<::prost::alloc::string::String>,
528    #[prost(map = "string, enumeration(SchemaOmission)", tag = "5")]
529    pub omissions: ::std::collections::HashMap<::prost::alloc::string::String, i32>,
530    #[prost(string, repeated, tag = "6")]
531    pub maps: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
532}
533/// Owns a finite, indexed schema graph with an explicit root and serialization representations.
534#[allow(clippy::all)]
535#[derive(Clone, PartialEq, ::prost::Message)]
536pub struct SchemaGraph {
537    /// Index into definitions of the graph's root definition.
538    #[prost(uint64, tag = "1")]
539    pub root: u64,
540    #[prost(message, repeated, tag = "2")]
541    pub definitions: ::prost::alloc::vec::Vec<SchemaDefinition>,
542    #[prost(message, repeated, tag = "3")]
543    pub representations: ::prost::alloc::vec::Vec<SchemaRepresentation>,
544}
545/// Storage schema graphs describe persisted payloads; they do not change their encoding.
546#[allow(clippy::all)]
547#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
548#[repr(i32)]
549pub enum PayloadEncoding {
550    Unspecified = 0,
551    PostcardV1 = 1,
552}
553impl PayloadEncoding {
554    /// String value of the enum field names used in the ProtoBuf definition.
555    ///
556    /// The values are not transformed in any way and thus are considered stable
557    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
558    pub fn as_str_name(&self) -> &'static str {
559        match self {
560            Self::Unspecified => "PAYLOAD_ENCODING_UNSPECIFIED",
561            Self::PostcardV1 => "POSTCARD_V1",
562        }
563    }
564    /// Creates an enum from field names used in the ProtoBuf definition.
565    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
566        match value {
567            "PAYLOAD_ENCODING_UNSPECIFIED" => Some(Self::Unspecified),
568            "POSTCARD_V1" => Some(Self::PostcardV1),
569            _ => None,
570        }
571    }
572}
573/// The Number of Values Carried by a Schema Field.
574#[allow(clippy::all)]
575#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
576#[repr(i32)]
577pub enum SchemaCardinality {
578    Required = 0,
579    Optional = 1,
580    Repeated = 2,
581    Variant = 3,
582}
583impl SchemaCardinality {
584    /// String value of the enum field names used in the ProtoBuf definition.
585    ///
586    /// The values are not transformed in any way and thus are considered stable
587    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
588    pub fn as_str_name(&self) -> &'static str {
589        match self {
590            Self::Required => "REQUIRED",
591            Self::Optional => "OPTIONAL",
592            Self::Repeated => "REPEATED",
593            Self::Variant => "VARIANT",
594        }
595    }
596    /// Creates an enum from field names used in the ProtoBuf definition.
597    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
598        match value {
599            "REQUIRED" => Some(Self::Required),
600            "OPTIONAL" => Some(Self::Optional),
601            "REPEATED" => Some(Self::Repeated),
602            "VARIANT" => Some(Self::Variant),
603            _ => None,
604        }
605    }
606}
607/// The Primitive or Composite Value Category of a Field.
608#[allow(clippy::all)]
609#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
610#[repr(i32)]
611pub enum SchemaKind {
612    Bool = 0,
613    Uint32 = 1,
614    Uint64 = 2,
615    Int32 = 3,
616    Int64 = 4,
617    Float32 = 5,
618    Float64 = 6,
619    String = 7,
620    Bytes = 8,
621    Message = 9,
622}
623impl SchemaKind {
624    /// String value of the enum field names used in the ProtoBuf definition.
625    ///
626    /// The values are not transformed in any way and thus are considered stable
627    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
628    pub fn as_str_name(&self) -> &'static str {
629        match self {
630            Self::Bool => "BOOL",
631            Self::Uint32 => "UINT32",
632            Self::Uint64 => "UINT64",
633            Self::Int32 => "INT32",
634            Self::Int64 => "INT64",
635            Self::Float32 => "FLOAT32",
636            Self::Float64 => "FLOAT64",
637            Self::String => "STRING",
638            Self::Bytes => "BYTES",
639            Self::Message => "MESSAGE",
640        }
641    }
642    /// Creates an enum from field names used in the ProtoBuf definition.
643    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
644        match value {
645            "BOOL" => Some(Self::Bool),
646            "UINT32" => Some(Self::Uint32),
647            "UINT64" => Some(Self::Uint64),
648            "INT32" => Some(Self::Int32),
649            "INT64" => Some(Self::Int64),
650            "FLOAT32" => Some(Self::Float32),
651            "FLOAT64" => Some(Self::Float64),
652            "STRING" => Some(Self::String),
653            "BYTES" => Some(Self::Bytes),
654            "MESSAGE" => Some(Self::Message),
655            _ => None,
656        }
657    }
658}
659/// The Shape of a Schema Definition.
660#[allow(clippy::all)]
661#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
662#[repr(i32)]
663pub enum SchemaForm {
664    Object = 0,
665    Unit = 1,
666    Value = 2,
667    Tuple = 3,
668    External = 4,
669    Internal = 5,
670    Adjacent = 6,
671    Untagged = 7,
672}
673impl SchemaForm {
674    /// String value of the enum field names used in the ProtoBuf definition.
675    ///
676    /// The values are not transformed in any way and thus are considered stable
677    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
678    pub fn as_str_name(&self) -> &'static str {
679        match self {
680            Self::Object => "OBJECT",
681            Self::Unit => "UNIT",
682            Self::Value => "VALUE",
683            Self::Tuple => "TUPLE",
684            Self::External => "EXTERNAL",
685            Self::Internal => "INTERNAL",
686            Self::Adjacent => "ADJACENT",
687            Self::Untagged => "UNTAGGED",
688        }
689    }
690    /// Creates an enum from field names used in the ProtoBuf definition.
691    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
692        match value {
693            "OBJECT" => Some(Self::Object),
694            "UNIT" => Some(Self::Unit),
695            "VALUE" => Some(Self::Value),
696            "TUPLE" => Some(Self::Tuple),
697            "EXTERNAL" => Some(Self::External),
698            "INTERNAL" => Some(Self::Internal),
699            "ADJACENT" => Some(Self::Adjacent),
700            "UNTAGGED" => Some(Self::Untagged),
701            _ => None,
702        }
703    }
704}
705/// Why a Schema Definition Is Not Included in This Reply.
706#[allow(clippy::all)]
707#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
708#[repr(i32)]
709pub enum SchemaOmission {
710    OmitNone = 0,
711    OmitEmpty = 1,
712}
713impl SchemaOmission {
714    /// String value of the enum field names used in the ProtoBuf definition.
715    ///
716    /// The values are not transformed in any way and thus are considered stable
717    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
718    pub fn as_str_name(&self) -> &'static str {
719        match self {
720            Self::OmitNone => "OMIT_NONE",
721            Self::OmitEmpty => "OMIT_EMPTY",
722        }
723    }
724    /// Creates an enum from field names used in the ProtoBuf definition.
725    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
726        match value {
727            "OMIT_NONE" => Some(Self::OmitNone),
728            "OMIT_EMPTY" => Some(Self::OmitEmpty),
729            _ => None,
730        }
731    }
732}
733/// Selects all registered schemas or one exact schema identity.
734#[allow(clippy::all)]
735#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
736pub struct SchemasListRequest {
737    /// Unset leaves schema identity unfiltered; a present identity must be valid.
738    #[prost(string, optional, tag = "1")]
739    pub schema: ::core::option::Option<::prost::alloc::string::String>,
740}
741/// Returns the complete typed persisted-schema registry selection.
742#[allow(clippy::all)]
743#[derive(Clone, PartialEq, ::prost::Message)]
744pub struct SchemasListResponse {
745    #[prost(message, repeated, tag = "1")]
746    pub schemas: ::prost::alloc::vec::Vec<SchemaDescription>,
747}
748/// Preserves the position, schema identity and definition graph formerly serialized by the registry handler.
749#[allow(clippy::all)]
750#[derive(Clone, PartialEq, ::prost::Message)]
751pub struct SchemaDescription {
752    #[prost(message, optional, tag = "1")]
753    pub position: ::core::option::Option<crate::model::Position>,
754    #[prost(message, optional, tag = "2")]
755    pub key: ::core::option::Option<SchemaKey>,
756    #[prost(message, optional, tag = "3")]
757    pub schema: ::core::option::Option<SchemaGraph>,
758}
759/// Request for Status.Get.
760#[allow(clippy::all)]
761#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
762pub struct StatusGetRequest {}
763/// Returns current host health and its issued status boundary.
764#[allow(clippy::all)]
765#[derive(Clone, PartialEq, ::prost::Message)]
766pub struct StatusGetResponse {
767    #[prost(message, optional, tag = "1")]
768    pub status: ::core::option::Option<HostStatus>,
769    /// Issued boundary actually selected for this response; retain and resend it unchanged to continue the same read.
770    #[prost(message, optional, tag = "2")]
771    pub resolved_at: ::core::option::Option<crate::model::Position>,
772}
773/// Carries the read boundary for Status.Watch.
774#[allow(clippy::all)]
775#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
776pub struct StatusWatchRequest {
777    /// Unset selects the current history boundary; otherwise resend an issued position for this owner. Foreign, expired and unissued positions refuse.
778    #[prost(message, optional, tag = "1")]
779    pub at: ::core::option::Option<crate::model::Position>,
780}
781/// Returns a current host health observation and its issued status boundary.
782#[allow(clippy::all)]
783#[derive(Clone, PartialEq, ::prost::Message)]
784pub struct StatusWatchResponse {
785    #[prost(message, optional, tag = "1")]
786    pub status: ::core::option::Option<HostStatus>,
787    /// Issued boundary actually selected for this response; retain and resend it unchanged to continue the same read.
788    #[prost(message, optional, tag = "2")]
789    pub resolved_at: ::core::option::Option<crate::model::Position>,
790}
791/// Identifies this host process and the application/library versions it is running.
792#[allow(clippy::all)]
793#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
794pub struct HostIdentity {
795    #[prost(string, tag = "1")]
796    pub application_name: ::prost::alloc::string::String,
797    #[prost(string, tag = "2")]
798    pub application_version: ::prost::alloc::string::String,
799    #[prost(string, tag = "3")]
800    pub library_version: ::prost::alloc::string::String,
801    /// Timestamp captured for this host process, rather than a status revision.
802    #[prost(message, optional, tag = "4")]
803    pub process_started_at: ::core::option::Option<::prost_types::Timestamp>,
804    /// Host identity supplied by the composing application.
805    #[prost(string, tag = "5")]
806    pub host_id: ::prost::alloc::string::String,
807}
808/// Reports one contributed component's availability and explanation.
809#[allow(clippy::all)]
810#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
811pub struct HealthComponent {
812    /// Identity of the contributed component within this host's status inventory.
813    #[prost(string, tag = "1")]
814    pub name: ::prost::alloc::string::String,
815    #[prost(enumeration = "ComponentState", tag = "2")]
816    pub state: i32,
817    #[prost(string, tag = "3")]
818    pub reason: ::prost::alloc::string::String,
819}
820/// Combines host identity and contributed health; an unavailable component makes the host unavailable.
821#[allow(clippy::all)]
822#[derive(Clone, PartialEq, ::prost::Message)]
823pub struct HostStatus {
824    #[prost(message, optional, tag = "1")]
825    pub identity: ::core::option::Option<HostIdentity>,
826    #[prost(bool, tag = "2")]
827    pub available: bool,
828    #[prost(message, repeated, tag = "3")]
829    pub components: ::prost::alloc::vec::Vec<HealthComponent>,
830}
831/// The Health Reported by One Contributing Component.
832#[allow(clippy::all)]
833#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
834#[repr(i32)]
835pub enum ComponentState {
836    Unspecified = 0,
837    Healthy = 1,
838    Degraded = 2,
839    Unavailable = 3,
840}
841impl ComponentState {
842    /// String value of the enum field names used in the ProtoBuf definition.
843    ///
844    /// The values are not transformed in any way and thus are considered stable
845    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
846    pub fn as_str_name(&self) -> &'static str {
847        match self {
848            Self::Unspecified => "COMPONENT_STATE_UNSPECIFIED",
849            Self::Healthy => "COMPONENT_STATE_HEALTHY",
850            Self::Degraded => "COMPONENT_STATE_DEGRADED",
851            Self::Unavailable => "COMPONENT_STATE_UNAVAILABLE",
852        }
853    }
854    /// Creates an enum from field names used in the ProtoBuf definition.
855    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
856        match value {
857            "COMPONENT_STATE_UNSPECIFIED" => Some(Self::Unspecified),
858            "COMPONENT_STATE_HEALTHY" => Some(Self::Healthy),
859            "COMPONENT_STATE_DEGRADED" => Some(Self::Degraded),
860            "COMPONENT_STATE_UNAVAILABLE" => Some(Self::Unavailable),
861            _ => None,
862        }
863    }
864}
865/// Selects all stored stream identities or those using one exact schema identity.
866#[allow(clippy::all)]
867#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
868pub struct StreamsListRequest {
869    /// Unset leaves schema identity unfiltered; a present identity must be valid.
870    #[prost(string, optional, tag = "1")]
871    pub schema: ::core::option::Option<::prost::alloc::string::String>,
872}
873/// Returns the complete typed stored-stream registry selection.
874#[allow(clippy::all)]
875#[derive(Clone, PartialEq, ::prost::Message)]
876pub struct StreamsListResponse {
877    #[prost(message, repeated, tag = "1")]
878    pub streams: ::prost::alloc::vec::Vec<StreamIdentity>,
879}
880/// Preserves the stream variant of the stored identity formerly serialized by the registry handler.
881#[allow(clippy::all)]
882#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
883pub struct StreamIdentity {
884    #[prost(message, optional, tag = "1")]
885    pub schema: ::core::option::Option<SchemaKey>,
886    /// Optional stored scope; absence remains distinct from an empty authored scope.
887    #[prost(string, optional, tag = "2")]
888    pub scope: ::core::option::Option<::prost::alloc::string::String>,
889    #[prost(string, tag = "3")]
890    pub item: ::prost::alloc::string::String,
891    #[prost(string, tag = "4")]
892    pub stream: ::prost::alloc::string::String,
893    /// First storage position at which this stream identity was observed.
894    #[prost(message, optional, tag = "5")]
895    pub first: ::core::option::Option<crate::model::Position>,
896}
897/// Request for Time.Get.
898#[allow(clippy::all)]
899#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
900pub struct TimeGetRequest {}
901/// Returns the authoritative host time, including virtual time when configured.
902#[allow(clippy::all)]
903#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
904pub struct TimeGetResponse {
905    /// Authoritative host time, including virtual time when the host uses it.
906    #[prost(message, optional, tag = "1")]
907    pub now: ::core::option::Option<::prost_types::Timestamp>,
908}
909/// Carries the wait duration for Time.Sleep.
910#[allow(clippy::all)]
911#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
912pub struct TimeSleepRequest {
913    /// Unset means a zero-duration wait. Seconds must be in 0..315576000000 and nanos in 0..999999999.
914    #[prost(message, optional, tag = "1")]
915    pub duration: ::core::option::Option<::prost_types::Duration>,
916}
917/// Acknowledges completion of the host-clock wait.
918#[allow(clippy::all)]
919#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
920pub struct TimeSleepResponse {}
921
922pub mod access;
923
924pub mod plugins;
925
926pub mod status;