Skip to main content

harmos_protocol/
model.rs

1// This file is @generated by prost-build.
2/// Identifies one store incarnation; positions from another epoch are not interchangeable.
3#[allow(clippy::all)]
4#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
5pub struct History {
6    /// Store identity that owns the sequence space.
7    #[prost(string, tag = "1")]
8    pub store: ::prost::alloc::string::String,
9    /// Incarnation identity; a position from another epoch cannot be reused in this history.
10    #[prost(string, tag = "2")]
11    pub epoch: ::prost::alloc::string::String,
12}
13/// Identifies progress within one history, rather than a digest or a portable offset.
14#[allow(clippy::all)]
15#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
16pub struct Position {
17    /// History owning this sequence; issued positions must retain it unchanged.
18    #[prost(message, optional, tag = "1")]
19    pub history: ::core::option::Option<History>,
20    /// Progress within the named history, not a globally comparable revision.
21    #[prost(uint64, tag = "2")]
22    pub sequence: u64,
23}
24/// Pins one named resource's opaque revision alongside a history boundary.
25#[allow(clippy::all)]
26#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
27pub struct ResourceRevision {
28    /// Resource identity whose revision participates in the cut.
29    #[prost(string, tag = "1")]
30    pub name: ::prost::alloc::string::String,
31    /// Opaque resource-owned revision; preserve its bytes rather than choosing a numerically greater value.
32    #[prost(bytes = "vec", tag = "2")]
33    pub revision: ::prost::alloc::vec::Vec<u8>,
34}
35/// Combines issued history positions and resource revisions for a repeatable read; retain and resend it unchanged.
36#[allow(clippy::all)]
37#[derive(Clone, PartialEq, ::prost::Message)]
38pub struct ReadCut {
39    /// Issued history boundaries selected together for this read.
40    #[prost(message, repeated, tag = "1")]
41    pub positions: ::prost::alloc::vec::Vec<Position>,
42    /// Additional resource revisions, including retained observations; an empty list adds no resource-specific revisions.
43    #[prost(message, repeated, tag = "2")]
44    pub revisions: ::prost::alloc::vec::Vec<ResourceRevision>,
45}
46/// Reports an invocation's phase, terminal outcome, cancellation request and current attempt without exposing its payload.
47#[allow(clippy::all)]
48#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
49pub struct InstanceState {
50    #[prost(string, tag = "1")]
51    pub phase: ::prost::alloc::string::String,
52    #[prost(string, tag = "2")]
53    pub outcome: ::prost::alloc::string::String,
54    #[prost(bool, tag = "3")]
55    pub cancellation_requested: bool,
56    #[prost(uint32, tag = "4")]
57    pub attempt: u32,
58}
59/// Caller audiences, independent of operation visibility and resource grants.
60#[allow(clippy::all)]
61#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
62#[repr(i32)]
63pub enum Callers {
64    Unspecified = 0,
65    Clients = 1,
66    Plugins = 2,
67    All = 3,
68}
69impl Callers {
70    /// String value of the enum field names used in the ProtoBuf definition.
71    ///
72    /// The values are not transformed in any way and thus are considered stable
73    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
74    pub fn as_str_name(&self) -> &'static str {
75        match self {
76            Self::Unspecified => "CALLERS_UNSPECIFIED",
77            Self::Clients => "CLIENTS",
78            Self::Plugins => "PLUGINS",
79            Self::All => "ALL",
80        }
81    }
82    /// Creates an enum from field names used in the ProtoBuf definition.
83    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
84        match value {
85            "CALLERS_UNSPECIFIED" => Some(Self::Unspecified),
86            "CLIENTS" => Some(Self::Clients),
87            "PLUGINS" => Some(Self::Plugins),
88            "ALL" => Some(Self::All),
89            _ => None,
90        }
91    }
92}
93/// Owns invocation, attempt and cancellation budgets; a child override applies only to that call.
94#[allow(clippy::all)]
95#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
96pub struct OperationPolicy {
97    /// Bound on the whole invocation including retries.
98    #[prost(message, optional, tag = "1")]
99    pub timeout: ::core::option::Option<::prost_types::Duration>,
100    /// Bound on one attempt.
101    #[prost(message, optional, tag = "2")]
102    pub attempt_timeout: ::core::option::Option<::prost_types::Duration>,
103    /// Grace after Cancel before the host abandons the attempt.
104    #[prost(message, optional, tag = "3")]
105    pub cancellation_timeout: ::core::option::Option<::prost_types::Duration>,
106    /// Absent means one attempt. Delays use the host's clock.
107    #[prost(message, optional, tag = "4")]
108    pub retries: ::core::option::Option<RetryPolicy>,
109}
110/// Bounds attempts and host-clock backoff; enabled retries require an explicitly replay-safe operation.
111#[allow(clippy::all)]
112#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
113pub struct RetryPolicy {
114    /// Includes the first attempt; must be positive.
115    #[prost(uint64, tag = "1")]
116    pub total_attempts: u64,
117    /// Initial host-clock backoff between attempts.
118    #[prost(message, optional, tag = "2")]
119    pub initial: ::core::option::Option<::prost_types::Duration>,
120    /// Presence selects exponential backoff.
121    #[prost(message, optional, tag = "3")]
122    pub maximum: ::core::option::Option<::prost_types::Duration>,
123    /// Enables reproducible jitter in the retry backoff.
124    #[prost(bool, tag = "4")]
125    pub deterministic_jitter: bool,
126}
127/// Declares an operation's routing identity, payload shapes, visibility and execution policy before activation.
128#[allow(clippy::all)]
129#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
130pub struct OperationContract {
131    /// Unique among the host and all connected plugins, for example
132    /// "example.set".
133    #[prost(string, tag = "1")]
134    pub id: ::prost::alloc::string::String,
135    /// Fully qualified message names found in Declarations.types.
136    #[prost(string, tag = "2")]
137    pub request: ::prost::alloc::string::String,
138    /// Fully qualified response message name resolved in Declarations.types.
139    #[prost(string, tag = "3")]
140    pub response: ::prost::alloc::string::String,
141    /// Wire declarations admit Public or Protected; Private remains process-local and Unspecified is invalid.
142    #[prost(enumeration = "Visibility", tag = "4")]
143    pub visibility: i32,
144    /// Callee-owned execution budgets; the admitted declarations must provide a valid policy.
145    #[prost(message, optional, tag = "5")]
146    pub policy: ::core::option::Option<OperationPolicy>,
147    /// SHA-256 over the id and the request and response definitions.
148    #[prost(bytes = "vec", tag = "6")]
149    pub fingerprint: ::prost::alloc::vec::Vec<u8>,
150    #[prost(string, tag = "7")]
151    pub description: ::prost::alloc::string::String,
152    /// Only explicitly replay-safe operations may retry transient failures.
153    #[prost(bool, tag = "8")]
154    pub replay_safe: bool,
155    /// Name in Declarations.lanes; empty uses the plugin instance's unbounded default. Lifecycle operations cannot name a lane.
156    #[prost(string, tag = "9")]
157    pub lane: ::prost::alloc::string::String,
158}
159/// Binds a declared dependency to the contract fingerprint against which the caller was built.
160#[allow(clippy::all)]
161#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
162pub struct Requirement {
163    /// Identifier of the operation the plugin calls.
164    #[prost(string, tag = "1")]
165    pub id: ::prost::alloc::string::String,
166    /// Fingerprint the plugin was built against.
167    #[prost(bytes = "vec", tag = "2")]
168    pub fingerprint: ::prost::alloc::vec::Vec<u8>,
169}
170/// Describes reachable protobuf types and root message names for unary and optional streaming directions.
171#[derive(serde::Serialize, serde::Deserialize)]
172#[allow(clippy::all)]
173#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
174pub struct Protobuf {
175    /// Encoded FileDescriptorSet containing the reachable message graph.
176    #[prost(bytes = "vec", tag = "1")]
177    pub descriptors: ::prost::alloc::vec::Vec<u8>,
178    /// Fully qualified unary request root in descriptors.
179    #[prost(string, tag = "2")]
180    pub request: ::prost::alloc::string::String,
181    /// Fully qualified unary response root in descriptors.
182    #[prost(string, tag = "3")]
183    pub response: ::prost::alloc::string::String,
184    /// Streaming input root when present; unset means no streamed input direction.
185    #[prost(string, optional, tag = "4")]
186    pub input: ::core::option::Option<::prost::alloc::string::String>,
187    /// Streaming output root when present; unset means no streamed output direction.
188    #[prost(string, optional, tag = "5")]
189    pub output: ::core::option::Option<::prost::alloc::string::String>,
190}
191/// Names the service projection associated with a discovered operation.
192#[allow(clippy::all)]
193#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
194pub struct Grpc {
195    #[prost(string, tag = "1")]
196    pub package: ::prost::alloc::string::String,
197    #[prost(string, tag = "2")]
198    pub service: ::prost::alloc::string::String,
199    #[prost(string, tag = "3")]
200    pub method: ::prost::alloc::string::String,
201    /// Whether the projection uses the managed operation carrier rather than a direct service method.
202    #[prost(bool, tag = "4")]
203    pub managed: bool,
204}
205/// Describes an admitted operation/resource scope; opaque invocation scope text does not itself confer this authority.
206#[allow(clippy::all)]
207#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
208pub struct Grant {
209    /// Complete admitted operation routing identity; no provider prefix or provider selection is added.
210    #[prost(string, tag = "1")]
211    pub operation: ::prost::alloc::string::String,
212    /// Optional checked resource scope; unset is distinct from an authored invocation scope and is interpreted by grant admission.
213    #[prost(string, optional, tag = "2")]
214    pub scope: ::core::option::Option<::prost::alloc::string::String>,
215}
216/// Advertises an operation's admitted policy, schema identity and available wire projections.
217#[allow(clippy::all)]
218#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
219pub struct DiscoveredContract {
220    /// Complete admitted operation routing identity; provider ownership is reported separately.
221    #[prost(string, tag = "1")]
222    pub id: ::prost::alloc::string::String,
223    #[prost(string, tag = "2")]
224    pub description: ::prost::alloc::string::String,
225    #[prost(enumeration = "Visibility", tag = "3")]
226    pub visibility: i32,
227    #[prost(message, optional, tag = "4")]
228    pub policy: ::core::option::Option<OperationPolicy>,
229    /// True only for an explicitly replay-safe declaration.
230    #[prost(bool, tag = "5")]
231    pub replay_safe: bool,
232    /// Expected operation contract digest used for admission; incompatible definitions refuse rather than invoking another shape.
233    #[prost(bytes = "vec", tag = "6")]
234    pub fingerprint: ::prost::alloc::vec::Vec<u8>,
235    /// Absent for native-only declarations with no public protobuf binding.
236    #[prost(message, optional, tag = "7")]
237    pub protobuf: ::core::option::Option<Protobuf>,
238    #[prost(message, optional, tag = "8")]
239    pub grpc: ::core::option::Option<Grpc>,
240    /// Effective callers after runtime composition has narrowed the declaration.
241    #[prost(enumeration = "Callers", tag = "9")]
242    pub callers: i32,
243}
244/// Pairs an admitted contract with its owner, activation generation and caller-specific access information.
245#[allow(clippy::all)]
246#[derive(Clone, PartialEq, ::prost::Message)]
247pub struct DiscoveredOperation {
248    /// Registered provider identity, not an operation routing prefix.
249    #[prost(string, tag = "1")]
250    pub owner: ::prost::alloc::string::String,
251    /// Activation generation pinned by this discovered entry; a handle must not follow a replacement activation.
252    #[prost(uint64, tag = "2")]
253    pub generation: u64,
254    #[prost(message, optional, tag = "3")]
255    pub contract: ::core::option::Option<DiscoveredContract>,
256    #[prost(message, repeated, tag = "4")]
257    pub grants: ::prost::alloc::vec::Vec<Grant>,
258    /// Whether admission also depends on request-specific resource grants.
259    #[prost(bool, tag = "5")]
260    pub conditional_access: bool,
261    /// Whether this discovery exposes an available gRPC projection.
262    #[prost(bool, tag = "6")]
263    pub grpc_available: bool,
264}
265/// Who May Invoke a Declared Operation.
266#[allow(clippy::all)]
267#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
268#[repr(i32)]
269pub enum Visibility {
270    Unspecified = 0,
271    /// Process-local only; invalid in any wire declarations.
272    Private = 1,
273    /// Everyone connected: other plugins and the host's clients.
274    Public = 2,
275    /// The declaring plugin and its host, through the carrier only.
276    Protected = 3,
277}
278impl Visibility {
279    /// String value of the enum field names used in the ProtoBuf definition.
280    ///
281    /// The values are not transformed in any way and thus are considered stable
282    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
283    pub fn as_str_name(&self) -> &'static str {
284        match self {
285            Self::Unspecified => "VISIBILITY_UNSPECIFIED",
286            Self::Private => "VISIBILITY_PRIVATE",
287            Self::Public => "VISIBILITY_PUBLIC",
288            Self::Protected => "VISIBILITY_PROTECTED",
289        }
290    }
291    /// Creates an enum from field names used in the ProtoBuf definition.
292    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
293        match value {
294            "VISIBILITY_UNSPECIFIED" => Some(Self::Unspecified),
295            "VISIBILITY_PRIVATE" => Some(Self::Private),
296            "VISIBILITY_PUBLIC" => Some(Self::Public),
297            "VISIBILITY_PROTECTED" => Some(Self::Protected),
298            _ => None,
299        }
300    }
301}
302/// Reports a mutation's accepted and durable positions separately; acceptance alone does not promise persisted bytes.
303#[allow(clippy::all)]
304#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
305pub struct Receipt {
306    /// Caller request identity, or the mutation window/key correlation used by storage; some conditional operations leave it empty.
307    #[prost(string, tag = "1")]
308    pub request_id: ::prost::alloc::string::String,
309    /// Position accepted by the owner, when one exists; it is not by itself a durability acknowledgement.
310    #[prost(message, optional, tag = "2")]
311    pub accepted_at: ::core::option::Option<Position>,
312    /// Position acknowledged durable, when supplied; staging receipts may omit both positions.
313    #[prost(message, optional, tag = "3")]
314    pub durable_at: ::core::option::Option<Position>,
315    /// Whether the reported mutation outcome has completed, independently of whether a durable position is present.
316    #[prost(bool, tag = "4")]
317    pub completed: bool,
318}
319/// Declares the plugin's settings in one typed contribution section of its reported description.
320#[allow(clippy::all)]
321#[derive(Clone, PartialEq, ::prost::Message)]
322pub struct SettingsDeclarations {
323    #[prost(message, repeated, tag = "1")]
324    pub values: ::prost::alloc::vec::Vec<SettingDeclaration>,
325}
326/// Declares one library-stored setting and the value used when the plugin entry has no override.
327#[allow(clippy::all)]
328#[derive(Clone, PartialEq, ::prost::Message)]
329pub struct SettingDeclaration {
330    #[prost(string, tag = "1")]
331    pub name: ::prost::alloc::string::String,
332    #[prost(string, tag = "2")]
333    pub title: ::prost::alloc::string::String,
334    #[prost(string, tag = "3")]
335    pub description: ::prost::alloc::string::String,
336    /// Required typed default; its discriminator declares text, flag, integer, number or duration.
337    #[prost(message, optional, tag = "4")]
338    pub default: ::core::option::Option<SettingValue>,
339    /// Inclusive lower bound, using the default's numeric or duration variant.
340    #[prost(message, optional, tag = "5")]
341    pub minimum: ::core::option::Option<SettingValue>,
342    /// Inclusive upper bound, using the default's numeric or duration variant.
343    #[prost(message, optional, tag = "6")]
344    pub maximum: ::core::option::Option<SettingValue>,
345    /// Allowed values, using the default's variant. Empty means unrestricted.
346    #[prost(message, repeated, tag = "7")]
347    pub choices: ::prost::alloc::vec::Vec<SettingValue>,
348    /// Saving a complete value must explicitly include this setting.
349    #[prost(bool, tag = "8")]
350    pub required: bool,
351}
352/// Carries a complete setting value; an unset discriminator is invalid, including when setting a false flag or an empty text.
353#[allow(clippy::all)]
354#[derive(Clone, PartialEq, ::prost::Message)]
355pub struct SettingValue {
356    #[prost(oneof = "setting_value::Value", tags = "1, 2, 3, 4, 5")]
357    pub value: ::core::option::Option<setting_value::Value>,
358}
359/// Nested message and enum types in `SettingValue`.
360pub mod setting_value {
361    #[allow(clippy::all)]
362    #[derive(Clone, PartialEq, ::prost::Oneof)]
363    pub enum Value {
364        #[prost(bool, tag = "1")]
365        Flag(bool),
366        #[prost(int64, tag = "2")]
367        Integer(i64),
368        #[prost(double, tag = "3")]
369        Number(f64),
370        #[prost(string, tag = "4")]
371        Text(::prost::alloc::string::String),
372        #[prost(message, tag = "5")]
373        Duration(::prost_types::Duration),
374    }
375}
376/// Contains the complete named setting values for one plugin entry, without secret values.
377#[allow(clippy::all)]
378#[derive(Clone, PartialEq, ::prost::Message)]
379pub struct SettingValues {
380    /// Keys are declaration names; values must select the same variant as their declared defaults.
381    #[prost(map = "string, message", tag = "1")]
382    pub values: ::std::collections::HashMap<
383        ::prost::alloc::string::String,
384        SettingValue,
385    >,
386}
387/// Declares a row type and either host-driven interval sampling or device-driven publication.
388#[allow(clippy::all)]
389#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
390pub struct StreamDeclaration {
391    /// Stream identity unique within its admitted provider inventory.
392    #[prost(string, tag = "1")]
393    pub id: ::prost::alloc::string::String,
394    /// Fully qualified message name of one row, found in Declarations.types.
395    #[prost(string, tag = "2")]
396    pub row: ::prost::alloc::string::String,
397    #[prost(string, tag = "3")]
398    pub description: ::prost::alloc::string::String,
399    /// Set for a stream sampled on the host's clock. Unset means the plugin
400    /// sends samples when its device produces them.
401    #[prost(message, optional, tag = "4")]
402    pub interval: ::core::option::Option<::prost_types::Duration>,
403    /// Identifier of a plugin setting that gives the interval instead, if any.
404    #[prost(string, tag = "5")]
405    pub interval_setting: ::prost::alloc::string::String,
406    /// Identifier of a plugin Duration setting that overrides the host's window
407    /// length for this interval stream, if any.
408    #[prost(string, tag = "6")]
409    pub window_setting: ::prost::alloc::string::String,
410    /// Nonempty for a collection member. The identity is its lexicographically first
411    /// member stream. Members share one interval and one handler per tick and scope.
412    #[prost(string, tag = "7")]
413    pub collection: ::prost::alloc::string::String,
414}
415/// Freezes the operations, dependencies, streams, contribution sections and reachable protobuf types admitted for a plugin activation.
416#[allow(clippy::all)]
417#[derive(Clone, PartialEq, ::prost::Message)]
418pub struct Declarations {
419    /// Operations the plugin serves.
420    #[prost(message, repeated, tag = "1")]
421    pub operations: ::prost::alloc::vec::Vec<OperationContract>,
422    /// Operations it calls on the host or on other plugins.
423    #[prost(message, repeated, tag = "2")]
424    pub requires: ::prost::alloc::vec::Vec<Requirement>,
425    /// Streams it can publish.
426    #[prost(message, repeated, tag = "3")]
427    pub streams: ::prost::alloc::vec::Vec<StreamDeclaration>,
428    /// Product contributions, opaque to Harmos.
429    #[prost(message, repeated, tag = "4")]
430    pub sections: ::prost::alloc::vec::Vec<Section>,
431    /// SHA-256 over the serialized fields 1 to 4, 6 and 7, in field order.
432    #[prost(bytes = "vec", tag = "5")]
433    pub digest: ::prost::alloc::vec::Vec<u8>,
434    /// Definitions of every message named in this declarations.
435    #[prost(message, optional, tag = "6")]
436    pub types: ::core::option::Option<::prost_types::FileDescriptorSet>,
437    /// Admission lanes owned by this plugin instance; an empty list preserves the original encoding.
438    #[prost(message, repeated, tag = "7")]
439    pub lanes: ::prost::alloc::vec::Vec<LaneDeclaration>,
440}
441/// Declares one plugin-owned admission lane; names must be unique and must not be empty or reserved.
442#[allow(clippy::all)]
443#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
444pub struct LaneDeclaration {
445    #[prost(string, tag = "1")]
446    pub name: ::prost::alloc::string::String,
447    /// Exactly one capacity is required. Boolean alternatives must be true and concurrent must be positive.
448    #[prost(oneof = "lane_declaration::Capacity", tags = "2, 3, 4")]
449    pub capacity: ::core::option::Option<lane_declaration::Capacity>,
450}
451/// Nested message and enum types in `LaneDeclaration`.
452pub mod lane_declaration {
453    /// Exactly one capacity is required. Boolean alternatives must be true and concurrent must be positive.
454    #[allow(clippy::all)]
455    #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
456    pub enum Capacity {
457        /// Admit one invocation at a time.
458        #[prost(bool, tag = "2")]
459        Serial(bool),
460        /// Admit at most this many invocations at a time.
461        #[prost(uint32, tag = "3")]
462        Concurrent(u32),
463        /// Admit invocations without a concurrency bound.
464        #[prost(bool, tag = "4")]
465        Unbounded(bool),
466    }
467}
468/// Carries a typed product contribution whose payload is opaque to the library.
469#[allow(clippy::all)]
470#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
471pub struct Section {
472    /// Fully qualified message name of the payload, for example
473    /// "application.v1.Contributions". At most one section per name.
474    #[prost(string, tag = "1")]
475    pub r#type: ::prost::alloc::string::String,
476    /// Encoded message named by type; interpretation belongs to the product contribution owner.
477    #[prost(bytes = "vec", tag = "2")]
478    pub payload: ::prost::alloc::vec::Vec<u8>,
479}
480/// Preserves machine classification, refusal code, causal context and support diagnostics across operation carriers.
481#[allow(clippy::all)]
482#[derive(Clone, PartialEq, ::prost::Message)]
483pub struct Failure {
484    #[prost(enumeration = "Classification", tag = "1")]
485    pub classification: i32,
486    /// Stable machine-readable code, for example "provider_absent".
487    #[prost(string, tag = "2")]
488    pub code: ::prost::alloc::string::String,
489    /// What happened.
490    #[prost(string, tag = "3")]
491    pub message: ::prost::alloc::string::String,
492    /// What the user can do about it.
493    #[prost(string, tag = "4")]
494    pub action: ::prost::alloc::string::String,
495    /// Operation and plugin where it happened.
496    #[prost(string, tag = "5")]
497    pub operation: ::prost::alloc::string::String,
498    #[prost(string, tag = "6")]
499    pub plugin: ::prost::alloc::string::String,
500    /// Failure of a child call that led to this one.
501    #[prost(message, optional, boxed, tag = "7")]
502    pub cause: ::core::option::Option<::prost::alloc::boxed::Box<Failure>>,
503    /// Extra named facts.
504    #[prost(map = "string, string", tag = "8")]
505    pub details: ::std::collections::HashMap<
506        ::prost::alloc::string::String,
507        ::prost::alloc::string::String,
508    >,
509    /// Stack or source chain for support. Never shown as the message.
510    #[prost(string, tag = "9")]
511    pub diagnostics: ::prost::alloc::string::String,
512    /// Host-Owned Retry Evidence for This Invocation.
513    #[prost(message, optional, tag = "10")]
514    pub retry: ::core::option::Option<OperationRetry>,
515}
516/// Retry Eligibility and Attempt Counts Reported by the Host Scheduler.
517#[allow(clippy::all)]
518#[derive(Clone, Copy, PartialEq, ::prost::Message)]
519pub struct OperationRetry {
520    #[prost(bool, tag = "1")]
521    pub retryable: bool,
522    /// Attempts Already Run; Zero Means Admission Failed Before Execution.
523    #[prost(uint64, tag = "2")]
524    pub attempts: u64,
525    #[prost(uint64, tag = "3")]
526    pub max_attempts: u64,
527    /// Delay Before Another Attempt, in Seconds; Zero When No Attempt Is Scheduled.
528    #[prost(double, tag = "4")]
529    pub next_after_s: f64,
530}
531/// The Failure Category Used for Admission and Retry Decisions.
532#[allow(clippy::all)]
533#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
534#[repr(i32)]
535pub enum Classification {
536    Unspecified = 0,
537    /// Retrying will not help.
538    Permanent = 1,
539    /// Another attempt may succeed.
540    Transient = 2,
541    Cancelled = 3,
542    TimedOut = 4,
543    /// Not admitted: visibility, fingerprint mismatch or absent provider.
544    Refused = 5,
545    /// The Request Does Not Match the Served Operation Contract.
546    Invalid = 6,
547}
548impl Classification {
549    /// String value of the enum field names used in the ProtoBuf definition.
550    ///
551    /// The values are not transformed in any way and thus are considered stable
552    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
553    pub fn as_str_name(&self) -> &'static str {
554        match self {
555            Self::Unspecified => "CLASSIFICATION_UNSPECIFIED",
556            Self::Permanent => "CLASSIFICATION_PERMANENT",
557            Self::Transient => "CLASSIFICATION_TRANSIENT",
558            Self::Cancelled => "CLASSIFICATION_CANCELLED",
559            Self::TimedOut => "CLASSIFICATION_TIMED_OUT",
560            Self::Refused => "CLASSIFICATION_REFUSED",
561            Self::Invalid => "CLASSIFICATION_INVALID",
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            "CLASSIFICATION_UNSPECIFIED" => Some(Self::Unspecified),
568            "CLASSIFICATION_PERMANENT" => Some(Self::Permanent),
569            "CLASSIFICATION_TRANSIENT" => Some(Self::Transient),
570            "CLASSIFICATION_CANCELLED" => Some(Self::Cancelled),
571            "CLASSIFICATION_TIMED_OUT" => Some(Self::TimedOut),
572            "CLASSIFICATION_REFUSED" => Some(Self::Refused),
573            "CLASSIFICATION_INVALID" => Some(Self::Invalid),
574            _ => None,
575        }
576    }
577}
578/// Bounds one response and carries an opaque continuation; each resource defines whether zero bounds select defaults or refuse.
579#[allow(clippy::all)]
580#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
581pub struct PageRequest {
582    /// Maximum rows/items in a page. Storage uses configured defaults at zero; status histories require a positive value.
583    #[prost(uint32, tag = "1")]
584    pub page_size: u32,
585    /// Maximum encoded response bytes, including metadata and continuation. Storage clamps to configured capacity; status histories reject zero.
586    #[prost(uint64, tag = "2")]
587    pub max_bytes: u64,
588    /// Empty opens a read; otherwise resend the opaque token with the same selection and cut. Expired or mismatched continuations refuse.
589    #[prost(string, tag = "3")]
590    pub page_token: ::prost::alloc::string::String,
591}
592/// Shared request value for exact-scope unfinished production discovery through native storage.
593/// No host service is exposed; a product owns its public operations.
594#[allow(clippy::all)]
595#[derive(Clone, PartialEq, ::prost::Message)]
596pub struct ListFileProductionsRequest {
597    /// Required exact scope identity; child scopes are excluded.
598    #[prost(string, tag = "1")]
599    pub scope: ::prost::alloc::string::String,
600    #[prost(message, optional, tag = "2")]
601    pub page: ::core::option::Option<PageRequest>,
602    /// Optional saved storage boundary. Production progress is live, not historical.
603    #[prost(message, optional, tag = "3")]
604    pub at: ::core::option::Option<ReadCut>,
605}
606/// A bounded page of unfinished productions, reusing the shared upload identity and byte progress.
607#[allow(clippy::all)]
608#[derive(Clone, PartialEq, ::prost::Message)]
609pub struct ListFileProductionsResponse {
610    #[prost(message, repeated, tag = "1")]
611    pub productions: ::prost::alloc::vec::Vec<Upload>,
612    /// Resume after the last returned identity in this scope, including after restart of the same history.
613    #[prost(string, tag = "2")]
614    pub next_page_token: ::prost::alloc::string::String,
615    /// Selected saved storage boundary; progress is observed from the current unfinished set.
616    #[prost(message, optional, tag = "3")]
617    pub resolved_at: ::core::option::Option<ReadCut>,
618}
619/// Declares a file's identity, optional scope and optional publication expectations before producing its bytes.
620#[allow(clippy::all)]
621#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
622pub struct FileMetadata {
623    /// File identity used for storage and resource-grant admission.
624    #[prost(string, tag = "1")]
625    pub id: ::prost::alloc::string::String,
626    /// Optional stored scope metadata; unset records no scope.
627    #[prost(string, optional, tag = "2")]
628    pub scope: ::core::option::Option<::prost::alloc::string::String>,
629    #[prost(string, tag = "3")]
630    pub media_type: ::prost::alloc::string::String,
631    /// If present, publication must match this byte length; unset imposes no declared length expectation.
632    #[prost(uint64, optional, tag = "4")]
633    pub expected_length: ::core::option::Option<u64>,
634    /// If present, publication must match this 32-byte digest; unset imposes no declared digest expectation.
635    #[prost(bytes = "vec", optional, tag = "5")]
636    pub expected_sha256: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
637}
638/// Addresses published immutable content with its storage position, metadata, length and SHA-256 digest.
639#[allow(clippy::all)]
640#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
641pub struct FileReference {
642    /// Storage position of published content; application-owned content uses its provider's reference identity.
643    #[prost(message, optional, tag = "1")]
644    pub position: ::core::option::Option<Position>,
645    #[prost(message, optional, tag = "2")]
646    pub metadata: ::core::option::Option<FileMetadata>,
647    #[prost(uint64, tag = "3")]
648    pub length: u64,
649    /// SHA-256 of the complete immutable file, encoded as 32 bytes.
650    #[prost(bytes = "vec", tag = "4")]
651    pub sha256: ::prost::alloc::vec::Vec<u8>,
652}
653/// Describes one published immutable file for a product-owned file resource.
654#[allow(clippy::all)]
655#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
656pub struct File {
657    #[prost(message, optional, tag = "1")]
658    pub reference: ::core::option::Option<FileReference>,
659}
660/// Describes resumable upload progress for a product-owned upload resource, without declaring storage calls.
661#[allow(clippy::all)]
662#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
663pub struct Upload {
664    /// Production identity, independent of the current writer generation.
665    #[prost(string, tag = "1")]
666    pub id: ::prost::alloc::string::String,
667    /// Store incarnation owning the upload; foreign histories cannot resume it.
668    #[prost(message, optional, tag = "2")]
669    pub history: ::core::option::Option<History>,
670    /// Current writer fence; resuming invalidates an older writer. Terminal uploads have no writer.
671    #[prost(uint64, tag = "3")]
672    pub writer_generation: u64,
673    /// Accepted bytes may still be lost on a crash.
674    #[prost(uint64, tag = "4")]
675    pub accepted_length: u64,
676    /// Byte prefix acknowledged persisted by the storage owner.
677    #[prost(uint64, tag = "5")]
678    pub durable_length: u64,
679    #[prost(enumeration = "UploadState", tag = "6")]
680    pub state: i32,
681}
682/// The Current State of an Admitted Upload.
683#[allow(clippy::all)]
684#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
685#[repr(i32)]
686pub enum UploadState {
687    Unspecified = 0,
688    Producing = 1,
689    Finished = 2,
690    Abandoned = 3,
691}
692impl UploadState {
693    /// String value of the enum field names used in the ProtoBuf definition.
694    ///
695    /// The values are not transformed in any way and thus are considered stable
696    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
697    pub fn as_str_name(&self) -> &'static str {
698        match self {
699            Self::Unspecified => "UPLOAD_STATE_UNSPECIFIED",
700            Self::Producing => "UPLOAD_STATE_PRODUCING",
701            Self::Finished => "UPLOAD_STATE_FINISHED",
702            Self::Abandoned => "UPLOAD_STATE_ABANDONED",
703        }
704    }
705    /// Creates an enum from field names used in the ProtoBuf definition.
706    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
707        match value {
708            "UPLOAD_STATE_UNSPECIFIED" => Some(Self::Unspecified),
709            "UPLOAD_STATE_PRODUCING" => Some(Self::Producing),
710            "UPLOAD_STATE_FINISHED" => Some(Self::Finished),
711            "UPLOAD_STATE_ABANDONED" => Some(Self::Abandoned),
712            _ => None,
713        }
714    }
715}
716/// One Storage Setting Shared by Host and SDK Defaults.
717#[derive(serde::Serialize, serde::Deserialize)]
718#[allow(clippy::all)]
719#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
720pub struct StorageTransferSettings {
721    /// Maximum bytes per default transfer chunk; unset uses the declared 4 MiB proto2 default.
722    #[prost(uint64, optional, tag = "1", default = "4194304")]
723    pub chunk_bytes: ::core::option::Option<u64>,
724}
725/// One Declared Transport Default for All Generated SDKs and Host Carriers.
726#[allow(clippy::all)]
727#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
728pub struct MessageSettings {
729    /// Carrier message ceiling; unset uses the declared 8 MiB proto2 default. Startup refuses a ceiling smaller than configured chunks plus framing.
730    #[prost(uint64, optional, tag = "1", default = "8388608")]
731    pub message_bytes: ::core::option::Option<u64>,
732}
733/// Space for Default Session, Receipt, Cut and Carrier Framing.
734#[allow(clippy::all)]
735#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
736#[repr(i32)]
737pub enum TransferFraming {
738    Unspecified = 0,
739    Bytes = 512,
740}
741impl TransferFraming {
742    /// String value of the enum field names used in the ProtoBuf definition.
743    ///
744    /// The values are not transformed in any way and thus are considered stable
745    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
746    pub fn as_str_name(&self) -> &'static str {
747        match self {
748            Self::Unspecified => "TRANSFER_FRAMING_UNSPECIFIED",
749            Self::Bytes => "TRANSFER_FRAMING_BYTES",
750        }
751    }
752    /// Creates an enum from field names used in the ProtoBuf definition.
753    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
754        match value {
755            "TRANSFER_FRAMING_UNSPECIFIED" => Some(Self::Unspecified),
756            "TRANSFER_FRAMING_BYTES" => Some(Self::Bytes),
757            _ => None,
758        }
759    }
760}