harmos-protocol 0.1.15

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