Skip to main content

webui_protocol/
gen_webui.rs

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT license.
3
4// This file is @generated by prost-build from proto/webui.proto.
5// Do not edit manually. Regenerate with: cargo xtask proto
6// This file is @generated by prost-build.
7/// Per-component metadata keyed by tag name.
8#[derive(serde::Serialize, serde::Deserialize)]
9#[serde(deny_unknown_fields)]
10#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
11pub struct ComponentData {
12    /// Non-WebUI client-side template payload.
13    /// FAST plugins store complete <f-template> HTML here.
14    #[prost(string, tag = "1")]
15    pub template: ::prost::alloc::string::String,
16    /// Compiled component CSS content for the Style and Module strategies.
17    /// Empty for Link and for components without CSS.
18    #[prost(string, tag = "2")]
19    pub css: ::prost::alloc::string::String,
20    /// External stylesheet href for the Link CSS strategy.
21    /// Set to e.g. "/my-card.css" when the component has a CSS file and the
22    /// build used CssStrategy::Link. Empty for Style/Module strategies and
23    /// for components without CSS.
24    /// Ordered style closures decide which Document or ShadowRoot owns the link.
25    #[prost(string, tag = "3")]
26    pub css_href: ::prost::alloc::string::String,
27    /// WebUI plugin JSON-safe component metadata.
28    /// Stored separately from executable condition closures so handlers can emit
29    /// the static metadata in application/json data blocks.
30    #[prost(string, tag = "4")]
31    pub template_json: ::prost::alloc::string::String,
32    /// WebUI plugin component-local JavaScript condition closure array.
33    /// Empty when the component has no conditions or boolean attributes.
34    #[prost(string, tag = "5")]
35    pub template_functions: ::prost::alloc::string::String,
36    /// Exact @observable + @attr property keys when hydration_mode is KEYS.
37    /// Existing SSR host attributes take precedence; bootstrap state fills
38    /// attribute-backed properties that were not materialized on the host.
39    /// Template roots already exist in the trusted SSR DOM and do not enter
40    /// initial state solely because a component has authored browser code.
41    /// Sorted and deduplicated; empty for NONE and ALL.
42    #[prost(string, repeated, tag = "6")]
43    pub hydration_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
44    /// Exact partial-navigation keys when navigation_mode is KEYS. Authored
45    /// components use @observable + @attr property keys plus template roots.
46    /// Scriptless compiled templates include only their template roots.
47    /// Sorted and deduplicated; empty for NONE and ALL.
48    #[prost(string, repeated, tag = "7")]
49    pub navigation_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
50    /// How initial hydration state is selected for this component.
51    #[prost(enumeration = "StateProjectionMode", tag = "8")]
52    pub hydration_mode: i32,
53    /// How partial-navigation state is selected for this component. Presence is
54    /// significant: protocols produced before projection metadata leave this
55    /// absent, so handlers preserve full state instead of treating it as NONE.
56    #[prost(enumeration = "StateProjectionMode", optional, tag = "9")]
57    pub navigation_mode: ::core::option::Option<i32>,
58    /// Whether this component effectively uses Shadow DOM after build-time
59    /// fallback and authored declarative Shadow DOM resolution.
60    #[prost(bool, tag = "10")]
61    pub uses_shadow_dom: bool,
62    /// Compiler-owned client work policy. Zero/eager is absent on the wire.
63    #[prost(enumeration = "ComponentWorkPolicy", tag = "11")]
64    pub work_policy: i32,
65}
66/// Link stylesheet metadata for one static component asset root.
67///
68/// Shadow builds publish this finite manifest so the framework can begin CSS
69/// beside the root module on interaction. Light builds emit the hrefs as
70/// deduplicated document stylesheets because their CSS is globally scoped.
71#[derive(serde::Serialize, serde::Deserialize)]
72#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
73pub struct ComponentAssetStylePreload {
74    /// Root component tag used by defineComponentAssets().
75    #[prost(string, tag = "1")]
76    pub root: ::prost::alloc::string::String,
77    /// Final Link-mode stylesheet hrefs required by this asset graph.
78    #[prost(string, repeated, tag = "2")]
79    pub style_hrefs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
80}
81/// Root protocol containing all fragment records and build metadata.
82#[derive(serde::Serialize, serde::Deserialize)]
83#[serde(deny_unknown_fields)]
84#[derive(Clone, PartialEq, ::prost::Message)]
85pub struct WebUiProtocol {
86    #[prost(map = "string, message", tag = "1")]
87    pub fragments: ::std::collections::HashMap<
88        ::prost::alloc::string::String,
89        FragmentList,
90    >,
91    /// Sorted, deduplicated CSS custom property names used across all components
92    /// and entry page styles (e.g., "colorBrandBackground", "spacingMedium").
93    /// Only usage via var(--name) is included; local definitions are excluded.
94    #[prost(string, repeated, tag = "2")]
95    pub tokens: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
96    /// Per-component data keyed by tag name (f-template + CSS).
97    #[prost(map = "string, message", tag = "3")]
98    pub components: ::std::collections::HashMap<
99        ::prost::alloc::string::String,
100        ComponentData,
101    >,
102    /// Build-wide CSS delivery strategy. Determines how compiled component
103    /// resources are installed in each CSS tree.
104    #[prost(enumeration = "CssStrategy", tag = "4")]
105    pub css_strategy: i32,
106    /// Whether initial SSR metadata contains full state or WebUI component
107    /// projection. Partial-navigation state remains component-driven.
108    #[prost(enumeration = "InitialStateStrategy", tag = "6")]
109    pub initial_state_strategy: i32,
110    /// Ready-to-write `<link rel="modulepreload">` hrefs for the shared chunks
111    /// that the page's critical module entries statically import, in the exact
112    /// order they must be emitted (largest chunk first).
113    ///
114    /// These chunks are named only inside the entry's own bytes, so the browser's
115    /// preload scanner cannot discover them until it has downloaded and parsed
116    /// the entry. Emitting them as hints removes that serialization.
117    ///
118    /// Order is load-bearing: preloads are issued in document order over one
119    /// connection, so a small chunk ahead of a large one delays the long pole.
120    /// The compiler resolves and sorts these at build time so the handler writes
121    /// them verbatim with no per-request work.
122    #[prost(string, repeated, tag = "7")]
123    pub module_preloads: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
124    /// Build-generated document-level rules for component rendering policies.
125    /// Empty when no component opts into lazy rendering.
126    #[prost(string, tag = "9")]
127    pub component_render_css: ::prost::alloc::string::String,
128    /// Ordered, deduplicated component style resource tags for each Document or
129    /// component-root CSS tree entry point.
130    #[prost(map = "string, message", tag = "10")]
131    pub style_closures: ::std::collections::HashMap<
132        ::prost::alloc::string::String,
133        ComponentStyleClosure,
134    >,
135    /// Bundled stylesheets in global cascade order. Empty unless the build
136    /// enabled CSS bundling, in which case every component that owns a style
137    /// resource belongs to exactly one chunk and handlers deliver chunks instead
138    /// of individual component resources.
139    #[prost(message, repeated, tag = "11")]
140    pub style_chunks: ::prost::alloc::vec::Vec<StyleChunk>,
141    /// Build-generated eager metadata for static component asset roots.
142    ///
143    /// Entries are sorted by root tag. Builds without component assets omit the
144    /// field from the wire.
145    #[prost(message, repeated, tag = "12")]
146    pub component_asset_style_preloads: ::prost::alloc::vec::Vec<
147        ComponentAssetStylePreload,
148    >,
149}
150/// Compile-time component style resources for one CSS tree.
151#[derive(serde::Serialize, serde::Deserialize)]
152#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
153pub struct ComponentStyleClosure {
154    /// Component tags in cascade-sensitive first-discovery order.
155    #[prost(string, repeated, tag = "1")]
156    pub component_tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
157    /// Indices into WebUIProtocol.style_chunks covering exactly the components in
158    /// component_tags, in the same cascade order. Empty unless the build enabled
159    /// CSS bundling. A chunk is listed only when the closure consumes every
160    /// component the chunk carries, so delivering a chunk never over-delivers.
161    #[prost(uint32, repeated, tag = "2")]
162    pub style_chunks: ::prost::alloc::vec::Vec<u32>,
163}
164/// One bundled stylesheet carrying a contiguous run of component styles that
165/// share the same set of consuming CSS trees.
166#[derive(serde::Serialize, serde::Deserialize)]
167#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
168pub struct StyleChunk {
169    /// Stable build-time chunk name. Surfaces as the data-webui-resource value so
170    /// delivered stylesheets stay attributable without a source map.
171    #[prost(string, tag = "1")]
172    pub name: ::prost::alloc::string::String,
173    /// Concatenated compiled CSS for the Style and Module strategies.
174    /// Empty for Link.
175    #[prost(string, tag = "2")]
176    pub css: ::prost::alloc::string::String,
177    /// External stylesheet href for the Link strategy.
178    /// Empty for Style and Module.
179    #[prost(string, tag = "3")]
180    pub css_href: ::prost::alloc::string::String,
181    /// Component tags whose CSS this chunk concatenates, in cascade order.
182    #[prost(string, repeated, tag = "4")]
183    pub component_tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
184}
185/// A list of fragments (needed because protobuf maps cannot have repeated values directly).
186#[derive(serde::Serialize, serde::Deserialize)]
187#[derive(Clone, PartialEq, ::prost::Message)]
188pub struct FragmentList {
189    #[prost(message, repeated, tag = "1")]
190    pub fragments: ::prost::alloc::vec::Vec<WebUiFragment>,
191    /// True when this record directly or transitively reaches a boundary
192    /// declaration. Computed once at build time so handlers never graph-walk a
193    /// request merely to decide whether rendering can suspend.
194    #[prost(bool, tag = "2")]
195    pub contains_boundary: bool,
196}
197/// A single fragment — one of several types.
198#[derive(serde::Serialize, serde::Deserialize)]
199#[derive(Clone, PartialEq, ::prost::Message)]
200pub struct WebUiFragment {
201    #[prost(oneof = "web_ui_fragment::Fragment", tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10")]
202    pub fragment: ::core::option::Option<web_ui_fragment::Fragment>,
203}
204/// Nested message and enum types in `WebUIFragment`.
205pub mod web_ui_fragment {
206    #[derive(serde::Serialize, serde::Deserialize)]
207    #[derive(Clone, PartialEq, ::prost::Oneof)]
208    pub enum Fragment {
209        #[prost(message, tag = "1")]
210        Raw(super::WebUiFragmentRaw),
211        #[prost(message, tag = "2")]
212        Component(super::WebUiFragmentComponent),
213        #[prost(message, tag = "3")]
214        ForLoop(super::WebUiFragmentFor),
215        #[prost(message, tag = "4")]
216        Signal(super::WebUiFragmentSignal),
217        #[prost(message, tag = "5")]
218        IfCond(super::WebUiFragmentIf),
219        #[prost(message, tag = "6")]
220        Attribute(super::WebUiFragmentAttribute),
221        #[prost(message, tag = "7")]
222        Plugin(super::WebUiFragmentPlugin),
223        #[prost(message, tag = "8")]
224        Route(super::WebUiFragmentRoute),
225        #[prost(message, tag = "9")]
226        Outlet(super::WebUiFragmentOutlet),
227        #[prost(message, tag = "10")]
228        Boundary(super::WebUiFragmentBoundary),
229    }
230}
231/// Compile-time streaming boundary declaration, written as an inline tape.
232///
233/// A declaration emits a start marker and an end marker into its owner's
234/// fragment record, with the body fragments in between. Ordinary rendering
235/// therefore walks the body without any extra record lookup, and streaming
236/// suspends and resumes inside the record it is already traversing.
237///
238/// A declaration can produce multiple response-local occurrences through
239/// components, conditions, loops, and routes. Runtime occurrence IDs are
240/// therefore assigned later by the handler and are not stored here.
241#[derive(serde::Serialize, serde::Deserialize)]
242#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
243pub struct WebUiFragmentBoundary {
244    /// Stable build-local declaration identity. Shared by the start/end pair.
245    #[prost(uint32, tag = "1")]
246    pub declaration_id: u32,
247    /// Entry or reusable component template that authored this declaration.
248    #[prost(string, tag = "2")]
249    pub owner_fragment_id: ::prost::alloc::string::String,
250    /// Free-form authored name, unique only within owner_fragment_id.
251    #[prost(string, tag = "3")]
252    pub name: ::prost::alloc::string::String,
253    /// Optional authored key expression preserved verbatim for handler evaluation.
254    #[prost(string, optional, tag = "4")]
255    pub key: ::core::option::Option<::prost::alloc::string::String>,
256    /// Conservative graph result: this declaration may produce multiple runtime
257    /// occurrences through repeated component callsites. A `<for>` repeat can no
258    /// longer contribute: the build rejects every boundary a repeat body reaches
259    /// (`boundary-in-repeat`), because a repeat iteration cannot suspend.
260    #[prost(bool, tag = "6")]
261    pub may_repeat: bool,
262    /// Whether this fragment opens or closes the declaration's body.
263    #[prost(enumeration = "BoundaryPhase", tag = "7")]
264    pub phase: i32,
265}
266/// Declarative route definition linking a URL path template to a component.
267/// Nested routes are expressed via repeated children.
268#[derive(serde::Serialize, serde::Deserialize)]
269#[derive(Clone, PartialEq, ::prost::Message)]
270pub struct WebUiFragmentRoute {
271    #[prost(string, tag = "1")]
272    pub path: ::prost::alloc::string::String,
273    #[prost(string, tag = "2")]
274    pub fragment_id: ::prost::alloc::string::String,
275    #[prost(bool, tag = "3")]
276    pub exact: bool,
277    /// Nested child routes rendered at the component's <outlet />.
278    #[prost(message, repeated, tag = "4")]
279    pub children: ::prost::alloc::vec::Vec<WebUiFragmentRoute>,
280    /// Comma-separated allowlist of query parameters forwarded as attributes.
281    /// Empty string means no query params are forwarded (deny-by-default).
282    #[prost(string, tag = "5")]
283    pub allowed_query: ::prost::alloc::string::String,
284    /// When true, the router preserves the mounted component instance across
285    /// navigations instead of destroying and recreating it. Opt-in per route.
286    #[prost(bool, tag = "6")]
287    pub keep_alive: bool,
288    /// Cache tag templates for this route (e.g. "thread:{threadId}", "inbox").
289    /// Placeholders like {param} are resolved at render time with actual param values.
290    #[prost(string, repeated, tag = "7")]
291    pub cache_tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
292    /// Invalidation tag templates (e.g. "inbox", "thread:{threadId}").
293    /// After a mutation action on this route, these tags are auto-invalidated.
294    /// Supports {param} placeholders resolved at render time.
295    #[prost(string, repeated, tag = "8")]
296    pub invalidates: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
297    /// Component tag name for the pending/loading UI (e.g. "mail-skeleton").
298    /// Validated at build time — build fails if the component does not exist.
299    #[prost(string, tag = "9")]
300    pub pending_component: ::prost::alloc::string::String,
301    /// Component tag name for the error boundary UI (e.g. "error-page").
302    /// Validated at build time — build fails if the component does not exist.
303    #[prost(string, tag = "10")]
304    pub error_component: ::prost::alloc::string::String,
305    /// Optional runtime content authored directly inside this route. The record
306    /// contains typed boundary references and is rendered only for this route
307    /// path; nested route declarations remain in children.
308    #[prost(string, tag = "11")]
309    pub content_fragment_id: ::prost::alloc::string::String,
310}
311/// Outlet placeholder — marks where matched child route content renders.
312/// Components use this to indicate where nested route children are rendered.
313#[derive(serde::Serialize, serde::Deserialize)]
314#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
315pub struct WebUiFragmentOutlet {}
316/// Opaque plugin-specific data passed from parser plugin to handler plugin.
317/// WebUI framework does not interpret this data — it is a pass-through conduit.
318/// Each parser/handler plugin pair defines its own binary contract for the data field.
319#[derive(serde::Serialize, serde::Deserialize)]
320#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
321pub struct WebUiFragmentPlugin {
322    #[prost(bytes = "vec", tag = "1")]
323    pub data: ::prost::alloc::vec::Vec<u8>,
324}
325/// Static text or HTML content.
326#[derive(serde::Serialize, serde::Deserialize)]
327#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
328pub struct WebUiFragmentRaw {
329    #[prost(string, tag = "1")]
330    pub value: ::prost::alloc::string::String,
331}
332/// Reference to a reusable component fragment.
333#[derive(serde::Serialize, serde::Deserialize)]
334#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
335pub struct WebUiFragmentComponent {
336    #[prost(string, tag = "1")]
337    pub fragment_id: ::prost::alloc::string::String,
338}
339/// Loop directive iterating over a collection.
340#[derive(serde::Serialize, serde::Deserialize)]
341#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
342pub struct WebUiFragmentFor {
343    #[prost(string, tag = "1")]
344    pub item: ::prost::alloc::string::String,
345    #[prost(string, tag = "2")]
346    pub collection: ::prost::alloc::string::String,
347    #[prost(string, tag = "3")]
348    pub fragment_id: ::prost::alloc::string::String,
349}
350/// Dynamic data binding via signal.
351#[derive(serde::Serialize, serde::Deserialize)]
352#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
353pub struct WebUiFragmentSignal {
354    #[prost(string, tag = "1")]
355    pub value: ::prost::alloc::string::String,
356    #[prost(bool, tag = "2")]
357    pub raw: bool,
358    /// True inside an HTML raw-text context such as <style>. Raw-text signals do
359    /// not own replaceable HTML sibling ranges because comments parse as text.
360    #[prost(bool, tag = "3")]
361    pub raw_text_context: bool,
362}
363/// Conditional rendering fragment.
364#[derive(serde::Serialize, serde::Deserialize)]
365#[derive(Clone, PartialEq, ::prost::Message)]
366pub struct WebUiFragmentIf {
367    #[prost(message, optional, tag = "1")]
368    pub condition: ::core::option::Option<ConditionExpr>,
369    #[prost(string, tag = "2")]
370    pub fragment_id: ::prost::alloc::string::String,
371}
372/// Dynamic attribute binding.
373#[derive(serde::Serialize, serde::Deserialize)]
374#[derive(Clone, PartialEq, ::prost::Message)]
375pub struct WebUiFragmentAttribute {
376    #[prost(string, tag = "1")]
377    pub name: ::prost::alloc::string::String,
378    /// For simple dynamic attrs, the signal name.
379    #[prost(string, tag = "2")]
380    pub value: ::prost::alloc::string::String,
381    /// For mixed (template) attrs, the sub-stream ID.
382    #[prost(string, tag = "3")]
383    pub template: ::prost::alloc::string::String,
384    /// True for :-prefixed complex attributes.
385    #[prost(bool, tag = "4")]
386    pub complex: bool,
387    /// True for the first dynamic attribute on a component element.
388    #[prost(bool, tag = "5")]
389    pub attr_start: bool,
390    /// True for skipped attributes (class, style, role, data-*, aria-*).
391    #[prost(bool, tag = "6")]
392    pub attr_skip: bool,
393    /// True for static attribute values on components.
394    #[prost(bool, tag = "7")]
395    pub raw_value: bool,
396    /// For ?-prefixed boolean attributes, the condition tree.
397    #[prost(message, optional, tag = "8")]
398    pub condition_tree: ::core::option::Option<ConditionExpr>,
399}
400/// A condition expression tree.
401#[derive(serde::Serialize, serde::Deserialize)]
402#[derive(Clone, PartialEq, ::prost::Message)]
403pub struct ConditionExpr {
404    #[prost(oneof = "condition_expr::Expr", tags = "1, 2, 3, 4")]
405    pub expr: ::core::option::Option<condition_expr::Expr>,
406}
407/// Nested message and enum types in `ConditionExpr`.
408pub mod condition_expr {
409    #[derive(serde::Serialize, serde::Deserialize)]
410    #[derive(Clone, PartialEq, ::prost::Oneof)]
411    pub enum Expr {
412        #[prost(message, tag = "1")]
413        Predicate(super::Predicate),
414        #[prost(message, tag = "2")]
415        Not(::prost::alloc::boxed::Box<super::NotCondition>),
416        #[prost(message, tag = "3")]
417        Compound(::prost::alloc::boxed::Box<super::CompoundCondition>),
418        #[prost(message, tag = "4")]
419        Identifier(super::IdentifierCondition),
420    }
421}
422/// Simple comparison predicate.
423#[derive(serde::Serialize, serde::Deserialize)]
424#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
425pub struct Predicate {
426    #[prost(string, tag = "1")]
427    pub left: ::prost::alloc::string::String,
428    #[prost(enumeration = "ComparisonOperator", tag = "2")]
429    pub operator: i32,
430    #[prost(string, tag = "3")]
431    pub right: ::prost::alloc::string::String,
432}
433/// Negation wrapper.
434#[derive(serde::Serialize, serde::Deserialize)]
435#[derive(Clone, PartialEq, ::prost::Message)]
436pub struct NotCondition {
437    #[prost(message, optional, boxed, tag = "1")]
438    pub condition: ::core::option::Option<::prost::alloc::boxed::Box<ConditionExpr>>,
439}
440/// Two conditions joined by a logical operator.
441#[derive(serde::Serialize, serde::Deserialize)]
442#[derive(Clone, PartialEq, ::prost::Message)]
443pub struct CompoundCondition {
444    #[prost(message, optional, boxed, tag = "1")]
445    pub left: ::core::option::Option<::prost::alloc::boxed::Box<ConditionExpr>>,
446    #[prost(enumeration = "LogicalOperator", tag = "2")]
447    pub op: i32,
448    #[prost(message, optional, boxed, tag = "3")]
449    pub right: ::core::option::Option<::prost::alloc::boxed::Box<ConditionExpr>>,
450}
451/// Single identifier (variable name).
452#[derive(serde::Serialize, serde::Deserialize)]
453#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
454pub struct IdentifierCondition {
455    #[prost(string, tag = "1")]
456    pub value: ::prost::alloc::string::String,
457}
458/// Per-component client work scheduling policy.
459#[derive(serde::Serialize, serde::Deserialize)]
460#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
461#[repr(i32)]
462pub enum ComponentWorkPolicy {
463    Eager = 0,
464    LazyHydration = 1,
465    LazyRender = 2,
466    Interaction = 3,
467    LazyRenderInteraction = 4,
468}
469impl ComponentWorkPolicy {
470    /// String value of the enum field names used in the ProtoBuf definition.
471    ///
472    /// The values are not transformed in any way and thus are considered stable
473    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
474    pub fn as_str_name(&self) -> &'static str {
475        match self {
476            Self::Eager => "COMPONENT_WORK_POLICY_EAGER",
477            Self::LazyHydration => "COMPONENT_WORK_POLICY_LAZY_HYDRATION",
478            Self::LazyRender => "COMPONENT_WORK_POLICY_LAZY_RENDER",
479            Self::Interaction => "COMPONENT_WORK_POLICY_INTERACTION",
480            Self::LazyRenderInteraction => {
481                "COMPONENT_WORK_POLICY_LAZY_RENDER_INTERACTION"
482            }
483        }
484    }
485    /// Creates an enum from field names used in the ProtoBuf definition.
486    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
487        match value {
488            "COMPONENT_WORK_POLICY_EAGER" => Some(Self::Eager),
489            "COMPONENT_WORK_POLICY_LAZY_HYDRATION" => Some(Self::LazyHydration),
490            "COMPONENT_WORK_POLICY_LAZY_RENDER" => Some(Self::LazyRender),
491            "COMPONENT_WORK_POLICY_INTERACTION" => Some(Self::Interaction),
492            "COMPONENT_WORK_POLICY_LAZY_RENDER_INTERACTION" => {
493                Some(Self::LazyRenderInteraction)
494            }
495            _ => None,
496        }
497    }
498}
499/// Build-wide initial-state behavior.
500#[derive(serde::Serialize, serde::Deserialize)]
501#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
502#[repr(i32)]
503pub enum InitialStateStrategy {
504    /// Emit the complete state object. Used by default and non-WebUI plugins.
505    Full = 0,
506    /// Select state from reachable WebUI component surfaces.
507    Components = 1,
508}
509impl InitialStateStrategy {
510    /// String value of the enum field names used in the ProtoBuf definition.
511    ///
512    /// The values are not transformed in any way and thus are considered stable
513    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
514    pub fn as_str_name(&self) -> &'static str {
515        match self {
516            Self::Full => "INITIAL_STATE_STRATEGY_FULL",
517            Self::Components => "INITIAL_STATE_STRATEGY_COMPONENTS",
518        }
519    }
520    /// Creates an enum from field names used in the ProtoBuf definition.
521    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
522        match value {
523            "INITIAL_STATE_STRATEGY_FULL" => Some(Self::Full),
524            "INITIAL_STATE_STRATEGY_COMPONENTS" => Some(Self::Components),
525            _ => None,
526        }
527    }
528}
529/// Per-component state selection.
530#[derive(serde::Serialize, serde::Deserialize)]
531#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
532#[repr(i32)]
533pub enum StateProjectionMode {
534    /// The component is known not to consume state through this channel.
535    None = 0,
536    /// Select the component's explicit sorted key list.
537    Keys = 1,
538    /// The complete surface is unknown, so preserve correctness with full state.
539    All = 2,
540}
541impl StateProjectionMode {
542    /// String value of the enum field names used in the ProtoBuf definition.
543    ///
544    /// The values are not transformed in any way and thus are considered stable
545    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
546    pub fn as_str_name(&self) -> &'static str {
547        match self {
548            Self::None => "STATE_PROJECTION_MODE_NONE",
549            Self::Keys => "STATE_PROJECTION_MODE_KEYS",
550            Self::All => "STATE_PROJECTION_MODE_ALL",
551        }
552    }
553    /// Creates an enum from field names used in the ProtoBuf definition.
554    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
555        match value {
556            "STATE_PROJECTION_MODE_NONE" => Some(Self::None),
557            "STATE_PROJECTION_MODE_KEYS" => Some(Self::Keys),
558            "STATE_PROJECTION_MODE_ALL" => Some(Self::All),
559            _ => None,
560        }
561    }
562}
563/// CSS delivery strategy chosen at build time.
564#[derive(serde::Serialize, serde::Deserialize)]
565#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
566#[repr(i32)]
567pub enum CssStrategy {
568    Link = 0,
569    Style = 1,
570    Module = 2,
571}
572impl CssStrategy {
573    /// String value of the enum field names used in the ProtoBuf definition.
574    ///
575    /// The values are not transformed in any way and thus are considered stable
576    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
577    pub fn as_str_name(&self) -> &'static str {
578        match self {
579            Self::Link => "CSS_STRATEGY_LINK",
580            Self::Style => "CSS_STRATEGY_STYLE",
581            Self::Module => "CSS_STRATEGY_MODULE",
582        }
583    }
584    /// Creates an enum from field names used in the ProtoBuf definition.
585    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
586        match value {
587            "CSS_STRATEGY_LINK" => Some(Self::Link),
588            "CSS_STRATEGY_STYLE" => Some(Self::Style),
589            "CSS_STRATEGY_MODULE" => Some(Self::Module),
590            _ => None,
591        }
592    }
593}
594/// Which end of an inline boundary tape a fragment marks.
595#[derive(serde::Serialize, serde::Deserialize)]
596#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
597#[repr(i32)]
598pub enum BoundaryPhase {
599    /// Opens a boundary body. Carries the full declaration metadata.
600    Start = 0,
601    /// Closes the body opened by the matching start in the same record. Only
602    /// declaration_id is meaningful.
603    End = 1,
604}
605impl BoundaryPhase {
606    /// String value of the enum field names used in the ProtoBuf definition.
607    ///
608    /// The values are not transformed in any way and thus are considered stable
609    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
610    pub fn as_str_name(&self) -> &'static str {
611        match self {
612            Self::Start => "BOUNDARY_PHASE_START",
613            Self::End => "BOUNDARY_PHASE_END",
614        }
615    }
616    /// Creates an enum from field names used in the ProtoBuf definition.
617    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
618        match value {
619            "BOUNDARY_PHASE_START" => Some(Self::Start),
620            "BOUNDARY_PHASE_END" => Some(Self::End),
621            _ => None,
622        }
623    }
624}
625#[derive(serde::Serialize, serde::Deserialize)]
626#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
627#[repr(i32)]
628pub enum LogicalOperator {
629    Unspecified = 0,
630    And = 1,
631    Or = 2,
632}
633impl LogicalOperator {
634    /// String value of the enum field names used in the ProtoBuf definition.
635    ///
636    /// The values are not transformed in any way and thus are considered stable
637    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
638    pub fn as_str_name(&self) -> &'static str {
639        match self {
640            Self::Unspecified => "LOGICAL_OPERATOR_UNSPECIFIED",
641            Self::And => "AND",
642            Self::Or => "OR",
643        }
644    }
645    /// Creates an enum from field names used in the ProtoBuf definition.
646    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
647        match value {
648            "LOGICAL_OPERATOR_UNSPECIFIED" => Some(Self::Unspecified),
649            "AND" => Some(Self::And),
650            "OR" => Some(Self::Or),
651            _ => None,
652        }
653    }
654}
655#[derive(serde::Serialize, serde::Deserialize)]
656#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
657#[repr(i32)]
658pub enum ComparisonOperator {
659    Unspecified = 0,
660    GreaterThan = 1,
661    LessThan = 2,
662    Equal = 3,
663    NotEqual = 4,
664    GreaterThanOrEqual = 5,
665    LessThanOrEqual = 6,
666}
667impl ComparisonOperator {
668    /// String value of the enum field names used in the ProtoBuf definition.
669    ///
670    /// The values are not transformed in any way and thus are considered stable
671    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
672    pub fn as_str_name(&self) -> &'static str {
673        match self {
674            Self::Unspecified => "COMPARISON_OPERATOR_UNSPECIFIED",
675            Self::GreaterThan => "GREATER_THAN",
676            Self::LessThan => "LESS_THAN",
677            Self::Equal => "EQUAL",
678            Self::NotEqual => "NOT_EQUAL",
679            Self::GreaterThanOrEqual => "GREATER_THAN_OR_EQUAL",
680            Self::LessThanOrEqual => "LESS_THAN_OR_EQUAL",
681        }
682    }
683    /// Creates an enum from field names used in the ProtoBuf definition.
684    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
685        match value {
686            "COMPARISON_OPERATOR_UNSPECIFIED" => Some(Self::Unspecified),
687            "GREATER_THAN" => Some(Self::GreaterThan),
688            "LESS_THAN" => Some(Self::LessThan),
689            "EQUAL" => Some(Self::Equal),
690            "NOT_EQUAL" => Some(Self::NotEqual),
691            "GREATER_THAN_OR_EQUAL" => Some(Self::GreaterThanOrEqual),
692            "LESS_THAN_OR_EQUAL" => Some(Self::LessThanOrEqual),
693            _ => None,
694        }
695    }
696}