microsoft-webui-protocol 0.0.27

Core protocol definitions for WebUI framework
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
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

// This file is @generated by prost-build from proto/webui.proto.
// Do not edit manually. Regenerate with: cargo xtask proto
// This file is @generated by prost-build.
/// Per-component metadata keyed by tag name.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(deny_unknown_fields)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ComponentData {
    /// Non-WebUI client-side template payload.
    /// FAST plugins store complete <f-template> HTML here.
    #[prost(string, tag = "1")]
    pub template: ::prost::alloc::string::String,
    /// Compiled component CSS content for the Style and Module strategies.
    /// Empty for Link and for components without CSS.
    #[prost(string, tag = "2")]
    pub css: ::prost::alloc::string::String,
    /// External stylesheet href for the Link CSS strategy.
    /// Set to e.g. "/my-card.css" when the component has a CSS file and the
    /// build used CssStrategy::Link. Empty for Style/Module strategies and
    /// for components without CSS.
    /// Ordered style closures decide which Document or ShadowRoot owns the link.
    #[prost(string, tag = "3")]
    pub css_href: ::prost::alloc::string::String,
    /// WebUI plugin JSON-safe component metadata.
    /// Stored separately from executable condition closures so handlers can emit
    /// the static metadata in application/json data blocks.
    #[prost(string, tag = "4")]
    pub template_json: ::prost::alloc::string::String,
    /// WebUI plugin component-local JavaScript condition closure array.
    /// Empty when the component has no conditions or boolean attributes.
    #[prost(string, tag = "5")]
    pub template_functions: ::prost::alloc::string::String,
    /// Exact @observable + @attr property keys when hydration_mode is KEYS.
    /// Existing SSR host attributes take precedence; bootstrap state fills
    /// attribute-backed properties that were not materialized on the host.
    /// Template roots already exist in the trusted SSR DOM and do not enter
    /// initial state solely because a component has authored browser code.
    /// Sorted and deduplicated; empty for NONE and ALL.
    #[prost(string, repeated, tag = "6")]
    pub hydration_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Exact partial-navigation keys when navigation_mode is KEYS. Authored
    /// components use @observable + @attr property keys plus template roots.
    /// Scriptless compiled templates include only their template roots.
    /// Sorted and deduplicated; empty for NONE and ALL.
    #[prost(string, repeated, tag = "7")]
    pub navigation_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// How initial hydration state is selected for this component.
    #[prost(enumeration = "StateProjectionMode", tag = "8")]
    pub hydration_mode: i32,
    /// How partial-navigation state is selected for this component. Presence is
    /// significant: protocols produced before projection metadata leave this
    /// absent, so handlers preserve full state instead of treating it as NONE.
    #[prost(enumeration = "StateProjectionMode", optional, tag = "9")]
    pub navigation_mode: ::core::option::Option<i32>,
    /// Whether this component effectively uses Shadow DOM after build-time
    /// fallback and authored declarative Shadow DOM resolution.
    #[prost(bool, tag = "10")]
    pub uses_shadow_dom: bool,
    /// Compiler-owned client work policy. Zero/eager is absent on the wire.
    #[prost(enumeration = "ComponentWorkPolicy", tag = "11")]
    pub work_policy: i32,
}
/// Link stylesheet metadata for one static component asset root.
///
/// Shadow builds publish this finite manifest so the framework can begin CSS
/// beside the root module on interaction. Light builds emit the hrefs as
/// deduplicated document stylesheets because their CSS is globally scoped.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ComponentAssetStylePreload {
    /// Root component tag used by defineComponentAssets().
    #[prost(string, tag = "1")]
    pub root: ::prost::alloc::string::String,
    /// Final Link-mode stylesheet hrefs required by this asset graph.
    #[prost(string, repeated, tag = "2")]
    pub style_hrefs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Root protocol containing all fragment records and build metadata.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(deny_unknown_fields)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WebUiProtocol {
    #[prost(map = "string, message", tag = "1")]
    pub fragments: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        FragmentList,
    >,
    /// Sorted, deduplicated CSS custom property names used across all components
    /// and entry page styles (e.g., "colorBrandBackground", "spacingMedium").
    /// Only usage via var(--name) is included; local definitions are excluded.
    #[prost(string, repeated, tag = "2")]
    pub tokens: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Per-component data keyed by tag name (f-template + CSS).
    #[prost(map = "string, message", tag = "3")]
    pub components: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ComponentData,
    >,
    /// Build-wide CSS delivery strategy. Determines how compiled component
    /// resources are installed in each CSS tree.
    #[prost(enumeration = "CssStrategy", tag = "4")]
    pub css_strategy: i32,
    /// Whether initial SSR metadata contains full state or WebUI component
    /// projection. Partial-navigation state remains component-driven.
    #[prost(enumeration = "InitialStateStrategy", tag = "6")]
    pub initial_state_strategy: i32,
    /// Ready-to-write `<link rel="modulepreload">` hrefs for the shared chunks
    /// that the page's critical module entries statically import, in the exact
    /// order they must be emitted (largest chunk first).
    ///
    /// These chunks are named only inside the entry's own bytes, so the browser's
    /// preload scanner cannot discover them until it has downloaded and parsed
    /// the entry. Emitting them as hints removes that serialization.
    ///
    /// Order is load-bearing: preloads are issued in document order over one
    /// connection, so a small chunk ahead of a large one delays the long pole.
    /// The compiler resolves and sorts these at build time so the handler writes
    /// them verbatim with no per-request work.
    #[prost(string, repeated, tag = "7")]
    pub module_preloads: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Build-generated document-level rules for component rendering policies.
    /// Empty when no component opts into lazy rendering.
    #[prost(string, tag = "9")]
    pub component_render_css: ::prost::alloc::string::String,
    /// Ordered, deduplicated component style resource tags for each Document or
    /// component-root CSS tree entry point.
    #[prost(map = "string, message", tag = "10")]
    pub style_closures: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ComponentStyleClosure,
    >,
    /// Bundled stylesheets in global cascade order. Empty unless the build
    /// enabled CSS bundling, in which case every component that owns a style
    /// resource belongs to exactly one chunk and handlers deliver chunks instead
    /// of individual component resources.
    #[prost(message, repeated, tag = "11")]
    pub style_chunks: ::prost::alloc::vec::Vec<StyleChunk>,
    /// Build-generated eager metadata for static component asset roots.
    ///
    /// Entries are sorted by root tag. Builds without component assets omit the
    /// field from the wire.
    #[prost(message, repeated, tag = "12")]
    pub component_asset_style_preloads: ::prost::alloc::vec::Vec<
        ComponentAssetStylePreload,
    >,
}
/// Compile-time component style resources for one CSS tree.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ComponentStyleClosure {
    /// Component tags in cascade-sensitive first-discovery order.
    #[prost(string, repeated, tag = "1")]
    pub component_tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Indices into WebUIProtocol.style_chunks covering exactly the components in
    /// component_tags, in the same cascade order. Empty unless the build enabled
    /// CSS bundling. A chunk is listed only when the closure consumes every
    /// component the chunk carries, so delivering a chunk never over-delivers.
    #[prost(uint32, repeated, tag = "2")]
    pub style_chunks: ::prost::alloc::vec::Vec<u32>,
}
/// One bundled stylesheet carrying a contiguous run of component styles that
/// share the same set of consuming CSS trees.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StyleChunk {
    /// Stable build-time chunk name. Surfaces as the data-webui-resource value so
    /// delivered stylesheets stay attributable without a source map.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Concatenated compiled CSS for the Style and Module strategies.
    /// Empty for Link.
    #[prost(string, tag = "2")]
    pub css: ::prost::alloc::string::String,
    /// External stylesheet href for the Link strategy.
    /// Empty for Style and Module.
    #[prost(string, tag = "3")]
    pub css_href: ::prost::alloc::string::String,
    /// Component tags whose CSS this chunk concatenates, in cascade order.
    #[prost(string, repeated, tag = "4")]
    pub component_tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// A list of fragments (needed because protobuf maps cannot have repeated values directly).
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FragmentList {
    #[prost(message, repeated, tag = "1")]
    pub fragments: ::prost::alloc::vec::Vec<WebUiFragment>,
    /// True when this record directly or transitively reaches a boundary
    /// declaration. Computed once at build time so handlers never graph-walk a
    /// request merely to decide whether rendering can suspend.
    #[prost(bool, tag = "2")]
    pub contains_boundary: bool,
}
/// A single fragment — one of several types.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WebUiFragment {
    #[prost(oneof = "web_ui_fragment::Fragment", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10")]
    pub fragment: ::core::option::Option<web_ui_fragment::Fragment>,
}
/// Nested message and enum types in `WebUIFragment`.
pub mod web_ui_fragment {
    #[derive(serde::Serialize, serde::Deserialize)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Fragment {
        #[prost(message, tag = "1")]
        Raw(super::WebUiFragmentRaw),
        #[prost(message, tag = "2")]
        Component(super::WebUiFragmentComponent),
        #[prost(message, tag = "3")]
        ForLoop(super::WebUiFragmentFor),
        #[prost(message, tag = "4")]
        Signal(super::WebUiFragmentSignal),
        #[prost(message, tag = "5")]
        IfCond(super::WebUiFragmentIf),
        #[prost(message, tag = "6")]
        Attribute(super::WebUiFragmentAttribute),
        #[prost(message, tag = "7")]
        Plugin(super::WebUiFragmentPlugin),
        #[prost(message, tag = "8")]
        Route(super::WebUiFragmentRoute),
        #[prost(message, tag = "9")]
        Outlet(super::WebUiFragmentOutlet),
        #[prost(message, tag = "10")]
        Boundary(super::WebUiFragmentBoundary),
    }
}
/// Compile-time streaming boundary declaration, written as an inline tape.
///
/// A declaration emits a start marker and an end marker into its owner's
/// fragment record, with the body fragments in between. Ordinary rendering
/// therefore walks the body without any extra record lookup, and streaming
/// suspends and resumes inside the record it is already traversing.
///
/// A declaration can produce multiple response-local occurrences through
/// components, conditions, loops, and routes. Runtime occurrence IDs are
/// therefore assigned later by the handler and are not stored here.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WebUiFragmentBoundary {
    /// Stable build-local declaration identity. Shared by the start/end pair.
    #[prost(uint32, tag = "1")]
    pub declaration_id: u32,
    /// Entry or reusable component template that authored this declaration.
    #[prost(string, tag = "2")]
    pub owner_fragment_id: ::prost::alloc::string::String,
    /// Free-form authored name, unique only within owner_fragment_id.
    #[prost(string, tag = "3")]
    pub name: ::prost::alloc::string::String,
    /// Optional authored key expression preserved verbatim for handler evaluation.
    #[prost(string, optional, tag = "4")]
    pub key: ::core::option::Option<::prost::alloc::string::String>,
    /// Conservative graph result: this declaration may produce multiple runtime
    /// occurrences through repeated component callsites. A `<for>` repeat can no
    /// longer contribute: the build rejects every boundary a repeat body reaches
    /// (`boundary-in-repeat`), because a repeat iteration cannot suspend.
    #[prost(bool, tag = "6")]
    pub may_repeat: bool,
    /// Whether this fragment opens or closes the declaration's body.
    #[prost(enumeration = "BoundaryPhase", tag = "7")]
    pub phase: i32,
}
/// Declarative route definition linking a URL path template to a component.
/// Nested routes are expressed via repeated children.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WebUiFragmentRoute {
    #[prost(string, tag = "1")]
    pub path: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub fragment_id: ::prost::alloc::string::String,
    #[prost(bool, tag = "3")]
    pub exact: bool,
    /// Nested child routes rendered at the component's <outlet />.
    #[prost(message, repeated, tag = "4")]
    pub children: ::prost::alloc::vec::Vec<WebUiFragmentRoute>,
    /// Comma-separated allowlist of query parameters forwarded as attributes.
    /// Empty string means no query params are forwarded (deny-by-default).
    #[prost(string, tag = "5")]
    pub allowed_query: ::prost::alloc::string::String,
    /// When true, the router preserves the mounted component instance across
    /// navigations instead of destroying and recreating it. Opt-in per route.
    #[prost(bool, tag = "6")]
    pub keep_alive: bool,
    /// Cache tag templates for this route (e.g. "thread:{threadId}", "inbox").
    /// Placeholders like {param} are resolved at render time with actual param values.
    #[prost(string, repeated, tag = "7")]
    pub cache_tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Invalidation tag templates (e.g. "inbox", "thread:{threadId}").
    /// After a mutation action on this route, these tags are auto-invalidated.
    /// Supports {param} placeholders resolved at render time.
    #[prost(string, repeated, tag = "8")]
    pub invalidates: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Component tag name for the pending/loading UI (e.g. "mail-skeleton").
    /// Validated at build time — build fails if the component does not exist.
    #[prost(string, tag = "9")]
    pub pending_component: ::prost::alloc::string::String,
    /// Component tag name for the error boundary UI (e.g. "error-page").
    /// Validated at build time — build fails if the component does not exist.
    #[prost(string, tag = "10")]
    pub error_component: ::prost::alloc::string::String,
    /// Optional runtime content authored directly inside this route. The record
    /// contains typed boundary references and is rendered only for this route
    /// path; nested route declarations remain in children.
    #[prost(string, tag = "11")]
    pub content_fragment_id: ::prost::alloc::string::String,
}
/// Outlet placeholder — marks where matched child route content renders.
/// Components use this to indicate where nested route children are rendered.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WebUiFragmentOutlet {}
/// Opaque plugin-specific data passed from parser plugin to handler plugin.
/// WebUI framework does not interpret this data — it is a pass-through conduit.
/// Each parser/handler plugin pair defines its own binary contract for the data field.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WebUiFragmentPlugin {
    #[prost(bytes = "vec", tag = "1")]
    pub data: ::prost::alloc::vec::Vec<u8>,
}
/// Static text or HTML content.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WebUiFragmentRaw {
    #[prost(string, tag = "1")]
    pub value: ::prost::alloc::string::String,
}
/// Reference to a reusable component fragment.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WebUiFragmentComponent {
    #[prost(string, tag = "1")]
    pub fragment_id: ::prost::alloc::string::String,
}
/// Loop directive iterating over a collection.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WebUiFragmentFor {
    #[prost(string, tag = "1")]
    pub item: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub collection: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub fragment_id: ::prost::alloc::string::String,
}
/// Dynamic data binding via signal.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WebUiFragmentSignal {
    #[prost(string, tag = "1")]
    pub value: ::prost::alloc::string::String,
    #[prost(bool, tag = "2")]
    pub raw: bool,
    /// True inside an HTML raw-text context such as <style>. Raw-text signals do
    /// not own replaceable HTML sibling ranges because comments parse as text.
    #[prost(bool, tag = "3")]
    pub raw_text_context: bool,
}
/// Conditional rendering fragment.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WebUiFragmentIf {
    #[prost(message, optional, tag = "1")]
    pub condition: ::core::option::Option<ConditionExpr>,
    #[prost(string, tag = "2")]
    pub fragment_id: ::prost::alloc::string::String,
}
/// Dynamic attribute binding.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WebUiFragmentAttribute {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// For simple dynamic attrs, the signal name.
    #[prost(string, tag = "2")]
    pub value: ::prost::alloc::string::String,
    /// For mixed (template) attrs, the sub-stream ID.
    #[prost(string, tag = "3")]
    pub template: ::prost::alloc::string::String,
    /// True for :-prefixed complex attributes.
    #[prost(bool, tag = "4")]
    pub complex: bool,
    /// True for the first dynamic attribute on a component element.
    #[prost(bool, tag = "5")]
    pub attr_start: bool,
    /// True for skipped attributes (class, style, role, data-*, aria-*).
    #[prost(bool, tag = "6")]
    pub attr_skip: bool,
    /// True for static attribute values on components.
    #[prost(bool, tag = "7")]
    pub raw_value: bool,
    /// For ?-prefixed boolean attributes, the condition tree.
    #[prost(message, optional, tag = "8")]
    pub condition_tree: ::core::option::Option<ConditionExpr>,
}
/// A condition expression tree.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConditionExpr {
    #[prost(oneof = "condition_expr::Expr", tags = "1, 2, 3, 4")]
    pub expr: ::core::option::Option<condition_expr::Expr>,
}
/// Nested message and enum types in `ConditionExpr`.
pub mod condition_expr {
    #[derive(serde::Serialize, serde::Deserialize)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Expr {
        #[prost(message, tag = "1")]
        Predicate(super::Predicate),
        #[prost(message, tag = "2")]
        Not(::prost::alloc::boxed::Box<super::NotCondition>),
        #[prost(message, tag = "3")]
        Compound(::prost::alloc::boxed::Box<super::CompoundCondition>),
        #[prost(message, tag = "4")]
        Identifier(super::IdentifierCondition),
    }
}
/// Simple comparison predicate.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Predicate {
    #[prost(string, tag = "1")]
    pub left: ::prost::alloc::string::String,
    #[prost(enumeration = "ComparisonOperator", tag = "2")]
    pub operator: i32,
    #[prost(string, tag = "3")]
    pub right: ::prost::alloc::string::String,
}
/// Negation wrapper.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NotCondition {
    #[prost(message, optional, boxed, tag = "1")]
    pub condition: ::core::option::Option<::prost::alloc::boxed::Box<ConditionExpr>>,
}
/// Two conditions joined by a logical operator.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompoundCondition {
    #[prost(message, optional, boxed, tag = "1")]
    pub left: ::core::option::Option<::prost::alloc::boxed::Box<ConditionExpr>>,
    #[prost(enumeration = "LogicalOperator", tag = "2")]
    pub op: i32,
    #[prost(message, optional, boxed, tag = "3")]
    pub right: ::core::option::Option<::prost::alloc::boxed::Box<ConditionExpr>>,
}
/// Single identifier (variable name).
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct IdentifierCondition {
    #[prost(string, tag = "1")]
    pub value: ::prost::alloc::string::String,
}
/// Per-component client work scheduling policy.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ComponentWorkPolicy {
    Eager = 0,
    LazyHydration = 1,
    LazyRender = 2,
    Interaction = 3,
    LazyRenderInteraction = 4,
}
impl ComponentWorkPolicy {
    /// 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::Eager => "COMPONENT_WORK_POLICY_EAGER",
            Self::LazyHydration => "COMPONENT_WORK_POLICY_LAZY_HYDRATION",
            Self::LazyRender => "COMPONENT_WORK_POLICY_LAZY_RENDER",
            Self::Interaction => "COMPONENT_WORK_POLICY_INTERACTION",
            Self::LazyRenderInteraction => {
                "COMPONENT_WORK_POLICY_LAZY_RENDER_INTERACTION"
            }
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "COMPONENT_WORK_POLICY_EAGER" => Some(Self::Eager),
            "COMPONENT_WORK_POLICY_LAZY_HYDRATION" => Some(Self::LazyHydration),
            "COMPONENT_WORK_POLICY_LAZY_RENDER" => Some(Self::LazyRender),
            "COMPONENT_WORK_POLICY_INTERACTION" => Some(Self::Interaction),
            "COMPONENT_WORK_POLICY_LAZY_RENDER_INTERACTION" => {
                Some(Self::LazyRenderInteraction)
            }
            _ => None,
        }
    }
}
/// Build-wide initial-state behavior.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum InitialStateStrategy {
    /// Emit the complete state object. Used by default and non-WebUI plugins.
    Full = 0,
    /// Select state from reachable WebUI component surfaces.
    Components = 1,
}
impl InitialStateStrategy {
    /// 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::Full => "INITIAL_STATE_STRATEGY_FULL",
            Self::Components => "INITIAL_STATE_STRATEGY_COMPONENTS",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "INITIAL_STATE_STRATEGY_FULL" => Some(Self::Full),
            "INITIAL_STATE_STRATEGY_COMPONENTS" => Some(Self::Components),
            _ => None,
        }
    }
}
/// Per-component state selection.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum StateProjectionMode {
    /// The component is known not to consume state through this channel.
    None = 0,
    /// Select the component's explicit sorted key list.
    Keys = 1,
    /// The complete surface is unknown, so preserve correctness with full state.
    All = 2,
}
impl StateProjectionMode {
    /// 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::None => "STATE_PROJECTION_MODE_NONE",
            Self::Keys => "STATE_PROJECTION_MODE_KEYS",
            Self::All => "STATE_PROJECTION_MODE_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 {
            "STATE_PROJECTION_MODE_NONE" => Some(Self::None),
            "STATE_PROJECTION_MODE_KEYS" => Some(Self::Keys),
            "STATE_PROJECTION_MODE_ALL" => Some(Self::All),
            _ => None,
        }
    }
}
/// CSS delivery strategy chosen at build time.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CssStrategy {
    Link = 0,
    Style = 1,
    Module = 2,
}
impl CssStrategy {
    /// 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::Link => "CSS_STRATEGY_LINK",
            Self::Style => "CSS_STRATEGY_STYLE",
            Self::Module => "CSS_STRATEGY_MODULE",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "CSS_STRATEGY_LINK" => Some(Self::Link),
            "CSS_STRATEGY_STYLE" => Some(Self::Style),
            "CSS_STRATEGY_MODULE" => Some(Self::Module),
            _ => None,
        }
    }
}
/// Which end of an inline boundary tape a fragment marks.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum BoundaryPhase {
    /// Opens a boundary body. Carries the full declaration metadata.
    Start = 0,
    /// Closes the body opened by the matching start in the same record. Only
    /// declaration_id is meaningful.
    End = 1,
}
impl BoundaryPhase {
    /// 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::Start => "BOUNDARY_PHASE_START",
            Self::End => "BOUNDARY_PHASE_END",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "BOUNDARY_PHASE_START" => Some(Self::Start),
            "BOUNDARY_PHASE_END" => Some(Self::End),
            _ => None,
        }
    }
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum LogicalOperator {
    Unspecified = 0,
    And = 1,
    Or = 2,
}
impl LogicalOperator {
    /// 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 => "LOGICAL_OPERATOR_UNSPECIFIED",
            Self::And => "AND",
            Self::Or => "OR",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "LOGICAL_OPERATOR_UNSPECIFIED" => Some(Self::Unspecified),
            "AND" => Some(Self::And),
            "OR" => Some(Self::Or),
            _ => None,
        }
    }
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ComparisonOperator {
    Unspecified = 0,
    GreaterThan = 1,
    LessThan = 2,
    Equal = 3,
    NotEqual = 4,
    GreaterThanOrEqual = 5,
    LessThanOrEqual = 6,
}
impl ComparisonOperator {
    /// 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 => "COMPARISON_OPERATOR_UNSPECIFIED",
            Self::GreaterThan => "GREATER_THAN",
            Self::LessThan => "LESS_THAN",
            Self::Equal => "EQUAL",
            Self::NotEqual => "NOT_EQUAL",
            Self::GreaterThanOrEqual => "GREATER_THAN_OR_EQUAL",
            Self::LessThanOrEqual => "LESS_THAN_OR_EQUAL",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "COMPARISON_OPERATOR_UNSPECIFIED" => Some(Self::Unspecified),
            "GREATER_THAN" => Some(Self::GreaterThan),
            "LESS_THAN" => Some(Self::LessThan),
            "EQUAL" => Some(Self::Equal),
            "NOT_EQUAL" => Some(Self::NotEqual),
            "GREATER_THAN_OR_EQUAL" => Some(Self::GreaterThanOrEqual),
            "LESS_THAN_OR_EQUAL" => Some(Self::LessThanOrEqual),
            _ => None,
        }
    }
}