Skip to main content

voce_schema/generated/
_combined_generated.rs

1// automatically generated by the FlatBuffers compiler, do not modify
2
3
4// @generated
5
6use core::mem;
7use core::cmp::Ordering;
8
9extern crate flatbuffers;
10use self::flatbuffers::{EndianScalar, Follow};
11
12#[allow(unused_imports, dead_code)]
13pub mod voce {
14
15  use core::mem;
16  use core::cmp::Ordering;
17
18  extern crate flatbuffers;
19  use self::flatbuffers::{EndianScalar, Follow};
20
21#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
22pub const ENUM_MIN_LENGTH_UNIT: i8 = 0;
23#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
24pub const ENUM_MAX_LENGTH_UNIT: i8 = 12;
25#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
26#[allow(non_camel_case_types)]
27pub const ENUM_VALUES_LENGTH_UNIT: [LengthUnit; 13] = [
28  LengthUnit::Px,
29  LengthUnit::Rem,
30  LengthUnit::Em,
31  LengthUnit::Percent,
32  LengthUnit::Vw,
33  LengthUnit::Vh,
34  LengthUnit::Dvh,
35  LengthUnit::Svh,
36  LengthUnit::Auto,
37  LengthUnit::FitContent,
38  LengthUnit::MinContent,
39  LengthUnit::MaxContent,
40  LengthUnit::Fr,
41];
42
43#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
44#[repr(transparent)]
45pub struct LengthUnit(pub i8);
46#[allow(non_upper_case_globals)]
47impl LengthUnit {
48  pub const Px: Self = Self(0);
49  pub const Rem: Self = Self(1);
50  pub const Em: Self = Self(2);
51  pub const Percent: Self = Self(3);
52  pub const Vw: Self = Self(4);
53  pub const Vh: Self = Self(5);
54  pub const Dvh: Self = Self(6);
55  pub const Svh: Self = Self(7);
56  pub const Auto: Self = Self(8);
57  pub const FitContent: Self = Self(9);
58  pub const MinContent: Self = Self(10);
59  pub const MaxContent: Self = Self(11);
60  pub const Fr: Self = Self(12);
61
62  pub const ENUM_MIN: i8 = 0;
63  pub const ENUM_MAX: i8 = 12;
64  pub const ENUM_VALUES: &'static [Self] = &[
65    Self::Px,
66    Self::Rem,
67    Self::Em,
68    Self::Percent,
69    Self::Vw,
70    Self::Vh,
71    Self::Dvh,
72    Self::Svh,
73    Self::Auto,
74    Self::FitContent,
75    Self::MinContent,
76    Self::MaxContent,
77    Self::Fr,
78  ];
79  /// Returns the variant's name or "" if unknown.
80  pub fn variant_name(self) -> Option<&'static str> {
81    match self {
82      Self::Px => Some("Px"),
83      Self::Rem => Some("Rem"),
84      Self::Em => Some("Em"),
85      Self::Percent => Some("Percent"),
86      Self::Vw => Some("Vw"),
87      Self::Vh => Some("Vh"),
88      Self::Dvh => Some("Dvh"),
89      Self::Svh => Some("Svh"),
90      Self::Auto => Some("Auto"),
91      Self::FitContent => Some("FitContent"),
92      Self::MinContent => Some("MinContent"),
93      Self::MaxContent => Some("MaxContent"),
94      Self::Fr => Some("Fr"),
95      _ => None,
96    }
97  }
98}
99impl core::fmt::Debug for LengthUnit {
100  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
101    if let Some(name) = self.variant_name() {
102      f.write_str(name)
103    } else {
104      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
105    }
106  }
107}
108impl<'a> flatbuffers::Follow<'a> for LengthUnit {
109  type Inner = Self;
110  #[inline]
111  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
112    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
113    Self(b)
114  }
115}
116
117impl flatbuffers::Push for LengthUnit {
118    type Output = LengthUnit;
119    #[inline]
120    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
121        flatbuffers::emplace_scalar::<i8>(dst, self.0);
122    }
123}
124
125impl flatbuffers::EndianScalar for LengthUnit {
126  type Scalar = i8;
127  #[inline]
128  fn to_little_endian(self) -> i8 {
129    self.0.to_le()
130  }
131  #[inline]
132  #[allow(clippy::wrong_self_convention)]
133  fn from_little_endian(v: i8) -> Self {
134    let b = i8::from_le(v);
135    Self(b)
136  }
137}
138
139impl<'a> flatbuffers::Verifiable for LengthUnit {
140  #[inline]
141  fn run_verifier(
142    v: &mut flatbuffers::Verifier, pos: usize
143  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
144    use self::flatbuffers::Verifiable;
145    i8::run_verifier(v, pos)
146  }
147}
148
149impl flatbuffers::SimpleToVerifyInSlice for LengthUnit {}
150#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
151pub const ENUM_MIN_EASING_TYPE: i8 = 0;
152#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
153pub const ENUM_MAX_EASING_TYPE: i8 = 4;
154#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
155#[allow(non_camel_case_types)]
156pub const ENUM_VALUES_EASING_TYPE: [EasingType; 5] = [
157  EasingType::Linear,
158  EasingType::CubicBezier,
159  EasingType::Spring,
160  EasingType::Steps,
161  EasingType::CustomLinear,
162];
163
164#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
165#[repr(transparent)]
166pub struct EasingType(pub i8);
167#[allow(non_upper_case_globals)]
168impl EasingType {
169  pub const Linear: Self = Self(0);
170  pub const CubicBezier: Self = Self(1);
171  pub const Spring: Self = Self(2);
172  pub const Steps: Self = Self(3);
173  pub const CustomLinear: Self = Self(4);
174
175  pub const ENUM_MIN: i8 = 0;
176  pub const ENUM_MAX: i8 = 4;
177  pub const ENUM_VALUES: &'static [Self] = &[
178    Self::Linear,
179    Self::CubicBezier,
180    Self::Spring,
181    Self::Steps,
182    Self::CustomLinear,
183  ];
184  /// Returns the variant's name or "" if unknown.
185  pub fn variant_name(self) -> Option<&'static str> {
186    match self {
187      Self::Linear => Some("Linear"),
188      Self::CubicBezier => Some("CubicBezier"),
189      Self::Spring => Some("Spring"),
190      Self::Steps => Some("Steps"),
191      Self::CustomLinear => Some("CustomLinear"),
192      _ => None,
193    }
194  }
195}
196impl core::fmt::Debug for EasingType {
197  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
198    if let Some(name) = self.variant_name() {
199      f.write_str(name)
200    } else {
201      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
202    }
203  }
204}
205impl<'a> flatbuffers::Follow<'a> for EasingType {
206  type Inner = Self;
207  #[inline]
208  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
209    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
210    Self(b)
211  }
212}
213
214impl flatbuffers::Push for EasingType {
215    type Output = EasingType;
216    #[inline]
217    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
218        flatbuffers::emplace_scalar::<i8>(dst, self.0);
219    }
220}
221
222impl flatbuffers::EndianScalar for EasingType {
223  type Scalar = i8;
224  #[inline]
225  fn to_little_endian(self) -> i8 {
226    self.0.to_le()
227  }
228  #[inline]
229  #[allow(clippy::wrong_self_convention)]
230  fn from_little_endian(v: i8) -> Self {
231    let b = i8::from_le(v);
232    Self(b)
233  }
234}
235
236impl<'a> flatbuffers::Verifiable for EasingType {
237  #[inline]
238  fn run_verifier(
239    v: &mut flatbuffers::Verifier, pos: usize
240  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
241    use self::flatbuffers::Verifiable;
242    i8::run_verifier(v, pos)
243  }
244}
245
246impl flatbuffers::SimpleToVerifyInSlice for EasingType {}
247#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
248pub const ENUM_MIN_ALIGNMENT: i8 = 0;
249#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
250pub const ENUM_MAX_ALIGNMENT: i8 = 7;
251#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
252#[allow(non_camel_case_types)]
253pub const ENUM_VALUES_ALIGNMENT: [Alignment; 8] = [
254  Alignment::Start,
255  Alignment::Center,
256  Alignment::End,
257  Alignment::Stretch,
258  Alignment::SpaceBetween,
259  Alignment::SpaceAround,
260  Alignment::SpaceEvenly,
261  Alignment::Baseline,
262];
263
264#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
265#[repr(transparent)]
266pub struct Alignment(pub i8);
267#[allow(non_upper_case_globals)]
268impl Alignment {
269  pub const Start: Self = Self(0);
270  pub const Center: Self = Self(1);
271  pub const End: Self = Self(2);
272  pub const Stretch: Self = Self(3);
273  pub const SpaceBetween: Self = Self(4);
274  pub const SpaceAround: Self = Self(5);
275  pub const SpaceEvenly: Self = Self(6);
276  pub const Baseline: Self = Self(7);
277
278  pub const ENUM_MIN: i8 = 0;
279  pub const ENUM_MAX: i8 = 7;
280  pub const ENUM_VALUES: &'static [Self] = &[
281    Self::Start,
282    Self::Center,
283    Self::End,
284    Self::Stretch,
285    Self::SpaceBetween,
286    Self::SpaceAround,
287    Self::SpaceEvenly,
288    Self::Baseline,
289  ];
290  /// Returns the variant's name or "" if unknown.
291  pub fn variant_name(self) -> Option<&'static str> {
292    match self {
293      Self::Start => Some("Start"),
294      Self::Center => Some("Center"),
295      Self::End => Some("End"),
296      Self::Stretch => Some("Stretch"),
297      Self::SpaceBetween => Some("SpaceBetween"),
298      Self::SpaceAround => Some("SpaceAround"),
299      Self::SpaceEvenly => Some("SpaceEvenly"),
300      Self::Baseline => Some("Baseline"),
301      _ => None,
302    }
303  }
304}
305impl core::fmt::Debug for Alignment {
306  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
307    if let Some(name) = self.variant_name() {
308      f.write_str(name)
309    } else {
310      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
311    }
312  }
313}
314impl<'a> flatbuffers::Follow<'a> for Alignment {
315  type Inner = Self;
316  #[inline]
317  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
318    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
319    Self(b)
320  }
321}
322
323impl flatbuffers::Push for Alignment {
324    type Output = Alignment;
325    #[inline]
326    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
327        flatbuffers::emplace_scalar::<i8>(dst, self.0);
328    }
329}
330
331impl flatbuffers::EndianScalar for Alignment {
332  type Scalar = i8;
333  #[inline]
334  fn to_little_endian(self) -> i8 {
335    self.0.to_le()
336  }
337  #[inline]
338  #[allow(clippy::wrong_self_convention)]
339  fn from_little_endian(v: i8) -> Self {
340    let b = i8::from_le(v);
341    Self(b)
342  }
343}
344
345impl<'a> flatbuffers::Verifiable for Alignment {
346  #[inline]
347  fn run_verifier(
348    v: &mut flatbuffers::Verifier, pos: usize
349  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
350    use self::flatbuffers::Verifiable;
351    i8::run_verifier(v, pos)
352  }
353}
354
355impl flatbuffers::SimpleToVerifyInSlice for Alignment {}
356#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
357pub const ENUM_MIN_LAYOUT_DIRECTION: i8 = 0;
358#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
359pub const ENUM_MAX_LAYOUT_DIRECTION: i8 = 3;
360#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
361#[allow(non_camel_case_types)]
362pub const ENUM_VALUES_LAYOUT_DIRECTION: [LayoutDirection; 4] = [
363  LayoutDirection::Row,
364  LayoutDirection::Column,
365  LayoutDirection::RowReverse,
366  LayoutDirection::ColumnReverse,
367];
368
369#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
370#[repr(transparent)]
371pub struct LayoutDirection(pub i8);
372#[allow(non_upper_case_globals)]
373impl LayoutDirection {
374  pub const Row: Self = Self(0);
375  pub const Column: Self = Self(1);
376  pub const RowReverse: Self = Self(2);
377  pub const ColumnReverse: Self = Self(3);
378
379  pub const ENUM_MIN: i8 = 0;
380  pub const ENUM_MAX: i8 = 3;
381  pub const ENUM_VALUES: &'static [Self] = &[
382    Self::Row,
383    Self::Column,
384    Self::RowReverse,
385    Self::ColumnReverse,
386  ];
387  /// Returns the variant's name or "" if unknown.
388  pub fn variant_name(self) -> Option<&'static str> {
389    match self {
390      Self::Row => Some("Row"),
391      Self::Column => Some("Column"),
392      Self::RowReverse => Some("RowReverse"),
393      Self::ColumnReverse => Some("ColumnReverse"),
394      _ => None,
395    }
396  }
397}
398impl core::fmt::Debug for LayoutDirection {
399  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
400    if let Some(name) = self.variant_name() {
401      f.write_str(name)
402    } else {
403      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
404    }
405  }
406}
407impl<'a> flatbuffers::Follow<'a> for LayoutDirection {
408  type Inner = Self;
409  #[inline]
410  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
411    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
412    Self(b)
413  }
414}
415
416impl flatbuffers::Push for LayoutDirection {
417    type Output = LayoutDirection;
418    #[inline]
419    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
420        flatbuffers::emplace_scalar::<i8>(dst, self.0);
421    }
422}
423
424impl flatbuffers::EndianScalar for LayoutDirection {
425  type Scalar = i8;
426  #[inline]
427  fn to_little_endian(self) -> i8 {
428    self.0.to_le()
429  }
430  #[inline]
431  #[allow(clippy::wrong_self_convention)]
432  fn from_little_endian(v: i8) -> Self {
433    let b = i8::from_le(v);
434    Self(b)
435  }
436}
437
438impl<'a> flatbuffers::Verifiable for LayoutDirection {
439  #[inline]
440  fn run_verifier(
441    v: &mut flatbuffers::Verifier, pos: usize
442  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
443    use self::flatbuffers::Verifiable;
444    i8::run_verifier(v, pos)
445  }
446}
447
448impl flatbuffers::SimpleToVerifyInSlice for LayoutDirection {}
449#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
450pub const ENUM_MIN_TEXT_DIRECTION: i8 = 0;
451#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
452pub const ENUM_MAX_TEXT_DIRECTION: i8 = 2;
453#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
454#[allow(non_camel_case_types)]
455pub const ENUM_VALUES_TEXT_DIRECTION: [TextDirection; 3] = [
456  TextDirection::Ltr,
457  TextDirection::Rtl,
458  TextDirection::Auto,
459];
460
461#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
462#[repr(transparent)]
463pub struct TextDirection(pub i8);
464#[allow(non_upper_case_globals)]
465impl TextDirection {
466  pub const Ltr: Self = Self(0);
467  pub const Rtl: Self = Self(1);
468  pub const Auto: Self = Self(2);
469
470  pub const ENUM_MIN: i8 = 0;
471  pub const ENUM_MAX: i8 = 2;
472  pub const ENUM_VALUES: &'static [Self] = &[
473    Self::Ltr,
474    Self::Rtl,
475    Self::Auto,
476  ];
477  /// Returns the variant's name or "" if unknown.
478  pub fn variant_name(self) -> Option<&'static str> {
479    match self {
480      Self::Ltr => Some("Ltr"),
481      Self::Rtl => Some("Rtl"),
482      Self::Auto => Some("Auto"),
483      _ => None,
484    }
485  }
486}
487impl core::fmt::Debug for TextDirection {
488  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
489    if let Some(name) = self.variant_name() {
490      f.write_str(name)
491    } else {
492      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
493    }
494  }
495}
496impl<'a> flatbuffers::Follow<'a> for TextDirection {
497  type Inner = Self;
498  #[inline]
499  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
500    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
501    Self(b)
502  }
503}
504
505impl flatbuffers::Push for TextDirection {
506    type Output = TextDirection;
507    #[inline]
508    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
509        flatbuffers::emplace_scalar::<i8>(dst, self.0);
510    }
511}
512
513impl flatbuffers::EndianScalar for TextDirection {
514  type Scalar = i8;
515  #[inline]
516  fn to_little_endian(self) -> i8 {
517    self.0.to_le()
518  }
519  #[inline]
520  #[allow(clippy::wrong_self_convention)]
521  fn from_little_endian(v: i8) -> Self {
522    let b = i8::from_le(v);
523    Self(b)
524  }
525}
526
527impl<'a> flatbuffers::Verifiable for TextDirection {
528  #[inline]
529  fn run_verifier(
530    v: &mut flatbuffers::Verifier, pos: usize
531  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
532    use self::flatbuffers::Verifiable;
533    i8::run_verifier(v, pos)
534  }
535}
536
537impl flatbuffers::SimpleToVerifyInSlice for TextDirection {}
538#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
539pub const ENUM_MIN_OVERFLOW: i8 = 0;
540#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
541pub const ENUM_MAX_OVERFLOW: i8 = 3;
542#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
543#[allow(non_camel_case_types)]
544pub const ENUM_VALUES_OVERFLOW: [Overflow; 4] = [
545  Overflow::Visible,
546  Overflow::Hidden,
547  Overflow::Scroll,
548  Overflow::Auto,
549];
550
551#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
552#[repr(transparent)]
553pub struct Overflow(pub i8);
554#[allow(non_upper_case_globals)]
555impl Overflow {
556  pub const Visible: Self = Self(0);
557  pub const Hidden: Self = Self(1);
558  pub const Scroll: Self = Self(2);
559  pub const Auto: Self = Self(3);
560
561  pub const ENUM_MIN: i8 = 0;
562  pub const ENUM_MAX: i8 = 3;
563  pub const ENUM_VALUES: &'static [Self] = &[
564    Self::Visible,
565    Self::Hidden,
566    Self::Scroll,
567    Self::Auto,
568  ];
569  /// Returns the variant's name or "" if unknown.
570  pub fn variant_name(self) -> Option<&'static str> {
571    match self {
572      Self::Visible => Some("Visible"),
573      Self::Hidden => Some("Hidden"),
574      Self::Scroll => Some("Scroll"),
575      Self::Auto => Some("Auto"),
576      _ => None,
577    }
578  }
579}
580impl core::fmt::Debug for Overflow {
581  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
582    if let Some(name) = self.variant_name() {
583      f.write_str(name)
584    } else {
585      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
586    }
587  }
588}
589impl<'a> flatbuffers::Follow<'a> for Overflow {
590  type Inner = Self;
591  #[inline]
592  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
593    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
594    Self(b)
595  }
596}
597
598impl flatbuffers::Push for Overflow {
599    type Output = Overflow;
600    #[inline]
601    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
602        flatbuffers::emplace_scalar::<i8>(dst, self.0);
603    }
604}
605
606impl flatbuffers::EndianScalar for Overflow {
607  type Scalar = i8;
608  #[inline]
609  fn to_little_endian(self) -> i8 {
610    self.0.to_le()
611  }
612  #[inline]
613  #[allow(clippy::wrong_self_convention)]
614  fn from_little_endian(v: i8) -> Self {
615    let b = i8::from_le(v);
616    Self(b)
617  }
618}
619
620impl<'a> flatbuffers::Verifiable for Overflow {
621  #[inline]
622  fn run_verifier(
623    v: &mut flatbuffers::Verifier, pos: usize
624  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
625    use self::flatbuffers::Verifiable;
626    i8::run_verifier(v, pos)
627  }
628}
629
630impl flatbuffers::SimpleToVerifyInSlice for Overflow {}
631#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
632pub const ENUM_MIN_POSITION: i8 = 0;
633#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
634pub const ENUM_MAX_POSITION: i8 = 3;
635#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
636#[allow(non_camel_case_types)]
637pub const ENUM_VALUES_POSITION: [Position; 4] = [
638  Position::Relative,
639  Position::Absolute,
640  Position::Fixed,
641  Position::Sticky,
642];
643
644#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
645#[repr(transparent)]
646pub struct Position(pub i8);
647#[allow(non_upper_case_globals)]
648impl Position {
649  pub const Relative: Self = Self(0);
650  pub const Absolute: Self = Self(1);
651  pub const Fixed: Self = Self(2);
652  pub const Sticky: Self = Self(3);
653
654  pub const ENUM_MIN: i8 = 0;
655  pub const ENUM_MAX: i8 = 3;
656  pub const ENUM_VALUES: &'static [Self] = &[
657    Self::Relative,
658    Self::Absolute,
659    Self::Fixed,
660    Self::Sticky,
661  ];
662  /// Returns the variant's name or "" if unknown.
663  pub fn variant_name(self) -> Option<&'static str> {
664    match self {
665      Self::Relative => Some("Relative"),
666      Self::Absolute => Some("Absolute"),
667      Self::Fixed => Some("Fixed"),
668      Self::Sticky => Some("Sticky"),
669      _ => None,
670    }
671  }
672}
673impl core::fmt::Debug for Position {
674  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
675    if let Some(name) = self.variant_name() {
676      f.write_str(name)
677    } else {
678      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
679    }
680  }
681}
682impl<'a> flatbuffers::Follow<'a> for Position {
683  type Inner = Self;
684  #[inline]
685  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
686    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
687    Self(b)
688  }
689}
690
691impl flatbuffers::Push for Position {
692    type Output = Position;
693    #[inline]
694    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
695        flatbuffers::emplace_scalar::<i8>(dst, self.0);
696    }
697}
698
699impl flatbuffers::EndianScalar for Position {
700  type Scalar = i8;
701  #[inline]
702  fn to_little_endian(self) -> i8 {
703    self.0.to_le()
704  }
705  #[inline]
706  #[allow(clippy::wrong_self_convention)]
707  fn from_little_endian(v: i8) -> Self {
708    let b = i8::from_le(v);
709    Self(b)
710  }
711}
712
713impl<'a> flatbuffers::Verifiable for Position {
714  #[inline]
715  fn run_verifier(
716    v: &mut flatbuffers::Verifier, pos: usize
717  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
718    use self::flatbuffers::Verifiable;
719    i8::run_verifier(v, pos)
720  }
721}
722
723impl flatbuffers::SimpleToVerifyInSlice for Position {}
724#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
725pub const ENUM_MIN_BORDER_STYLE: i8 = 0;
726#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
727pub const ENUM_MAX_BORDER_STYLE: i8 = 3;
728#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
729#[allow(non_camel_case_types)]
730pub const ENUM_VALUES_BORDER_STYLE: [BorderStyle; 4] = [
731  BorderStyle::None,
732  BorderStyle::Solid,
733  BorderStyle::Dashed,
734  BorderStyle::Dotted,
735];
736
737#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
738#[repr(transparent)]
739pub struct BorderStyle(pub i8);
740#[allow(non_upper_case_globals)]
741impl BorderStyle {
742  pub const None: Self = Self(0);
743  pub const Solid: Self = Self(1);
744  pub const Dashed: Self = Self(2);
745  pub const Dotted: Self = Self(3);
746
747  pub const ENUM_MIN: i8 = 0;
748  pub const ENUM_MAX: i8 = 3;
749  pub const ENUM_VALUES: &'static [Self] = &[
750    Self::None,
751    Self::Solid,
752    Self::Dashed,
753    Self::Dotted,
754  ];
755  /// Returns the variant's name or "" if unknown.
756  pub fn variant_name(self) -> Option<&'static str> {
757    match self {
758      Self::None => Some("None"),
759      Self::Solid => Some("Solid"),
760      Self::Dashed => Some("Dashed"),
761      Self::Dotted => Some("Dotted"),
762      _ => None,
763    }
764  }
765}
766impl core::fmt::Debug for BorderStyle {
767  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
768    if let Some(name) = self.variant_name() {
769      f.write_str(name)
770    } else {
771      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
772    }
773  }
774}
775impl<'a> flatbuffers::Follow<'a> for BorderStyle {
776  type Inner = Self;
777  #[inline]
778  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
779    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
780    Self(b)
781  }
782}
783
784impl flatbuffers::Push for BorderStyle {
785    type Output = BorderStyle;
786    #[inline]
787    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
788        flatbuffers::emplace_scalar::<i8>(dst, self.0);
789    }
790}
791
792impl flatbuffers::EndianScalar for BorderStyle {
793  type Scalar = i8;
794  #[inline]
795  fn to_little_endian(self) -> i8 {
796    self.0.to_le()
797  }
798  #[inline]
799  #[allow(clippy::wrong_self_convention)]
800  fn from_little_endian(v: i8) -> Self {
801    let b = i8::from_le(v);
802    Self(b)
803  }
804}
805
806impl<'a> flatbuffers::Verifiable for BorderStyle {
807  #[inline]
808  fn run_verifier(
809    v: &mut flatbuffers::Verifier, pos: usize
810  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
811    use self::flatbuffers::Verifiable;
812    i8::run_verifier(v, pos)
813  }
814}
815
816impl flatbuffers::SimpleToVerifyInSlice for BorderStyle {}
817#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
818pub const ENUM_MIN_GESTURE_TYPE: i8 = 0;
819#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
820pub const ENUM_MAX_GESTURE_TYPE: i8 = 7;
821#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
822#[allow(non_camel_case_types)]
823pub const ENUM_VALUES_GESTURE_TYPE: [GestureType; 8] = [
824  GestureType::Tap,
825  GestureType::DoubleTap,
826  GestureType::LongPress,
827  GestureType::Drag,
828  GestureType::Swipe,
829  GestureType::Pinch,
830  GestureType::Hover,
831  GestureType::Focus,
832];
833
834#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
835#[repr(transparent)]
836pub struct GestureType(pub i8);
837#[allow(non_upper_case_globals)]
838impl GestureType {
839  pub const Tap: Self = Self(0);
840  pub const DoubleTap: Self = Self(1);
841  pub const LongPress: Self = Self(2);
842  pub const Drag: Self = Self(3);
843  pub const Swipe: Self = Self(4);
844  pub const Pinch: Self = Self(5);
845  pub const Hover: Self = Self(6);
846  pub const Focus: Self = Self(7);
847
848  pub const ENUM_MIN: i8 = 0;
849  pub const ENUM_MAX: i8 = 7;
850  pub const ENUM_VALUES: &'static [Self] = &[
851    Self::Tap,
852    Self::DoubleTap,
853    Self::LongPress,
854    Self::Drag,
855    Self::Swipe,
856    Self::Pinch,
857    Self::Hover,
858    Self::Focus,
859  ];
860  /// Returns the variant's name or "" if unknown.
861  pub fn variant_name(self) -> Option<&'static str> {
862    match self {
863      Self::Tap => Some("Tap"),
864      Self::DoubleTap => Some("DoubleTap"),
865      Self::LongPress => Some("LongPress"),
866      Self::Drag => Some("Drag"),
867      Self::Swipe => Some("Swipe"),
868      Self::Pinch => Some("Pinch"),
869      Self::Hover => Some("Hover"),
870      Self::Focus => Some("Focus"),
871      _ => None,
872    }
873  }
874}
875impl core::fmt::Debug for GestureType {
876  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
877    if let Some(name) = self.variant_name() {
878      f.write_str(name)
879    } else {
880      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
881    }
882  }
883}
884impl<'a> flatbuffers::Follow<'a> for GestureType {
885  type Inner = Self;
886  #[inline]
887  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
888    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
889    Self(b)
890  }
891}
892
893impl flatbuffers::Push for GestureType {
894    type Output = GestureType;
895    #[inline]
896    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
897        flatbuffers::emplace_scalar::<i8>(dst, self.0);
898    }
899}
900
901impl flatbuffers::EndianScalar for GestureType {
902  type Scalar = i8;
903  #[inline]
904  fn to_little_endian(self) -> i8 {
905    self.0.to_le()
906  }
907  #[inline]
908  #[allow(clippy::wrong_self_convention)]
909  fn from_little_endian(v: i8) -> Self {
910    let b = i8::from_le(v);
911    Self(b)
912  }
913}
914
915impl<'a> flatbuffers::Verifiable for GestureType {
916  #[inline]
917  fn run_verifier(
918    v: &mut flatbuffers::Verifier, pos: usize
919  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
920    use self::flatbuffers::Verifiable;
921    i8::run_verifier(v, pos)
922  }
923}
924
925impl flatbuffers::SimpleToVerifyInSlice for GestureType {}
926#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
927pub const ENUM_MIN_SCROLL_AXIS: i8 = 0;
928#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
929pub const ENUM_MAX_SCROLL_AXIS: i8 = 1;
930#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
931#[allow(non_camel_case_types)]
932pub const ENUM_VALUES_SCROLL_AXIS: [ScrollAxis; 2] = [
933  ScrollAxis::Vertical,
934  ScrollAxis::Horizontal,
935];
936
937#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
938#[repr(transparent)]
939pub struct ScrollAxis(pub i8);
940#[allow(non_upper_case_globals)]
941impl ScrollAxis {
942  pub const Vertical: Self = Self(0);
943  pub const Horizontal: Self = Self(1);
944
945  pub const ENUM_MIN: i8 = 0;
946  pub const ENUM_MAX: i8 = 1;
947  pub const ENUM_VALUES: &'static [Self] = &[
948    Self::Vertical,
949    Self::Horizontal,
950  ];
951  /// Returns the variant's name or "" if unknown.
952  pub fn variant_name(self) -> Option<&'static str> {
953    match self {
954      Self::Vertical => Some("Vertical"),
955      Self::Horizontal => Some("Horizontal"),
956      _ => None,
957    }
958  }
959}
960impl core::fmt::Debug for ScrollAxis {
961  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
962    if let Some(name) = self.variant_name() {
963      f.write_str(name)
964    } else {
965      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
966    }
967  }
968}
969impl<'a> flatbuffers::Follow<'a> for ScrollAxis {
970  type Inner = Self;
971  #[inline]
972  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
973    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
974    Self(b)
975  }
976}
977
978impl flatbuffers::Push for ScrollAxis {
979    type Output = ScrollAxis;
980    #[inline]
981    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
982        flatbuffers::emplace_scalar::<i8>(dst, self.0);
983    }
984}
985
986impl flatbuffers::EndianScalar for ScrollAxis {
987  type Scalar = i8;
988  #[inline]
989  fn to_little_endian(self) -> i8 {
990    self.0.to_le()
991  }
992  #[inline]
993  #[allow(clippy::wrong_self_convention)]
994  fn from_little_endian(v: i8) -> Self {
995    let b = i8::from_le(v);
996    Self(b)
997  }
998}
999
1000impl<'a> flatbuffers::Verifiable for ScrollAxis {
1001  #[inline]
1002  fn run_verifier(
1003    v: &mut flatbuffers::Verifier, pos: usize
1004  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1005    use self::flatbuffers::Verifiable;
1006    i8::run_verifier(v, pos)
1007  }
1008}
1009
1010impl flatbuffers::SimpleToVerifyInSlice for ScrollAxis {}
1011#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1012pub const ENUM_MIN_SCROLL_TRIGGER: i8 = 0;
1013#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1014pub const ENUM_MAX_SCROLL_TRIGGER: i8 = 1;
1015#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1016#[allow(non_camel_case_types)]
1017pub const ENUM_VALUES_SCROLL_TRIGGER: [ScrollTrigger; 2] = [
1018  ScrollTrigger::ViewProgress,
1019  ScrollTrigger::ScrollProgress,
1020];
1021
1022#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1023#[repr(transparent)]
1024pub struct ScrollTrigger(pub i8);
1025#[allow(non_upper_case_globals)]
1026impl ScrollTrigger {
1027  /// Animate as element enters/exits viewport.
1028  pub const ViewProgress: Self = Self(0);
1029  /// Animate based on scroll position within a container.
1030  pub const ScrollProgress: Self = Self(1);
1031
1032  pub const ENUM_MIN: i8 = 0;
1033  pub const ENUM_MAX: i8 = 1;
1034  pub const ENUM_VALUES: &'static [Self] = &[
1035    Self::ViewProgress,
1036    Self::ScrollProgress,
1037  ];
1038  /// Returns the variant's name or "" if unknown.
1039  pub fn variant_name(self) -> Option<&'static str> {
1040    match self {
1041      Self::ViewProgress => Some("ViewProgress"),
1042      Self::ScrollProgress => Some("ScrollProgress"),
1043      _ => None,
1044    }
1045  }
1046}
1047impl core::fmt::Debug for ScrollTrigger {
1048  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1049    if let Some(name) = self.variant_name() {
1050      f.write_str(name)
1051    } else {
1052      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
1053    }
1054  }
1055}
1056impl<'a> flatbuffers::Follow<'a> for ScrollTrigger {
1057  type Inner = Self;
1058  #[inline]
1059  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1060    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
1061    Self(b)
1062  }
1063}
1064
1065impl flatbuffers::Push for ScrollTrigger {
1066    type Output = ScrollTrigger;
1067    #[inline]
1068    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
1069        flatbuffers::emplace_scalar::<i8>(dst, self.0);
1070    }
1071}
1072
1073impl flatbuffers::EndianScalar for ScrollTrigger {
1074  type Scalar = i8;
1075  #[inline]
1076  fn to_little_endian(self) -> i8 {
1077    self.0.to_le()
1078  }
1079  #[inline]
1080  #[allow(clippy::wrong_self_convention)]
1081  fn from_little_endian(v: i8) -> Self {
1082    let b = i8::from_le(v);
1083    Self(b)
1084  }
1085}
1086
1087impl<'a> flatbuffers::Verifiable for ScrollTrigger {
1088  #[inline]
1089  fn run_verifier(
1090    v: &mut flatbuffers::Verifier, pos: usize
1091  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1092    use self::flatbuffers::Verifiable;
1093    i8::run_verifier(v, pos)
1094  }
1095}
1096
1097impl flatbuffers::SimpleToVerifyInSlice for ScrollTrigger {}
1098#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1099pub const ENUM_MIN_REDUCED_MOTION_STRATEGY: i8 = 0;
1100#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1101pub const ENUM_MAX_REDUCED_MOTION_STRATEGY: i8 = 3;
1102#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1103#[allow(non_camel_case_types)]
1104pub const ENUM_VALUES_REDUCED_MOTION_STRATEGY: [ReducedMotionStrategy; 4] = [
1105  ReducedMotionStrategy::Remove,
1106  ReducedMotionStrategy::Simplify,
1107  ReducedMotionStrategy::ReduceDuration,
1108  ReducedMotionStrategy::Functional,
1109];
1110
1111#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1112#[repr(transparent)]
1113pub struct ReducedMotionStrategy(pub i8);
1114#[allow(non_upper_case_globals)]
1115impl ReducedMotionStrategy {
1116  /// Remove the animation entirely — snap to final state.
1117  pub const Remove: Self = Self(0);
1118  /// Replace with a simpler animation (e.g., opacity fade instead of slide).
1119  pub const Simplify: Self = Self(1);
1120  /// Keep the animation but reduce duration to near-instant.
1121  pub const ReduceDuration: Self = Self(2);
1122  /// This animation is functional (loading spinner, progress bar) —
1123  /// simplify but don't remove.
1124  pub const Functional: Self = Self(3);
1125
1126  pub const ENUM_MIN: i8 = 0;
1127  pub const ENUM_MAX: i8 = 3;
1128  pub const ENUM_VALUES: &'static [Self] = &[
1129    Self::Remove,
1130    Self::Simplify,
1131    Self::ReduceDuration,
1132    Self::Functional,
1133  ];
1134  /// Returns the variant's name or "" if unknown.
1135  pub fn variant_name(self) -> Option<&'static str> {
1136    match self {
1137      Self::Remove => Some("Remove"),
1138      Self::Simplify => Some("Simplify"),
1139      Self::ReduceDuration => Some("ReduceDuration"),
1140      Self::Functional => Some("Functional"),
1141      _ => None,
1142    }
1143  }
1144}
1145impl core::fmt::Debug for ReducedMotionStrategy {
1146  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1147    if let Some(name) = self.variant_name() {
1148      f.write_str(name)
1149    } else {
1150      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
1151    }
1152  }
1153}
1154impl<'a> flatbuffers::Follow<'a> for ReducedMotionStrategy {
1155  type Inner = Self;
1156  #[inline]
1157  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1158    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
1159    Self(b)
1160  }
1161}
1162
1163impl flatbuffers::Push for ReducedMotionStrategy {
1164    type Output = ReducedMotionStrategy;
1165    #[inline]
1166    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
1167        flatbuffers::emplace_scalar::<i8>(dst, self.0);
1168    }
1169}
1170
1171impl flatbuffers::EndianScalar for ReducedMotionStrategy {
1172  type Scalar = i8;
1173  #[inline]
1174  fn to_little_endian(self) -> i8 {
1175    self.0.to_le()
1176  }
1177  #[inline]
1178  #[allow(clippy::wrong_self_convention)]
1179  fn from_little_endian(v: i8) -> Self {
1180    let b = i8::from_le(v);
1181    Self(b)
1182  }
1183}
1184
1185impl<'a> flatbuffers::Verifiable for ReducedMotionStrategy {
1186  #[inline]
1187  fn run_verifier(
1188    v: &mut flatbuffers::Verifier, pos: usize
1189  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1190    use self::flatbuffers::Verifiable;
1191    i8::run_verifier(v, pos)
1192  }
1193}
1194
1195impl flatbuffers::SimpleToVerifyInSlice for ReducedMotionStrategy {}
1196#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1197pub const ENUM_MIN_CHANGE_FREQUENCY: i8 = 0;
1198#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1199pub const ENUM_MAX_CHANGE_FREQUENCY: i8 = 6;
1200#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1201#[allow(non_camel_case_types)]
1202pub const ENUM_VALUES_CHANGE_FREQUENCY: [ChangeFrequency; 7] = [
1203  ChangeFrequency::Always,
1204  ChangeFrequency::Hourly,
1205  ChangeFrequency::Daily,
1206  ChangeFrequency::Weekly,
1207  ChangeFrequency::Monthly,
1208  ChangeFrequency::Yearly,
1209  ChangeFrequency::Never,
1210];
1211
1212#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1213#[repr(transparent)]
1214pub struct ChangeFrequency(pub i8);
1215#[allow(non_upper_case_globals)]
1216impl ChangeFrequency {
1217  pub const Always: Self = Self(0);
1218  pub const Hourly: Self = Self(1);
1219  pub const Daily: Self = Self(2);
1220  pub const Weekly: Self = Self(3);
1221  pub const Monthly: Self = Self(4);
1222  pub const Yearly: Self = Self(5);
1223  pub const Never: Self = Self(6);
1224
1225  pub const ENUM_MIN: i8 = 0;
1226  pub const ENUM_MAX: i8 = 6;
1227  pub const ENUM_VALUES: &'static [Self] = &[
1228    Self::Always,
1229    Self::Hourly,
1230    Self::Daily,
1231    Self::Weekly,
1232    Self::Monthly,
1233    Self::Yearly,
1234    Self::Never,
1235  ];
1236  /// Returns the variant's name or "" if unknown.
1237  pub fn variant_name(self) -> Option<&'static str> {
1238    match self {
1239      Self::Always => Some("Always"),
1240      Self::Hourly => Some("Hourly"),
1241      Self::Daily => Some("Daily"),
1242      Self::Weekly => Some("Weekly"),
1243      Self::Monthly => Some("Monthly"),
1244      Self::Yearly => Some("Yearly"),
1245      Self::Never => Some("Never"),
1246      _ => None,
1247    }
1248  }
1249}
1250impl core::fmt::Debug for ChangeFrequency {
1251  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1252    if let Some(name) = self.variant_name() {
1253      f.write_str(name)
1254    } else {
1255      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
1256    }
1257  }
1258}
1259impl<'a> flatbuffers::Follow<'a> for ChangeFrequency {
1260  type Inner = Self;
1261  #[inline]
1262  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1263    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
1264    Self(b)
1265  }
1266}
1267
1268impl flatbuffers::Push for ChangeFrequency {
1269    type Output = ChangeFrequency;
1270    #[inline]
1271    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
1272        flatbuffers::emplace_scalar::<i8>(dst, self.0);
1273    }
1274}
1275
1276impl flatbuffers::EndianScalar for ChangeFrequency {
1277  type Scalar = i8;
1278  #[inline]
1279  fn to_little_endian(self) -> i8 {
1280    self.0.to_le()
1281  }
1282  #[inline]
1283  #[allow(clippy::wrong_self_convention)]
1284  fn from_little_endian(v: i8) -> Self {
1285    let b = i8::from_le(v);
1286    Self(b)
1287  }
1288}
1289
1290impl<'a> flatbuffers::Verifiable for ChangeFrequency {
1291  #[inline]
1292  fn run_verifier(
1293    v: &mut flatbuffers::Verifier, pos: usize
1294  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1295    use self::flatbuffers::Verifiable;
1296    i8::run_verifier(v, pos)
1297  }
1298}
1299
1300impl flatbuffers::SimpleToVerifyInSlice for ChangeFrequency {}
1301#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1302pub const ENUM_MIN_ROUTE_TRANSITION_TYPE: i8 = 0;
1303#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1304pub const ENUM_MAX_ROUTE_TRANSITION_TYPE: i8 = 4;
1305#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1306#[allow(non_camel_case_types)]
1307pub const ENUM_VALUES_ROUTE_TRANSITION_TYPE: [RouteTransitionType; 5] = [
1308  RouteTransitionType::None,
1309  RouteTransitionType::Crossfade,
1310  RouteTransitionType::Slide,
1311  RouteTransitionType::SharedElement,
1312  RouteTransitionType::Custom,
1313];
1314
1315#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1316#[repr(transparent)]
1317pub struct RouteTransitionType(pub i8);
1318#[allow(non_upper_case_globals)]
1319impl RouteTransitionType {
1320  pub const None: Self = Self(0);
1321  pub const Crossfade: Self = Self(1);
1322  pub const Slide: Self = Self(2);
1323  pub const SharedElement: Self = Self(3);
1324  pub const Custom: Self = Self(4);
1325
1326  pub const ENUM_MIN: i8 = 0;
1327  pub const ENUM_MAX: i8 = 4;
1328  pub const ENUM_VALUES: &'static [Self] = &[
1329    Self::None,
1330    Self::Crossfade,
1331    Self::Slide,
1332    Self::SharedElement,
1333    Self::Custom,
1334  ];
1335  /// Returns the variant's name or "" if unknown.
1336  pub fn variant_name(self) -> Option<&'static str> {
1337    match self {
1338      Self::None => Some("None"),
1339      Self::Crossfade => Some("Crossfade"),
1340      Self::Slide => Some("Slide"),
1341      Self::SharedElement => Some("SharedElement"),
1342      Self::Custom => Some("Custom"),
1343      _ => None,
1344    }
1345  }
1346}
1347impl core::fmt::Debug for RouteTransitionType {
1348  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1349    if let Some(name) = self.variant_name() {
1350      f.write_str(name)
1351    } else {
1352      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
1353    }
1354  }
1355}
1356impl<'a> flatbuffers::Follow<'a> for RouteTransitionType {
1357  type Inner = Self;
1358  #[inline]
1359  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1360    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
1361    Self(b)
1362  }
1363}
1364
1365impl flatbuffers::Push for RouteTransitionType {
1366    type Output = RouteTransitionType;
1367    #[inline]
1368    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
1369        flatbuffers::emplace_scalar::<i8>(dst, self.0);
1370    }
1371}
1372
1373impl flatbuffers::EndianScalar for RouteTransitionType {
1374  type Scalar = i8;
1375  #[inline]
1376  fn to_little_endian(self) -> i8 {
1377    self.0.to_le()
1378  }
1379  #[inline]
1380  #[allow(clippy::wrong_self_convention)]
1381  fn from_little_endian(v: i8) -> Self {
1382    let b = i8::from_le(v);
1383    Self(b)
1384  }
1385}
1386
1387impl<'a> flatbuffers::Verifiable for RouteTransitionType {
1388  #[inline]
1389  fn run_verifier(
1390    v: &mut flatbuffers::Verifier, pos: usize
1391  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1392    use self::flatbuffers::Verifiable;
1393    i8::run_verifier(v, pos)
1394  }
1395}
1396
1397impl flatbuffers::SimpleToVerifyInSlice for RouteTransitionType {}
1398#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1399pub const ENUM_MIN_SLIDE_DIRECTION: i8 = 0;
1400#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1401pub const ENUM_MAX_SLIDE_DIRECTION: i8 = 3;
1402#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1403#[allow(non_camel_case_types)]
1404pub const ENUM_VALUES_SLIDE_DIRECTION: [SlideDirection; 4] = [
1405  SlideDirection::Left,
1406  SlideDirection::Right,
1407  SlideDirection::Up,
1408  SlideDirection::Down,
1409];
1410
1411#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1412#[repr(transparent)]
1413pub struct SlideDirection(pub i8);
1414#[allow(non_upper_case_globals)]
1415impl SlideDirection {
1416  pub const Left: Self = Self(0);
1417  pub const Right: Self = Self(1);
1418  pub const Up: Self = Self(2);
1419  pub const Down: Self = Self(3);
1420
1421  pub const ENUM_MIN: i8 = 0;
1422  pub const ENUM_MAX: i8 = 3;
1423  pub const ENUM_VALUES: &'static [Self] = &[
1424    Self::Left,
1425    Self::Right,
1426    Self::Up,
1427    Self::Down,
1428  ];
1429  /// Returns the variant's name or "" if unknown.
1430  pub fn variant_name(self) -> Option<&'static str> {
1431    match self {
1432      Self::Left => Some("Left"),
1433      Self::Right => Some("Right"),
1434      Self::Up => Some("Up"),
1435      Self::Down => Some("Down"),
1436      _ => None,
1437    }
1438  }
1439}
1440impl core::fmt::Debug for SlideDirection {
1441  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1442    if let Some(name) = self.variant_name() {
1443      f.write_str(name)
1444    } else {
1445      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
1446    }
1447  }
1448}
1449impl<'a> flatbuffers::Follow<'a> for SlideDirection {
1450  type Inner = Self;
1451  #[inline]
1452  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1453    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
1454    Self(b)
1455  }
1456}
1457
1458impl flatbuffers::Push for SlideDirection {
1459    type Output = SlideDirection;
1460    #[inline]
1461    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
1462        flatbuffers::emplace_scalar::<i8>(dst, self.0);
1463    }
1464}
1465
1466impl flatbuffers::EndianScalar for SlideDirection {
1467  type Scalar = i8;
1468  #[inline]
1469  fn to_little_endian(self) -> i8 {
1470    self.0.to_le()
1471  }
1472  #[inline]
1473  #[allow(clippy::wrong_self_convention)]
1474  fn from_little_endian(v: i8) -> Self {
1475    let b = i8::from_le(v);
1476    Self(b)
1477  }
1478}
1479
1480impl<'a> flatbuffers::Verifiable for SlideDirection {
1481  #[inline]
1482  fn run_verifier(
1483    v: &mut flatbuffers::Verifier, pos: usize
1484  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1485    use self::flatbuffers::Verifiable;
1486    i8::run_verifier(v, pos)
1487  }
1488}
1489
1490impl flatbuffers::SimpleToVerifyInSlice for SlideDirection {}
1491#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1492pub const ENUM_MIN_DATA_SOURCE_PROVIDER: i8 = 0;
1493#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1494pub const ENUM_MAX_DATA_SOURCE_PROVIDER: i8 = 5;
1495#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1496#[allow(non_camel_case_types)]
1497pub const ENUM_VALUES_DATA_SOURCE_PROVIDER: [DataSourceProvider; 6] = [
1498  DataSourceProvider::Rest,
1499  DataSourceProvider::GraphQL,
1500  DataSourceProvider::Supabase,
1501  DataSourceProvider::Firebase,
1502  DataSourceProvider::Convex,
1503  DataSourceProvider::Custom,
1504];
1505
1506#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1507#[repr(transparent)]
1508pub struct DataSourceProvider(pub i8);
1509#[allow(non_upper_case_globals)]
1510impl DataSourceProvider {
1511  pub const Rest: Self = Self(0);
1512  pub const GraphQL: Self = Self(1);
1513  pub const Supabase: Self = Self(2);
1514  pub const Firebase: Self = Self(3);
1515  pub const Convex: Self = Self(4);
1516  pub const Custom: Self = Self(5);
1517
1518  pub const ENUM_MIN: i8 = 0;
1519  pub const ENUM_MAX: i8 = 5;
1520  pub const ENUM_VALUES: &'static [Self] = &[
1521    Self::Rest,
1522    Self::GraphQL,
1523    Self::Supabase,
1524    Self::Firebase,
1525    Self::Convex,
1526    Self::Custom,
1527  ];
1528  /// Returns the variant's name or "" if unknown.
1529  pub fn variant_name(self) -> Option<&'static str> {
1530    match self {
1531      Self::Rest => Some("Rest"),
1532      Self::GraphQL => Some("GraphQL"),
1533      Self::Supabase => Some("Supabase"),
1534      Self::Firebase => Some("Firebase"),
1535      Self::Convex => Some("Convex"),
1536      Self::Custom => Some("Custom"),
1537      _ => None,
1538    }
1539  }
1540}
1541impl core::fmt::Debug for DataSourceProvider {
1542  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1543    if let Some(name) = self.variant_name() {
1544      f.write_str(name)
1545    } else {
1546      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
1547    }
1548  }
1549}
1550impl<'a> flatbuffers::Follow<'a> for DataSourceProvider {
1551  type Inner = Self;
1552  #[inline]
1553  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1554    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
1555    Self(b)
1556  }
1557}
1558
1559impl flatbuffers::Push for DataSourceProvider {
1560    type Output = DataSourceProvider;
1561    #[inline]
1562    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
1563        flatbuffers::emplace_scalar::<i8>(dst, self.0);
1564    }
1565}
1566
1567impl flatbuffers::EndianScalar for DataSourceProvider {
1568  type Scalar = i8;
1569  #[inline]
1570  fn to_little_endian(self) -> i8 {
1571    self.0.to_le()
1572  }
1573  #[inline]
1574  #[allow(clippy::wrong_self_convention)]
1575  fn from_little_endian(v: i8) -> Self {
1576    let b = i8::from_le(v);
1577    Self(b)
1578  }
1579}
1580
1581impl<'a> flatbuffers::Verifiable for DataSourceProvider {
1582  #[inline]
1583  fn run_verifier(
1584    v: &mut flatbuffers::Verifier, pos: usize
1585  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1586    use self::flatbuffers::Verifiable;
1587    i8::run_verifier(v, pos)
1588  }
1589}
1590
1591impl flatbuffers::SimpleToVerifyInSlice for DataSourceProvider {}
1592#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1593pub const ENUM_MIN_HTTP_METHOD: i8 = 0;
1594#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1595pub const ENUM_MAX_HTTP_METHOD: i8 = 4;
1596#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1597#[allow(non_camel_case_types)]
1598pub const ENUM_VALUES_HTTP_METHOD: [HttpMethod; 5] = [
1599  HttpMethod::GET,
1600  HttpMethod::POST,
1601  HttpMethod::PUT,
1602  HttpMethod::PATCH,
1603  HttpMethod::DELETE,
1604];
1605
1606#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1607#[repr(transparent)]
1608pub struct HttpMethod(pub i8);
1609#[allow(non_upper_case_globals)]
1610impl HttpMethod {
1611  pub const GET: Self = Self(0);
1612  pub const POST: Self = Self(1);
1613  pub const PUT: Self = Self(2);
1614  pub const PATCH: Self = Self(3);
1615  pub const DELETE: Self = Self(4);
1616
1617  pub const ENUM_MIN: i8 = 0;
1618  pub const ENUM_MAX: i8 = 4;
1619  pub const ENUM_VALUES: &'static [Self] = &[
1620    Self::GET,
1621    Self::POST,
1622    Self::PUT,
1623    Self::PATCH,
1624    Self::DELETE,
1625  ];
1626  /// Returns the variant's name or "" if unknown.
1627  pub fn variant_name(self) -> Option<&'static str> {
1628    match self {
1629      Self::GET => Some("GET"),
1630      Self::POST => Some("POST"),
1631      Self::PUT => Some("PUT"),
1632      Self::PATCH => Some("PATCH"),
1633      Self::DELETE => Some("DELETE"),
1634      _ => None,
1635    }
1636  }
1637}
1638impl core::fmt::Debug for HttpMethod {
1639  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1640    if let Some(name) = self.variant_name() {
1641      f.write_str(name)
1642    } else {
1643      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
1644    }
1645  }
1646}
1647impl<'a> flatbuffers::Follow<'a> for HttpMethod {
1648  type Inner = Self;
1649  #[inline]
1650  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1651    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
1652    Self(b)
1653  }
1654}
1655
1656impl flatbuffers::Push for HttpMethod {
1657    type Output = HttpMethod;
1658    #[inline]
1659    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
1660        flatbuffers::emplace_scalar::<i8>(dst, self.0);
1661    }
1662}
1663
1664impl flatbuffers::EndianScalar for HttpMethod {
1665  type Scalar = i8;
1666  #[inline]
1667  fn to_little_endian(self) -> i8 {
1668    self.0.to_le()
1669  }
1670  #[inline]
1671  #[allow(clippy::wrong_self_convention)]
1672  fn from_little_endian(v: i8) -> Self {
1673    let b = i8::from_le(v);
1674    Self(b)
1675  }
1676}
1677
1678impl<'a> flatbuffers::Verifiable for HttpMethod {
1679  #[inline]
1680  fn run_verifier(
1681    v: &mut flatbuffers::Verifier, pos: usize
1682  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1683    use self::flatbuffers::Verifiable;
1684    i8::run_verifier(v, pos)
1685  }
1686}
1687
1688impl flatbuffers::SimpleToVerifyInSlice for HttpMethod {}
1689#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1690pub const ENUM_MIN_CACHE_STRATEGY: i8 = 0;
1691#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1692pub const ENUM_MAX_CACHE_STRATEGY: i8 = 3;
1693#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1694#[allow(non_camel_case_types)]
1695pub const ENUM_VALUES_CACHE_STRATEGY: [CacheStrategy; 4] = [
1696  CacheStrategy::None,
1697  CacheStrategy::StaleWhileRevalidate,
1698  CacheStrategy::CacheUntilInvalidated,
1699  CacheStrategy::Static,
1700];
1701
1702#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1703#[repr(transparent)]
1704pub struct CacheStrategy(pub i8);
1705#[allow(non_upper_case_globals)]
1706impl CacheStrategy {
1707  /// No caching — fetch every time.
1708  pub const None: Self = Self(0);
1709  /// Cache for a duration, serve stale while revalidating.
1710  pub const StaleWhileRevalidate: Self = Self(1);
1711  /// Cache until explicitly invalidated.
1712  pub const CacheUntilInvalidated: Self = Self(2);
1713  /// Fetch once at build time, bake into output.
1714  pub const Static: Self = Self(3);
1715
1716  pub const ENUM_MIN: i8 = 0;
1717  pub const ENUM_MAX: i8 = 3;
1718  pub const ENUM_VALUES: &'static [Self] = &[
1719    Self::None,
1720    Self::StaleWhileRevalidate,
1721    Self::CacheUntilInvalidated,
1722    Self::Static,
1723  ];
1724  /// Returns the variant's name or "" if unknown.
1725  pub fn variant_name(self) -> Option<&'static str> {
1726    match self {
1727      Self::None => Some("None"),
1728      Self::StaleWhileRevalidate => Some("StaleWhileRevalidate"),
1729      Self::CacheUntilInvalidated => Some("CacheUntilInvalidated"),
1730      Self::Static => Some("Static"),
1731      _ => None,
1732    }
1733  }
1734}
1735impl core::fmt::Debug for CacheStrategy {
1736  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1737    if let Some(name) = self.variant_name() {
1738      f.write_str(name)
1739    } else {
1740      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
1741    }
1742  }
1743}
1744impl<'a> flatbuffers::Follow<'a> for CacheStrategy {
1745  type Inner = Self;
1746  #[inline]
1747  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1748    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
1749    Self(b)
1750  }
1751}
1752
1753impl flatbuffers::Push for CacheStrategy {
1754    type Output = CacheStrategy;
1755    #[inline]
1756    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
1757        flatbuffers::emplace_scalar::<i8>(dst, self.0);
1758    }
1759}
1760
1761impl flatbuffers::EndianScalar for CacheStrategy {
1762  type Scalar = i8;
1763  #[inline]
1764  fn to_little_endian(self) -> i8 {
1765    self.0.to_le()
1766  }
1767  #[inline]
1768  #[allow(clippy::wrong_self_convention)]
1769  fn from_little_endian(v: i8) -> Self {
1770    let b = i8::from_le(v);
1771    Self(b)
1772  }
1773}
1774
1775impl<'a> flatbuffers::Verifiable for CacheStrategy {
1776  #[inline]
1777  fn run_verifier(
1778    v: &mut flatbuffers::Verifier, pos: usize
1779  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1780    use self::flatbuffers::Verifiable;
1781    i8::run_verifier(v, pos)
1782  }
1783}
1784
1785impl flatbuffers::SimpleToVerifyInSlice for CacheStrategy {}
1786#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1787pub const ENUM_MIN_EFFECT_TYPE: i8 = 0;
1788#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1789pub const ENUM_MAX_EFFECT_TYPE: i8 = 6;
1790#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1791#[allow(non_camel_case_types)]
1792pub const ENUM_VALUES_EFFECT_TYPE: [EffectType; 7] = [
1793  EffectType::Analytics,
1794  EffectType::ApiCall,
1795  EffectType::Storage,
1796  EffectType::Haptic,
1797  EffectType::Log,
1798  EffectType::Navigate,
1799  EffectType::Custom,
1800];
1801
1802#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1803#[repr(transparent)]
1804pub struct EffectType(pub i8);
1805#[allow(non_upper_case_globals)]
1806impl EffectType {
1807  /// Send an analytics event.
1808  pub const Analytics: Self = Self(0);
1809  /// Call an API endpoint (mutation).
1810  pub const ApiCall: Self = Self(1);
1811  /// Write to local/session storage.
1812  pub const Storage: Self = Self(2);
1813  /// Trigger haptic feedback.
1814  pub const Haptic: Self = Self(3);
1815  /// Log to console (development only).
1816  pub const Log: Self = Self(4);
1817  /// Navigate to a route.
1818  pub const Navigate: Self = Self(5);
1819  /// Custom effect (escape hatch).
1820  pub const Custom: Self = Self(6);
1821
1822  pub const ENUM_MIN: i8 = 0;
1823  pub const ENUM_MAX: i8 = 6;
1824  pub const ENUM_VALUES: &'static [Self] = &[
1825    Self::Analytics,
1826    Self::ApiCall,
1827    Self::Storage,
1828    Self::Haptic,
1829    Self::Log,
1830    Self::Navigate,
1831    Self::Custom,
1832  ];
1833  /// Returns the variant's name or "" if unknown.
1834  pub fn variant_name(self) -> Option<&'static str> {
1835    match self {
1836      Self::Analytics => Some("Analytics"),
1837      Self::ApiCall => Some("ApiCall"),
1838      Self::Storage => Some("Storage"),
1839      Self::Haptic => Some("Haptic"),
1840      Self::Log => Some("Log"),
1841      Self::Navigate => Some("Navigate"),
1842      Self::Custom => Some("Custom"),
1843      _ => None,
1844    }
1845  }
1846}
1847impl core::fmt::Debug for EffectType {
1848  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1849    if let Some(name) = self.variant_name() {
1850      f.write_str(name)
1851    } else {
1852      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
1853    }
1854  }
1855}
1856impl<'a> flatbuffers::Follow<'a> for EffectType {
1857  type Inner = Self;
1858  #[inline]
1859  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1860    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
1861    Self(b)
1862  }
1863}
1864
1865impl flatbuffers::Push for EffectType {
1866    type Output = EffectType;
1867    #[inline]
1868    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
1869        flatbuffers::emplace_scalar::<i8>(dst, self.0);
1870    }
1871}
1872
1873impl flatbuffers::EndianScalar for EffectType {
1874  type Scalar = i8;
1875  #[inline]
1876  fn to_little_endian(self) -> i8 {
1877    self.0.to_le()
1878  }
1879  #[inline]
1880  #[allow(clippy::wrong_self_convention)]
1881  fn from_little_endian(v: i8) -> Self {
1882    let b = i8::from_le(v);
1883    Self(b)
1884  }
1885}
1886
1887impl<'a> flatbuffers::Verifiable for EffectType {
1888  #[inline]
1889  fn run_verifier(
1890    v: &mut flatbuffers::Verifier, pos: usize
1891  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1892    use self::flatbuffers::Verifiable;
1893    i8::run_verifier(v, pos)
1894  }
1895}
1896
1897impl flatbuffers::SimpleToVerifyInSlice for EffectType {}
1898#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1899pub const ENUM_MIN_LIVE_REGION_POLITENESS: i8 = 0;
1900#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1901pub const ENUM_MAX_LIVE_REGION_POLITENESS: i8 = 2;
1902#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1903#[allow(non_camel_case_types)]
1904pub const ENUM_VALUES_LIVE_REGION_POLITENESS: [LiveRegionPoliteness; 3] = [
1905  LiveRegionPoliteness::Polite,
1906  LiveRegionPoliteness::Assertive,
1907  LiveRegionPoliteness::Off,
1908];
1909
1910#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
1911#[repr(transparent)]
1912pub struct LiveRegionPoliteness(pub i8);
1913#[allow(non_upper_case_globals)]
1914impl LiveRegionPoliteness {
1915  /// Wait for user to be idle before announcing.
1916  pub const Polite: Self = Self(0);
1917  /// Interrupt current speech to announce immediately.
1918  pub const Assertive: Self = Self(1);
1919  /// Do not announce (region is silent).
1920  pub const Off: Self = Self(2);
1921
1922  pub const ENUM_MIN: i8 = 0;
1923  pub const ENUM_MAX: i8 = 2;
1924  pub const ENUM_VALUES: &'static [Self] = &[
1925    Self::Polite,
1926    Self::Assertive,
1927    Self::Off,
1928  ];
1929  /// Returns the variant's name or "" if unknown.
1930  pub fn variant_name(self) -> Option<&'static str> {
1931    match self {
1932      Self::Polite => Some("Polite"),
1933      Self::Assertive => Some("Assertive"),
1934      Self::Off => Some("Off"),
1935      _ => None,
1936    }
1937  }
1938}
1939impl core::fmt::Debug for LiveRegionPoliteness {
1940  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1941    if let Some(name) = self.variant_name() {
1942      f.write_str(name)
1943    } else {
1944      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
1945    }
1946  }
1947}
1948impl<'a> flatbuffers::Follow<'a> for LiveRegionPoliteness {
1949  type Inner = Self;
1950  #[inline]
1951  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1952    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
1953    Self(b)
1954  }
1955}
1956
1957impl flatbuffers::Push for LiveRegionPoliteness {
1958    type Output = LiveRegionPoliteness;
1959    #[inline]
1960    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
1961        flatbuffers::emplace_scalar::<i8>(dst, self.0);
1962    }
1963}
1964
1965impl flatbuffers::EndianScalar for LiveRegionPoliteness {
1966  type Scalar = i8;
1967  #[inline]
1968  fn to_little_endian(self) -> i8 {
1969    self.0.to_le()
1970  }
1971  #[inline]
1972  #[allow(clippy::wrong_self_convention)]
1973  fn from_little_endian(v: i8) -> Self {
1974    let b = i8::from_le(v);
1975    Self(b)
1976  }
1977}
1978
1979impl<'a> flatbuffers::Verifiable for LiveRegionPoliteness {
1980  #[inline]
1981  fn run_verifier(
1982    v: &mut flatbuffers::Verifier, pos: usize
1983  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1984    use self::flatbuffers::Verifiable;
1985    i8::run_verifier(v, pos)
1986  }
1987}
1988
1989impl flatbuffers::SimpleToVerifyInSlice for LiveRegionPoliteness {}
1990#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1991pub const ENUM_MIN_LIVE_REGION_RELEVANT: i8 = 0;
1992#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1993pub const ENUM_MAX_LIVE_REGION_RELEVANT: i8 = 3;
1994#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
1995#[allow(non_camel_case_types)]
1996pub const ENUM_VALUES_LIVE_REGION_RELEVANT: [LiveRegionRelevant; 4] = [
1997  LiveRegionRelevant::Additions,
1998  LiveRegionRelevant::Removals,
1999  LiveRegionRelevant::Text,
2000  LiveRegionRelevant::All,
2001];
2002
2003#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
2004#[repr(transparent)]
2005pub struct LiveRegionRelevant(pub i8);
2006#[allow(non_upper_case_globals)]
2007impl LiveRegionRelevant {
2008  /// Announce added content.
2009  pub const Additions: Self = Self(0);
2010  /// Announce removed content.
2011  pub const Removals: Self = Self(1);
2012  /// Announce text changes.
2013  pub const Text: Self = Self(2);
2014  /// Announce everything.
2015  pub const All: Self = Self(3);
2016
2017  pub const ENUM_MIN: i8 = 0;
2018  pub const ENUM_MAX: i8 = 3;
2019  pub const ENUM_VALUES: &'static [Self] = &[
2020    Self::Additions,
2021    Self::Removals,
2022    Self::Text,
2023    Self::All,
2024  ];
2025  /// Returns the variant's name or "" if unknown.
2026  pub fn variant_name(self) -> Option<&'static str> {
2027    match self {
2028      Self::Additions => Some("Additions"),
2029      Self::Removals => Some("Removals"),
2030      Self::Text => Some("Text"),
2031      Self::All => Some("All"),
2032      _ => None,
2033    }
2034  }
2035}
2036impl core::fmt::Debug for LiveRegionRelevant {
2037  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2038    if let Some(name) = self.variant_name() {
2039      f.write_str(name)
2040    } else {
2041      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
2042    }
2043  }
2044}
2045impl<'a> flatbuffers::Follow<'a> for LiveRegionRelevant {
2046  type Inner = Self;
2047  #[inline]
2048  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2049    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
2050    Self(b)
2051  }
2052}
2053
2054impl flatbuffers::Push for LiveRegionRelevant {
2055    type Output = LiveRegionRelevant;
2056    #[inline]
2057    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
2058        flatbuffers::emplace_scalar::<i8>(dst, self.0);
2059    }
2060}
2061
2062impl flatbuffers::EndianScalar for LiveRegionRelevant {
2063  type Scalar = i8;
2064  #[inline]
2065  fn to_little_endian(self) -> i8 {
2066    self.0.to_le()
2067  }
2068  #[inline]
2069  #[allow(clippy::wrong_self_convention)]
2070  fn from_little_endian(v: i8) -> Self {
2071    let b = i8::from_le(v);
2072    Self(b)
2073  }
2074}
2075
2076impl<'a> flatbuffers::Verifiable for LiveRegionRelevant {
2077  #[inline]
2078  fn run_verifier(
2079    v: &mut flatbuffers::Verifier, pos: usize
2080  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2081    use self::flatbuffers::Verifiable;
2082    i8::run_verifier(v, pos)
2083  }
2084}
2085
2086impl flatbuffers::SimpleToVerifyInSlice for LiveRegionRelevant {}
2087#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2088pub const ENUM_MIN_FOCUS_TRAP_ESCAPE: i8 = 0;
2089#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2090pub const ENUM_MAX_FOCUS_TRAP_ESCAPE: i8 = 2;
2091#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2092#[allow(non_camel_case_types)]
2093pub const ENUM_VALUES_FOCUS_TRAP_ESCAPE: [FocusTrapEscape; 3] = [
2094  FocusTrapEscape::CloseOnEscape,
2095  FocusTrapEscape::NoEscape,
2096  FocusTrapEscape::FireEvent,
2097];
2098
2099#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
2100#[repr(transparent)]
2101pub struct FocusTrapEscape(pub i8);
2102#[allow(non_upper_case_globals)]
2103impl FocusTrapEscape {
2104  /// Pressing Escape closes the trap (standard for modals).
2105  pub const CloseOnEscape: Self = Self(0);
2106  /// Escape does nothing (trap must be closed programmatically).
2107  pub const NoEscape: Self = Self(1);
2108  /// Pressing Escape fires a state machine event.
2109  pub const FireEvent: Self = Self(2);
2110
2111  pub const ENUM_MIN: i8 = 0;
2112  pub const ENUM_MAX: i8 = 2;
2113  pub const ENUM_VALUES: &'static [Self] = &[
2114    Self::CloseOnEscape,
2115    Self::NoEscape,
2116    Self::FireEvent,
2117  ];
2118  /// Returns the variant's name or "" if unknown.
2119  pub fn variant_name(self) -> Option<&'static str> {
2120    match self {
2121      Self::CloseOnEscape => Some("CloseOnEscape"),
2122      Self::NoEscape => Some("NoEscape"),
2123      Self::FireEvent => Some("FireEvent"),
2124      _ => None,
2125    }
2126  }
2127}
2128impl core::fmt::Debug for FocusTrapEscape {
2129  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2130    if let Some(name) = self.variant_name() {
2131      f.write_str(name)
2132    } else {
2133      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
2134    }
2135  }
2136}
2137impl<'a> flatbuffers::Follow<'a> for FocusTrapEscape {
2138  type Inner = Self;
2139  #[inline]
2140  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2141    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
2142    Self(b)
2143  }
2144}
2145
2146impl flatbuffers::Push for FocusTrapEscape {
2147    type Output = FocusTrapEscape;
2148    #[inline]
2149    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
2150        flatbuffers::emplace_scalar::<i8>(dst, self.0);
2151    }
2152}
2153
2154impl flatbuffers::EndianScalar for FocusTrapEscape {
2155  type Scalar = i8;
2156  #[inline]
2157  fn to_little_endian(self) -> i8 {
2158    self.0.to_le()
2159  }
2160  #[inline]
2161  #[allow(clippy::wrong_self_convention)]
2162  fn from_little_endian(v: i8) -> Self {
2163    let b = i8::from_le(v);
2164    Self(b)
2165  }
2166}
2167
2168impl<'a> flatbuffers::Verifiable for FocusTrapEscape {
2169  #[inline]
2170  fn run_verifier(
2171    v: &mut flatbuffers::Verifier, pos: usize
2172  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2173    use self::flatbuffers::Verifiable;
2174    i8::run_verifier(v, pos)
2175  }
2176}
2177
2178impl flatbuffers::SimpleToVerifyInSlice for FocusTrapEscape {}
2179#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2180pub const ENUM_MIN_PERSONALIZATION_CONDITION_TYPE: i8 = 0;
2181#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2182pub const ENUM_MAX_PERSONALIZATION_CONDITION_TYPE: i8 = 6;
2183#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2184#[allow(non_camel_case_types)]
2185pub const ENUM_VALUES_PERSONALIZATION_CONDITION_TYPE: [PersonalizationConditionType; 7] = [
2186  PersonalizationConditionType::Locale,
2187  PersonalizationConditionType::DeviceType,
2188  PersonalizationConditionType::ColorScheme,
2189  PersonalizationConditionType::ReducedMotion,
2190  PersonalizationConditionType::HighContrast,
2191  PersonalizationConditionType::Viewport,
2192  PersonalizationConditionType::Custom,
2193];
2194
2195#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
2196#[repr(transparent)]
2197pub struct PersonalizationConditionType(pub i8);
2198#[allow(non_upper_case_globals)]
2199impl PersonalizationConditionType {
2200  pub const Locale: Self = Self(0);
2201  pub const DeviceType: Self = Self(1);
2202  pub const ColorScheme: Self = Self(2);
2203  pub const ReducedMotion: Self = Self(3);
2204  pub const HighContrast: Self = Self(4);
2205  pub const Viewport: Self = Self(5);
2206  pub const Custom: Self = Self(6);
2207
2208  pub const ENUM_MIN: i8 = 0;
2209  pub const ENUM_MAX: i8 = 6;
2210  pub const ENUM_VALUES: &'static [Self] = &[
2211    Self::Locale,
2212    Self::DeviceType,
2213    Self::ColorScheme,
2214    Self::ReducedMotion,
2215    Self::HighContrast,
2216    Self::Viewport,
2217    Self::Custom,
2218  ];
2219  /// Returns the variant's name or "" if unknown.
2220  pub fn variant_name(self) -> Option<&'static str> {
2221    match self {
2222      Self::Locale => Some("Locale"),
2223      Self::DeviceType => Some("DeviceType"),
2224      Self::ColorScheme => Some("ColorScheme"),
2225      Self::ReducedMotion => Some("ReducedMotion"),
2226      Self::HighContrast => Some("HighContrast"),
2227      Self::Viewport => Some("Viewport"),
2228      Self::Custom => Some("Custom"),
2229      _ => None,
2230    }
2231  }
2232}
2233impl core::fmt::Debug for PersonalizationConditionType {
2234  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2235    if let Some(name) = self.variant_name() {
2236      f.write_str(name)
2237    } else {
2238      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
2239    }
2240  }
2241}
2242impl<'a> flatbuffers::Follow<'a> for PersonalizationConditionType {
2243  type Inner = Self;
2244  #[inline]
2245  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2246    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
2247    Self(b)
2248  }
2249}
2250
2251impl flatbuffers::Push for PersonalizationConditionType {
2252    type Output = PersonalizationConditionType;
2253    #[inline]
2254    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
2255        flatbuffers::emplace_scalar::<i8>(dst, self.0);
2256    }
2257}
2258
2259impl flatbuffers::EndianScalar for PersonalizationConditionType {
2260  type Scalar = i8;
2261  #[inline]
2262  fn to_little_endian(self) -> i8 {
2263    self.0.to_le()
2264  }
2265  #[inline]
2266  #[allow(clippy::wrong_self_convention)]
2267  fn from_little_endian(v: i8) -> Self {
2268    let b = i8::from_le(v);
2269    Self(b)
2270  }
2271}
2272
2273impl<'a> flatbuffers::Verifiable for PersonalizationConditionType {
2274  #[inline]
2275  fn run_verifier(
2276    v: &mut flatbuffers::Verifier, pos: usize
2277  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2278    use self::flatbuffers::Verifiable;
2279    i8::run_verifier(v, pos)
2280  }
2281}
2282
2283impl flatbuffers::SimpleToVerifyInSlice for PersonalizationConditionType {}
2284#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2285pub const ENUM_MIN_OPTIMISTIC_STRATEGY: i8 = 0;
2286#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2287pub const ENUM_MAX_OPTIMISTIC_STRATEGY: i8 = 2;
2288#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2289#[allow(non_camel_case_types)]
2290pub const ENUM_VALUES_OPTIMISTIC_STRATEGY: [OptimisticStrategy; 3] = [
2291  OptimisticStrategy::None,
2292  OptimisticStrategy::MirrorInput,
2293  OptimisticStrategy::CustomTransform,
2294];
2295
2296#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
2297#[repr(transparent)]
2298pub struct OptimisticStrategy(pub i8);
2299#[allow(non_upper_case_globals)]
2300impl OptimisticStrategy {
2301  pub const None: Self = Self(0);
2302  pub const MirrorInput: Self = Self(1);
2303  pub const CustomTransform: Self = Self(2);
2304
2305  pub const ENUM_MIN: i8 = 0;
2306  pub const ENUM_MAX: i8 = 2;
2307  pub const ENUM_VALUES: &'static [Self] = &[
2308    Self::None,
2309    Self::MirrorInput,
2310    Self::CustomTransform,
2311  ];
2312  /// Returns the variant's name or "" if unknown.
2313  pub fn variant_name(self) -> Option<&'static str> {
2314    match self {
2315      Self::None => Some("None"),
2316      Self::MirrorInput => Some("MirrorInput"),
2317      Self::CustomTransform => Some("CustomTransform"),
2318      _ => None,
2319    }
2320  }
2321}
2322impl core::fmt::Debug for OptimisticStrategy {
2323  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2324    if let Some(name) = self.variant_name() {
2325      f.write_str(name)
2326    } else {
2327      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
2328    }
2329  }
2330}
2331impl<'a> flatbuffers::Follow<'a> for OptimisticStrategy {
2332  type Inner = Self;
2333  #[inline]
2334  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2335    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
2336    Self(b)
2337  }
2338}
2339
2340impl flatbuffers::Push for OptimisticStrategy {
2341    type Output = OptimisticStrategy;
2342    #[inline]
2343    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
2344        flatbuffers::emplace_scalar::<i8>(dst, self.0);
2345    }
2346}
2347
2348impl flatbuffers::EndianScalar for OptimisticStrategy {
2349  type Scalar = i8;
2350  #[inline]
2351  fn to_little_endian(self) -> i8 {
2352    self.0.to_le()
2353  }
2354  #[inline]
2355  #[allow(clippy::wrong_self_convention)]
2356  fn from_little_endian(v: i8) -> Self {
2357    let b = i8::from_le(v);
2358    Self(b)
2359  }
2360}
2361
2362impl<'a> flatbuffers::Verifiable for OptimisticStrategy {
2363  #[inline]
2364  fn run_verifier(
2365    v: &mut flatbuffers::Verifier, pos: usize
2366  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2367    use self::flatbuffers::Verifiable;
2368    i8::run_verifier(v, pos)
2369  }
2370}
2371
2372impl flatbuffers::SimpleToVerifyInSlice for OptimisticStrategy {}
2373#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2374pub const ENUM_MIN_ROLLBACK_STRATEGY: i8 = 0;
2375#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2376pub const ENUM_MAX_ROLLBACK_STRATEGY: i8 = 1;
2377#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2378#[allow(non_camel_case_types)]
2379pub const ENUM_VALUES_ROLLBACK_STRATEGY: [RollbackStrategy; 2] = [
2380  RollbackStrategy::Revert,
2381  RollbackStrategy::ShowErrorKeepData,
2382];
2383
2384#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
2385#[repr(transparent)]
2386pub struct RollbackStrategy(pub i8);
2387#[allow(non_upper_case_globals)]
2388impl RollbackStrategy {
2389  pub const Revert: Self = Self(0);
2390  pub const ShowErrorKeepData: Self = Self(1);
2391
2392  pub const ENUM_MIN: i8 = 0;
2393  pub const ENUM_MAX: i8 = 1;
2394  pub const ENUM_VALUES: &'static [Self] = &[
2395    Self::Revert,
2396    Self::ShowErrorKeepData,
2397  ];
2398  /// Returns the variant's name or "" if unknown.
2399  pub fn variant_name(self) -> Option<&'static str> {
2400    match self {
2401      Self::Revert => Some("Revert"),
2402      Self::ShowErrorKeepData => Some("ShowErrorKeepData"),
2403      _ => None,
2404    }
2405  }
2406}
2407impl core::fmt::Debug for RollbackStrategy {
2408  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2409    if let Some(name) = self.variant_name() {
2410      f.write_str(name)
2411    } else {
2412      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
2413    }
2414  }
2415}
2416impl<'a> flatbuffers::Follow<'a> for RollbackStrategy {
2417  type Inner = Self;
2418  #[inline]
2419  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2420    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
2421    Self(b)
2422  }
2423}
2424
2425impl flatbuffers::Push for RollbackStrategy {
2426    type Output = RollbackStrategy;
2427    #[inline]
2428    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
2429        flatbuffers::emplace_scalar::<i8>(dst, self.0);
2430    }
2431}
2432
2433impl flatbuffers::EndianScalar for RollbackStrategy {
2434  type Scalar = i8;
2435  #[inline]
2436  fn to_little_endian(self) -> i8 {
2437    self.0.to_le()
2438  }
2439  #[inline]
2440  #[allow(clippy::wrong_self_convention)]
2441  fn from_little_endian(v: i8) -> Self {
2442    let b = i8::from_le(v);
2443    Self(b)
2444  }
2445}
2446
2447impl<'a> flatbuffers::Verifiable for RollbackStrategy {
2448  #[inline]
2449  fn run_verifier(
2450    v: &mut flatbuffers::Verifier, pos: usize
2451  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2452    use self::flatbuffers::Verifiable;
2453    i8::run_verifier(v, pos)
2454  }
2455}
2456
2457impl flatbuffers::SimpleToVerifyInSlice for RollbackStrategy {}
2458#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2459pub const ENUM_MIN_ERROR_FALLBACK: i8 = 0;
2460#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2461pub const ENUM_MAX_ERROR_FALLBACK: i8 = 2;
2462#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2463#[allow(non_camel_case_types)]
2464pub const ENUM_VALUES_ERROR_FALLBACK: [ErrorFallback; 3] = [
2465  ErrorFallback::ShowToast,
2466  ErrorFallback::ShowInlineError,
2467  ErrorFallback::Redirect,
2468];
2469
2470#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
2471#[repr(transparent)]
2472pub struct ErrorFallback(pub i8);
2473#[allow(non_upper_case_globals)]
2474impl ErrorFallback {
2475  pub const ShowToast: Self = Self(0);
2476  pub const ShowInlineError: Self = Self(1);
2477  pub const Redirect: Self = Self(2);
2478
2479  pub const ENUM_MIN: i8 = 0;
2480  pub const ENUM_MAX: i8 = 2;
2481  pub const ENUM_VALUES: &'static [Self] = &[
2482    Self::ShowToast,
2483    Self::ShowInlineError,
2484    Self::Redirect,
2485  ];
2486  /// Returns the variant's name or "" if unknown.
2487  pub fn variant_name(self) -> Option<&'static str> {
2488    match self {
2489      Self::ShowToast => Some("ShowToast"),
2490      Self::ShowInlineError => Some("ShowInlineError"),
2491      Self::Redirect => Some("Redirect"),
2492      _ => None,
2493    }
2494  }
2495}
2496impl core::fmt::Debug for ErrorFallback {
2497  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2498    if let Some(name) = self.variant_name() {
2499      f.write_str(name)
2500    } else {
2501      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
2502    }
2503  }
2504}
2505impl<'a> flatbuffers::Follow<'a> for ErrorFallback {
2506  type Inner = Self;
2507  #[inline]
2508  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2509    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
2510    Self(b)
2511  }
2512}
2513
2514impl flatbuffers::Push for ErrorFallback {
2515    type Output = ErrorFallback;
2516    #[inline]
2517    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
2518        flatbuffers::emplace_scalar::<i8>(dst, self.0);
2519    }
2520}
2521
2522impl flatbuffers::EndianScalar for ErrorFallback {
2523  type Scalar = i8;
2524  #[inline]
2525  fn to_little_endian(self) -> i8 {
2526    self.0.to_le()
2527  }
2528  #[inline]
2529  #[allow(clippy::wrong_self_convention)]
2530  fn from_little_endian(v: i8) -> Self {
2531    let b = i8::from_le(v);
2532    Self(b)
2533  }
2534}
2535
2536impl<'a> flatbuffers::Verifiable for ErrorFallback {
2537  #[inline]
2538  fn run_verifier(
2539    v: &mut flatbuffers::Verifier, pos: usize
2540  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2541    use self::flatbuffers::Verifiable;
2542    i8::run_verifier(v, pos)
2543  }
2544}
2545
2546impl flatbuffers::SimpleToVerifyInSlice for ErrorFallback {}
2547#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2548pub const ENUM_MIN_SUBSCRIPTION_TRANSPORT: i8 = 0;
2549#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2550pub const ENUM_MAX_SUBSCRIPTION_TRANSPORT: i8 = 2;
2551#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2552#[allow(non_camel_case_types)]
2553pub const ENUM_VALUES_SUBSCRIPTION_TRANSPORT: [SubscriptionTransport; 3] = [
2554  SubscriptionTransport::WebSocket,
2555  SubscriptionTransport::ServerSentEvents,
2556  SubscriptionTransport::Polling,
2557];
2558
2559#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
2560#[repr(transparent)]
2561pub struct SubscriptionTransport(pub i8);
2562#[allow(non_upper_case_globals)]
2563impl SubscriptionTransport {
2564  pub const WebSocket: Self = Self(0);
2565  pub const ServerSentEvents: Self = Self(1);
2566  pub const Polling: Self = Self(2);
2567
2568  pub const ENUM_MIN: i8 = 0;
2569  pub const ENUM_MAX: i8 = 2;
2570  pub const ENUM_VALUES: &'static [Self] = &[
2571    Self::WebSocket,
2572    Self::ServerSentEvents,
2573    Self::Polling,
2574  ];
2575  /// Returns the variant's name or "" if unknown.
2576  pub fn variant_name(self) -> Option<&'static str> {
2577    match self {
2578      Self::WebSocket => Some("WebSocket"),
2579      Self::ServerSentEvents => Some("ServerSentEvents"),
2580      Self::Polling => Some("Polling"),
2581      _ => None,
2582    }
2583  }
2584}
2585impl core::fmt::Debug for SubscriptionTransport {
2586  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2587    if let Some(name) = self.variant_name() {
2588      f.write_str(name)
2589    } else {
2590      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
2591    }
2592  }
2593}
2594impl<'a> flatbuffers::Follow<'a> for SubscriptionTransport {
2595  type Inner = Self;
2596  #[inline]
2597  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2598    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
2599    Self(b)
2600  }
2601}
2602
2603impl flatbuffers::Push for SubscriptionTransport {
2604    type Output = SubscriptionTransport;
2605    #[inline]
2606    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
2607        flatbuffers::emplace_scalar::<i8>(dst, self.0);
2608    }
2609}
2610
2611impl flatbuffers::EndianScalar for SubscriptionTransport {
2612  type Scalar = i8;
2613  #[inline]
2614  fn to_little_endian(self) -> i8 {
2615    self.0.to_le()
2616  }
2617  #[inline]
2618  #[allow(clippy::wrong_self_convention)]
2619  fn from_little_endian(v: i8) -> Self {
2620    let b = i8::from_le(v);
2621    Self(b)
2622  }
2623}
2624
2625impl<'a> flatbuffers::Verifiable for SubscriptionTransport {
2626  #[inline]
2627  fn run_verifier(
2628    v: &mut flatbuffers::Verifier, pos: usize
2629  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2630    use self::flatbuffers::Verifiable;
2631    i8::run_verifier(v, pos)
2632  }
2633}
2634
2635impl flatbuffers::SimpleToVerifyInSlice for SubscriptionTransport {}
2636#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2637pub const ENUM_MIN_UPDATE_STRATEGY: i8 = 0;
2638#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2639pub const ENUM_MAX_UPDATE_STRATEGY: i8 = 2;
2640#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2641#[allow(non_camel_case_types)]
2642pub const ENUM_VALUES_UPDATE_STRATEGY: [UpdateStrategy; 3] = [
2643  UpdateStrategy::Replace,
2644  UpdateStrategy::Merge,
2645  UpdateStrategy::Append,
2646];
2647
2648#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
2649#[repr(transparent)]
2650pub struct UpdateStrategy(pub i8);
2651#[allow(non_upper_case_globals)]
2652impl UpdateStrategy {
2653  pub const Replace: Self = Self(0);
2654  pub const Merge: Self = Self(1);
2655  pub const Append: Self = Self(2);
2656
2657  pub const ENUM_MIN: i8 = 0;
2658  pub const ENUM_MAX: i8 = 2;
2659  pub const ENUM_VALUES: &'static [Self] = &[
2660    Self::Replace,
2661    Self::Merge,
2662    Self::Append,
2663  ];
2664  /// Returns the variant's name or "" if unknown.
2665  pub fn variant_name(self) -> Option<&'static str> {
2666    match self {
2667      Self::Replace => Some("Replace"),
2668      Self::Merge => Some("Merge"),
2669      Self::Append => Some("Append"),
2670      _ => None,
2671    }
2672  }
2673}
2674impl core::fmt::Debug for UpdateStrategy {
2675  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2676    if let Some(name) = self.variant_name() {
2677      f.write_str(name)
2678    } else {
2679      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
2680    }
2681  }
2682}
2683impl<'a> flatbuffers::Follow<'a> for UpdateStrategy {
2684  type Inner = Self;
2685  #[inline]
2686  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2687    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
2688    Self(b)
2689  }
2690}
2691
2692impl flatbuffers::Push for UpdateStrategy {
2693    type Output = UpdateStrategy;
2694    #[inline]
2695    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
2696        flatbuffers::emplace_scalar::<i8>(dst, self.0);
2697    }
2698}
2699
2700impl flatbuffers::EndianScalar for UpdateStrategy {
2701  type Scalar = i8;
2702  #[inline]
2703  fn to_little_endian(self) -> i8 {
2704    self.0.to_le()
2705  }
2706  #[inline]
2707  #[allow(clippy::wrong_self_convention)]
2708  fn from_little_endian(v: i8) -> Self {
2709    let b = i8::from_le(v);
2710    Self(b)
2711  }
2712}
2713
2714impl<'a> flatbuffers::Verifiable for UpdateStrategy {
2715  #[inline]
2716  fn run_verifier(
2717    v: &mut flatbuffers::Verifier, pos: usize
2718  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2719    use self::flatbuffers::Verifiable;
2720    i8::run_verifier(v, pos)
2721  }
2722}
2723
2724impl flatbuffers::SimpleToVerifyInSlice for UpdateStrategy {}
2725#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2726pub const ENUM_MIN_AUTH_PROVIDER: i8 = 0;
2727#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2728pub const ENUM_MAX_AUTH_PROVIDER: i8 = 5;
2729#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2730#[allow(non_camel_case_types)]
2731pub const ENUM_VALUES_AUTH_PROVIDER: [AuthProvider; 6] = [
2732  AuthProvider::Auth0,
2733  AuthProvider::Clerk,
2734  AuthProvider::Supabase,
2735  AuthProvider::Firebase,
2736  AuthProvider::NextAuth,
2737  AuthProvider::Custom,
2738];
2739
2740#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
2741#[repr(transparent)]
2742pub struct AuthProvider(pub i8);
2743#[allow(non_upper_case_globals)]
2744impl AuthProvider {
2745  pub const Auth0: Self = Self(0);
2746  pub const Clerk: Self = Self(1);
2747  pub const Supabase: Self = Self(2);
2748  pub const Firebase: Self = Self(3);
2749  pub const NextAuth: Self = Self(4);
2750  pub const Custom: Self = Self(5);
2751
2752  pub const ENUM_MIN: i8 = 0;
2753  pub const ENUM_MAX: i8 = 5;
2754  pub const ENUM_VALUES: &'static [Self] = &[
2755    Self::Auth0,
2756    Self::Clerk,
2757    Self::Supabase,
2758    Self::Firebase,
2759    Self::NextAuth,
2760    Self::Custom,
2761  ];
2762  /// Returns the variant's name or "" if unknown.
2763  pub fn variant_name(self) -> Option<&'static str> {
2764    match self {
2765      Self::Auth0 => Some("Auth0"),
2766      Self::Clerk => Some("Clerk"),
2767      Self::Supabase => Some("Supabase"),
2768      Self::Firebase => Some("Firebase"),
2769      Self::NextAuth => Some("NextAuth"),
2770      Self::Custom => Some("Custom"),
2771      _ => None,
2772    }
2773  }
2774}
2775impl core::fmt::Debug for AuthProvider {
2776  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2777    if let Some(name) = self.variant_name() {
2778      f.write_str(name)
2779    } else {
2780      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
2781    }
2782  }
2783}
2784impl<'a> flatbuffers::Follow<'a> for AuthProvider {
2785  type Inner = Self;
2786  #[inline]
2787  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2788    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
2789    Self(b)
2790  }
2791}
2792
2793impl flatbuffers::Push for AuthProvider {
2794    type Output = AuthProvider;
2795    #[inline]
2796    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
2797        flatbuffers::emplace_scalar::<i8>(dst, self.0);
2798    }
2799}
2800
2801impl flatbuffers::EndianScalar for AuthProvider {
2802  type Scalar = i8;
2803  #[inline]
2804  fn to_little_endian(self) -> i8 {
2805    self.0.to_le()
2806  }
2807  #[inline]
2808  #[allow(clippy::wrong_self_convention)]
2809  fn from_little_endian(v: i8) -> Self {
2810    let b = i8::from_le(v);
2811    Self(b)
2812  }
2813}
2814
2815impl<'a> flatbuffers::Verifiable for AuthProvider {
2816  #[inline]
2817  fn run_verifier(
2818    v: &mut flatbuffers::Verifier, pos: usize
2819  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2820    use self::flatbuffers::Verifiable;
2821    i8::run_verifier(v, pos)
2822  }
2823}
2824
2825impl flatbuffers::SimpleToVerifyInSlice for AuthProvider {}
2826#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2827pub const ENUM_MIN_SESSION_STRATEGY: i8 = 0;
2828#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2829pub const ENUM_MAX_SESSION_STRATEGY: i8 = 2;
2830#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2831#[allow(non_camel_case_types)]
2832pub const ENUM_VALUES_SESSION_STRATEGY: [SessionStrategy; 3] = [
2833  SessionStrategy::JwtCookie,
2834  SessionStrategy::JwtHeader,
2835  SessionStrategy::SessionCookie,
2836];
2837
2838#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
2839#[repr(transparent)]
2840pub struct SessionStrategy(pub i8);
2841#[allow(non_upper_case_globals)]
2842impl SessionStrategy {
2843  pub const JwtCookie: Self = Self(0);
2844  pub const JwtHeader: Self = Self(1);
2845  pub const SessionCookie: Self = Self(2);
2846
2847  pub const ENUM_MIN: i8 = 0;
2848  pub const ENUM_MAX: i8 = 2;
2849  pub const ENUM_VALUES: &'static [Self] = &[
2850    Self::JwtCookie,
2851    Self::JwtHeader,
2852    Self::SessionCookie,
2853  ];
2854  /// Returns the variant's name or "" if unknown.
2855  pub fn variant_name(self) -> Option<&'static str> {
2856    match self {
2857      Self::JwtCookie => Some("JwtCookie"),
2858      Self::JwtHeader => Some("JwtHeader"),
2859      Self::SessionCookie => Some("SessionCookie"),
2860      _ => None,
2861    }
2862  }
2863}
2864impl core::fmt::Debug for SessionStrategy {
2865  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2866    if let Some(name) = self.variant_name() {
2867      f.write_str(name)
2868    } else {
2869      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
2870    }
2871  }
2872}
2873impl<'a> flatbuffers::Follow<'a> for SessionStrategy {
2874  type Inner = Self;
2875  #[inline]
2876  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2877    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
2878    Self(b)
2879  }
2880}
2881
2882impl flatbuffers::Push for SessionStrategy {
2883    type Output = SessionStrategy;
2884    #[inline]
2885    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
2886        flatbuffers::emplace_scalar::<i8>(dst, self.0);
2887    }
2888}
2889
2890impl flatbuffers::EndianScalar for SessionStrategy {
2891  type Scalar = i8;
2892  #[inline]
2893  fn to_little_endian(self) -> i8 {
2894    self.0.to_le()
2895  }
2896  #[inline]
2897  #[allow(clippy::wrong_self_convention)]
2898  fn from_little_endian(v: i8) -> Self {
2899    let b = i8::from_le(v);
2900    Self(b)
2901  }
2902}
2903
2904impl<'a> flatbuffers::Verifiable for SessionStrategy {
2905  #[inline]
2906  fn run_verifier(
2907    v: &mut flatbuffers::Verifier, pos: usize
2908  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2909    use self::flatbuffers::Verifiable;
2910    i8::run_verifier(v, pos)
2911  }
2912}
2913
2914impl flatbuffers::SimpleToVerifyInSlice for SessionStrategy {}
2915#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2916pub const ENUM_MIN_CONTENT_CACHE_STRATEGY: i8 = 0;
2917#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2918pub const ENUM_MAX_CONTENT_CACHE_STRATEGY: i8 = 2;
2919#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
2920#[allow(non_camel_case_types)]
2921pub const ENUM_VALUES_CONTENT_CACHE_STRATEGY: [ContentCacheStrategy; 3] = [
2922  ContentCacheStrategy::Static,
2923  ContentCacheStrategy::Isr,
2924  ContentCacheStrategy::Dynamic,
2925];
2926
2927#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
2928#[repr(transparent)]
2929pub struct ContentCacheStrategy(pub i8);
2930#[allow(non_upper_case_globals)]
2931impl ContentCacheStrategy {
2932  /// Fetch at compile time, bake into output.
2933  pub const Static: Self = Self(0);
2934  /// Fetch at compile time, include revalidation mechanism.
2935  pub const Isr: Self = Self(1);
2936  /// Fetch at runtime via DataNode.
2937  pub const Dynamic: Self = Self(2);
2938
2939  pub const ENUM_MIN: i8 = 0;
2940  pub const ENUM_MAX: i8 = 2;
2941  pub const ENUM_VALUES: &'static [Self] = &[
2942    Self::Static,
2943    Self::Isr,
2944    Self::Dynamic,
2945  ];
2946  /// Returns the variant's name or "" if unknown.
2947  pub fn variant_name(self) -> Option<&'static str> {
2948    match self {
2949      Self::Static => Some("Static"),
2950      Self::Isr => Some("Isr"),
2951      Self::Dynamic => Some("Dynamic"),
2952      _ => None,
2953    }
2954  }
2955}
2956impl core::fmt::Debug for ContentCacheStrategy {
2957  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
2958    if let Some(name) = self.variant_name() {
2959      f.write_str(name)
2960    } else {
2961      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
2962    }
2963  }
2964}
2965impl<'a> flatbuffers::Follow<'a> for ContentCacheStrategy {
2966  type Inner = Self;
2967  #[inline]
2968  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2969    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
2970    Self(b)
2971  }
2972}
2973
2974impl flatbuffers::Push for ContentCacheStrategy {
2975    type Output = ContentCacheStrategy;
2976    #[inline]
2977    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
2978        flatbuffers::emplace_scalar::<i8>(dst, self.0);
2979    }
2980}
2981
2982impl flatbuffers::EndianScalar for ContentCacheStrategy {
2983  type Scalar = i8;
2984  #[inline]
2985  fn to_little_endian(self) -> i8 {
2986    self.0.to_le()
2987  }
2988  #[inline]
2989  #[allow(clippy::wrong_self_convention)]
2990  fn from_little_endian(v: i8) -> Self {
2991    let b = i8::from_le(v);
2992    Self(b)
2993  }
2994}
2995
2996impl<'a> flatbuffers::Verifiable for ContentCacheStrategy {
2997  #[inline]
2998  fn run_verifier(
2999    v: &mut flatbuffers::Verifier, pos: usize
3000  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
3001    use self::flatbuffers::Verifiable;
3002    i8::run_verifier(v, pos)
3003  }
3004}
3005
3006impl flatbuffers::SimpleToVerifyInSlice for ContentCacheStrategy {}
3007#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
3008pub const ENUM_MIN_CONTENT_TYPE: i8 = 0;
3009#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
3010pub const ENUM_MAX_CONTENT_TYPE: i8 = 3;
3011#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
3012#[allow(non_camel_case_types)]
3013pub const ENUM_VALUES_CONTENT_TYPE: [ContentType; 4] = [
3014  ContentType::Text,
3015  ContentType::RichText,
3016  ContentType::Media,
3017  ContentType::Structured,
3018];
3019
3020#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
3021#[repr(transparent)]
3022pub struct ContentType(pub i8);
3023#[allow(non_upper_case_globals)]
3024impl ContentType {
3025  pub const Text: Self = Self(0);
3026  pub const RichText: Self = Self(1);
3027  pub const Media: Self = Self(2);
3028  pub const Structured: Self = Self(3);
3029
3030  pub const ENUM_MIN: i8 = 0;
3031  pub const ENUM_MAX: i8 = 3;
3032  pub const ENUM_VALUES: &'static [Self] = &[
3033    Self::Text,
3034    Self::RichText,
3035    Self::Media,
3036    Self::Structured,
3037  ];
3038  /// Returns the variant's name or "" if unknown.
3039  pub fn variant_name(self) -> Option<&'static str> {
3040    match self {
3041      Self::Text => Some("Text"),
3042      Self::RichText => Some("RichText"),
3043      Self::Media => Some("Media"),
3044      Self::Structured => Some("Structured"),
3045      _ => None,
3046    }
3047  }
3048}
3049impl core::fmt::Debug for ContentType {
3050  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
3051    if let Some(name) = self.variant_name() {
3052      f.write_str(name)
3053    } else {
3054      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
3055    }
3056  }
3057}
3058impl<'a> flatbuffers::Follow<'a> for ContentType {
3059  type Inner = Self;
3060  #[inline]
3061  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3062    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
3063    Self(b)
3064  }
3065}
3066
3067impl flatbuffers::Push for ContentType {
3068    type Output = ContentType;
3069    #[inline]
3070    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
3071        flatbuffers::emplace_scalar::<i8>(dst, self.0);
3072    }
3073}
3074
3075impl flatbuffers::EndianScalar for ContentType {
3076  type Scalar = i8;
3077  #[inline]
3078  fn to_little_endian(self) -> i8 {
3079    self.0.to_le()
3080  }
3081  #[inline]
3082  #[allow(clippy::wrong_self_convention)]
3083  fn from_little_endian(v: i8) -> Self {
3084    let b = i8::from_le(v);
3085    Self(b)
3086  }
3087}
3088
3089impl<'a> flatbuffers::Verifiable for ContentType {
3090  #[inline]
3091  fn run_verifier(
3092    v: &mut flatbuffers::Verifier, pos: usize
3093  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
3094    use self::flatbuffers::Verifiable;
3095    i8::run_verifier(v, pos)
3096  }
3097}
3098
3099impl flatbuffers::SimpleToVerifyInSlice for ContentType {}
3100#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
3101pub const ENUM_MIN_RICH_TEXT_BLOCK_TYPE: i8 = 0;
3102#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
3103pub const ENUM_MAX_RICH_TEXT_BLOCK_TYPE: i8 = 11;
3104#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
3105#[allow(non_camel_case_types)]
3106pub const ENUM_VALUES_RICH_TEXT_BLOCK_TYPE: [RichTextBlockType; 12] = [
3107  RichTextBlockType::Paragraph,
3108  RichTextBlockType::Heading,
3109  RichTextBlockType::UnorderedList,
3110  RichTextBlockType::OrderedList,
3111  RichTextBlockType::ListItem,
3112  RichTextBlockType::Image,
3113  RichTextBlockType::CodeBlock,
3114  RichTextBlockType::Blockquote,
3115  RichTextBlockType::Divider,
3116  RichTextBlockType::Table,
3117  RichTextBlockType::TableRow,
3118  RichTextBlockType::TableCell,
3119];
3120
3121#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
3122#[repr(transparent)]
3123pub struct RichTextBlockType(pub i8);
3124#[allow(non_upper_case_globals)]
3125impl RichTextBlockType {
3126  pub const Paragraph: Self = Self(0);
3127  pub const Heading: Self = Self(1);
3128  pub const UnorderedList: Self = Self(2);
3129  pub const OrderedList: Self = Self(3);
3130  pub const ListItem: Self = Self(4);
3131  pub const Image: Self = Self(5);
3132  pub const CodeBlock: Self = Self(6);
3133  pub const Blockquote: Self = Self(7);
3134  pub const Divider: Self = Self(8);
3135  pub const Table: Self = Self(9);
3136  pub const TableRow: Self = Self(10);
3137  pub const TableCell: Self = Self(11);
3138
3139  pub const ENUM_MIN: i8 = 0;
3140  pub const ENUM_MAX: i8 = 11;
3141  pub const ENUM_VALUES: &'static [Self] = &[
3142    Self::Paragraph,
3143    Self::Heading,
3144    Self::UnorderedList,
3145    Self::OrderedList,
3146    Self::ListItem,
3147    Self::Image,
3148    Self::CodeBlock,
3149    Self::Blockquote,
3150    Self::Divider,
3151    Self::Table,
3152    Self::TableRow,
3153    Self::TableCell,
3154  ];
3155  /// Returns the variant's name or "" if unknown.
3156  pub fn variant_name(self) -> Option<&'static str> {
3157    match self {
3158      Self::Paragraph => Some("Paragraph"),
3159      Self::Heading => Some("Heading"),
3160      Self::UnorderedList => Some("UnorderedList"),
3161      Self::OrderedList => Some("OrderedList"),
3162      Self::ListItem => Some("ListItem"),
3163      Self::Image => Some("Image"),
3164      Self::CodeBlock => Some("CodeBlock"),
3165      Self::Blockquote => Some("Blockquote"),
3166      Self::Divider => Some("Divider"),
3167      Self::Table => Some("Table"),
3168      Self::TableRow => Some("TableRow"),
3169      Self::TableCell => Some("TableCell"),
3170      _ => None,
3171    }
3172  }
3173}
3174impl core::fmt::Debug for RichTextBlockType {
3175  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
3176    if let Some(name) = self.variant_name() {
3177      f.write_str(name)
3178    } else {
3179      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
3180    }
3181  }
3182}
3183impl<'a> flatbuffers::Follow<'a> for RichTextBlockType {
3184  type Inner = Self;
3185  #[inline]
3186  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3187    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
3188    Self(b)
3189  }
3190}
3191
3192impl flatbuffers::Push for RichTextBlockType {
3193    type Output = RichTextBlockType;
3194    #[inline]
3195    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
3196        flatbuffers::emplace_scalar::<i8>(dst, self.0);
3197    }
3198}
3199
3200impl flatbuffers::EndianScalar for RichTextBlockType {
3201  type Scalar = i8;
3202  #[inline]
3203  fn to_little_endian(self) -> i8 {
3204    self.0.to_le()
3205  }
3206  #[inline]
3207  #[allow(clippy::wrong_self_convention)]
3208  fn from_little_endian(v: i8) -> Self {
3209    let b = i8::from_le(v);
3210    Self(b)
3211  }
3212}
3213
3214impl<'a> flatbuffers::Verifiable for RichTextBlockType {
3215  #[inline]
3216  fn run_verifier(
3217    v: &mut flatbuffers::Verifier, pos: usize
3218  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
3219    use self::flatbuffers::Verifiable;
3220    i8::run_verifier(v, pos)
3221  }
3222}
3223
3224impl flatbuffers::SimpleToVerifyInSlice for RichTextBlockType {}
3225#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
3226pub const ENUM_MIN_RICH_TEXT_MARK: i8 = 0;
3227#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
3228pub const ENUM_MAX_RICH_TEXT_MARK: i8 = 6;
3229#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
3230#[allow(non_camel_case_types)]
3231pub const ENUM_VALUES_RICH_TEXT_MARK: [RichTextMark; 7] = [
3232  RichTextMark::Bold,
3233  RichTextMark::Italic,
3234  RichTextMark::Underline,
3235  RichTextMark::Strikethrough,
3236  RichTextMark::Code,
3237  RichTextMark::Subscript,
3238  RichTextMark::Superscript,
3239];
3240
3241#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
3242#[repr(transparent)]
3243pub struct RichTextMark(pub i8);
3244#[allow(non_upper_case_globals)]
3245impl RichTextMark {
3246  pub const Bold: Self = Self(0);
3247  pub const Italic: Self = Self(1);
3248  pub const Underline: Self = Self(2);
3249  pub const Strikethrough: Self = Self(3);
3250  pub const Code: Self = Self(4);
3251  pub const Subscript: Self = Self(5);
3252  pub const Superscript: Self = Self(6);
3253
3254  pub const ENUM_MIN: i8 = 0;
3255  pub const ENUM_MAX: i8 = 6;
3256  pub const ENUM_VALUES: &'static [Self] = &[
3257    Self::Bold,
3258    Self::Italic,
3259    Self::Underline,
3260    Self::Strikethrough,
3261    Self::Code,
3262    Self::Subscript,
3263    Self::Superscript,
3264  ];
3265  /// Returns the variant's name or "" if unknown.
3266  pub fn variant_name(self) -> Option<&'static str> {
3267    match self {
3268      Self::Bold => Some("Bold"),
3269      Self::Italic => Some("Italic"),
3270      Self::Underline => Some("Underline"),
3271      Self::Strikethrough => Some("Strikethrough"),
3272      Self::Code => Some("Code"),
3273      Self::Subscript => Some("Subscript"),
3274      Self::Superscript => Some("Superscript"),
3275      _ => None,
3276    }
3277  }
3278}
3279impl core::fmt::Debug for RichTextMark {
3280  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
3281    if let Some(name) = self.variant_name() {
3282      f.write_str(name)
3283    } else {
3284      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
3285    }
3286  }
3287}
3288impl<'a> flatbuffers::Follow<'a> for RichTextMark {
3289  type Inner = Self;
3290  #[inline]
3291  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3292    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
3293    Self(b)
3294  }
3295}
3296
3297impl flatbuffers::Push for RichTextMark {
3298    type Output = RichTextMark;
3299    #[inline]
3300    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
3301        flatbuffers::emplace_scalar::<i8>(dst, self.0);
3302    }
3303}
3304
3305impl flatbuffers::EndianScalar for RichTextMark {
3306  type Scalar = i8;
3307  #[inline]
3308  fn to_little_endian(self) -> i8 {
3309    self.0.to_le()
3310  }
3311  #[inline]
3312  #[allow(clippy::wrong_self_convention)]
3313  fn from_little_endian(v: i8) -> Self {
3314    let b = i8::from_le(v);
3315    Self(b)
3316  }
3317}
3318
3319impl<'a> flatbuffers::Verifiable for RichTextMark {
3320  #[inline]
3321  fn run_verifier(
3322    v: &mut flatbuffers::Verifier, pos: usize
3323  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
3324    use self::flatbuffers::Verifiable;
3325    i8::run_verifier(v, pos)
3326  }
3327}
3328
3329impl flatbuffers::SimpleToVerifyInSlice for RichTextMark {}
3330#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
3331pub const ENUM_MIN_MESSAGE_PARAM_TYPE: i8 = 0;
3332#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
3333pub const ENUM_MAX_MESSAGE_PARAM_TYPE: i8 = 5;
3334#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
3335#[allow(non_camel_case_types)]
3336pub const ENUM_VALUES_MESSAGE_PARAM_TYPE: [MessageParamType; 6] = [
3337  MessageParamType::StringParam,
3338  MessageParamType::NumberParam,
3339  MessageParamType::DateParam,
3340  MessageParamType::CurrencyParam,
3341  MessageParamType::PluralParam,
3342  MessageParamType::SelectParam,
3343];
3344
3345#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
3346#[repr(transparent)]
3347pub struct MessageParamType(pub i8);
3348#[allow(non_upper_case_globals)]
3349impl MessageParamType {
3350  pub const StringParam: Self = Self(0);
3351  pub const NumberParam: Self = Self(1);
3352  pub const DateParam: Self = Self(2);
3353  pub const CurrencyParam: Self = Self(3);
3354  pub const PluralParam: Self = Self(4);
3355  pub const SelectParam: Self = Self(5);
3356
3357  pub const ENUM_MIN: i8 = 0;
3358  pub const ENUM_MAX: i8 = 5;
3359  pub const ENUM_VALUES: &'static [Self] = &[
3360    Self::StringParam,
3361    Self::NumberParam,
3362    Self::DateParam,
3363    Self::CurrencyParam,
3364    Self::PluralParam,
3365    Self::SelectParam,
3366  ];
3367  /// Returns the variant's name or "" if unknown.
3368  pub fn variant_name(self) -> Option<&'static str> {
3369    match self {
3370      Self::StringParam => Some("StringParam"),
3371      Self::NumberParam => Some("NumberParam"),
3372      Self::DateParam => Some("DateParam"),
3373      Self::CurrencyParam => Some("CurrencyParam"),
3374      Self::PluralParam => Some("PluralParam"),
3375      Self::SelectParam => Some("SelectParam"),
3376      _ => None,
3377    }
3378  }
3379}
3380impl core::fmt::Debug for MessageParamType {
3381  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
3382    if let Some(name) = self.variant_name() {
3383      f.write_str(name)
3384    } else {
3385      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
3386    }
3387  }
3388}
3389impl<'a> flatbuffers::Follow<'a> for MessageParamType {
3390  type Inner = Self;
3391  #[inline]
3392  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3393    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
3394    Self(b)
3395  }
3396}
3397
3398impl flatbuffers::Push for MessageParamType {
3399    type Output = MessageParamType;
3400    #[inline]
3401    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
3402        flatbuffers::emplace_scalar::<i8>(dst, self.0);
3403    }
3404}
3405
3406impl flatbuffers::EndianScalar for MessageParamType {
3407  type Scalar = i8;
3408  #[inline]
3409  fn to_little_endian(self) -> i8 {
3410    self.0.to_le()
3411  }
3412  #[inline]
3413  #[allow(clippy::wrong_self_convention)]
3414  fn from_little_endian(v: i8) -> Self {
3415    let b = i8::from_le(v);
3416    Self(b)
3417  }
3418}
3419
3420impl<'a> flatbuffers::Verifiable for MessageParamType {
3421  #[inline]
3422  fn run_verifier(
3423    v: &mut flatbuffers::Verifier, pos: usize
3424  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
3425    use self::flatbuffers::Verifiable;
3426    i8::run_verifier(v, pos)
3427  }
3428}
3429
3430impl flatbuffers::SimpleToVerifyInSlice for MessageParamType {}
3431#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
3432pub const ENUM_MIN_NUMBER_STYLE: i8 = 0;
3433#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
3434pub const ENUM_MAX_NUMBER_STYLE: i8 = 3;
3435#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
3436#[allow(non_camel_case_types)]
3437pub const ENUM_VALUES_NUMBER_STYLE: [NumberStyle; 4] = [
3438  NumberStyle::Decimal,
3439  NumberStyle::Currency,
3440  NumberStyle::Percent,
3441  NumberStyle::Unit,
3442];
3443
3444#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
3445#[repr(transparent)]
3446pub struct NumberStyle(pub i8);
3447#[allow(non_upper_case_globals)]
3448impl NumberStyle {
3449  pub const Decimal: Self = Self(0);
3450  pub const Currency: Self = Self(1);
3451  pub const Percent: Self = Self(2);
3452  pub const Unit: Self = Self(3);
3453
3454  pub const ENUM_MIN: i8 = 0;
3455  pub const ENUM_MAX: i8 = 3;
3456  pub const ENUM_VALUES: &'static [Self] = &[
3457    Self::Decimal,
3458    Self::Currency,
3459    Self::Percent,
3460    Self::Unit,
3461  ];
3462  /// Returns the variant's name or "" if unknown.
3463  pub fn variant_name(self) -> Option<&'static str> {
3464    match self {
3465      Self::Decimal => Some("Decimal"),
3466      Self::Currency => Some("Currency"),
3467      Self::Percent => Some("Percent"),
3468      Self::Unit => Some("Unit"),
3469      _ => None,
3470    }
3471  }
3472}
3473impl core::fmt::Debug for NumberStyle {
3474  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
3475    if let Some(name) = self.variant_name() {
3476      f.write_str(name)
3477    } else {
3478      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
3479    }
3480  }
3481}
3482impl<'a> flatbuffers::Follow<'a> for NumberStyle {
3483  type Inner = Self;
3484  #[inline]
3485  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3486    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
3487    Self(b)
3488  }
3489}
3490
3491impl flatbuffers::Push for NumberStyle {
3492    type Output = NumberStyle;
3493    #[inline]
3494    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
3495        flatbuffers::emplace_scalar::<i8>(dst, self.0);
3496    }
3497}
3498
3499impl flatbuffers::EndianScalar for NumberStyle {
3500  type Scalar = i8;
3501  #[inline]
3502  fn to_little_endian(self) -> i8 {
3503    self.0.to_le()
3504  }
3505  #[inline]
3506  #[allow(clippy::wrong_self_convention)]
3507  fn from_little_endian(v: i8) -> Self {
3508    let b = i8::from_le(v);
3509    Self(b)
3510  }
3511}
3512
3513impl<'a> flatbuffers::Verifiable for NumberStyle {
3514  #[inline]
3515  fn run_verifier(
3516    v: &mut flatbuffers::Verifier, pos: usize
3517  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
3518    use self::flatbuffers::Verifiable;
3519    i8::run_verifier(v, pos)
3520  }
3521}
3522
3523impl flatbuffers::SimpleToVerifyInSlice for NumberStyle {}
3524#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
3525pub const ENUM_MIN_DATE_STYLE: i8 = 0;
3526#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
3527pub const ENUM_MAX_DATE_STYLE: i8 = 4;
3528#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
3529#[allow(non_camel_case_types)]
3530pub const ENUM_VALUES_DATE_STYLE: [DateStyle; 5] = [
3531  DateStyle::Short,
3532  DateStyle::Medium,
3533  DateStyle::Long,
3534  DateStyle::Full,
3535  DateStyle::Custom,
3536];
3537
3538#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
3539#[repr(transparent)]
3540pub struct DateStyle(pub i8);
3541#[allow(non_upper_case_globals)]
3542impl DateStyle {
3543  pub const Short: Self = Self(0);
3544  pub const Medium: Self = Self(1);
3545  pub const Long: Self = Self(2);
3546  pub const Full: Self = Self(3);
3547  pub const Custom: Self = Self(4);
3548
3549  pub const ENUM_MIN: i8 = 0;
3550  pub const ENUM_MAX: i8 = 4;
3551  pub const ENUM_VALUES: &'static [Self] = &[
3552    Self::Short,
3553    Self::Medium,
3554    Self::Long,
3555    Self::Full,
3556    Self::Custom,
3557  ];
3558  /// Returns the variant's name or "" if unknown.
3559  pub fn variant_name(self) -> Option<&'static str> {
3560    match self {
3561      Self::Short => Some("Short"),
3562      Self::Medium => Some("Medium"),
3563      Self::Long => Some("Long"),
3564      Self::Full => Some("Full"),
3565      Self::Custom => Some("Custom"),
3566      _ => None,
3567    }
3568  }
3569}
3570impl core::fmt::Debug for DateStyle {
3571  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
3572    if let Some(name) = self.variant_name() {
3573      f.write_str(name)
3574    } else {
3575      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
3576    }
3577  }
3578}
3579impl<'a> flatbuffers::Follow<'a> for DateStyle {
3580  type Inner = Self;
3581  #[inline]
3582  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3583    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
3584    Self(b)
3585  }
3586}
3587
3588impl flatbuffers::Push for DateStyle {
3589    type Output = DateStyle;
3590    #[inline]
3591    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
3592        flatbuffers::emplace_scalar::<i8>(dst, self.0);
3593    }
3594}
3595
3596impl flatbuffers::EndianScalar for DateStyle {
3597  type Scalar = i8;
3598  #[inline]
3599  fn to_little_endian(self) -> i8 {
3600    self.0.to_le()
3601  }
3602  #[inline]
3603  #[allow(clippy::wrong_self_convention)]
3604  fn from_little_endian(v: i8) -> Self {
3605    let b = i8::from_le(v);
3606    Self(b)
3607  }
3608}
3609
3610impl<'a> flatbuffers::Verifiable for DateStyle {
3611  #[inline]
3612  fn run_verifier(
3613    v: &mut flatbuffers::Verifier, pos: usize
3614  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
3615    use self::flatbuffers::Verifiable;
3616    i8::run_verifier(v, pos)
3617  }
3618}
3619
3620impl flatbuffers::SimpleToVerifyInSlice for DateStyle {}
3621#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
3622pub const ENUM_MIN_OGTYPE: i8 = 0;
3623#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
3624pub const ENUM_MAX_OGTYPE: i8 = 3;
3625#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
3626#[allow(non_camel_case_types)]
3627pub const ENUM_VALUES_OGTYPE: [OGType; 4] = [
3628  OGType::Website,
3629  OGType::Article,
3630  OGType::Product,
3631  OGType::Profile,
3632];
3633
3634#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
3635#[repr(transparent)]
3636pub struct OGType(pub i8);
3637#[allow(non_upper_case_globals)]
3638impl OGType {
3639  pub const Website: Self = Self(0);
3640  pub const Article: Self = Self(1);
3641  pub const Product: Self = Self(2);
3642  pub const Profile: Self = Self(3);
3643
3644  pub const ENUM_MIN: i8 = 0;
3645  pub const ENUM_MAX: i8 = 3;
3646  pub const ENUM_VALUES: &'static [Self] = &[
3647    Self::Website,
3648    Self::Article,
3649    Self::Product,
3650    Self::Profile,
3651  ];
3652  /// Returns the variant's name or "" if unknown.
3653  pub fn variant_name(self) -> Option<&'static str> {
3654    match self {
3655      Self::Website => Some("Website"),
3656      Self::Article => Some("Article"),
3657      Self::Product => Some("Product"),
3658      Self::Profile => Some("Profile"),
3659      _ => None,
3660    }
3661  }
3662}
3663impl core::fmt::Debug for OGType {
3664  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
3665    if let Some(name) = self.variant_name() {
3666      f.write_str(name)
3667    } else {
3668      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
3669    }
3670  }
3671}
3672impl<'a> flatbuffers::Follow<'a> for OGType {
3673  type Inner = Self;
3674  #[inline]
3675  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3676    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
3677    Self(b)
3678  }
3679}
3680
3681impl flatbuffers::Push for OGType {
3682    type Output = OGType;
3683    #[inline]
3684    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
3685        flatbuffers::emplace_scalar::<i8>(dst, self.0);
3686    }
3687}
3688
3689impl flatbuffers::EndianScalar for OGType {
3690  type Scalar = i8;
3691  #[inline]
3692  fn to_little_endian(self) -> i8 {
3693    self.0.to_le()
3694  }
3695  #[inline]
3696  #[allow(clippy::wrong_self_convention)]
3697  fn from_little_endian(v: i8) -> Self {
3698    let b = i8::from_le(v);
3699    Self(b)
3700  }
3701}
3702
3703impl<'a> flatbuffers::Verifiable for OGType {
3704  #[inline]
3705  fn run_verifier(
3706    v: &mut flatbuffers::Verifier, pos: usize
3707  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
3708    use self::flatbuffers::Verifiable;
3709    i8::run_verifier(v, pos)
3710  }
3711}
3712
3713impl flatbuffers::SimpleToVerifyInSlice for OGType {}
3714#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
3715pub const ENUM_MIN_TWITTER_CARD_TYPE: i8 = 0;
3716#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
3717pub const ENUM_MAX_TWITTER_CARD_TYPE: i8 = 3;
3718#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
3719#[allow(non_camel_case_types)]
3720pub const ENUM_VALUES_TWITTER_CARD_TYPE: [TwitterCardType; 4] = [
3721  TwitterCardType::Summary,
3722  TwitterCardType::SummaryLargeImage,
3723  TwitterCardType::App,
3724  TwitterCardType::Player,
3725];
3726
3727#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
3728#[repr(transparent)]
3729pub struct TwitterCardType(pub i8);
3730#[allow(non_upper_case_globals)]
3731impl TwitterCardType {
3732  pub const Summary: Self = Self(0);
3733  pub const SummaryLargeImage: Self = Self(1);
3734  pub const App: Self = Self(2);
3735  pub const Player: Self = Self(3);
3736
3737  pub const ENUM_MIN: i8 = 0;
3738  pub const ENUM_MAX: i8 = 3;
3739  pub const ENUM_VALUES: &'static [Self] = &[
3740    Self::Summary,
3741    Self::SummaryLargeImage,
3742    Self::App,
3743    Self::Player,
3744  ];
3745  /// Returns the variant's name or "" if unknown.
3746  pub fn variant_name(self) -> Option<&'static str> {
3747    match self {
3748      Self::Summary => Some("Summary"),
3749      Self::SummaryLargeImage => Some("SummaryLargeImage"),
3750      Self::App => Some("App"),
3751      Self::Player => Some("Player"),
3752      _ => None,
3753    }
3754  }
3755}
3756impl core::fmt::Debug for TwitterCardType {
3757  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
3758    if let Some(name) = self.variant_name() {
3759      f.write_str(name)
3760    } else {
3761      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
3762    }
3763  }
3764}
3765impl<'a> flatbuffers::Follow<'a> for TwitterCardType {
3766  type Inner = Self;
3767  #[inline]
3768  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3769    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
3770    Self(b)
3771  }
3772}
3773
3774impl flatbuffers::Push for TwitterCardType {
3775    type Output = TwitterCardType;
3776    #[inline]
3777    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
3778        flatbuffers::emplace_scalar::<i8>(dst, self.0);
3779    }
3780}
3781
3782impl flatbuffers::EndianScalar for TwitterCardType {
3783  type Scalar = i8;
3784  #[inline]
3785  fn to_little_endian(self) -> i8 {
3786    self.0.to_le()
3787  }
3788  #[inline]
3789  #[allow(clippy::wrong_self_convention)]
3790  fn from_little_endian(v: i8) -> Self {
3791    let b = i8::from_le(v);
3792    Self(b)
3793  }
3794}
3795
3796impl<'a> flatbuffers::Verifiable for TwitterCardType {
3797  #[inline]
3798  fn run_verifier(
3799    v: &mut flatbuffers::Verifier, pos: usize
3800  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
3801    use self::flatbuffers::Verifiable;
3802    i8::run_verifier(v, pos)
3803  }
3804}
3805
3806impl flatbuffers::SimpleToVerifyInSlice for TwitterCardType {}
3807#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
3808pub const ENUM_MIN_IMAGE_PREVIEW_SIZE: i8 = 0;
3809#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
3810pub const ENUM_MAX_IMAGE_PREVIEW_SIZE: i8 = 2;
3811#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
3812#[allow(non_camel_case_types)]
3813pub const ENUM_VALUES_IMAGE_PREVIEW_SIZE: [ImagePreviewSize; 3] = [
3814  ImagePreviewSize::None,
3815  ImagePreviewSize::Standard,
3816  ImagePreviewSize::Large,
3817];
3818
3819#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
3820#[repr(transparent)]
3821pub struct ImagePreviewSize(pub i8);
3822#[allow(non_upper_case_globals)]
3823impl ImagePreviewSize {
3824  pub const None: Self = Self(0);
3825  pub const Standard: Self = Self(1);
3826  pub const Large: Self = Self(2);
3827
3828  pub const ENUM_MIN: i8 = 0;
3829  pub const ENUM_MAX: i8 = 2;
3830  pub const ENUM_VALUES: &'static [Self] = &[
3831    Self::None,
3832    Self::Standard,
3833    Self::Large,
3834  ];
3835  /// Returns the variant's name or "" if unknown.
3836  pub fn variant_name(self) -> Option<&'static str> {
3837    match self {
3838      Self::None => Some("None"),
3839      Self::Standard => Some("Standard"),
3840      Self::Large => Some("Large"),
3841      _ => None,
3842    }
3843  }
3844}
3845impl core::fmt::Debug for ImagePreviewSize {
3846  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
3847    if let Some(name) = self.variant_name() {
3848      f.write_str(name)
3849    } else {
3850      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
3851    }
3852  }
3853}
3854impl<'a> flatbuffers::Follow<'a> for ImagePreviewSize {
3855  type Inner = Self;
3856  #[inline]
3857  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3858    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
3859    Self(b)
3860  }
3861}
3862
3863impl flatbuffers::Push for ImagePreviewSize {
3864    type Output = ImagePreviewSize;
3865    #[inline]
3866    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
3867        flatbuffers::emplace_scalar::<i8>(dst, self.0);
3868    }
3869}
3870
3871impl flatbuffers::EndianScalar for ImagePreviewSize {
3872  type Scalar = i8;
3873  #[inline]
3874  fn to_little_endian(self) -> i8 {
3875    self.0.to_le()
3876  }
3877  #[inline]
3878  #[allow(clippy::wrong_self_convention)]
3879  fn from_little_endian(v: i8) -> Self {
3880    let b = i8::from_le(v);
3881    Self(b)
3882  }
3883}
3884
3885impl<'a> flatbuffers::Verifiable for ImagePreviewSize {
3886  #[inline]
3887  fn run_verifier(
3888    v: &mut flatbuffers::Verifier, pos: usize
3889  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
3890    use self::flatbuffers::Verifiable;
3891    i8::run_verifier(v, pos)
3892  }
3893}
3894
3895impl flatbuffers::SimpleToVerifyInSlice for ImagePreviewSize {}
3896#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
3897pub const ENUM_MIN_FORM_FIELD_TYPE: i8 = 0;
3898#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
3899pub const ENUM_MAX_FORM_FIELD_TYPE: i8 = 18;
3900#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
3901#[allow(non_camel_case_types)]
3902pub const ENUM_VALUES_FORM_FIELD_TYPE: [FormFieldType; 19] = [
3903  FormFieldType::Text,
3904  FormFieldType::Email,
3905  FormFieldType::Password,
3906  FormFieldType::Number,
3907  FormFieldType::Tel,
3908  FormFieldType::Url,
3909  FormFieldType::Search,
3910  FormFieldType::Select,
3911  FormFieldType::MultiSelect,
3912  FormFieldType::Checkbox,
3913  FormFieldType::Radio,
3914  FormFieldType::Textarea,
3915  FormFieldType::File,
3916  FormFieldType::Date,
3917  FormFieldType::Time,
3918  FormFieldType::DateTimeLocal,
3919  FormFieldType::Hidden,
3920  FormFieldType::Color,
3921  FormFieldType::Range,
3922];
3923
3924#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
3925#[repr(transparent)]
3926pub struct FormFieldType(pub i8);
3927#[allow(non_upper_case_globals)]
3928impl FormFieldType {
3929  pub const Text: Self = Self(0);
3930  pub const Email: Self = Self(1);
3931  pub const Password: Self = Self(2);
3932  pub const Number: Self = Self(3);
3933  pub const Tel: Self = Self(4);
3934  pub const Url: Self = Self(5);
3935  pub const Search: Self = Self(6);
3936  pub const Select: Self = Self(7);
3937  pub const MultiSelect: Self = Self(8);
3938  pub const Checkbox: Self = Self(9);
3939  pub const Radio: Self = Self(10);
3940  pub const Textarea: Self = Self(11);
3941  pub const File: Self = Self(12);
3942  pub const Date: Self = Self(13);
3943  pub const Time: Self = Self(14);
3944  pub const DateTimeLocal: Self = Self(15);
3945  pub const Hidden: Self = Self(16);
3946  pub const Color: Self = Self(17);
3947  pub const Range: Self = Self(18);
3948
3949  pub const ENUM_MIN: i8 = 0;
3950  pub const ENUM_MAX: i8 = 18;
3951  pub const ENUM_VALUES: &'static [Self] = &[
3952    Self::Text,
3953    Self::Email,
3954    Self::Password,
3955    Self::Number,
3956    Self::Tel,
3957    Self::Url,
3958    Self::Search,
3959    Self::Select,
3960    Self::MultiSelect,
3961    Self::Checkbox,
3962    Self::Radio,
3963    Self::Textarea,
3964    Self::File,
3965    Self::Date,
3966    Self::Time,
3967    Self::DateTimeLocal,
3968    Self::Hidden,
3969    Self::Color,
3970    Self::Range,
3971  ];
3972  /// Returns the variant's name or "" if unknown.
3973  pub fn variant_name(self) -> Option<&'static str> {
3974    match self {
3975      Self::Text => Some("Text"),
3976      Self::Email => Some("Email"),
3977      Self::Password => Some("Password"),
3978      Self::Number => Some("Number"),
3979      Self::Tel => Some("Tel"),
3980      Self::Url => Some("Url"),
3981      Self::Search => Some("Search"),
3982      Self::Select => Some("Select"),
3983      Self::MultiSelect => Some("MultiSelect"),
3984      Self::Checkbox => Some("Checkbox"),
3985      Self::Radio => Some("Radio"),
3986      Self::Textarea => Some("Textarea"),
3987      Self::File => Some("File"),
3988      Self::Date => Some("Date"),
3989      Self::Time => Some("Time"),
3990      Self::DateTimeLocal => Some("DateTimeLocal"),
3991      Self::Hidden => Some("Hidden"),
3992      Self::Color => Some("Color"),
3993      Self::Range => Some("Range"),
3994      _ => None,
3995    }
3996  }
3997}
3998impl core::fmt::Debug for FormFieldType {
3999  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
4000    if let Some(name) = self.variant_name() {
4001      f.write_str(name)
4002    } else {
4003      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
4004    }
4005  }
4006}
4007impl<'a> flatbuffers::Follow<'a> for FormFieldType {
4008  type Inner = Self;
4009  #[inline]
4010  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4011    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
4012    Self(b)
4013  }
4014}
4015
4016impl flatbuffers::Push for FormFieldType {
4017    type Output = FormFieldType;
4018    #[inline]
4019    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
4020        flatbuffers::emplace_scalar::<i8>(dst, self.0);
4021    }
4022}
4023
4024impl flatbuffers::EndianScalar for FormFieldType {
4025  type Scalar = i8;
4026  #[inline]
4027  fn to_little_endian(self) -> i8 {
4028    self.0.to_le()
4029  }
4030  #[inline]
4031  #[allow(clippy::wrong_self_convention)]
4032  fn from_little_endian(v: i8) -> Self {
4033    let b = i8::from_le(v);
4034    Self(b)
4035  }
4036}
4037
4038impl<'a> flatbuffers::Verifiable for FormFieldType {
4039  #[inline]
4040  fn run_verifier(
4041    v: &mut flatbuffers::Verifier, pos: usize
4042  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4043    use self::flatbuffers::Verifiable;
4044    i8::run_verifier(v, pos)
4045  }
4046}
4047
4048impl flatbuffers::SimpleToVerifyInSlice for FormFieldType {}
4049#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
4050pub const ENUM_MIN_VALIDATION_MODE: i8 = 0;
4051#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
4052pub const ENUM_MAX_VALIDATION_MODE: i8 = 3;
4053#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
4054#[allow(non_camel_case_types)]
4055pub const ENUM_VALUES_VALIDATION_MODE: [ValidationMode; 4] = [
4056  ValidationMode::OnSubmit,
4057  ValidationMode::OnBlur,
4058  ValidationMode::OnChange,
4059  ValidationMode::OnBlurThenChange,
4060];
4061
4062#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
4063#[repr(transparent)]
4064pub struct ValidationMode(pub i8);
4065#[allow(non_upper_case_globals)]
4066impl ValidationMode {
4067  /// Validate all fields on submit only.
4068  pub const OnSubmit: Self = Self(0);
4069  /// Validate each field on blur.
4070  pub const OnBlur: Self = Self(1);
4071  /// Validate on every keystroke (use sparingly).
4072  pub const OnChange: Self = Self(2);
4073  /// Validate on blur, then on change after first error (best UX).
4074  pub const OnBlurThenChange: Self = Self(3);
4075
4076  pub const ENUM_MIN: i8 = 0;
4077  pub const ENUM_MAX: i8 = 3;
4078  pub const ENUM_VALUES: &'static [Self] = &[
4079    Self::OnSubmit,
4080    Self::OnBlur,
4081    Self::OnChange,
4082    Self::OnBlurThenChange,
4083  ];
4084  /// Returns the variant's name or "" if unknown.
4085  pub fn variant_name(self) -> Option<&'static str> {
4086    match self {
4087      Self::OnSubmit => Some("OnSubmit"),
4088      Self::OnBlur => Some("OnBlur"),
4089      Self::OnChange => Some("OnChange"),
4090      Self::OnBlurThenChange => Some("OnBlurThenChange"),
4091      _ => None,
4092    }
4093  }
4094}
4095impl core::fmt::Debug for ValidationMode {
4096  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
4097    if let Some(name) = self.variant_name() {
4098      f.write_str(name)
4099    } else {
4100      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
4101    }
4102  }
4103}
4104impl<'a> flatbuffers::Follow<'a> for ValidationMode {
4105  type Inner = Self;
4106  #[inline]
4107  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4108    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
4109    Self(b)
4110  }
4111}
4112
4113impl flatbuffers::Push for ValidationMode {
4114    type Output = ValidationMode;
4115    #[inline]
4116    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
4117        flatbuffers::emplace_scalar::<i8>(dst, self.0);
4118    }
4119}
4120
4121impl flatbuffers::EndianScalar for ValidationMode {
4122  type Scalar = i8;
4123  #[inline]
4124  fn to_little_endian(self) -> i8 {
4125    self.0.to_le()
4126  }
4127  #[inline]
4128  #[allow(clippy::wrong_self_convention)]
4129  fn from_little_endian(v: i8) -> Self {
4130    let b = i8::from_le(v);
4131    Self(b)
4132  }
4133}
4134
4135impl<'a> flatbuffers::Verifiable for ValidationMode {
4136  #[inline]
4137  fn run_verifier(
4138    v: &mut flatbuffers::Verifier, pos: usize
4139  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4140    use self::flatbuffers::Verifiable;
4141    i8::run_verifier(v, pos)
4142  }
4143}
4144
4145impl flatbuffers::SimpleToVerifyInSlice for ValidationMode {}
4146#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
4147pub const ENUM_MIN_FORM_ENCODING: i8 = 0;
4148#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
4149pub const ENUM_MAX_FORM_ENCODING: i8 = 2;
4150#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
4151#[allow(non_camel_case_types)]
4152pub const ENUM_VALUES_FORM_ENCODING: [FormEncoding; 3] = [
4153  FormEncoding::UrlEncoded,
4154  FormEncoding::Multipart,
4155  FormEncoding::Json,
4156];
4157
4158#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
4159#[repr(transparent)]
4160pub struct FormEncoding(pub i8);
4161#[allow(non_upper_case_globals)]
4162impl FormEncoding {
4163  pub const UrlEncoded: Self = Self(0);
4164  pub const Multipart: Self = Self(1);
4165  pub const Json: Self = Self(2);
4166
4167  pub const ENUM_MIN: i8 = 0;
4168  pub const ENUM_MAX: i8 = 2;
4169  pub const ENUM_VALUES: &'static [Self] = &[
4170    Self::UrlEncoded,
4171    Self::Multipart,
4172    Self::Json,
4173  ];
4174  /// Returns the variant's name or "" if unknown.
4175  pub fn variant_name(self) -> Option<&'static str> {
4176    match self {
4177      Self::UrlEncoded => Some("UrlEncoded"),
4178      Self::Multipart => Some("Multipart"),
4179      Self::Json => Some("Json"),
4180      _ => None,
4181    }
4182  }
4183}
4184impl core::fmt::Debug for FormEncoding {
4185  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
4186    if let Some(name) = self.variant_name() {
4187      f.write_str(name)
4188    } else {
4189      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
4190    }
4191  }
4192}
4193impl<'a> flatbuffers::Follow<'a> for FormEncoding {
4194  type Inner = Self;
4195  #[inline]
4196  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4197    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
4198    Self(b)
4199  }
4200}
4201
4202impl flatbuffers::Push for FormEncoding {
4203    type Output = FormEncoding;
4204    #[inline]
4205    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
4206        flatbuffers::emplace_scalar::<i8>(dst, self.0);
4207    }
4208}
4209
4210impl flatbuffers::EndianScalar for FormEncoding {
4211  type Scalar = i8;
4212  #[inline]
4213  fn to_little_endian(self) -> i8 {
4214    self.0.to_le()
4215  }
4216  #[inline]
4217  #[allow(clippy::wrong_self_convention)]
4218  fn from_little_endian(v: i8) -> Self {
4219    let b = i8::from_le(v);
4220    Self(b)
4221  }
4222}
4223
4224impl<'a> flatbuffers::Verifiable for FormEncoding {
4225  #[inline]
4226  fn run_verifier(
4227    v: &mut flatbuffers::Verifier, pos: usize
4228  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4229    use self::flatbuffers::Verifiable;
4230    i8::run_verifier(v, pos)
4231  }
4232}
4233
4234impl flatbuffers::SimpleToVerifyInSlice for FormEncoding {}
4235#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
4236pub const ENUM_MIN_AUTOCOMPLETE_HINT: i8 = 0;
4237#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
4238pub const ENUM_MAX_AUTOCOMPLETE_HINT: i8 = 17;
4239#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
4240#[allow(non_camel_case_types)]
4241pub const ENUM_VALUES_AUTOCOMPLETE_HINT: [AutocompleteHint; 18] = [
4242  AutocompleteHint::Off,
4243  AutocompleteHint::On,
4244  AutocompleteHint::Name,
4245  AutocompleteHint::GivenName,
4246  AutocompleteHint::FamilyName,
4247  AutocompleteHint::Email,
4248  AutocompleteHint::Username,
4249  AutocompleteHint::NewPassword,
4250  AutocompleteHint::CurrentPassword,
4251  AutocompleteHint::Tel,
4252  AutocompleteHint::StreetAddress,
4253  AutocompleteHint::City,
4254  AutocompleteHint::State,
4255  AutocompleteHint::PostalCode,
4256  AutocompleteHint::Country,
4257  AutocompleteHint::CreditCardNumber,
4258  AutocompleteHint::CreditCardExp,
4259  AutocompleteHint::CreditCardCsc,
4260];
4261
4262#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
4263#[repr(transparent)]
4264pub struct AutocompleteHint(pub i8);
4265#[allow(non_upper_case_globals)]
4266impl AutocompleteHint {
4267  pub const Off: Self = Self(0);
4268  pub const On: Self = Self(1);
4269  pub const Name: Self = Self(2);
4270  pub const GivenName: Self = Self(3);
4271  pub const FamilyName: Self = Self(4);
4272  pub const Email: Self = Self(5);
4273  pub const Username: Self = Self(6);
4274  pub const NewPassword: Self = Self(7);
4275  pub const CurrentPassword: Self = Self(8);
4276  pub const Tel: Self = Self(9);
4277  pub const StreetAddress: Self = Self(10);
4278  pub const City: Self = Self(11);
4279  pub const State: Self = Self(12);
4280  pub const PostalCode: Self = Self(13);
4281  pub const Country: Self = Self(14);
4282  pub const CreditCardNumber: Self = Self(15);
4283  pub const CreditCardExp: Self = Self(16);
4284  pub const CreditCardCsc: Self = Self(17);
4285
4286  pub const ENUM_MIN: i8 = 0;
4287  pub const ENUM_MAX: i8 = 17;
4288  pub const ENUM_VALUES: &'static [Self] = &[
4289    Self::Off,
4290    Self::On,
4291    Self::Name,
4292    Self::GivenName,
4293    Self::FamilyName,
4294    Self::Email,
4295    Self::Username,
4296    Self::NewPassword,
4297    Self::CurrentPassword,
4298    Self::Tel,
4299    Self::StreetAddress,
4300    Self::City,
4301    Self::State,
4302    Self::PostalCode,
4303    Self::Country,
4304    Self::CreditCardNumber,
4305    Self::CreditCardExp,
4306    Self::CreditCardCsc,
4307  ];
4308  /// Returns the variant's name or "" if unknown.
4309  pub fn variant_name(self) -> Option<&'static str> {
4310    match self {
4311      Self::Off => Some("Off"),
4312      Self::On => Some("On"),
4313      Self::Name => Some("Name"),
4314      Self::GivenName => Some("GivenName"),
4315      Self::FamilyName => Some("FamilyName"),
4316      Self::Email => Some("Email"),
4317      Self::Username => Some("Username"),
4318      Self::NewPassword => Some("NewPassword"),
4319      Self::CurrentPassword => Some("CurrentPassword"),
4320      Self::Tel => Some("Tel"),
4321      Self::StreetAddress => Some("StreetAddress"),
4322      Self::City => Some("City"),
4323      Self::State => Some("State"),
4324      Self::PostalCode => Some("PostalCode"),
4325      Self::Country => Some("Country"),
4326      Self::CreditCardNumber => Some("CreditCardNumber"),
4327      Self::CreditCardExp => Some("CreditCardExp"),
4328      Self::CreditCardCsc => Some("CreditCardCsc"),
4329      _ => None,
4330    }
4331  }
4332}
4333impl core::fmt::Debug for AutocompleteHint {
4334  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
4335    if let Some(name) = self.variant_name() {
4336      f.write_str(name)
4337    } else {
4338      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
4339    }
4340  }
4341}
4342impl<'a> flatbuffers::Follow<'a> for AutocompleteHint {
4343  type Inner = Self;
4344  #[inline]
4345  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4346    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
4347    Self(b)
4348  }
4349}
4350
4351impl flatbuffers::Push for AutocompleteHint {
4352    type Output = AutocompleteHint;
4353    #[inline]
4354    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
4355        flatbuffers::emplace_scalar::<i8>(dst, self.0);
4356    }
4357}
4358
4359impl flatbuffers::EndianScalar for AutocompleteHint {
4360  type Scalar = i8;
4361  #[inline]
4362  fn to_little_endian(self) -> i8 {
4363    self.0.to_le()
4364  }
4365  #[inline]
4366  #[allow(clippy::wrong_self_convention)]
4367  fn from_little_endian(v: i8) -> Self {
4368    let b = i8::from_le(v);
4369    Self(b)
4370  }
4371}
4372
4373impl<'a> flatbuffers::Verifiable for AutocompleteHint {
4374  #[inline]
4375  fn run_verifier(
4376    v: &mut flatbuffers::Verifier, pos: usize
4377  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4378    use self::flatbuffers::Verifiable;
4379    i8::run_verifier(v, pos)
4380  }
4381}
4382
4383impl flatbuffers::SimpleToVerifyInSlice for AutocompleteHint {}
4384#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
4385pub const ENUM_MIN_VALIDATION_TYPE: i8 = 0;
4386#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
4387pub const ENUM_MAX_VALIDATION_TYPE: i8 = 8;
4388#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
4389#[allow(non_camel_case_types)]
4390pub const ENUM_VALUES_VALIDATION_TYPE: [ValidationType; 9] = [
4391  ValidationType::Required,
4392  ValidationType::MinLength,
4393  ValidationType::MaxLength,
4394  ValidationType::Pattern,
4395  ValidationType::Min,
4396  ValidationType::Max,
4397  ValidationType::Email,
4398  ValidationType::Url,
4399  ValidationType::Custom,
4400];
4401
4402#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
4403#[repr(transparent)]
4404pub struct ValidationType(pub i8);
4405#[allow(non_upper_case_globals)]
4406impl ValidationType {
4407  pub const Required: Self = Self(0);
4408  pub const MinLength: Self = Self(1);
4409  pub const MaxLength: Self = Self(2);
4410  pub const Pattern: Self = Self(3);
4411  pub const Min: Self = Self(4);
4412  pub const Max: Self = Self(5);
4413  pub const Email: Self = Self(6);
4414  pub const Url: Self = Self(7);
4415  pub const Custom: Self = Self(8);
4416
4417  pub const ENUM_MIN: i8 = 0;
4418  pub const ENUM_MAX: i8 = 8;
4419  pub const ENUM_VALUES: &'static [Self] = &[
4420    Self::Required,
4421    Self::MinLength,
4422    Self::MaxLength,
4423    Self::Pattern,
4424    Self::Min,
4425    Self::Max,
4426    Self::Email,
4427    Self::Url,
4428    Self::Custom,
4429  ];
4430  /// Returns the variant's name or "" if unknown.
4431  pub fn variant_name(self) -> Option<&'static str> {
4432    match self {
4433      Self::Required => Some("Required"),
4434      Self::MinLength => Some("MinLength"),
4435      Self::MaxLength => Some("MaxLength"),
4436      Self::Pattern => Some("Pattern"),
4437      Self::Min => Some("Min"),
4438      Self::Max => Some("Max"),
4439      Self::Email => Some("Email"),
4440      Self::Url => Some("Url"),
4441      Self::Custom => Some("Custom"),
4442      _ => None,
4443    }
4444  }
4445}
4446impl core::fmt::Debug for ValidationType {
4447  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
4448    if let Some(name) = self.variant_name() {
4449      f.write_str(name)
4450    } else {
4451      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
4452    }
4453  }
4454}
4455impl<'a> flatbuffers::Follow<'a> for ValidationType {
4456  type Inner = Self;
4457  #[inline]
4458  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4459    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
4460    Self(b)
4461  }
4462}
4463
4464impl flatbuffers::Push for ValidationType {
4465    type Output = ValidationType;
4466    #[inline]
4467    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
4468        flatbuffers::emplace_scalar::<i8>(dst, self.0);
4469    }
4470}
4471
4472impl flatbuffers::EndianScalar for ValidationType {
4473  type Scalar = i8;
4474  #[inline]
4475  fn to_little_endian(self) -> i8 {
4476    self.0.to_le()
4477  }
4478  #[inline]
4479  #[allow(clippy::wrong_self_convention)]
4480  fn from_little_endian(v: i8) -> Self {
4481    let b = i8::from_le(v);
4482    Self(b)
4483  }
4484}
4485
4486impl<'a> flatbuffers::Verifiable for ValidationType {
4487  #[inline]
4488  fn run_verifier(
4489    v: &mut flatbuffers::Verifier, pos: usize
4490  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4491    use self::flatbuffers::Verifiable;
4492    i8::run_verifier(v, pos)
4493  }
4494}
4495
4496impl flatbuffers::SimpleToVerifyInSlice for ValidationType {}
4497#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
4498pub const ENUM_MIN_CONTAINER_LAYOUT: i8 = 0;
4499#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
4500pub const ENUM_MAX_CONTAINER_LAYOUT: i8 = 3;
4501#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
4502#[allow(non_camel_case_types)]
4503pub const ENUM_VALUES_CONTAINER_LAYOUT: [ContainerLayout; 4] = [
4504  ContainerLayout::Stack,
4505  ContainerLayout::Flex,
4506  ContainerLayout::Grid,
4507  ContainerLayout::Absolute,
4508];
4509
4510#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
4511#[repr(transparent)]
4512pub struct ContainerLayout(pub i8);
4513#[allow(non_upper_case_globals)]
4514impl ContainerLayout {
4515  pub const Stack: Self = Self(0);
4516  pub const Flex: Self = Self(1);
4517  pub const Grid: Self = Self(2);
4518  pub const Absolute: Self = Self(3);
4519
4520  pub const ENUM_MIN: i8 = 0;
4521  pub const ENUM_MAX: i8 = 3;
4522  pub const ENUM_VALUES: &'static [Self] = &[
4523    Self::Stack,
4524    Self::Flex,
4525    Self::Grid,
4526    Self::Absolute,
4527  ];
4528  /// Returns the variant's name or "" if unknown.
4529  pub fn variant_name(self) -> Option<&'static str> {
4530    match self {
4531      Self::Stack => Some("Stack"),
4532      Self::Flex => Some("Flex"),
4533      Self::Grid => Some("Grid"),
4534      Self::Absolute => Some("Absolute"),
4535      _ => None,
4536    }
4537  }
4538}
4539impl core::fmt::Debug for ContainerLayout {
4540  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
4541    if let Some(name) = self.variant_name() {
4542      f.write_str(name)
4543    } else {
4544      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
4545    }
4546  }
4547}
4548impl<'a> flatbuffers::Follow<'a> for ContainerLayout {
4549  type Inner = Self;
4550  #[inline]
4551  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4552    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
4553    Self(b)
4554  }
4555}
4556
4557impl flatbuffers::Push for ContainerLayout {
4558    type Output = ContainerLayout;
4559    #[inline]
4560    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
4561        flatbuffers::emplace_scalar::<i8>(dst, self.0);
4562    }
4563}
4564
4565impl flatbuffers::EndianScalar for ContainerLayout {
4566  type Scalar = i8;
4567  #[inline]
4568  fn to_little_endian(self) -> i8 {
4569    self.0.to_le()
4570  }
4571  #[inline]
4572  #[allow(clippy::wrong_self_convention)]
4573  fn from_little_endian(v: i8) -> Self {
4574    let b = i8::from_le(v);
4575    Self(b)
4576  }
4577}
4578
4579impl<'a> flatbuffers::Verifiable for ContainerLayout {
4580  #[inline]
4581  fn run_verifier(
4582    v: &mut flatbuffers::Verifier, pos: usize
4583  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4584    use self::flatbuffers::Verifiable;
4585    i8::run_verifier(v, pos)
4586  }
4587}
4588
4589impl flatbuffers::SimpleToVerifyInSlice for ContainerLayout {}
4590#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
4591pub const ENUM_MIN_FONT_WEIGHT: i16 = 100;
4592#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
4593pub const ENUM_MAX_FONT_WEIGHT: i16 = 900;
4594#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
4595#[allow(non_camel_case_types)]
4596pub const ENUM_VALUES_FONT_WEIGHT: [FontWeight; 9] = [
4597  FontWeight::Thin,
4598  FontWeight::ExtraLight,
4599  FontWeight::Light,
4600  FontWeight::Regular,
4601  FontWeight::Medium,
4602  FontWeight::SemiBold,
4603  FontWeight::Bold,
4604  FontWeight::ExtraBold,
4605  FontWeight::Black,
4606];
4607
4608#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
4609#[repr(transparent)]
4610pub struct FontWeight(pub i16);
4611#[allow(non_upper_case_globals)]
4612impl FontWeight {
4613  pub const Thin: Self = Self(100);
4614  pub const ExtraLight: Self = Self(200);
4615  pub const Light: Self = Self(300);
4616  pub const Regular: Self = Self(400);
4617  pub const Medium: Self = Self(500);
4618  pub const SemiBold: Self = Self(600);
4619  pub const Bold: Self = Self(700);
4620  pub const ExtraBold: Self = Self(800);
4621  pub const Black: Self = Self(900);
4622
4623  pub const ENUM_MIN: i16 = 100;
4624  pub const ENUM_MAX: i16 = 900;
4625  pub const ENUM_VALUES: &'static [Self] = &[
4626    Self::Thin,
4627    Self::ExtraLight,
4628    Self::Light,
4629    Self::Regular,
4630    Self::Medium,
4631    Self::SemiBold,
4632    Self::Bold,
4633    Self::ExtraBold,
4634    Self::Black,
4635  ];
4636  /// Returns the variant's name or "" if unknown.
4637  pub fn variant_name(self) -> Option<&'static str> {
4638    match self {
4639      Self::Thin => Some("Thin"),
4640      Self::ExtraLight => Some("ExtraLight"),
4641      Self::Light => Some("Light"),
4642      Self::Regular => Some("Regular"),
4643      Self::Medium => Some("Medium"),
4644      Self::SemiBold => Some("SemiBold"),
4645      Self::Bold => Some("Bold"),
4646      Self::ExtraBold => Some("ExtraBold"),
4647      Self::Black => Some("Black"),
4648      _ => None,
4649    }
4650  }
4651}
4652impl core::fmt::Debug for FontWeight {
4653  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
4654    if let Some(name) = self.variant_name() {
4655      f.write_str(name)
4656    } else {
4657      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
4658    }
4659  }
4660}
4661impl<'a> flatbuffers::Follow<'a> for FontWeight {
4662  type Inner = Self;
4663  #[inline]
4664  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4665    let b = flatbuffers::read_scalar_at::<i16>(buf, loc);
4666    Self(b)
4667  }
4668}
4669
4670impl flatbuffers::Push for FontWeight {
4671    type Output = FontWeight;
4672    #[inline]
4673    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
4674        flatbuffers::emplace_scalar::<i16>(dst, self.0);
4675    }
4676}
4677
4678impl flatbuffers::EndianScalar for FontWeight {
4679  type Scalar = i16;
4680  #[inline]
4681  fn to_little_endian(self) -> i16 {
4682    self.0.to_le()
4683  }
4684  #[inline]
4685  #[allow(clippy::wrong_self_convention)]
4686  fn from_little_endian(v: i16) -> Self {
4687    let b = i16::from_le(v);
4688    Self(b)
4689  }
4690}
4691
4692impl<'a> flatbuffers::Verifiable for FontWeight {
4693  #[inline]
4694  fn run_verifier(
4695    v: &mut flatbuffers::Verifier, pos: usize
4696  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4697    use self::flatbuffers::Verifiable;
4698    i16::run_verifier(v, pos)
4699  }
4700}
4701
4702impl flatbuffers::SimpleToVerifyInSlice for FontWeight {}
4703#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
4704pub const ENUM_MIN_TEXT_ALIGN: i8 = 0;
4705#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
4706pub const ENUM_MAX_TEXT_ALIGN: i8 = 3;
4707#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
4708#[allow(non_camel_case_types)]
4709pub const ENUM_VALUES_TEXT_ALIGN: [TextAlign; 4] = [
4710  TextAlign::Start,
4711  TextAlign::Center,
4712  TextAlign::End,
4713  TextAlign::Justify,
4714];
4715
4716#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
4717#[repr(transparent)]
4718pub struct TextAlign(pub i8);
4719#[allow(non_upper_case_globals)]
4720impl TextAlign {
4721  pub const Start: Self = Self(0);
4722  pub const Center: Self = Self(1);
4723  pub const End: Self = Self(2);
4724  pub const Justify: Self = Self(3);
4725
4726  pub const ENUM_MIN: i8 = 0;
4727  pub const ENUM_MAX: i8 = 3;
4728  pub const ENUM_VALUES: &'static [Self] = &[
4729    Self::Start,
4730    Self::Center,
4731    Self::End,
4732    Self::Justify,
4733  ];
4734  /// Returns the variant's name or "" if unknown.
4735  pub fn variant_name(self) -> Option<&'static str> {
4736    match self {
4737      Self::Start => Some("Start"),
4738      Self::Center => Some("Center"),
4739      Self::End => Some("End"),
4740      Self::Justify => Some("Justify"),
4741      _ => None,
4742    }
4743  }
4744}
4745impl core::fmt::Debug for TextAlign {
4746  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
4747    if let Some(name) = self.variant_name() {
4748      f.write_str(name)
4749    } else {
4750      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
4751    }
4752  }
4753}
4754impl<'a> flatbuffers::Follow<'a> for TextAlign {
4755  type Inner = Self;
4756  #[inline]
4757  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4758    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
4759    Self(b)
4760  }
4761}
4762
4763impl flatbuffers::Push for TextAlign {
4764    type Output = TextAlign;
4765    #[inline]
4766    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
4767        flatbuffers::emplace_scalar::<i8>(dst, self.0);
4768    }
4769}
4770
4771impl flatbuffers::EndianScalar for TextAlign {
4772  type Scalar = i8;
4773  #[inline]
4774  fn to_little_endian(self) -> i8 {
4775    self.0.to_le()
4776  }
4777  #[inline]
4778  #[allow(clippy::wrong_self_convention)]
4779  fn from_little_endian(v: i8) -> Self {
4780    let b = i8::from_le(v);
4781    Self(b)
4782  }
4783}
4784
4785impl<'a> flatbuffers::Verifiable for TextAlign {
4786  #[inline]
4787  fn run_verifier(
4788    v: &mut flatbuffers::Verifier, pos: usize
4789  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4790    use self::flatbuffers::Verifiable;
4791    i8::run_verifier(v, pos)
4792  }
4793}
4794
4795impl flatbuffers::SimpleToVerifyInSlice for TextAlign {}
4796#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
4797pub const ENUM_MIN_TEXT_OVERFLOW: i8 = 0;
4798#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
4799pub const ENUM_MAX_TEXT_OVERFLOW: i8 = 2;
4800#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
4801#[allow(non_camel_case_types)]
4802pub const ENUM_VALUES_TEXT_OVERFLOW: [TextOverflow; 3] = [
4803  TextOverflow::Clip,
4804  TextOverflow::Ellipsis,
4805  TextOverflow::Fade,
4806];
4807
4808#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
4809#[repr(transparent)]
4810pub struct TextOverflow(pub i8);
4811#[allow(non_upper_case_globals)]
4812impl TextOverflow {
4813  pub const Clip: Self = Self(0);
4814  pub const Ellipsis: Self = Self(1);
4815  pub const Fade: Self = Self(2);
4816
4817  pub const ENUM_MIN: i8 = 0;
4818  pub const ENUM_MAX: i8 = 2;
4819  pub const ENUM_VALUES: &'static [Self] = &[
4820    Self::Clip,
4821    Self::Ellipsis,
4822    Self::Fade,
4823  ];
4824  /// Returns the variant's name or "" if unknown.
4825  pub fn variant_name(self) -> Option<&'static str> {
4826    match self {
4827      Self::Clip => Some("Clip"),
4828      Self::Ellipsis => Some("Ellipsis"),
4829      Self::Fade => Some("Fade"),
4830      _ => None,
4831    }
4832  }
4833}
4834impl core::fmt::Debug for TextOverflow {
4835  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
4836    if let Some(name) = self.variant_name() {
4837      f.write_str(name)
4838    } else {
4839      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
4840    }
4841  }
4842}
4843impl<'a> flatbuffers::Follow<'a> for TextOverflow {
4844  type Inner = Self;
4845  #[inline]
4846  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4847    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
4848    Self(b)
4849  }
4850}
4851
4852impl flatbuffers::Push for TextOverflow {
4853    type Output = TextOverflow;
4854    #[inline]
4855    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
4856        flatbuffers::emplace_scalar::<i8>(dst, self.0);
4857    }
4858}
4859
4860impl flatbuffers::EndianScalar for TextOverflow {
4861  type Scalar = i8;
4862  #[inline]
4863  fn to_little_endian(self) -> i8 {
4864    self.0.to_le()
4865  }
4866  #[inline]
4867  #[allow(clippy::wrong_self_convention)]
4868  fn from_little_endian(v: i8) -> Self {
4869    let b = i8::from_le(v);
4870    Self(b)
4871  }
4872}
4873
4874impl<'a> flatbuffers::Verifiable for TextOverflow {
4875  #[inline]
4876  fn run_verifier(
4877    v: &mut flatbuffers::Verifier, pos: usize
4878  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4879    use self::flatbuffers::Verifiable;
4880    i8::run_verifier(v, pos)
4881  }
4882}
4883
4884impl flatbuffers::SimpleToVerifyInSlice for TextOverflow {}
4885#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
4886pub const ENUM_MIN_TEXT_DECORATION: i8 = 0;
4887#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
4888pub const ENUM_MAX_TEXT_DECORATION: i8 = 2;
4889#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
4890#[allow(non_camel_case_types)]
4891pub const ENUM_VALUES_TEXT_DECORATION: [TextDecoration; 3] = [
4892  TextDecoration::None,
4893  TextDecoration::Underline,
4894  TextDecoration::LineThrough,
4895];
4896
4897#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
4898#[repr(transparent)]
4899pub struct TextDecoration(pub i8);
4900#[allow(non_upper_case_globals)]
4901impl TextDecoration {
4902  pub const None: Self = Self(0);
4903  pub const Underline: Self = Self(1);
4904  pub const LineThrough: Self = Self(2);
4905
4906  pub const ENUM_MIN: i8 = 0;
4907  pub const ENUM_MAX: i8 = 2;
4908  pub const ENUM_VALUES: &'static [Self] = &[
4909    Self::None,
4910    Self::Underline,
4911    Self::LineThrough,
4912  ];
4913  /// Returns the variant's name or "" if unknown.
4914  pub fn variant_name(self) -> Option<&'static str> {
4915    match self {
4916      Self::None => Some("None"),
4917      Self::Underline => Some("Underline"),
4918      Self::LineThrough => Some("LineThrough"),
4919      _ => None,
4920    }
4921  }
4922}
4923impl core::fmt::Debug for TextDecoration {
4924  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
4925    if let Some(name) = self.variant_name() {
4926      f.write_str(name)
4927    } else {
4928      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
4929    }
4930  }
4931}
4932impl<'a> flatbuffers::Follow<'a> for TextDecoration {
4933  type Inner = Self;
4934  #[inline]
4935  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4936    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
4937    Self(b)
4938  }
4939}
4940
4941impl flatbuffers::Push for TextDecoration {
4942    type Output = TextDecoration;
4943    #[inline]
4944    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
4945        flatbuffers::emplace_scalar::<i8>(dst, self.0);
4946    }
4947}
4948
4949impl flatbuffers::EndianScalar for TextDecoration {
4950  type Scalar = i8;
4951  #[inline]
4952  fn to_little_endian(self) -> i8 {
4953    self.0.to_le()
4954  }
4955  #[inline]
4956  #[allow(clippy::wrong_self_convention)]
4957  fn from_little_endian(v: i8) -> Self {
4958    let b = i8::from_le(v);
4959    Self(b)
4960  }
4961}
4962
4963impl<'a> flatbuffers::Verifiable for TextDecoration {
4964  #[inline]
4965  fn run_verifier(
4966    v: &mut flatbuffers::Verifier, pos: usize
4967  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4968    use self::flatbuffers::Verifiable;
4969    i8::run_verifier(v, pos)
4970  }
4971}
4972
4973impl flatbuffers::SimpleToVerifyInSlice for TextDecoration {}
4974#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
4975pub const ENUM_MIN_MEDIA_TYPE: i8 = 0;
4976#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
4977pub const ENUM_MAX_MEDIA_TYPE: i8 = 3;
4978#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
4979#[allow(non_camel_case_types)]
4980pub const ENUM_VALUES_MEDIA_TYPE: [MediaType; 4] = [
4981  MediaType::Image,
4982  MediaType::Video,
4983  MediaType::Audio,
4984  MediaType::Svg,
4985];
4986
4987#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
4988#[repr(transparent)]
4989pub struct MediaType(pub i8);
4990#[allow(non_upper_case_globals)]
4991impl MediaType {
4992  pub const Image: Self = Self(0);
4993  pub const Video: Self = Self(1);
4994  pub const Audio: Self = Self(2);
4995  pub const Svg: Self = Self(3);
4996
4997  pub const ENUM_MIN: i8 = 0;
4998  pub const ENUM_MAX: i8 = 3;
4999  pub const ENUM_VALUES: &'static [Self] = &[
5000    Self::Image,
5001    Self::Video,
5002    Self::Audio,
5003    Self::Svg,
5004  ];
5005  /// Returns the variant's name or "" if unknown.
5006  pub fn variant_name(self) -> Option<&'static str> {
5007    match self {
5008      Self::Image => Some("Image"),
5009      Self::Video => Some("Video"),
5010      Self::Audio => Some("Audio"),
5011      Self::Svg => Some("Svg"),
5012      _ => None,
5013    }
5014  }
5015}
5016impl core::fmt::Debug for MediaType {
5017  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
5018    if let Some(name) = self.variant_name() {
5019      f.write_str(name)
5020    } else {
5021      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
5022    }
5023  }
5024}
5025impl<'a> flatbuffers::Follow<'a> for MediaType {
5026  type Inner = Self;
5027  #[inline]
5028  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5029    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
5030    Self(b)
5031  }
5032}
5033
5034impl flatbuffers::Push for MediaType {
5035    type Output = MediaType;
5036    #[inline]
5037    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
5038        flatbuffers::emplace_scalar::<i8>(dst, self.0);
5039    }
5040}
5041
5042impl flatbuffers::EndianScalar for MediaType {
5043  type Scalar = i8;
5044  #[inline]
5045  fn to_little_endian(self) -> i8 {
5046    self.0.to_le()
5047  }
5048  #[inline]
5049  #[allow(clippy::wrong_self_convention)]
5050  fn from_little_endian(v: i8) -> Self {
5051    let b = i8::from_le(v);
5052    Self(b)
5053  }
5054}
5055
5056impl<'a> flatbuffers::Verifiable for MediaType {
5057  #[inline]
5058  fn run_verifier(
5059    v: &mut flatbuffers::Verifier, pos: usize
5060  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
5061    use self::flatbuffers::Verifiable;
5062    i8::run_verifier(v, pos)
5063  }
5064}
5065
5066impl flatbuffers::SimpleToVerifyInSlice for MediaType {}
5067#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
5068pub const ENUM_MIN_LOADING_STRATEGY: i8 = 0;
5069#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
5070pub const ENUM_MAX_LOADING_STRATEGY: i8 = 1;
5071#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
5072#[allow(non_camel_case_types)]
5073pub const ENUM_VALUES_LOADING_STRATEGY: [LoadingStrategy; 2] = [
5074  LoadingStrategy::Eager,
5075  LoadingStrategy::Lazy,
5076];
5077
5078#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
5079#[repr(transparent)]
5080pub struct LoadingStrategy(pub i8);
5081#[allow(non_upper_case_globals)]
5082impl LoadingStrategy {
5083  pub const Eager: Self = Self(0);
5084  pub const Lazy: Self = Self(1);
5085
5086  pub const ENUM_MIN: i8 = 0;
5087  pub const ENUM_MAX: i8 = 1;
5088  pub const ENUM_VALUES: &'static [Self] = &[
5089    Self::Eager,
5090    Self::Lazy,
5091  ];
5092  /// Returns the variant's name or "" if unknown.
5093  pub fn variant_name(self) -> Option<&'static str> {
5094    match self {
5095      Self::Eager => Some("Eager"),
5096      Self::Lazy => Some("Lazy"),
5097      _ => None,
5098    }
5099  }
5100}
5101impl core::fmt::Debug for LoadingStrategy {
5102  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
5103    if let Some(name) = self.variant_name() {
5104      f.write_str(name)
5105    } else {
5106      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
5107    }
5108  }
5109}
5110impl<'a> flatbuffers::Follow<'a> for LoadingStrategy {
5111  type Inner = Self;
5112  #[inline]
5113  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5114    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
5115    Self(b)
5116  }
5117}
5118
5119impl flatbuffers::Push for LoadingStrategy {
5120    type Output = LoadingStrategy;
5121    #[inline]
5122    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
5123        flatbuffers::emplace_scalar::<i8>(dst, self.0);
5124    }
5125}
5126
5127impl flatbuffers::EndianScalar for LoadingStrategy {
5128  type Scalar = i8;
5129  #[inline]
5130  fn to_little_endian(self) -> i8 {
5131    self.0.to_le()
5132  }
5133  #[inline]
5134  #[allow(clippy::wrong_self_convention)]
5135  fn from_little_endian(v: i8) -> Self {
5136    let b = i8::from_le(v);
5137    Self(b)
5138  }
5139}
5140
5141impl<'a> flatbuffers::Verifiable for LoadingStrategy {
5142  #[inline]
5143  fn run_verifier(
5144    v: &mut flatbuffers::Verifier, pos: usize
5145  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
5146    use self::flatbuffers::Verifiable;
5147    i8::run_verifier(v, pos)
5148  }
5149}
5150
5151impl flatbuffers::SimpleToVerifyInSlice for LoadingStrategy {}
5152#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
5153pub const ENUM_MIN_OBJECT_FIT: i8 = 0;
5154#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
5155pub const ENUM_MAX_OBJECT_FIT: i8 = 4;
5156#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
5157#[allow(non_camel_case_types)]
5158pub const ENUM_VALUES_OBJECT_FIT: [ObjectFit; 5] = [
5159  ObjectFit::Cover,
5160  ObjectFit::Contain,
5161  ObjectFit::Fill,
5162  ObjectFit::ScaleDown,
5163  ObjectFit::None,
5164];
5165
5166#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
5167#[repr(transparent)]
5168pub struct ObjectFit(pub i8);
5169#[allow(non_upper_case_globals)]
5170impl ObjectFit {
5171  pub const Cover: Self = Self(0);
5172  pub const Contain: Self = Self(1);
5173  pub const Fill: Self = Self(2);
5174  pub const ScaleDown: Self = Self(3);
5175  pub const None: Self = Self(4);
5176
5177  pub const ENUM_MIN: i8 = 0;
5178  pub const ENUM_MAX: i8 = 4;
5179  pub const ENUM_VALUES: &'static [Self] = &[
5180    Self::Cover,
5181    Self::Contain,
5182    Self::Fill,
5183    Self::ScaleDown,
5184    Self::None,
5185  ];
5186  /// Returns the variant's name or "" if unknown.
5187  pub fn variant_name(self) -> Option<&'static str> {
5188    match self {
5189      Self::Cover => Some("Cover"),
5190      Self::Contain => Some("Contain"),
5191      Self::Fill => Some("Fill"),
5192      Self::ScaleDown => Some("ScaleDown"),
5193      Self::None => Some("None"),
5194      _ => None,
5195    }
5196  }
5197}
5198impl core::fmt::Debug for ObjectFit {
5199  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
5200    if let Some(name) = self.variant_name() {
5201      f.write_str(name)
5202    } else {
5203      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
5204    }
5205  }
5206}
5207impl<'a> flatbuffers::Follow<'a> for ObjectFit {
5208  type Inner = Self;
5209  #[inline]
5210  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5211    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
5212    Self(b)
5213  }
5214}
5215
5216impl flatbuffers::Push for ObjectFit {
5217    type Output = ObjectFit;
5218    #[inline]
5219    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
5220        flatbuffers::emplace_scalar::<i8>(dst, self.0);
5221    }
5222}
5223
5224impl flatbuffers::EndianScalar for ObjectFit {
5225  type Scalar = i8;
5226  #[inline]
5227  fn to_little_endian(self) -> i8 {
5228    self.0.to_le()
5229  }
5230  #[inline]
5231  #[allow(clippy::wrong_self_convention)]
5232  fn from_little_endian(v: i8) -> Self {
5233    let b = i8::from_le(v);
5234    Self(b)
5235  }
5236}
5237
5238impl<'a> flatbuffers::Verifiable for ObjectFit {
5239  #[inline]
5240  fn run_verifier(
5241    v: &mut flatbuffers::Verifier, pos: usize
5242  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
5243    use self::flatbuffers::Verifiable;
5244    i8::run_verifier(v, pos)
5245  }
5246}
5247
5248impl flatbuffers::SimpleToVerifyInSlice for ObjectFit {}
5249#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
5250pub const ENUM_MIN_CHILD_UNION: u8 = 0;
5251#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
5252pub const ENUM_MAX_CHILD_UNION: u8 = 27;
5253#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
5254#[allow(non_camel_case_types)]
5255pub const ENUM_VALUES_CHILD_UNION: [ChildUnion; 28] = [
5256  ChildUnion::NONE,
5257  ChildUnion::Container,
5258  ChildUnion::Surface,
5259  ChildUnion::TextNode,
5260  ChildUnion::MediaNode,
5261  ChildUnion::StateMachine,
5262  ChildUnion::DataNode,
5263  ChildUnion::ComputeNode,
5264  ChildUnion::EffectNode,
5265  ChildUnion::ContextNode,
5266  ChildUnion::AnimationTransition,
5267  ChildUnion::Sequence,
5268  ChildUnion::GestureHandler,
5269  ChildUnion::ScrollBinding,
5270  ChildUnion::PhysicsBody,
5271  ChildUnion::RouteMap,
5272  ChildUnion::SemanticNode,
5273  ChildUnion::LiveRegion,
5274  ChildUnion::FocusTrap,
5275  ChildUnion::ThemeNode,
5276  ChildUnion::PersonalizationSlot,
5277  ChildUnion::ResponsiveRule,
5278  ChildUnion::ActionNode,
5279  ChildUnion::SubscriptionNode,
5280  ChildUnion::AuthContextNode,
5281  ChildUnion::ContentSlot,
5282  ChildUnion::RichTextNode,
5283  ChildUnion::FormNode,
5284];
5285
5286#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
5287#[repr(transparent)]
5288pub struct ChildUnion(pub u8);
5289#[allow(non_upper_case_globals)]
5290impl ChildUnion {
5291  pub const NONE: Self = Self(0);
5292  pub const Container: Self = Self(1);
5293  pub const Surface: Self = Self(2);
5294  pub const TextNode: Self = Self(3);
5295  pub const MediaNode: Self = Self(4);
5296  pub const StateMachine: Self = Self(5);
5297  pub const DataNode: Self = Self(6);
5298  pub const ComputeNode: Self = Self(7);
5299  pub const EffectNode: Self = Self(8);
5300  pub const ContextNode: Self = Self(9);
5301  pub const AnimationTransition: Self = Self(10);
5302  pub const Sequence: Self = Self(11);
5303  pub const GestureHandler: Self = Self(12);
5304  pub const ScrollBinding: Self = Self(13);
5305  pub const PhysicsBody: Self = Self(14);
5306  pub const RouteMap: Self = Self(15);
5307  pub const SemanticNode: Self = Self(16);
5308  pub const LiveRegion: Self = Self(17);
5309  pub const FocusTrap: Self = Self(18);
5310  pub const ThemeNode: Self = Self(19);
5311  pub const PersonalizationSlot: Self = Self(20);
5312  pub const ResponsiveRule: Self = Self(21);
5313  pub const ActionNode: Self = Self(22);
5314  pub const SubscriptionNode: Self = Self(23);
5315  pub const AuthContextNode: Self = Self(24);
5316  pub const ContentSlot: Self = Self(25);
5317  pub const RichTextNode: Self = Self(26);
5318  pub const FormNode: Self = Self(27);
5319
5320  pub const ENUM_MIN: u8 = 0;
5321  pub const ENUM_MAX: u8 = 27;
5322  pub const ENUM_VALUES: &'static [Self] = &[
5323    Self::NONE,
5324    Self::Container,
5325    Self::Surface,
5326    Self::TextNode,
5327    Self::MediaNode,
5328    Self::StateMachine,
5329    Self::DataNode,
5330    Self::ComputeNode,
5331    Self::EffectNode,
5332    Self::ContextNode,
5333    Self::AnimationTransition,
5334    Self::Sequence,
5335    Self::GestureHandler,
5336    Self::ScrollBinding,
5337    Self::PhysicsBody,
5338    Self::RouteMap,
5339    Self::SemanticNode,
5340    Self::LiveRegion,
5341    Self::FocusTrap,
5342    Self::ThemeNode,
5343    Self::PersonalizationSlot,
5344    Self::ResponsiveRule,
5345    Self::ActionNode,
5346    Self::SubscriptionNode,
5347    Self::AuthContextNode,
5348    Self::ContentSlot,
5349    Self::RichTextNode,
5350    Self::FormNode,
5351  ];
5352  /// Returns the variant's name or "" if unknown.
5353  pub fn variant_name(self) -> Option<&'static str> {
5354    match self {
5355      Self::NONE => Some("NONE"),
5356      Self::Container => Some("Container"),
5357      Self::Surface => Some("Surface"),
5358      Self::TextNode => Some("TextNode"),
5359      Self::MediaNode => Some("MediaNode"),
5360      Self::StateMachine => Some("StateMachine"),
5361      Self::DataNode => Some("DataNode"),
5362      Self::ComputeNode => Some("ComputeNode"),
5363      Self::EffectNode => Some("EffectNode"),
5364      Self::ContextNode => Some("ContextNode"),
5365      Self::AnimationTransition => Some("AnimationTransition"),
5366      Self::Sequence => Some("Sequence"),
5367      Self::GestureHandler => Some("GestureHandler"),
5368      Self::ScrollBinding => Some("ScrollBinding"),
5369      Self::PhysicsBody => Some("PhysicsBody"),
5370      Self::RouteMap => Some("RouteMap"),
5371      Self::SemanticNode => Some("SemanticNode"),
5372      Self::LiveRegion => Some("LiveRegion"),
5373      Self::FocusTrap => Some("FocusTrap"),
5374      Self::ThemeNode => Some("ThemeNode"),
5375      Self::PersonalizationSlot => Some("PersonalizationSlot"),
5376      Self::ResponsiveRule => Some("ResponsiveRule"),
5377      Self::ActionNode => Some("ActionNode"),
5378      Self::SubscriptionNode => Some("SubscriptionNode"),
5379      Self::AuthContextNode => Some("AuthContextNode"),
5380      Self::ContentSlot => Some("ContentSlot"),
5381      Self::RichTextNode => Some("RichTextNode"),
5382      Self::FormNode => Some("FormNode"),
5383      _ => None,
5384    }
5385  }
5386}
5387impl core::fmt::Debug for ChildUnion {
5388  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
5389    if let Some(name) = self.variant_name() {
5390      f.write_str(name)
5391    } else {
5392      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
5393    }
5394  }
5395}
5396impl<'a> flatbuffers::Follow<'a> for ChildUnion {
5397  type Inner = Self;
5398  #[inline]
5399  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5400    let b = flatbuffers::read_scalar_at::<u8>(buf, loc);
5401    Self(b)
5402  }
5403}
5404
5405impl flatbuffers::Push for ChildUnion {
5406    type Output = ChildUnion;
5407    #[inline]
5408    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
5409        flatbuffers::emplace_scalar::<u8>(dst, self.0);
5410    }
5411}
5412
5413impl flatbuffers::EndianScalar for ChildUnion {
5414  type Scalar = u8;
5415  #[inline]
5416  fn to_little_endian(self) -> u8 {
5417    self.0.to_le()
5418  }
5419  #[inline]
5420  #[allow(clippy::wrong_self_convention)]
5421  fn from_little_endian(v: u8) -> Self {
5422    let b = u8::from_le(v);
5423    Self(b)
5424  }
5425}
5426
5427impl<'a> flatbuffers::Verifiable for ChildUnion {
5428  #[inline]
5429  fn run_verifier(
5430    v: &mut flatbuffers::Verifier, pos: usize
5431  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
5432    use self::flatbuffers::Verifiable;
5433    u8::run_verifier(v, pos)
5434  }
5435}
5436
5437impl flatbuffers::SimpleToVerifyInSlice for ChildUnion {}
5438pub struct ChildUnionUnionTableOffset {}
5439
5440// struct Color, aligned to 1
5441#[repr(transparent)]
5442#[derive(Clone, Copy, PartialEq)]
5443pub struct Color(pub [u8; 4]);
5444impl Default for Color { 
5445  fn default() -> Self { 
5446    Self([0; 4])
5447  }
5448}
5449impl core::fmt::Debug for Color {
5450  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
5451    f.debug_struct("Color")
5452      .field("r", &self.r())
5453      .field("g", &self.g())
5454      .field("b", &self.b())
5455      .field("a", &self.a())
5456      .finish()
5457  }
5458}
5459
5460impl flatbuffers::SimpleToVerifyInSlice for Color {}
5461impl<'a> flatbuffers::Follow<'a> for Color {
5462  type Inner = &'a Color;
5463  #[inline]
5464  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5465    <&'a Color>::follow(buf, loc)
5466  }
5467}
5468impl<'a> flatbuffers::Follow<'a> for &'a Color {
5469  type Inner = &'a Color;
5470  #[inline]
5471  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5472    flatbuffers::follow_cast_ref::<Color>(buf, loc)
5473  }
5474}
5475impl<'b> flatbuffers::Push for Color {
5476    type Output = Color;
5477    #[inline]
5478    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
5479        let src = ::core::slice::from_raw_parts(self as *const Color as *const u8, Self::size());
5480        dst.copy_from_slice(src);
5481    }
5482}
5483
5484impl<'a> flatbuffers::Verifiable for Color {
5485  #[inline]
5486  fn run_verifier(
5487    v: &mut flatbuffers::Verifier, pos: usize
5488  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
5489    use self::flatbuffers::Verifiable;
5490    v.in_buffer::<Self>(pos)
5491  }
5492}
5493
5494impl<'a> Color {
5495  #[allow(clippy::too_many_arguments)]
5496  pub fn new(
5497    r: u8,
5498    g: u8,
5499    b: u8,
5500    a: u8,
5501  ) -> Self {
5502    let mut s = Self([0; 4]);
5503    s.set_r(r);
5504    s.set_g(g);
5505    s.set_b(b);
5506    s.set_a(a);
5507    s
5508  }
5509
5510  pub fn r(&self) -> u8 {
5511    let mut mem = core::mem::MaybeUninit::<<u8 as EndianScalar>::Scalar>::uninit();
5512    // Safety:
5513    // Created from a valid Table for this object
5514    // Which contains a valid value in this slot
5515    EndianScalar::from_little_endian(unsafe {
5516      core::ptr::copy_nonoverlapping(
5517        self.0[0..].as_ptr(),
5518        mem.as_mut_ptr() as *mut u8,
5519        core::mem::size_of::<<u8 as EndianScalar>::Scalar>(),
5520      );
5521      mem.assume_init()
5522    })
5523  }
5524
5525  pub fn set_r(&mut self, x: u8) {
5526    let x_le = x.to_little_endian();
5527    // Safety:
5528    // Created from a valid Table for this object
5529    // Which contains a valid value in this slot
5530    unsafe {
5531      core::ptr::copy_nonoverlapping(
5532        &x_le as *const _ as *const u8,
5533        self.0[0..].as_mut_ptr(),
5534        core::mem::size_of::<<u8 as EndianScalar>::Scalar>(),
5535      );
5536    }
5537  }
5538
5539  pub fn g(&self) -> u8 {
5540    let mut mem = core::mem::MaybeUninit::<<u8 as EndianScalar>::Scalar>::uninit();
5541    // Safety:
5542    // Created from a valid Table for this object
5543    // Which contains a valid value in this slot
5544    EndianScalar::from_little_endian(unsafe {
5545      core::ptr::copy_nonoverlapping(
5546        self.0[1..].as_ptr(),
5547        mem.as_mut_ptr() as *mut u8,
5548        core::mem::size_of::<<u8 as EndianScalar>::Scalar>(),
5549      );
5550      mem.assume_init()
5551    })
5552  }
5553
5554  pub fn set_g(&mut self, x: u8) {
5555    let x_le = x.to_little_endian();
5556    // Safety:
5557    // Created from a valid Table for this object
5558    // Which contains a valid value in this slot
5559    unsafe {
5560      core::ptr::copy_nonoverlapping(
5561        &x_le as *const _ as *const u8,
5562        self.0[1..].as_mut_ptr(),
5563        core::mem::size_of::<<u8 as EndianScalar>::Scalar>(),
5564      );
5565    }
5566  }
5567
5568  pub fn b(&self) -> u8 {
5569    let mut mem = core::mem::MaybeUninit::<<u8 as EndianScalar>::Scalar>::uninit();
5570    // Safety:
5571    // Created from a valid Table for this object
5572    // Which contains a valid value in this slot
5573    EndianScalar::from_little_endian(unsafe {
5574      core::ptr::copy_nonoverlapping(
5575        self.0[2..].as_ptr(),
5576        mem.as_mut_ptr() as *mut u8,
5577        core::mem::size_of::<<u8 as EndianScalar>::Scalar>(),
5578      );
5579      mem.assume_init()
5580    })
5581  }
5582
5583  pub fn set_b(&mut self, x: u8) {
5584    let x_le = x.to_little_endian();
5585    // Safety:
5586    // Created from a valid Table for this object
5587    // Which contains a valid value in this slot
5588    unsafe {
5589      core::ptr::copy_nonoverlapping(
5590        &x_le as *const _ as *const u8,
5591        self.0[2..].as_mut_ptr(),
5592        core::mem::size_of::<<u8 as EndianScalar>::Scalar>(),
5593      );
5594    }
5595  }
5596
5597  pub fn a(&self) -> u8 {
5598    let mut mem = core::mem::MaybeUninit::<<u8 as EndianScalar>::Scalar>::uninit();
5599    // Safety:
5600    // Created from a valid Table for this object
5601    // Which contains a valid value in this slot
5602    EndianScalar::from_little_endian(unsafe {
5603      core::ptr::copy_nonoverlapping(
5604        self.0[3..].as_ptr(),
5605        mem.as_mut_ptr() as *mut u8,
5606        core::mem::size_of::<<u8 as EndianScalar>::Scalar>(),
5607      );
5608      mem.assume_init()
5609    })
5610  }
5611
5612  pub fn set_a(&mut self, x: u8) {
5613    let x_le = x.to_little_endian();
5614    // Safety:
5615    // Created from a valid Table for this object
5616    // Which contains a valid value in this slot
5617    unsafe {
5618      core::ptr::copy_nonoverlapping(
5619        &x_le as *const _ as *const u8,
5620        self.0[3..].as_mut_ptr(),
5621        core::mem::size_of::<<u8 as EndianScalar>::Scalar>(),
5622      );
5623    }
5624  }
5625
5626}
5627
5628// struct Vec2, aligned to 4
5629#[repr(transparent)]
5630#[derive(Clone, Copy, PartialEq)]
5631pub struct Vec2(pub [u8; 8]);
5632impl Default for Vec2 { 
5633  fn default() -> Self { 
5634    Self([0; 8])
5635  }
5636}
5637impl core::fmt::Debug for Vec2 {
5638  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
5639    f.debug_struct("Vec2")
5640      .field("x", &self.x())
5641      .field("y", &self.y())
5642      .finish()
5643  }
5644}
5645
5646impl flatbuffers::SimpleToVerifyInSlice for Vec2 {}
5647impl<'a> flatbuffers::Follow<'a> for Vec2 {
5648  type Inner = &'a Vec2;
5649  #[inline]
5650  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5651    <&'a Vec2>::follow(buf, loc)
5652  }
5653}
5654impl<'a> flatbuffers::Follow<'a> for &'a Vec2 {
5655  type Inner = &'a Vec2;
5656  #[inline]
5657  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5658    flatbuffers::follow_cast_ref::<Vec2>(buf, loc)
5659  }
5660}
5661impl<'b> flatbuffers::Push for Vec2 {
5662    type Output = Vec2;
5663    #[inline]
5664    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
5665        let src = ::core::slice::from_raw_parts(self as *const Vec2 as *const u8, Self::size());
5666        dst.copy_from_slice(src);
5667    }
5668}
5669
5670impl<'a> flatbuffers::Verifiable for Vec2 {
5671  #[inline]
5672  fn run_verifier(
5673    v: &mut flatbuffers::Verifier, pos: usize
5674  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
5675    use self::flatbuffers::Verifiable;
5676    v.in_buffer::<Self>(pos)
5677  }
5678}
5679
5680impl<'a> Vec2 {
5681  #[allow(clippy::too_many_arguments)]
5682  pub fn new(
5683    x: f32,
5684    y: f32,
5685  ) -> Self {
5686    let mut s = Self([0; 8]);
5687    s.set_x(x);
5688    s.set_y(y);
5689    s
5690  }
5691
5692  pub fn x(&self) -> f32 {
5693    let mut mem = core::mem::MaybeUninit::<<f32 as EndianScalar>::Scalar>::uninit();
5694    // Safety:
5695    // Created from a valid Table for this object
5696    // Which contains a valid value in this slot
5697    EndianScalar::from_little_endian(unsafe {
5698      core::ptr::copy_nonoverlapping(
5699        self.0[0..].as_ptr(),
5700        mem.as_mut_ptr() as *mut u8,
5701        core::mem::size_of::<<f32 as EndianScalar>::Scalar>(),
5702      );
5703      mem.assume_init()
5704    })
5705  }
5706
5707  pub fn set_x(&mut self, x: f32) {
5708    let x_le = x.to_little_endian();
5709    // Safety:
5710    // Created from a valid Table for this object
5711    // Which contains a valid value in this slot
5712    unsafe {
5713      core::ptr::copy_nonoverlapping(
5714        &x_le as *const _ as *const u8,
5715        self.0[0..].as_mut_ptr(),
5716        core::mem::size_of::<<f32 as EndianScalar>::Scalar>(),
5717      );
5718    }
5719  }
5720
5721  pub fn y(&self) -> f32 {
5722    let mut mem = core::mem::MaybeUninit::<<f32 as EndianScalar>::Scalar>::uninit();
5723    // Safety:
5724    // Created from a valid Table for this object
5725    // Which contains a valid value in this slot
5726    EndianScalar::from_little_endian(unsafe {
5727      core::ptr::copy_nonoverlapping(
5728        self.0[4..].as_ptr(),
5729        mem.as_mut_ptr() as *mut u8,
5730        core::mem::size_of::<<f32 as EndianScalar>::Scalar>(),
5731      );
5732      mem.assume_init()
5733    })
5734  }
5735
5736  pub fn set_y(&mut self, x: f32) {
5737    let x_le = x.to_little_endian();
5738    // Safety:
5739    // Created from a valid Table for this object
5740    // Which contains a valid value in this slot
5741    unsafe {
5742      core::ptr::copy_nonoverlapping(
5743        &x_le as *const _ as *const u8,
5744        self.0[4..].as_mut_ptr(),
5745        core::mem::size_of::<<f32 as EndianScalar>::Scalar>(),
5746      );
5747    }
5748  }
5749
5750}
5751
5752// struct Vec3, aligned to 4
5753#[repr(transparent)]
5754#[derive(Clone, Copy, PartialEq)]
5755pub struct Vec3(pub [u8; 12]);
5756impl Default for Vec3 { 
5757  fn default() -> Self { 
5758    Self([0; 12])
5759  }
5760}
5761impl core::fmt::Debug for Vec3 {
5762  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
5763    f.debug_struct("Vec3")
5764      .field("x", &self.x())
5765      .field("y", &self.y())
5766      .field("z", &self.z())
5767      .finish()
5768  }
5769}
5770
5771impl flatbuffers::SimpleToVerifyInSlice for Vec3 {}
5772impl<'a> flatbuffers::Follow<'a> for Vec3 {
5773  type Inner = &'a Vec3;
5774  #[inline]
5775  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5776    <&'a Vec3>::follow(buf, loc)
5777  }
5778}
5779impl<'a> flatbuffers::Follow<'a> for &'a Vec3 {
5780  type Inner = &'a Vec3;
5781  #[inline]
5782  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5783    flatbuffers::follow_cast_ref::<Vec3>(buf, loc)
5784  }
5785}
5786impl<'b> flatbuffers::Push for Vec3 {
5787    type Output = Vec3;
5788    #[inline]
5789    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
5790        let src = ::core::slice::from_raw_parts(self as *const Vec3 as *const u8, Self::size());
5791        dst.copy_from_slice(src);
5792    }
5793}
5794
5795impl<'a> flatbuffers::Verifiable for Vec3 {
5796  #[inline]
5797  fn run_verifier(
5798    v: &mut flatbuffers::Verifier, pos: usize
5799  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
5800    use self::flatbuffers::Verifiable;
5801    v.in_buffer::<Self>(pos)
5802  }
5803}
5804
5805impl<'a> Vec3 {
5806  #[allow(clippy::too_many_arguments)]
5807  pub fn new(
5808    x: f32,
5809    y: f32,
5810    z: f32,
5811  ) -> Self {
5812    let mut s = Self([0; 12]);
5813    s.set_x(x);
5814    s.set_y(y);
5815    s.set_z(z);
5816    s
5817  }
5818
5819  pub fn x(&self) -> f32 {
5820    let mut mem = core::mem::MaybeUninit::<<f32 as EndianScalar>::Scalar>::uninit();
5821    // Safety:
5822    // Created from a valid Table for this object
5823    // Which contains a valid value in this slot
5824    EndianScalar::from_little_endian(unsafe {
5825      core::ptr::copy_nonoverlapping(
5826        self.0[0..].as_ptr(),
5827        mem.as_mut_ptr() as *mut u8,
5828        core::mem::size_of::<<f32 as EndianScalar>::Scalar>(),
5829      );
5830      mem.assume_init()
5831    })
5832  }
5833
5834  pub fn set_x(&mut self, x: f32) {
5835    let x_le = x.to_little_endian();
5836    // Safety:
5837    // Created from a valid Table for this object
5838    // Which contains a valid value in this slot
5839    unsafe {
5840      core::ptr::copy_nonoverlapping(
5841        &x_le as *const _ as *const u8,
5842        self.0[0..].as_mut_ptr(),
5843        core::mem::size_of::<<f32 as EndianScalar>::Scalar>(),
5844      );
5845    }
5846  }
5847
5848  pub fn y(&self) -> f32 {
5849    let mut mem = core::mem::MaybeUninit::<<f32 as EndianScalar>::Scalar>::uninit();
5850    // Safety:
5851    // Created from a valid Table for this object
5852    // Which contains a valid value in this slot
5853    EndianScalar::from_little_endian(unsafe {
5854      core::ptr::copy_nonoverlapping(
5855        self.0[4..].as_ptr(),
5856        mem.as_mut_ptr() as *mut u8,
5857        core::mem::size_of::<<f32 as EndianScalar>::Scalar>(),
5858      );
5859      mem.assume_init()
5860    })
5861  }
5862
5863  pub fn set_y(&mut self, x: f32) {
5864    let x_le = x.to_little_endian();
5865    // Safety:
5866    // Created from a valid Table for this object
5867    // Which contains a valid value in this slot
5868    unsafe {
5869      core::ptr::copy_nonoverlapping(
5870        &x_le as *const _ as *const u8,
5871        self.0[4..].as_mut_ptr(),
5872        core::mem::size_of::<<f32 as EndianScalar>::Scalar>(),
5873      );
5874    }
5875  }
5876
5877  pub fn z(&self) -> f32 {
5878    let mut mem = core::mem::MaybeUninit::<<f32 as EndianScalar>::Scalar>::uninit();
5879    // Safety:
5880    // Created from a valid Table for this object
5881    // Which contains a valid value in this slot
5882    EndianScalar::from_little_endian(unsafe {
5883      core::ptr::copy_nonoverlapping(
5884        self.0[8..].as_ptr(),
5885        mem.as_mut_ptr() as *mut u8,
5886        core::mem::size_of::<<f32 as EndianScalar>::Scalar>(),
5887      );
5888      mem.assume_init()
5889    })
5890  }
5891
5892  pub fn set_z(&mut self, x: f32) {
5893    let x_le = x.to_little_endian();
5894    // Safety:
5895    // Created from a valid Table for this object
5896    // Which contains a valid value in this slot
5897    unsafe {
5898      core::ptr::copy_nonoverlapping(
5899        &x_le as *const _ as *const u8,
5900        self.0[8..].as_mut_ptr(),
5901        core::mem::size_of::<<f32 as EndianScalar>::Scalar>(),
5902      );
5903    }
5904  }
5905
5906}
5907
5908// struct Vec4, aligned to 4
5909#[repr(transparent)]
5910#[derive(Clone, Copy, PartialEq)]
5911pub struct Vec4(pub [u8; 16]);
5912impl Default for Vec4 { 
5913  fn default() -> Self { 
5914    Self([0; 16])
5915  }
5916}
5917impl core::fmt::Debug for Vec4 {
5918  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
5919    f.debug_struct("Vec4")
5920      .field("x", &self.x())
5921      .field("y", &self.y())
5922      .field("z", &self.z())
5923      .field("w", &self.w())
5924      .finish()
5925  }
5926}
5927
5928impl flatbuffers::SimpleToVerifyInSlice for Vec4 {}
5929impl<'a> flatbuffers::Follow<'a> for Vec4 {
5930  type Inner = &'a Vec4;
5931  #[inline]
5932  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5933    <&'a Vec4>::follow(buf, loc)
5934  }
5935}
5936impl<'a> flatbuffers::Follow<'a> for &'a Vec4 {
5937  type Inner = &'a Vec4;
5938  #[inline]
5939  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5940    flatbuffers::follow_cast_ref::<Vec4>(buf, loc)
5941  }
5942}
5943impl<'b> flatbuffers::Push for Vec4 {
5944    type Output = Vec4;
5945    #[inline]
5946    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
5947        let src = ::core::slice::from_raw_parts(self as *const Vec4 as *const u8, Self::size());
5948        dst.copy_from_slice(src);
5949    }
5950}
5951
5952impl<'a> flatbuffers::Verifiable for Vec4 {
5953  #[inline]
5954  fn run_verifier(
5955    v: &mut flatbuffers::Verifier, pos: usize
5956  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
5957    use self::flatbuffers::Verifiable;
5958    v.in_buffer::<Self>(pos)
5959  }
5960}
5961
5962impl<'a> Vec4 {
5963  #[allow(clippy::too_many_arguments)]
5964  pub fn new(
5965    x: f32,
5966    y: f32,
5967    z: f32,
5968    w: f32,
5969  ) -> Self {
5970    let mut s = Self([0; 16]);
5971    s.set_x(x);
5972    s.set_y(y);
5973    s.set_z(z);
5974    s.set_w(w);
5975    s
5976  }
5977
5978  pub fn x(&self) -> f32 {
5979    let mut mem = core::mem::MaybeUninit::<<f32 as EndianScalar>::Scalar>::uninit();
5980    // Safety:
5981    // Created from a valid Table for this object
5982    // Which contains a valid value in this slot
5983    EndianScalar::from_little_endian(unsafe {
5984      core::ptr::copy_nonoverlapping(
5985        self.0[0..].as_ptr(),
5986        mem.as_mut_ptr() as *mut u8,
5987        core::mem::size_of::<<f32 as EndianScalar>::Scalar>(),
5988      );
5989      mem.assume_init()
5990    })
5991  }
5992
5993  pub fn set_x(&mut self, x: f32) {
5994    let x_le = x.to_little_endian();
5995    // Safety:
5996    // Created from a valid Table for this object
5997    // Which contains a valid value in this slot
5998    unsafe {
5999      core::ptr::copy_nonoverlapping(
6000        &x_le as *const _ as *const u8,
6001        self.0[0..].as_mut_ptr(),
6002        core::mem::size_of::<<f32 as EndianScalar>::Scalar>(),
6003      );
6004    }
6005  }
6006
6007  pub fn y(&self) -> f32 {
6008    let mut mem = core::mem::MaybeUninit::<<f32 as EndianScalar>::Scalar>::uninit();
6009    // Safety:
6010    // Created from a valid Table for this object
6011    // Which contains a valid value in this slot
6012    EndianScalar::from_little_endian(unsafe {
6013      core::ptr::copy_nonoverlapping(
6014        self.0[4..].as_ptr(),
6015        mem.as_mut_ptr() as *mut u8,
6016        core::mem::size_of::<<f32 as EndianScalar>::Scalar>(),
6017      );
6018      mem.assume_init()
6019    })
6020  }
6021
6022  pub fn set_y(&mut self, x: f32) {
6023    let x_le = x.to_little_endian();
6024    // Safety:
6025    // Created from a valid Table for this object
6026    // Which contains a valid value in this slot
6027    unsafe {
6028      core::ptr::copy_nonoverlapping(
6029        &x_le as *const _ as *const u8,
6030        self.0[4..].as_mut_ptr(),
6031        core::mem::size_of::<<f32 as EndianScalar>::Scalar>(),
6032      );
6033    }
6034  }
6035
6036  pub fn z(&self) -> f32 {
6037    let mut mem = core::mem::MaybeUninit::<<f32 as EndianScalar>::Scalar>::uninit();
6038    // Safety:
6039    // Created from a valid Table for this object
6040    // Which contains a valid value in this slot
6041    EndianScalar::from_little_endian(unsafe {
6042      core::ptr::copy_nonoverlapping(
6043        self.0[8..].as_ptr(),
6044        mem.as_mut_ptr() as *mut u8,
6045        core::mem::size_of::<<f32 as EndianScalar>::Scalar>(),
6046      );
6047      mem.assume_init()
6048    })
6049  }
6050
6051  pub fn set_z(&mut self, x: f32) {
6052    let x_le = x.to_little_endian();
6053    // Safety:
6054    // Created from a valid Table for this object
6055    // Which contains a valid value in this slot
6056    unsafe {
6057      core::ptr::copy_nonoverlapping(
6058        &x_le as *const _ as *const u8,
6059        self.0[8..].as_mut_ptr(),
6060        core::mem::size_of::<<f32 as EndianScalar>::Scalar>(),
6061      );
6062    }
6063  }
6064
6065  pub fn w(&self) -> f32 {
6066    let mut mem = core::mem::MaybeUninit::<<f32 as EndianScalar>::Scalar>::uninit();
6067    // Safety:
6068    // Created from a valid Table for this object
6069    // Which contains a valid value in this slot
6070    EndianScalar::from_little_endian(unsafe {
6071      core::ptr::copy_nonoverlapping(
6072        self.0[12..].as_ptr(),
6073        mem.as_mut_ptr() as *mut u8,
6074        core::mem::size_of::<<f32 as EndianScalar>::Scalar>(),
6075      );
6076      mem.assume_init()
6077    })
6078  }
6079
6080  pub fn set_w(&mut self, x: f32) {
6081    let x_le = x.to_little_endian();
6082    // Safety:
6083    // Created from a valid Table for this object
6084    // Which contains a valid value in this slot
6085    unsafe {
6086      core::ptr::copy_nonoverlapping(
6087        &x_le as *const _ as *const u8,
6088        self.0[12..].as_mut_ptr(),
6089        core::mem::size_of::<<f32 as EndianScalar>::Scalar>(),
6090      );
6091    }
6092  }
6093
6094}
6095
6096pub enum LengthOffset {}
6097#[derive(Copy, Clone, PartialEq)]
6098
6099pub struct Length<'a> {
6100  pub _tab: flatbuffers::Table<'a>,
6101}
6102
6103impl<'a> flatbuffers::Follow<'a> for Length<'a> {
6104  type Inner = Length<'a>;
6105  #[inline]
6106  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
6107    Self { _tab: flatbuffers::Table::new(buf, loc) }
6108  }
6109}
6110
6111impl<'a> Length<'a> {
6112  pub const VT_VALUE: flatbuffers::VOffsetT = 4;
6113  pub const VT_UNIT: flatbuffers::VOffsetT = 6;
6114
6115  #[inline]
6116  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
6117    Length { _tab: table }
6118  }
6119  #[allow(unused_mut)]
6120  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
6121    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
6122    args: &'args LengthArgs
6123  ) -> flatbuffers::WIPOffset<Length<'bldr>> {
6124    let mut builder = LengthBuilder::new(_fbb);
6125    builder.add_value(args.value);
6126    builder.add_unit(args.unit);
6127    builder.finish()
6128  }
6129
6130
6131  #[inline]
6132  pub fn value(&self) -> f32 {
6133    // Safety:
6134    // Created from valid Table for this object
6135    // which contains a valid value in this slot
6136    unsafe { self._tab.get::<f32>(Length::VT_VALUE, Some(0.0)).unwrap()}
6137  }
6138  #[inline]
6139  pub fn unit(&self) -> LengthUnit {
6140    // Safety:
6141    // Created from valid Table for this object
6142    // which contains a valid value in this slot
6143    unsafe { self._tab.get::<LengthUnit>(Length::VT_UNIT, Some(LengthUnit::Px)).unwrap()}
6144  }
6145}
6146
6147impl flatbuffers::Verifiable for Length<'_> {
6148  #[inline]
6149  fn run_verifier(
6150    v: &mut flatbuffers::Verifier, pos: usize
6151  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
6152    use self::flatbuffers::Verifiable;
6153    v.visit_table(pos)?
6154     .visit_field::<f32>("value", Self::VT_VALUE, false)?
6155     .visit_field::<LengthUnit>("unit", Self::VT_UNIT, false)?
6156     .finish();
6157    Ok(())
6158  }
6159}
6160pub struct LengthArgs {
6161    pub value: f32,
6162    pub unit: LengthUnit,
6163}
6164impl<'a> Default for LengthArgs {
6165  #[inline]
6166  fn default() -> Self {
6167    LengthArgs {
6168      value: 0.0,
6169      unit: LengthUnit::Px,
6170    }
6171  }
6172}
6173
6174pub struct LengthBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
6175  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
6176  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
6177}
6178impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> LengthBuilder<'a, 'b, A> {
6179  #[inline]
6180  pub fn add_value(&mut self, value: f32) {
6181    self.fbb_.push_slot::<f32>(Length::VT_VALUE, value, 0.0);
6182  }
6183  #[inline]
6184  pub fn add_unit(&mut self, unit: LengthUnit) {
6185    self.fbb_.push_slot::<LengthUnit>(Length::VT_UNIT, unit, LengthUnit::Px);
6186  }
6187  #[inline]
6188  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> LengthBuilder<'a, 'b, A> {
6189    let start = _fbb.start_table();
6190    LengthBuilder {
6191      fbb_: _fbb,
6192      start_: start,
6193    }
6194  }
6195  #[inline]
6196  pub fn finish(self) -> flatbuffers::WIPOffset<Length<'a>> {
6197    let o = self.fbb_.end_table(self.start_);
6198    flatbuffers::WIPOffset::new(o.value())
6199  }
6200}
6201
6202impl core::fmt::Debug for Length<'_> {
6203  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
6204    let mut ds = f.debug_struct("Length");
6205      ds.field("value", &self.value());
6206      ds.field("unit", &self.unit());
6207      ds.finish()
6208  }
6209}
6210pub enum DurationOffset {}
6211#[derive(Copy, Clone, PartialEq)]
6212
6213pub struct Duration<'a> {
6214  pub _tab: flatbuffers::Table<'a>,
6215}
6216
6217impl<'a> flatbuffers::Follow<'a> for Duration<'a> {
6218  type Inner = Duration<'a>;
6219  #[inline]
6220  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
6221    Self { _tab: flatbuffers::Table::new(buf, loc) }
6222  }
6223}
6224
6225impl<'a> Duration<'a> {
6226  pub const VT_MS: flatbuffers::VOffsetT = 4;
6227
6228  #[inline]
6229  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
6230    Duration { _tab: table }
6231  }
6232  #[allow(unused_mut)]
6233  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
6234    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
6235    args: &'args DurationArgs
6236  ) -> flatbuffers::WIPOffset<Duration<'bldr>> {
6237    let mut builder = DurationBuilder::new(_fbb);
6238    builder.add_ms(args.ms);
6239    builder.finish()
6240  }
6241
6242
6243  #[inline]
6244  pub fn ms(&self) -> f32 {
6245    // Safety:
6246    // Created from valid Table for this object
6247    // which contains a valid value in this slot
6248    unsafe { self._tab.get::<f32>(Duration::VT_MS, Some(0.0)).unwrap()}
6249  }
6250}
6251
6252impl flatbuffers::Verifiable for Duration<'_> {
6253  #[inline]
6254  fn run_verifier(
6255    v: &mut flatbuffers::Verifier, pos: usize
6256  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
6257    use self::flatbuffers::Verifiable;
6258    v.visit_table(pos)?
6259     .visit_field::<f32>("ms", Self::VT_MS, false)?
6260     .finish();
6261    Ok(())
6262  }
6263}
6264pub struct DurationArgs {
6265    pub ms: f32,
6266}
6267impl<'a> Default for DurationArgs {
6268  #[inline]
6269  fn default() -> Self {
6270    DurationArgs {
6271      ms: 0.0,
6272    }
6273  }
6274}
6275
6276pub struct DurationBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
6277  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
6278  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
6279}
6280impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> DurationBuilder<'a, 'b, A> {
6281  #[inline]
6282  pub fn add_ms(&mut self, ms: f32) {
6283    self.fbb_.push_slot::<f32>(Duration::VT_MS, ms, 0.0);
6284  }
6285  #[inline]
6286  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> DurationBuilder<'a, 'b, A> {
6287    let start = _fbb.start_table();
6288    DurationBuilder {
6289      fbb_: _fbb,
6290      start_: start,
6291    }
6292  }
6293  #[inline]
6294  pub fn finish(self) -> flatbuffers::WIPOffset<Duration<'a>> {
6295    let o = self.fbb_.end_table(self.start_);
6296    flatbuffers::WIPOffset::new(o.value())
6297  }
6298}
6299
6300impl core::fmt::Debug for Duration<'_> {
6301  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
6302    let mut ds = f.debug_struct("Duration");
6303      ds.field("ms", &self.ms());
6304      ds.finish()
6305  }
6306}
6307pub enum AngleOffset {}
6308#[derive(Copy, Clone, PartialEq)]
6309
6310pub struct Angle<'a> {
6311  pub _tab: flatbuffers::Table<'a>,
6312}
6313
6314impl<'a> flatbuffers::Follow<'a> for Angle<'a> {
6315  type Inner = Angle<'a>;
6316  #[inline]
6317  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
6318    Self { _tab: flatbuffers::Table::new(buf, loc) }
6319  }
6320}
6321
6322impl<'a> Angle<'a> {
6323  pub const VT_DEGREES: flatbuffers::VOffsetT = 4;
6324
6325  #[inline]
6326  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
6327    Angle { _tab: table }
6328  }
6329  #[allow(unused_mut)]
6330  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
6331    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
6332    args: &'args AngleArgs
6333  ) -> flatbuffers::WIPOffset<Angle<'bldr>> {
6334    let mut builder = AngleBuilder::new(_fbb);
6335    builder.add_degrees(args.degrees);
6336    builder.finish()
6337  }
6338
6339
6340  #[inline]
6341  pub fn degrees(&self) -> f32 {
6342    // Safety:
6343    // Created from valid Table for this object
6344    // which contains a valid value in this slot
6345    unsafe { self._tab.get::<f32>(Angle::VT_DEGREES, Some(0.0)).unwrap()}
6346  }
6347}
6348
6349impl flatbuffers::Verifiable for Angle<'_> {
6350  #[inline]
6351  fn run_verifier(
6352    v: &mut flatbuffers::Verifier, pos: usize
6353  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
6354    use self::flatbuffers::Verifiable;
6355    v.visit_table(pos)?
6356     .visit_field::<f32>("degrees", Self::VT_DEGREES, false)?
6357     .finish();
6358    Ok(())
6359  }
6360}
6361pub struct AngleArgs {
6362    pub degrees: f32,
6363}
6364impl<'a> Default for AngleArgs {
6365  #[inline]
6366  fn default() -> Self {
6367    AngleArgs {
6368      degrees: 0.0,
6369    }
6370  }
6371}
6372
6373pub struct AngleBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
6374  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
6375  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
6376}
6377impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> AngleBuilder<'a, 'b, A> {
6378  #[inline]
6379  pub fn add_degrees(&mut self, degrees: f32) {
6380    self.fbb_.push_slot::<f32>(Angle::VT_DEGREES, degrees, 0.0);
6381  }
6382  #[inline]
6383  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> AngleBuilder<'a, 'b, A> {
6384    let start = _fbb.start_table();
6385    AngleBuilder {
6386      fbb_: _fbb,
6387      start_: start,
6388    }
6389  }
6390  #[inline]
6391  pub fn finish(self) -> flatbuffers::WIPOffset<Angle<'a>> {
6392    let o = self.fbb_.end_table(self.start_);
6393    flatbuffers::WIPOffset::new(o.value())
6394  }
6395}
6396
6397impl core::fmt::Debug for Angle<'_> {
6398  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
6399    let mut ds = f.debug_struct("Angle");
6400      ds.field("degrees", &self.degrees());
6401      ds.finish()
6402  }
6403}
6404pub enum EasingOffset {}
6405#[derive(Copy, Clone, PartialEq)]
6406
6407pub struct Easing<'a> {
6408  pub _tab: flatbuffers::Table<'a>,
6409}
6410
6411impl<'a> flatbuffers::Follow<'a> for Easing<'a> {
6412  type Inner = Easing<'a>;
6413  #[inline]
6414  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
6415    Self { _tab: flatbuffers::Table::new(buf, loc) }
6416  }
6417}
6418
6419impl<'a> Easing<'a> {
6420  pub const VT_EASING_TYPE: flatbuffers::VOffsetT = 4;
6421  pub const VT_X1: flatbuffers::VOffsetT = 6;
6422  pub const VT_Y1: flatbuffers::VOffsetT = 8;
6423  pub const VT_X2: flatbuffers::VOffsetT = 10;
6424  pub const VT_Y2: flatbuffers::VOffsetT = 12;
6425  pub const VT_STIFFNESS: flatbuffers::VOffsetT = 14;
6426  pub const VT_DAMPING: flatbuffers::VOffsetT = 16;
6427  pub const VT_MASS: flatbuffers::VOffsetT = 18;
6428  pub const VT_STEPS: flatbuffers::VOffsetT = 20;
6429  pub const VT_POINTS: flatbuffers::VOffsetT = 22;
6430
6431  #[inline]
6432  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
6433    Easing { _tab: table }
6434  }
6435  #[allow(unused_mut)]
6436  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
6437    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
6438    args: &'args EasingArgs<'args>
6439  ) -> flatbuffers::WIPOffset<Easing<'bldr>> {
6440    let mut builder = EasingBuilder::new(_fbb);
6441    if let Some(x) = args.points { builder.add_points(x); }
6442    builder.add_steps(args.steps);
6443    builder.add_mass(args.mass);
6444    builder.add_damping(args.damping);
6445    builder.add_stiffness(args.stiffness);
6446    builder.add_y2(args.y2);
6447    builder.add_x2(args.x2);
6448    builder.add_y1(args.y1);
6449    builder.add_x1(args.x1);
6450    builder.add_easing_type(args.easing_type);
6451    builder.finish()
6452  }
6453
6454
6455  #[inline]
6456  pub fn easing_type(&self) -> EasingType {
6457    // Safety:
6458    // Created from valid Table for this object
6459    // which contains a valid value in this slot
6460    unsafe { self._tab.get::<EasingType>(Easing::VT_EASING_TYPE, Some(EasingType::Linear)).unwrap()}
6461  }
6462  #[inline]
6463  pub fn x1(&self) -> f32 {
6464    // Safety:
6465    // Created from valid Table for this object
6466    // which contains a valid value in this slot
6467    unsafe { self._tab.get::<f32>(Easing::VT_X1, Some(0.0)).unwrap()}
6468  }
6469  #[inline]
6470  pub fn y1(&self) -> f32 {
6471    // Safety:
6472    // Created from valid Table for this object
6473    // which contains a valid value in this slot
6474    unsafe { self._tab.get::<f32>(Easing::VT_Y1, Some(0.0)).unwrap()}
6475  }
6476  #[inline]
6477  pub fn x2(&self) -> f32 {
6478    // Safety:
6479    // Created from valid Table for this object
6480    // which contains a valid value in this slot
6481    unsafe { self._tab.get::<f32>(Easing::VT_X2, Some(0.0)).unwrap()}
6482  }
6483  #[inline]
6484  pub fn y2(&self) -> f32 {
6485    // Safety:
6486    // Created from valid Table for this object
6487    // which contains a valid value in this slot
6488    unsafe { self._tab.get::<f32>(Easing::VT_Y2, Some(0.0)).unwrap()}
6489  }
6490  #[inline]
6491  pub fn stiffness(&self) -> f32 {
6492    // Safety:
6493    // Created from valid Table for this object
6494    // which contains a valid value in this slot
6495    unsafe { self._tab.get::<f32>(Easing::VT_STIFFNESS, Some(200.0)).unwrap()}
6496  }
6497  #[inline]
6498  pub fn damping(&self) -> f32 {
6499    // Safety:
6500    // Created from valid Table for this object
6501    // which contains a valid value in this slot
6502    unsafe { self._tab.get::<f32>(Easing::VT_DAMPING, Some(20.0)).unwrap()}
6503  }
6504  #[inline]
6505  pub fn mass(&self) -> f32 {
6506    // Safety:
6507    // Created from valid Table for this object
6508    // which contains a valid value in this slot
6509    unsafe { self._tab.get::<f32>(Easing::VT_MASS, Some(1.0)).unwrap()}
6510  }
6511  #[inline]
6512  pub fn steps(&self) -> i32 {
6513    // Safety:
6514    // Created from valid Table for this object
6515    // which contains a valid value in this slot
6516    unsafe { self._tab.get::<i32>(Easing::VT_STEPS, Some(0)).unwrap()}
6517  }
6518  #[inline]
6519  pub fn points(&self) -> Option<flatbuffers::Vector<'a, f32>> {
6520    // Safety:
6521    // Created from valid Table for this object
6522    // which contains a valid value in this slot
6523    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, f32>>>(Easing::VT_POINTS, None)}
6524  }
6525}
6526
6527impl flatbuffers::Verifiable for Easing<'_> {
6528  #[inline]
6529  fn run_verifier(
6530    v: &mut flatbuffers::Verifier, pos: usize
6531  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
6532    use self::flatbuffers::Verifiable;
6533    v.visit_table(pos)?
6534     .visit_field::<EasingType>("easing_type", Self::VT_EASING_TYPE, false)?
6535     .visit_field::<f32>("x1", Self::VT_X1, false)?
6536     .visit_field::<f32>("y1", Self::VT_Y1, false)?
6537     .visit_field::<f32>("x2", Self::VT_X2, false)?
6538     .visit_field::<f32>("y2", Self::VT_Y2, false)?
6539     .visit_field::<f32>("stiffness", Self::VT_STIFFNESS, false)?
6540     .visit_field::<f32>("damping", Self::VT_DAMPING, false)?
6541     .visit_field::<f32>("mass", Self::VT_MASS, false)?
6542     .visit_field::<i32>("steps", Self::VT_STEPS, false)?
6543     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, f32>>>("points", Self::VT_POINTS, false)?
6544     .finish();
6545    Ok(())
6546  }
6547}
6548pub struct EasingArgs<'a> {
6549    pub easing_type: EasingType,
6550    pub x1: f32,
6551    pub y1: f32,
6552    pub x2: f32,
6553    pub y2: f32,
6554    pub stiffness: f32,
6555    pub damping: f32,
6556    pub mass: f32,
6557    pub steps: i32,
6558    pub points: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, f32>>>,
6559}
6560impl<'a> Default for EasingArgs<'a> {
6561  #[inline]
6562  fn default() -> Self {
6563    EasingArgs {
6564      easing_type: EasingType::Linear,
6565      x1: 0.0,
6566      y1: 0.0,
6567      x2: 0.0,
6568      y2: 0.0,
6569      stiffness: 200.0,
6570      damping: 20.0,
6571      mass: 1.0,
6572      steps: 0,
6573      points: None,
6574    }
6575  }
6576}
6577
6578pub struct EasingBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
6579  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
6580  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
6581}
6582impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> EasingBuilder<'a, 'b, A> {
6583  #[inline]
6584  pub fn add_easing_type(&mut self, easing_type: EasingType) {
6585    self.fbb_.push_slot::<EasingType>(Easing::VT_EASING_TYPE, easing_type, EasingType::Linear);
6586  }
6587  #[inline]
6588  pub fn add_x1(&mut self, x1: f32) {
6589    self.fbb_.push_slot::<f32>(Easing::VT_X1, x1, 0.0);
6590  }
6591  #[inline]
6592  pub fn add_y1(&mut self, y1: f32) {
6593    self.fbb_.push_slot::<f32>(Easing::VT_Y1, y1, 0.0);
6594  }
6595  #[inline]
6596  pub fn add_x2(&mut self, x2: f32) {
6597    self.fbb_.push_slot::<f32>(Easing::VT_X2, x2, 0.0);
6598  }
6599  #[inline]
6600  pub fn add_y2(&mut self, y2: f32) {
6601    self.fbb_.push_slot::<f32>(Easing::VT_Y2, y2, 0.0);
6602  }
6603  #[inline]
6604  pub fn add_stiffness(&mut self, stiffness: f32) {
6605    self.fbb_.push_slot::<f32>(Easing::VT_STIFFNESS, stiffness, 200.0);
6606  }
6607  #[inline]
6608  pub fn add_damping(&mut self, damping: f32) {
6609    self.fbb_.push_slot::<f32>(Easing::VT_DAMPING, damping, 20.0);
6610  }
6611  #[inline]
6612  pub fn add_mass(&mut self, mass: f32) {
6613    self.fbb_.push_slot::<f32>(Easing::VT_MASS, mass, 1.0);
6614  }
6615  #[inline]
6616  pub fn add_steps(&mut self, steps: i32) {
6617    self.fbb_.push_slot::<i32>(Easing::VT_STEPS, steps, 0);
6618  }
6619  #[inline]
6620  pub fn add_points(&mut self, points: flatbuffers::WIPOffset<flatbuffers::Vector<'b , f32>>) {
6621    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Easing::VT_POINTS, points);
6622  }
6623  #[inline]
6624  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> EasingBuilder<'a, 'b, A> {
6625    let start = _fbb.start_table();
6626    EasingBuilder {
6627      fbb_: _fbb,
6628      start_: start,
6629    }
6630  }
6631  #[inline]
6632  pub fn finish(self) -> flatbuffers::WIPOffset<Easing<'a>> {
6633    let o = self.fbb_.end_table(self.start_);
6634    flatbuffers::WIPOffset::new(o.value())
6635  }
6636}
6637
6638impl core::fmt::Debug for Easing<'_> {
6639  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
6640    let mut ds = f.debug_struct("Easing");
6641      ds.field("easing_type", &self.easing_type());
6642      ds.field("x1", &self.x1());
6643      ds.field("y1", &self.y1());
6644      ds.field("x2", &self.x2());
6645      ds.field("y2", &self.y2());
6646      ds.field("stiffness", &self.stiffness());
6647      ds.field("damping", &self.damping());
6648      ds.field("mass", &self.mass());
6649      ds.field("steps", &self.steps());
6650      ds.field("points", &self.points());
6651      ds.finish()
6652  }
6653}
6654pub enum EdgeInsetsOffset {}
6655#[derive(Copy, Clone, PartialEq)]
6656
6657pub struct EdgeInsets<'a> {
6658  pub _tab: flatbuffers::Table<'a>,
6659}
6660
6661impl<'a> flatbuffers::Follow<'a> for EdgeInsets<'a> {
6662  type Inner = EdgeInsets<'a>;
6663  #[inline]
6664  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
6665    Self { _tab: flatbuffers::Table::new(buf, loc) }
6666  }
6667}
6668
6669impl<'a> EdgeInsets<'a> {
6670  pub const VT_TOP: flatbuffers::VOffsetT = 4;
6671  pub const VT_RIGHT: flatbuffers::VOffsetT = 6;
6672  pub const VT_BOTTOM: flatbuffers::VOffsetT = 8;
6673  pub const VT_LEFT: flatbuffers::VOffsetT = 10;
6674
6675  #[inline]
6676  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
6677    EdgeInsets { _tab: table }
6678  }
6679  #[allow(unused_mut)]
6680  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
6681    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
6682    args: &'args EdgeInsetsArgs<'args>
6683  ) -> flatbuffers::WIPOffset<EdgeInsets<'bldr>> {
6684    let mut builder = EdgeInsetsBuilder::new(_fbb);
6685    if let Some(x) = args.left { builder.add_left(x); }
6686    if let Some(x) = args.bottom { builder.add_bottom(x); }
6687    if let Some(x) = args.right { builder.add_right(x); }
6688    if let Some(x) = args.top { builder.add_top(x); }
6689    builder.finish()
6690  }
6691
6692
6693  #[inline]
6694  pub fn top(&self) -> Option<Length<'a>> {
6695    // Safety:
6696    // Created from valid Table for this object
6697    // which contains a valid value in this slot
6698    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(EdgeInsets::VT_TOP, None)}
6699  }
6700  #[inline]
6701  pub fn right(&self) -> Option<Length<'a>> {
6702    // Safety:
6703    // Created from valid Table for this object
6704    // which contains a valid value in this slot
6705    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(EdgeInsets::VT_RIGHT, None)}
6706  }
6707  #[inline]
6708  pub fn bottom(&self) -> Option<Length<'a>> {
6709    // Safety:
6710    // Created from valid Table for this object
6711    // which contains a valid value in this slot
6712    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(EdgeInsets::VT_BOTTOM, None)}
6713  }
6714  #[inline]
6715  pub fn left(&self) -> Option<Length<'a>> {
6716    // Safety:
6717    // Created from valid Table for this object
6718    // which contains a valid value in this slot
6719    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(EdgeInsets::VT_LEFT, None)}
6720  }
6721}
6722
6723impl flatbuffers::Verifiable for EdgeInsets<'_> {
6724  #[inline]
6725  fn run_verifier(
6726    v: &mut flatbuffers::Verifier, pos: usize
6727  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
6728    use self::flatbuffers::Verifiable;
6729    v.visit_table(pos)?
6730     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("top", Self::VT_TOP, false)?
6731     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("right", Self::VT_RIGHT, false)?
6732     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("bottom", Self::VT_BOTTOM, false)?
6733     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("left", Self::VT_LEFT, false)?
6734     .finish();
6735    Ok(())
6736  }
6737}
6738pub struct EdgeInsetsArgs<'a> {
6739    pub top: Option<flatbuffers::WIPOffset<Length<'a>>>,
6740    pub right: Option<flatbuffers::WIPOffset<Length<'a>>>,
6741    pub bottom: Option<flatbuffers::WIPOffset<Length<'a>>>,
6742    pub left: Option<flatbuffers::WIPOffset<Length<'a>>>,
6743}
6744impl<'a> Default for EdgeInsetsArgs<'a> {
6745  #[inline]
6746  fn default() -> Self {
6747    EdgeInsetsArgs {
6748      top: None,
6749      right: None,
6750      bottom: None,
6751      left: None,
6752    }
6753  }
6754}
6755
6756pub struct EdgeInsetsBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
6757  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
6758  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
6759}
6760impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> EdgeInsetsBuilder<'a, 'b, A> {
6761  #[inline]
6762  pub fn add_top(&mut self, top: flatbuffers::WIPOffset<Length<'b >>) {
6763    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(EdgeInsets::VT_TOP, top);
6764  }
6765  #[inline]
6766  pub fn add_right(&mut self, right: flatbuffers::WIPOffset<Length<'b >>) {
6767    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(EdgeInsets::VT_RIGHT, right);
6768  }
6769  #[inline]
6770  pub fn add_bottom(&mut self, bottom: flatbuffers::WIPOffset<Length<'b >>) {
6771    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(EdgeInsets::VT_BOTTOM, bottom);
6772  }
6773  #[inline]
6774  pub fn add_left(&mut self, left: flatbuffers::WIPOffset<Length<'b >>) {
6775    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(EdgeInsets::VT_LEFT, left);
6776  }
6777  #[inline]
6778  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> EdgeInsetsBuilder<'a, 'b, A> {
6779    let start = _fbb.start_table();
6780    EdgeInsetsBuilder {
6781      fbb_: _fbb,
6782      start_: start,
6783    }
6784  }
6785  #[inline]
6786  pub fn finish(self) -> flatbuffers::WIPOffset<EdgeInsets<'a>> {
6787    let o = self.fbb_.end_table(self.start_);
6788    flatbuffers::WIPOffset::new(o.value())
6789  }
6790}
6791
6792impl core::fmt::Debug for EdgeInsets<'_> {
6793  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
6794    let mut ds = f.debug_struct("EdgeInsets");
6795      ds.field("top", &self.top());
6796      ds.field("right", &self.right());
6797      ds.field("bottom", &self.bottom());
6798      ds.field("left", &self.left());
6799      ds.finish()
6800  }
6801}
6802pub enum CornerRadiiOffset {}
6803#[derive(Copy, Clone, PartialEq)]
6804
6805pub struct CornerRadii<'a> {
6806  pub _tab: flatbuffers::Table<'a>,
6807}
6808
6809impl<'a> flatbuffers::Follow<'a> for CornerRadii<'a> {
6810  type Inner = CornerRadii<'a>;
6811  #[inline]
6812  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
6813    Self { _tab: flatbuffers::Table::new(buf, loc) }
6814  }
6815}
6816
6817impl<'a> CornerRadii<'a> {
6818  pub const VT_TOP_LEFT: flatbuffers::VOffsetT = 4;
6819  pub const VT_TOP_RIGHT: flatbuffers::VOffsetT = 6;
6820  pub const VT_BOTTOM_RIGHT: flatbuffers::VOffsetT = 8;
6821  pub const VT_BOTTOM_LEFT: flatbuffers::VOffsetT = 10;
6822
6823  #[inline]
6824  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
6825    CornerRadii { _tab: table }
6826  }
6827  #[allow(unused_mut)]
6828  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
6829    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
6830    args: &'args CornerRadiiArgs<'args>
6831  ) -> flatbuffers::WIPOffset<CornerRadii<'bldr>> {
6832    let mut builder = CornerRadiiBuilder::new(_fbb);
6833    if let Some(x) = args.bottom_left { builder.add_bottom_left(x); }
6834    if let Some(x) = args.bottom_right { builder.add_bottom_right(x); }
6835    if let Some(x) = args.top_right { builder.add_top_right(x); }
6836    if let Some(x) = args.top_left { builder.add_top_left(x); }
6837    builder.finish()
6838  }
6839
6840
6841  #[inline]
6842  pub fn top_left(&self) -> Option<Length<'a>> {
6843    // Safety:
6844    // Created from valid Table for this object
6845    // which contains a valid value in this slot
6846    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(CornerRadii::VT_TOP_LEFT, None)}
6847  }
6848  #[inline]
6849  pub fn top_right(&self) -> Option<Length<'a>> {
6850    // Safety:
6851    // Created from valid Table for this object
6852    // which contains a valid value in this slot
6853    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(CornerRadii::VT_TOP_RIGHT, None)}
6854  }
6855  #[inline]
6856  pub fn bottom_right(&self) -> Option<Length<'a>> {
6857    // Safety:
6858    // Created from valid Table for this object
6859    // which contains a valid value in this slot
6860    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(CornerRadii::VT_BOTTOM_RIGHT, None)}
6861  }
6862  #[inline]
6863  pub fn bottom_left(&self) -> Option<Length<'a>> {
6864    // Safety:
6865    // Created from valid Table for this object
6866    // which contains a valid value in this slot
6867    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(CornerRadii::VT_BOTTOM_LEFT, None)}
6868  }
6869}
6870
6871impl flatbuffers::Verifiable for CornerRadii<'_> {
6872  #[inline]
6873  fn run_verifier(
6874    v: &mut flatbuffers::Verifier, pos: usize
6875  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
6876    use self::flatbuffers::Verifiable;
6877    v.visit_table(pos)?
6878     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("top_left", Self::VT_TOP_LEFT, false)?
6879     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("top_right", Self::VT_TOP_RIGHT, false)?
6880     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("bottom_right", Self::VT_BOTTOM_RIGHT, false)?
6881     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("bottom_left", Self::VT_BOTTOM_LEFT, false)?
6882     .finish();
6883    Ok(())
6884  }
6885}
6886pub struct CornerRadiiArgs<'a> {
6887    pub top_left: Option<flatbuffers::WIPOffset<Length<'a>>>,
6888    pub top_right: Option<flatbuffers::WIPOffset<Length<'a>>>,
6889    pub bottom_right: Option<flatbuffers::WIPOffset<Length<'a>>>,
6890    pub bottom_left: Option<flatbuffers::WIPOffset<Length<'a>>>,
6891}
6892impl<'a> Default for CornerRadiiArgs<'a> {
6893  #[inline]
6894  fn default() -> Self {
6895    CornerRadiiArgs {
6896      top_left: None,
6897      top_right: None,
6898      bottom_right: None,
6899      bottom_left: None,
6900    }
6901  }
6902}
6903
6904pub struct CornerRadiiBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
6905  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
6906  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
6907}
6908impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> CornerRadiiBuilder<'a, 'b, A> {
6909  #[inline]
6910  pub fn add_top_left(&mut self, top_left: flatbuffers::WIPOffset<Length<'b >>) {
6911    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(CornerRadii::VT_TOP_LEFT, top_left);
6912  }
6913  #[inline]
6914  pub fn add_top_right(&mut self, top_right: flatbuffers::WIPOffset<Length<'b >>) {
6915    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(CornerRadii::VT_TOP_RIGHT, top_right);
6916  }
6917  #[inline]
6918  pub fn add_bottom_right(&mut self, bottom_right: flatbuffers::WIPOffset<Length<'b >>) {
6919    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(CornerRadii::VT_BOTTOM_RIGHT, bottom_right);
6920  }
6921  #[inline]
6922  pub fn add_bottom_left(&mut self, bottom_left: flatbuffers::WIPOffset<Length<'b >>) {
6923    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(CornerRadii::VT_BOTTOM_LEFT, bottom_left);
6924  }
6925  #[inline]
6926  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> CornerRadiiBuilder<'a, 'b, A> {
6927    let start = _fbb.start_table();
6928    CornerRadiiBuilder {
6929      fbb_: _fbb,
6930      start_: start,
6931    }
6932  }
6933  #[inline]
6934  pub fn finish(self) -> flatbuffers::WIPOffset<CornerRadii<'a>> {
6935    let o = self.fbb_.end_table(self.start_);
6936    flatbuffers::WIPOffset::new(o.value())
6937  }
6938}
6939
6940impl core::fmt::Debug for CornerRadii<'_> {
6941  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
6942    let mut ds = f.debug_struct("CornerRadii");
6943      ds.field("top_left", &self.top_left());
6944      ds.field("top_right", &self.top_right());
6945      ds.field("bottom_right", &self.bottom_right());
6946      ds.field("bottom_left", &self.bottom_left());
6947      ds.finish()
6948  }
6949}
6950pub enum ShadowOffset {}
6951#[derive(Copy, Clone, PartialEq)]
6952
6953pub struct Shadow<'a> {
6954  pub _tab: flatbuffers::Table<'a>,
6955}
6956
6957impl<'a> flatbuffers::Follow<'a> for Shadow<'a> {
6958  type Inner = Shadow<'a>;
6959  #[inline]
6960  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
6961    Self { _tab: flatbuffers::Table::new(buf, loc) }
6962  }
6963}
6964
6965impl<'a> Shadow<'a> {
6966  pub const VT_OFFSET_X: flatbuffers::VOffsetT = 4;
6967  pub const VT_OFFSET_Y: flatbuffers::VOffsetT = 6;
6968  pub const VT_BLUR: flatbuffers::VOffsetT = 8;
6969  pub const VT_SPREAD: flatbuffers::VOffsetT = 10;
6970  pub const VT_COLOR: flatbuffers::VOffsetT = 12;
6971  pub const VT_INSET: flatbuffers::VOffsetT = 14;
6972
6973  #[inline]
6974  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
6975    Shadow { _tab: table }
6976  }
6977  #[allow(unused_mut)]
6978  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
6979    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
6980    args: &'args ShadowArgs<'args>
6981  ) -> flatbuffers::WIPOffset<Shadow<'bldr>> {
6982    let mut builder = ShadowBuilder::new(_fbb);
6983    if let Some(x) = args.color { builder.add_color(x); }
6984    if let Some(x) = args.spread { builder.add_spread(x); }
6985    if let Some(x) = args.blur { builder.add_blur(x); }
6986    if let Some(x) = args.offset_y { builder.add_offset_y(x); }
6987    if let Some(x) = args.offset_x { builder.add_offset_x(x); }
6988    builder.add_inset(args.inset);
6989    builder.finish()
6990  }
6991
6992
6993  #[inline]
6994  pub fn offset_x(&self) -> Option<Length<'a>> {
6995    // Safety:
6996    // Created from valid Table for this object
6997    // which contains a valid value in this slot
6998    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(Shadow::VT_OFFSET_X, None)}
6999  }
7000  #[inline]
7001  pub fn offset_y(&self) -> Option<Length<'a>> {
7002    // Safety:
7003    // Created from valid Table for this object
7004    // which contains a valid value in this slot
7005    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(Shadow::VT_OFFSET_Y, None)}
7006  }
7007  #[inline]
7008  pub fn blur(&self) -> Option<Length<'a>> {
7009    // Safety:
7010    // Created from valid Table for this object
7011    // which contains a valid value in this slot
7012    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(Shadow::VT_BLUR, None)}
7013  }
7014  #[inline]
7015  pub fn spread(&self) -> Option<Length<'a>> {
7016    // Safety:
7017    // Created from valid Table for this object
7018    // which contains a valid value in this slot
7019    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(Shadow::VT_SPREAD, None)}
7020  }
7021  #[inline]
7022  pub fn color(&self) -> Option<&'a Color> {
7023    // Safety:
7024    // Created from valid Table for this object
7025    // which contains a valid value in this slot
7026    unsafe { self._tab.get::<Color>(Shadow::VT_COLOR, None)}
7027  }
7028  #[inline]
7029  pub fn inset(&self) -> bool {
7030    // Safety:
7031    // Created from valid Table for this object
7032    // which contains a valid value in this slot
7033    unsafe { self._tab.get::<bool>(Shadow::VT_INSET, Some(false)).unwrap()}
7034  }
7035}
7036
7037impl flatbuffers::Verifiable for Shadow<'_> {
7038  #[inline]
7039  fn run_verifier(
7040    v: &mut flatbuffers::Verifier, pos: usize
7041  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
7042    use self::flatbuffers::Verifiable;
7043    v.visit_table(pos)?
7044     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("offset_x", Self::VT_OFFSET_X, false)?
7045     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("offset_y", Self::VT_OFFSET_Y, false)?
7046     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("blur", Self::VT_BLUR, false)?
7047     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("spread", Self::VT_SPREAD, false)?
7048     .visit_field::<Color>("color", Self::VT_COLOR, false)?
7049     .visit_field::<bool>("inset", Self::VT_INSET, false)?
7050     .finish();
7051    Ok(())
7052  }
7053}
7054pub struct ShadowArgs<'a> {
7055    pub offset_x: Option<flatbuffers::WIPOffset<Length<'a>>>,
7056    pub offset_y: Option<flatbuffers::WIPOffset<Length<'a>>>,
7057    pub blur: Option<flatbuffers::WIPOffset<Length<'a>>>,
7058    pub spread: Option<flatbuffers::WIPOffset<Length<'a>>>,
7059    pub color: Option<&'a Color>,
7060    pub inset: bool,
7061}
7062impl<'a> Default for ShadowArgs<'a> {
7063  #[inline]
7064  fn default() -> Self {
7065    ShadowArgs {
7066      offset_x: None,
7067      offset_y: None,
7068      blur: None,
7069      spread: None,
7070      color: None,
7071      inset: false,
7072    }
7073  }
7074}
7075
7076pub struct ShadowBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
7077  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
7078  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
7079}
7080impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ShadowBuilder<'a, 'b, A> {
7081  #[inline]
7082  pub fn add_offset_x(&mut self, offset_x: flatbuffers::WIPOffset<Length<'b >>) {
7083    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(Shadow::VT_OFFSET_X, offset_x);
7084  }
7085  #[inline]
7086  pub fn add_offset_y(&mut self, offset_y: flatbuffers::WIPOffset<Length<'b >>) {
7087    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(Shadow::VT_OFFSET_Y, offset_y);
7088  }
7089  #[inline]
7090  pub fn add_blur(&mut self, blur: flatbuffers::WIPOffset<Length<'b >>) {
7091    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(Shadow::VT_BLUR, blur);
7092  }
7093  #[inline]
7094  pub fn add_spread(&mut self, spread: flatbuffers::WIPOffset<Length<'b >>) {
7095    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(Shadow::VT_SPREAD, spread);
7096  }
7097  #[inline]
7098  pub fn add_color(&mut self, color: &Color) {
7099    self.fbb_.push_slot_always::<&Color>(Shadow::VT_COLOR, color);
7100  }
7101  #[inline]
7102  pub fn add_inset(&mut self, inset: bool) {
7103    self.fbb_.push_slot::<bool>(Shadow::VT_INSET, inset, false);
7104  }
7105  #[inline]
7106  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ShadowBuilder<'a, 'b, A> {
7107    let start = _fbb.start_table();
7108    ShadowBuilder {
7109      fbb_: _fbb,
7110      start_: start,
7111    }
7112  }
7113  #[inline]
7114  pub fn finish(self) -> flatbuffers::WIPOffset<Shadow<'a>> {
7115    let o = self.fbb_.end_table(self.start_);
7116    flatbuffers::WIPOffset::new(o.value())
7117  }
7118}
7119
7120impl core::fmt::Debug for Shadow<'_> {
7121  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
7122    let mut ds = f.debug_struct("Shadow");
7123      ds.field("offset_x", &self.offset_x());
7124      ds.field("offset_y", &self.offset_y());
7125      ds.field("blur", &self.blur());
7126      ds.field("spread", &self.spread());
7127      ds.field("color", &self.color());
7128      ds.field("inset", &self.inset());
7129      ds.finish()
7130  }
7131}
7132pub enum DataBindingOffset {}
7133#[derive(Copy, Clone, PartialEq)]
7134
7135pub struct DataBinding<'a> {
7136  pub _tab: flatbuffers::Table<'a>,
7137}
7138
7139impl<'a> flatbuffers::Follow<'a> for DataBinding<'a> {
7140  type Inner = DataBinding<'a>;
7141  #[inline]
7142  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
7143    Self { _tab: flatbuffers::Table::new(buf, loc) }
7144  }
7145}
7146
7147impl<'a> DataBinding<'a> {
7148  pub const VT_SOURCE_NODE_ID: flatbuffers::VOffsetT = 4;
7149  pub const VT_FIELD_PATH: flatbuffers::VOffsetT = 6;
7150
7151  #[inline]
7152  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
7153    DataBinding { _tab: table }
7154  }
7155  #[allow(unused_mut)]
7156  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
7157    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
7158    args: &'args DataBindingArgs<'args>
7159  ) -> flatbuffers::WIPOffset<DataBinding<'bldr>> {
7160    let mut builder = DataBindingBuilder::new(_fbb);
7161    if let Some(x) = args.field_path { builder.add_field_path(x); }
7162    if let Some(x) = args.source_node_id { builder.add_source_node_id(x); }
7163    builder.finish()
7164  }
7165
7166
7167  #[inline]
7168  pub fn source_node_id(&self) -> Option<&'a str> {
7169    // Safety:
7170    // Created from valid Table for this object
7171    // which contains a valid value in this slot
7172    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(DataBinding::VT_SOURCE_NODE_ID, None)}
7173  }
7174  #[inline]
7175  pub fn field_path(&self) -> Option<&'a str> {
7176    // Safety:
7177    // Created from valid Table for this object
7178    // which contains a valid value in this slot
7179    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(DataBinding::VT_FIELD_PATH, None)}
7180  }
7181}
7182
7183impl flatbuffers::Verifiable for DataBinding<'_> {
7184  #[inline]
7185  fn run_verifier(
7186    v: &mut flatbuffers::Verifier, pos: usize
7187  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
7188    use self::flatbuffers::Verifiable;
7189    v.visit_table(pos)?
7190     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("source_node_id", Self::VT_SOURCE_NODE_ID, false)?
7191     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("field_path", Self::VT_FIELD_PATH, false)?
7192     .finish();
7193    Ok(())
7194  }
7195}
7196pub struct DataBindingArgs<'a> {
7197    pub source_node_id: Option<flatbuffers::WIPOffset<&'a str>>,
7198    pub field_path: Option<flatbuffers::WIPOffset<&'a str>>,
7199}
7200impl<'a> Default for DataBindingArgs<'a> {
7201  #[inline]
7202  fn default() -> Self {
7203    DataBindingArgs {
7204      source_node_id: None,
7205      field_path: None,
7206    }
7207  }
7208}
7209
7210pub struct DataBindingBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
7211  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
7212  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
7213}
7214impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> DataBindingBuilder<'a, 'b, A> {
7215  #[inline]
7216  pub fn add_source_node_id(&mut self, source_node_id: flatbuffers::WIPOffset<&'b  str>) {
7217    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(DataBinding::VT_SOURCE_NODE_ID, source_node_id);
7218  }
7219  #[inline]
7220  pub fn add_field_path(&mut self, field_path: flatbuffers::WIPOffset<&'b  str>) {
7221    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(DataBinding::VT_FIELD_PATH, field_path);
7222  }
7223  #[inline]
7224  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> DataBindingBuilder<'a, 'b, A> {
7225    let start = _fbb.start_table();
7226    DataBindingBuilder {
7227      fbb_: _fbb,
7228      start_: start,
7229    }
7230  }
7231  #[inline]
7232  pub fn finish(self) -> flatbuffers::WIPOffset<DataBinding<'a>> {
7233    let o = self.fbb_.end_table(self.start_);
7234    flatbuffers::WIPOffset::new(o.value())
7235  }
7236}
7237
7238impl core::fmt::Debug for DataBinding<'_> {
7239  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
7240    let mut ds = f.debug_struct("DataBinding");
7241      ds.field("source_node_id", &self.source_node_id());
7242      ds.field("field_path", &self.field_path());
7243      ds.finish()
7244  }
7245}
7246pub enum BorderOffset {}
7247#[derive(Copy, Clone, PartialEq)]
7248
7249pub struct Border<'a> {
7250  pub _tab: flatbuffers::Table<'a>,
7251}
7252
7253impl<'a> flatbuffers::Follow<'a> for Border<'a> {
7254  type Inner = Border<'a>;
7255  #[inline]
7256  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
7257    Self { _tab: flatbuffers::Table::new(buf, loc) }
7258  }
7259}
7260
7261impl<'a> Border<'a> {
7262  pub const VT_WIDTH: flatbuffers::VOffsetT = 4;
7263  pub const VT_STYLE: flatbuffers::VOffsetT = 6;
7264  pub const VT_COLOR: flatbuffers::VOffsetT = 8;
7265
7266  #[inline]
7267  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
7268    Border { _tab: table }
7269  }
7270  #[allow(unused_mut)]
7271  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
7272    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
7273    args: &'args BorderArgs<'args>
7274  ) -> flatbuffers::WIPOffset<Border<'bldr>> {
7275    let mut builder = BorderBuilder::new(_fbb);
7276    if let Some(x) = args.color { builder.add_color(x); }
7277    if let Some(x) = args.width { builder.add_width(x); }
7278    builder.add_style(args.style);
7279    builder.finish()
7280  }
7281
7282
7283  #[inline]
7284  pub fn width(&self) -> Option<Length<'a>> {
7285    // Safety:
7286    // Created from valid Table for this object
7287    // which contains a valid value in this slot
7288    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(Border::VT_WIDTH, None)}
7289  }
7290  #[inline]
7291  pub fn style(&self) -> BorderStyle {
7292    // Safety:
7293    // Created from valid Table for this object
7294    // which contains a valid value in this slot
7295    unsafe { self._tab.get::<BorderStyle>(Border::VT_STYLE, Some(BorderStyle::Solid)).unwrap()}
7296  }
7297  #[inline]
7298  pub fn color(&self) -> Option<&'a Color> {
7299    // Safety:
7300    // Created from valid Table for this object
7301    // which contains a valid value in this slot
7302    unsafe { self._tab.get::<Color>(Border::VT_COLOR, None)}
7303  }
7304}
7305
7306impl flatbuffers::Verifiable for Border<'_> {
7307  #[inline]
7308  fn run_verifier(
7309    v: &mut flatbuffers::Verifier, pos: usize
7310  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
7311    use self::flatbuffers::Verifiable;
7312    v.visit_table(pos)?
7313     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("width", Self::VT_WIDTH, false)?
7314     .visit_field::<BorderStyle>("style", Self::VT_STYLE, false)?
7315     .visit_field::<Color>("color", Self::VT_COLOR, false)?
7316     .finish();
7317    Ok(())
7318  }
7319}
7320pub struct BorderArgs<'a> {
7321    pub width: Option<flatbuffers::WIPOffset<Length<'a>>>,
7322    pub style: BorderStyle,
7323    pub color: Option<&'a Color>,
7324}
7325impl<'a> Default for BorderArgs<'a> {
7326  #[inline]
7327  fn default() -> Self {
7328    BorderArgs {
7329      width: None,
7330      style: BorderStyle::Solid,
7331      color: None,
7332    }
7333  }
7334}
7335
7336pub struct BorderBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
7337  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
7338  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
7339}
7340impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> BorderBuilder<'a, 'b, A> {
7341  #[inline]
7342  pub fn add_width(&mut self, width: flatbuffers::WIPOffset<Length<'b >>) {
7343    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(Border::VT_WIDTH, width);
7344  }
7345  #[inline]
7346  pub fn add_style(&mut self, style: BorderStyle) {
7347    self.fbb_.push_slot::<BorderStyle>(Border::VT_STYLE, style, BorderStyle::Solid);
7348  }
7349  #[inline]
7350  pub fn add_color(&mut self, color: &Color) {
7351    self.fbb_.push_slot_always::<&Color>(Border::VT_COLOR, color);
7352  }
7353  #[inline]
7354  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> BorderBuilder<'a, 'b, A> {
7355    let start = _fbb.start_table();
7356    BorderBuilder {
7357      fbb_: _fbb,
7358      start_: start,
7359    }
7360  }
7361  #[inline]
7362  pub fn finish(self) -> flatbuffers::WIPOffset<Border<'a>> {
7363    let o = self.fbb_.end_table(self.start_);
7364    flatbuffers::WIPOffset::new(o.value())
7365  }
7366}
7367
7368impl core::fmt::Debug for Border<'_> {
7369  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
7370    let mut ds = f.debug_struct("Border");
7371      ds.field("width", &self.width());
7372      ds.field("style", &self.style());
7373      ds.field("color", &self.color());
7374      ds.finish()
7375  }
7376}
7377pub enum BorderSidesOffset {}
7378#[derive(Copy, Clone, PartialEq)]
7379
7380pub struct BorderSides<'a> {
7381  pub _tab: flatbuffers::Table<'a>,
7382}
7383
7384impl<'a> flatbuffers::Follow<'a> for BorderSides<'a> {
7385  type Inner = BorderSides<'a>;
7386  #[inline]
7387  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
7388    Self { _tab: flatbuffers::Table::new(buf, loc) }
7389  }
7390}
7391
7392impl<'a> BorderSides<'a> {
7393  pub const VT_TOP: flatbuffers::VOffsetT = 4;
7394  pub const VT_RIGHT: flatbuffers::VOffsetT = 6;
7395  pub const VT_BOTTOM: flatbuffers::VOffsetT = 8;
7396  pub const VT_LEFT: flatbuffers::VOffsetT = 10;
7397
7398  #[inline]
7399  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
7400    BorderSides { _tab: table }
7401  }
7402  #[allow(unused_mut)]
7403  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
7404    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
7405    args: &'args BorderSidesArgs<'args>
7406  ) -> flatbuffers::WIPOffset<BorderSides<'bldr>> {
7407    let mut builder = BorderSidesBuilder::new(_fbb);
7408    if let Some(x) = args.left { builder.add_left(x); }
7409    if let Some(x) = args.bottom { builder.add_bottom(x); }
7410    if let Some(x) = args.right { builder.add_right(x); }
7411    if let Some(x) = args.top { builder.add_top(x); }
7412    builder.finish()
7413  }
7414
7415
7416  #[inline]
7417  pub fn top(&self) -> Option<Border<'a>> {
7418    // Safety:
7419    // Created from valid Table for this object
7420    // which contains a valid value in this slot
7421    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Border>>(BorderSides::VT_TOP, None)}
7422  }
7423  #[inline]
7424  pub fn right(&self) -> Option<Border<'a>> {
7425    // Safety:
7426    // Created from valid Table for this object
7427    // which contains a valid value in this slot
7428    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Border>>(BorderSides::VT_RIGHT, None)}
7429  }
7430  #[inline]
7431  pub fn bottom(&self) -> Option<Border<'a>> {
7432    // Safety:
7433    // Created from valid Table for this object
7434    // which contains a valid value in this slot
7435    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Border>>(BorderSides::VT_BOTTOM, None)}
7436  }
7437  #[inline]
7438  pub fn left(&self) -> Option<Border<'a>> {
7439    // Safety:
7440    // Created from valid Table for this object
7441    // which contains a valid value in this slot
7442    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Border>>(BorderSides::VT_LEFT, None)}
7443  }
7444}
7445
7446impl flatbuffers::Verifiable for BorderSides<'_> {
7447  #[inline]
7448  fn run_verifier(
7449    v: &mut flatbuffers::Verifier, pos: usize
7450  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
7451    use self::flatbuffers::Verifiable;
7452    v.visit_table(pos)?
7453     .visit_field::<flatbuffers::ForwardsUOffset<Border>>("top", Self::VT_TOP, false)?
7454     .visit_field::<flatbuffers::ForwardsUOffset<Border>>("right", Self::VT_RIGHT, false)?
7455     .visit_field::<flatbuffers::ForwardsUOffset<Border>>("bottom", Self::VT_BOTTOM, false)?
7456     .visit_field::<flatbuffers::ForwardsUOffset<Border>>("left", Self::VT_LEFT, false)?
7457     .finish();
7458    Ok(())
7459  }
7460}
7461pub struct BorderSidesArgs<'a> {
7462    pub top: Option<flatbuffers::WIPOffset<Border<'a>>>,
7463    pub right: Option<flatbuffers::WIPOffset<Border<'a>>>,
7464    pub bottom: Option<flatbuffers::WIPOffset<Border<'a>>>,
7465    pub left: Option<flatbuffers::WIPOffset<Border<'a>>>,
7466}
7467impl<'a> Default for BorderSidesArgs<'a> {
7468  #[inline]
7469  fn default() -> Self {
7470    BorderSidesArgs {
7471      top: None,
7472      right: None,
7473      bottom: None,
7474      left: None,
7475    }
7476  }
7477}
7478
7479pub struct BorderSidesBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
7480  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
7481  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
7482}
7483impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> BorderSidesBuilder<'a, 'b, A> {
7484  #[inline]
7485  pub fn add_top(&mut self, top: flatbuffers::WIPOffset<Border<'b >>) {
7486    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Border>>(BorderSides::VT_TOP, top);
7487  }
7488  #[inline]
7489  pub fn add_right(&mut self, right: flatbuffers::WIPOffset<Border<'b >>) {
7490    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Border>>(BorderSides::VT_RIGHT, right);
7491  }
7492  #[inline]
7493  pub fn add_bottom(&mut self, bottom: flatbuffers::WIPOffset<Border<'b >>) {
7494    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Border>>(BorderSides::VT_BOTTOM, bottom);
7495  }
7496  #[inline]
7497  pub fn add_left(&mut self, left: flatbuffers::WIPOffset<Border<'b >>) {
7498    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Border>>(BorderSides::VT_LEFT, left);
7499  }
7500  #[inline]
7501  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> BorderSidesBuilder<'a, 'b, A> {
7502    let start = _fbb.start_table();
7503    BorderSidesBuilder {
7504      fbb_: _fbb,
7505      start_: start,
7506    }
7507  }
7508  #[inline]
7509  pub fn finish(self) -> flatbuffers::WIPOffset<BorderSides<'a>> {
7510    let o = self.fbb_.end_table(self.start_);
7511    flatbuffers::WIPOffset::new(o.value())
7512  }
7513}
7514
7515impl core::fmt::Debug for BorderSides<'_> {
7516  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
7517    let mut ds = f.debug_struct("BorderSides");
7518      ds.field("top", &self.top());
7519      ds.field("right", &self.right());
7520      ds.field("bottom", &self.bottom());
7521      ds.field("left", &self.left());
7522      ds.finish()
7523  }
7524}
7525pub enum AnimatedPropertyOffset {}
7526#[derive(Copy, Clone, PartialEq)]
7527
7528pub struct AnimatedProperty<'a> {
7529  pub _tab: flatbuffers::Table<'a>,
7530}
7531
7532impl<'a> flatbuffers::Follow<'a> for AnimatedProperty<'a> {
7533  type Inner = AnimatedProperty<'a>;
7534  #[inline]
7535  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
7536    Self { _tab: flatbuffers::Table::new(buf, loc) }
7537  }
7538}
7539
7540impl<'a> AnimatedProperty<'a> {
7541  pub const VT_PROPERTY: flatbuffers::VOffsetT = 4;
7542  pub const VT_FROM: flatbuffers::VOffsetT = 6;
7543  pub const VT_TO: flatbuffers::VOffsetT = 8;
7544
7545  #[inline]
7546  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
7547    AnimatedProperty { _tab: table }
7548  }
7549  #[allow(unused_mut)]
7550  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
7551    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
7552    args: &'args AnimatedPropertyArgs<'args>
7553  ) -> flatbuffers::WIPOffset<AnimatedProperty<'bldr>> {
7554    let mut builder = AnimatedPropertyBuilder::new(_fbb);
7555    if let Some(x) = args.to { builder.add_to(x); }
7556    if let Some(x) = args.from { builder.add_from(x); }
7557    if let Some(x) = args.property { builder.add_property(x); }
7558    builder.finish()
7559  }
7560
7561
7562  /// CSS-like property path (e.g., "transform.translateY", "opacity", "background.color").
7563  #[inline]
7564  pub fn property(&self) -> &'a str {
7565    // Safety:
7566    // Created from valid Table for this object
7567    // which contains a valid value in this slot
7568    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(AnimatedProperty::VT_PROPERTY, None).unwrap()}
7569  }
7570  /// Value in the "from" state.
7571  #[inline]
7572  pub fn from(&self) -> &'a str {
7573    // Safety:
7574    // Created from valid Table for this object
7575    // which contains a valid value in this slot
7576    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(AnimatedProperty::VT_FROM, None).unwrap()}
7577  }
7578  /// Value in the "to" state.
7579  #[inline]
7580  pub fn to(&self) -> &'a str {
7581    // Safety:
7582    // Created from valid Table for this object
7583    // which contains a valid value in this slot
7584    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(AnimatedProperty::VT_TO, None).unwrap()}
7585  }
7586}
7587
7588impl flatbuffers::Verifiable for AnimatedProperty<'_> {
7589  #[inline]
7590  fn run_verifier(
7591    v: &mut flatbuffers::Verifier, pos: usize
7592  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
7593    use self::flatbuffers::Verifiable;
7594    v.visit_table(pos)?
7595     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("property", Self::VT_PROPERTY, true)?
7596     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("from", Self::VT_FROM, true)?
7597     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("to", Self::VT_TO, true)?
7598     .finish();
7599    Ok(())
7600  }
7601}
7602pub struct AnimatedPropertyArgs<'a> {
7603    pub property: Option<flatbuffers::WIPOffset<&'a str>>,
7604    pub from: Option<flatbuffers::WIPOffset<&'a str>>,
7605    pub to: Option<flatbuffers::WIPOffset<&'a str>>,
7606}
7607impl<'a> Default for AnimatedPropertyArgs<'a> {
7608  #[inline]
7609  fn default() -> Self {
7610    AnimatedPropertyArgs {
7611      property: None, // required field
7612      from: None, // required field
7613      to: None, // required field
7614    }
7615  }
7616}
7617
7618pub struct AnimatedPropertyBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
7619  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
7620  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
7621}
7622impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> AnimatedPropertyBuilder<'a, 'b, A> {
7623  #[inline]
7624  pub fn add_property(&mut self, property: flatbuffers::WIPOffset<&'b  str>) {
7625    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(AnimatedProperty::VT_PROPERTY, property);
7626  }
7627  #[inline]
7628  pub fn add_from(&mut self, from: flatbuffers::WIPOffset<&'b  str>) {
7629    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(AnimatedProperty::VT_FROM, from);
7630  }
7631  #[inline]
7632  pub fn add_to(&mut self, to: flatbuffers::WIPOffset<&'b  str>) {
7633    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(AnimatedProperty::VT_TO, to);
7634  }
7635  #[inline]
7636  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> AnimatedPropertyBuilder<'a, 'b, A> {
7637    let start = _fbb.start_table();
7638    AnimatedPropertyBuilder {
7639      fbb_: _fbb,
7640      start_: start,
7641    }
7642  }
7643  #[inline]
7644  pub fn finish(self) -> flatbuffers::WIPOffset<AnimatedProperty<'a>> {
7645    let o = self.fbb_.end_table(self.start_);
7646    self.fbb_.required(o, AnimatedProperty::VT_PROPERTY,"property");
7647    self.fbb_.required(o, AnimatedProperty::VT_FROM,"from");
7648    self.fbb_.required(o, AnimatedProperty::VT_TO,"to");
7649    flatbuffers::WIPOffset::new(o.value())
7650  }
7651}
7652
7653impl core::fmt::Debug for AnimatedProperty<'_> {
7654  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
7655    let mut ds = f.debug_struct("AnimatedProperty");
7656      ds.field("property", &self.property());
7657      ds.field("from", &self.from());
7658      ds.field("to", &self.to());
7659      ds.finish()
7660  }
7661}
7662pub enum AnimationTransitionOffset {}
7663#[derive(Copy, Clone, PartialEq)]
7664
7665pub struct AnimationTransition<'a> {
7666  pub _tab: flatbuffers::Table<'a>,
7667}
7668
7669impl<'a> flatbuffers::Follow<'a> for AnimationTransition<'a> {
7670  type Inner = AnimationTransition<'a>;
7671  #[inline]
7672  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
7673    Self { _tab: flatbuffers::Table::new(buf, loc) }
7674  }
7675}
7676
7677impl<'a> AnimationTransition<'a> {
7678  pub const VT_NODE_ID: flatbuffers::VOffsetT = 4;
7679  pub const VT_NAME: flatbuffers::VOffsetT = 6;
7680  pub const VT_TARGET_NODE_ID: flatbuffers::VOffsetT = 8;
7681  pub const VT_TRIGGER_STATE_MACHINE: flatbuffers::VOffsetT = 10;
7682  pub const VT_TRIGGER_EVENT: flatbuffers::VOffsetT = 12;
7683  pub const VT_PROPERTIES: flatbuffers::VOffsetT = 14;
7684  pub const VT_DURATION: flatbuffers::VOffsetT = 16;
7685  pub const VT_DELAY: flatbuffers::VOffsetT = 18;
7686  pub const VT_EASING: flatbuffers::VOffsetT = 20;
7687  pub const VT_REDUCED_MOTION: flatbuffers::VOffsetT = 22;
7688
7689  #[inline]
7690  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
7691    AnimationTransition { _tab: table }
7692  }
7693  #[allow(unused_mut)]
7694  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
7695    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
7696    args: &'args AnimationTransitionArgs<'args>
7697  ) -> flatbuffers::WIPOffset<AnimationTransition<'bldr>> {
7698    let mut builder = AnimationTransitionBuilder::new(_fbb);
7699    if let Some(x) = args.reduced_motion { builder.add_reduced_motion(x); }
7700    if let Some(x) = args.easing { builder.add_easing(x); }
7701    if let Some(x) = args.delay { builder.add_delay(x); }
7702    if let Some(x) = args.duration { builder.add_duration(x); }
7703    if let Some(x) = args.properties { builder.add_properties(x); }
7704    if let Some(x) = args.trigger_event { builder.add_trigger_event(x); }
7705    if let Some(x) = args.trigger_state_machine { builder.add_trigger_state_machine(x); }
7706    if let Some(x) = args.target_node_id { builder.add_target_node_id(x); }
7707    if let Some(x) = args.name { builder.add_name(x); }
7708    if let Some(x) = args.node_id { builder.add_node_id(x); }
7709    builder.finish()
7710  }
7711
7712
7713  #[inline]
7714  pub fn node_id(&self) -> &'a str {
7715    // Safety:
7716    // Created from valid Table for this object
7717    // which contains a valid value in this slot
7718    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(AnimationTransition::VT_NODE_ID, None).unwrap()}
7719  }
7720  #[inline]
7721  pub fn name(&self) -> Option<&'a str> {
7722    // Safety:
7723    // Created from valid Table for this object
7724    // which contains a valid value in this slot
7725    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(AnimationTransition::VT_NAME, None)}
7726  }
7727  /// Target node to animate.
7728  #[inline]
7729  pub fn target_node_id(&self) -> &'a str {
7730    // Safety:
7731    // Created from valid Table for this object
7732    // which contains a valid value in this slot
7733    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(AnimationTransition::VT_TARGET_NODE_ID, None).unwrap()}
7734  }
7735  /// Which state machine transition triggers this animation.
7736  #[inline]
7737  pub fn trigger_state_machine(&self) -> Option<&'a str> {
7738    // Safety:
7739    // Created from valid Table for this object
7740    // which contains a valid value in this slot
7741    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(AnimationTransition::VT_TRIGGER_STATE_MACHINE, None)}
7742  }
7743  #[inline]
7744  pub fn trigger_event(&self) -> Option<&'a str> {
7745    // Safety:
7746    // Created from valid Table for this object
7747    // which contains a valid value in this slot
7748    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(AnimationTransition::VT_TRIGGER_EVENT, None)}
7749  }
7750  /// Properties to animate.
7751  #[inline]
7752  pub fn properties(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<AnimatedProperty<'a>>> {
7753    // Safety:
7754    // Created from valid Table for this object
7755    // which contains a valid value in this slot
7756    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<AnimatedProperty>>>>(AnimationTransition::VT_PROPERTIES, None).unwrap()}
7757  }
7758  /// Timing.
7759  #[inline]
7760  pub fn duration(&self) -> Option<Duration<'a>> {
7761    // Safety:
7762    // Created from valid Table for this object
7763    // which contains a valid value in this slot
7764    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Duration>>(AnimationTransition::VT_DURATION, None)}
7765  }
7766  #[inline]
7767  pub fn delay(&self) -> Option<Duration<'a>> {
7768    // Safety:
7769    // Created from valid Table for this object
7770    // which contains a valid value in this slot
7771    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Duration>>(AnimationTransition::VT_DELAY, None)}
7772  }
7773  #[inline]
7774  pub fn easing(&self) -> Option<Easing<'a>> {
7775    // Safety:
7776    // Created from valid Table for this object
7777    // which contains a valid value in this slot
7778    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Easing>>(AnimationTransition::VT_EASING, None)}
7779  }
7780  /// Reduced motion alternative (required by validator).
7781  #[inline]
7782  pub fn reduced_motion(&self) -> Option<ReducedMotion<'a>> {
7783    // Safety:
7784    // Created from valid Table for this object
7785    // which contains a valid value in this slot
7786    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<ReducedMotion>>(AnimationTransition::VT_REDUCED_MOTION, None)}
7787  }
7788}
7789
7790impl flatbuffers::Verifiable for AnimationTransition<'_> {
7791  #[inline]
7792  fn run_verifier(
7793    v: &mut flatbuffers::Verifier, pos: usize
7794  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
7795    use self::flatbuffers::Verifiable;
7796    v.visit_table(pos)?
7797     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("node_id", Self::VT_NODE_ID, true)?
7798     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
7799     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("target_node_id", Self::VT_TARGET_NODE_ID, true)?
7800     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("trigger_state_machine", Self::VT_TRIGGER_STATE_MACHINE, false)?
7801     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("trigger_event", Self::VT_TRIGGER_EVENT, false)?
7802     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<AnimatedProperty>>>>("properties", Self::VT_PROPERTIES, true)?
7803     .visit_field::<flatbuffers::ForwardsUOffset<Duration>>("duration", Self::VT_DURATION, false)?
7804     .visit_field::<flatbuffers::ForwardsUOffset<Duration>>("delay", Self::VT_DELAY, false)?
7805     .visit_field::<flatbuffers::ForwardsUOffset<Easing>>("easing", Self::VT_EASING, false)?
7806     .visit_field::<flatbuffers::ForwardsUOffset<ReducedMotion>>("reduced_motion", Self::VT_REDUCED_MOTION, false)?
7807     .finish();
7808    Ok(())
7809  }
7810}
7811pub struct AnimationTransitionArgs<'a> {
7812    pub node_id: Option<flatbuffers::WIPOffset<&'a str>>,
7813    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
7814    pub target_node_id: Option<flatbuffers::WIPOffset<&'a str>>,
7815    pub trigger_state_machine: Option<flatbuffers::WIPOffset<&'a str>>,
7816    pub trigger_event: Option<flatbuffers::WIPOffset<&'a str>>,
7817    pub properties: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<AnimatedProperty<'a>>>>>,
7818    pub duration: Option<flatbuffers::WIPOffset<Duration<'a>>>,
7819    pub delay: Option<flatbuffers::WIPOffset<Duration<'a>>>,
7820    pub easing: Option<flatbuffers::WIPOffset<Easing<'a>>>,
7821    pub reduced_motion: Option<flatbuffers::WIPOffset<ReducedMotion<'a>>>,
7822}
7823impl<'a> Default for AnimationTransitionArgs<'a> {
7824  #[inline]
7825  fn default() -> Self {
7826    AnimationTransitionArgs {
7827      node_id: None, // required field
7828      name: None,
7829      target_node_id: None, // required field
7830      trigger_state_machine: None,
7831      trigger_event: None,
7832      properties: None, // required field
7833      duration: None,
7834      delay: None,
7835      easing: None,
7836      reduced_motion: None,
7837    }
7838  }
7839}
7840
7841pub struct AnimationTransitionBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
7842  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
7843  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
7844}
7845impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> AnimationTransitionBuilder<'a, 'b, A> {
7846  #[inline]
7847  pub fn add_node_id(&mut self, node_id: flatbuffers::WIPOffset<&'b  str>) {
7848    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(AnimationTransition::VT_NODE_ID, node_id);
7849  }
7850  #[inline]
7851  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
7852    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(AnimationTransition::VT_NAME, name);
7853  }
7854  #[inline]
7855  pub fn add_target_node_id(&mut self, target_node_id: flatbuffers::WIPOffset<&'b  str>) {
7856    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(AnimationTransition::VT_TARGET_NODE_ID, target_node_id);
7857  }
7858  #[inline]
7859  pub fn add_trigger_state_machine(&mut self, trigger_state_machine: flatbuffers::WIPOffset<&'b  str>) {
7860    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(AnimationTransition::VT_TRIGGER_STATE_MACHINE, trigger_state_machine);
7861  }
7862  #[inline]
7863  pub fn add_trigger_event(&mut self, trigger_event: flatbuffers::WIPOffset<&'b  str>) {
7864    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(AnimationTransition::VT_TRIGGER_EVENT, trigger_event);
7865  }
7866  #[inline]
7867  pub fn add_properties(&mut self, properties: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<AnimatedProperty<'b >>>>) {
7868    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(AnimationTransition::VT_PROPERTIES, properties);
7869  }
7870  #[inline]
7871  pub fn add_duration(&mut self, duration: flatbuffers::WIPOffset<Duration<'b >>) {
7872    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Duration>>(AnimationTransition::VT_DURATION, duration);
7873  }
7874  #[inline]
7875  pub fn add_delay(&mut self, delay: flatbuffers::WIPOffset<Duration<'b >>) {
7876    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Duration>>(AnimationTransition::VT_DELAY, delay);
7877  }
7878  #[inline]
7879  pub fn add_easing(&mut self, easing: flatbuffers::WIPOffset<Easing<'b >>) {
7880    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Easing>>(AnimationTransition::VT_EASING, easing);
7881  }
7882  #[inline]
7883  pub fn add_reduced_motion(&mut self, reduced_motion: flatbuffers::WIPOffset<ReducedMotion<'b >>) {
7884    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<ReducedMotion>>(AnimationTransition::VT_REDUCED_MOTION, reduced_motion);
7885  }
7886  #[inline]
7887  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> AnimationTransitionBuilder<'a, 'b, A> {
7888    let start = _fbb.start_table();
7889    AnimationTransitionBuilder {
7890      fbb_: _fbb,
7891      start_: start,
7892    }
7893  }
7894  #[inline]
7895  pub fn finish(self) -> flatbuffers::WIPOffset<AnimationTransition<'a>> {
7896    let o = self.fbb_.end_table(self.start_);
7897    self.fbb_.required(o, AnimationTransition::VT_NODE_ID,"node_id");
7898    self.fbb_.required(o, AnimationTransition::VT_TARGET_NODE_ID,"target_node_id");
7899    self.fbb_.required(o, AnimationTransition::VT_PROPERTIES,"properties");
7900    flatbuffers::WIPOffset::new(o.value())
7901  }
7902}
7903
7904impl core::fmt::Debug for AnimationTransition<'_> {
7905  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
7906    let mut ds = f.debug_struct("AnimationTransition");
7907      ds.field("node_id", &self.node_id());
7908      ds.field("name", &self.name());
7909      ds.field("target_node_id", &self.target_node_id());
7910      ds.field("trigger_state_machine", &self.trigger_state_machine());
7911      ds.field("trigger_event", &self.trigger_event());
7912      ds.field("properties", &self.properties());
7913      ds.field("duration", &self.duration());
7914      ds.field("delay", &self.delay());
7915      ds.field("easing", &self.easing());
7916      ds.field("reduced_motion", &self.reduced_motion());
7917      ds.finish()
7918  }
7919}
7920pub enum SequenceStepOffset {}
7921#[derive(Copy, Clone, PartialEq)]
7922
7923pub struct SequenceStep<'a> {
7924  pub _tab: flatbuffers::Table<'a>,
7925}
7926
7927impl<'a> flatbuffers::Follow<'a> for SequenceStep<'a> {
7928  type Inner = SequenceStep<'a>;
7929  #[inline]
7930  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
7931    Self { _tab: flatbuffers::Table::new(buf, loc) }
7932  }
7933}
7934
7935impl<'a> SequenceStep<'a> {
7936  pub const VT_TRANSITION_ID: flatbuffers::VOffsetT = 4;
7937  pub const VT_DELAY: flatbuffers::VOffsetT = 6;
7938  pub const VT_PARALLEL: flatbuffers::VOffsetT = 8;
7939
7940  #[inline]
7941  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
7942    SequenceStep { _tab: table }
7943  }
7944  #[allow(unused_mut)]
7945  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
7946    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
7947    args: &'args SequenceStepArgs<'args>
7948  ) -> flatbuffers::WIPOffset<SequenceStep<'bldr>> {
7949    let mut builder = SequenceStepBuilder::new(_fbb);
7950    if let Some(x) = args.delay { builder.add_delay(x); }
7951    if let Some(x) = args.transition_id { builder.add_transition_id(x); }
7952    builder.add_parallel(args.parallel);
7953    builder.finish()
7954  }
7955
7956
7957  /// Reference to an AnimationTransition node.
7958  #[inline]
7959  pub fn transition_id(&self) -> &'a str {
7960    // Safety:
7961    // Created from valid Table for this object
7962    // which contains a valid value in this slot
7963    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(SequenceStep::VT_TRANSITION_ID, None).unwrap()}
7964  }
7965  /// Delay before this step starts (relative to sequence start or previous step).
7966  #[inline]
7967  pub fn delay(&self) -> Option<Duration<'a>> {
7968    // Safety:
7969    // Created from valid Table for this object
7970    // which contains a valid value in this slot
7971    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Duration>>(SequenceStep::VT_DELAY, None)}
7972  }
7973  /// If true, this step starts at the same time as the previous step (parallel).
7974  #[inline]
7975  pub fn parallel(&self) -> bool {
7976    // Safety:
7977    // Created from valid Table for this object
7978    // which contains a valid value in this slot
7979    unsafe { self._tab.get::<bool>(SequenceStep::VT_PARALLEL, Some(false)).unwrap()}
7980  }
7981}
7982
7983impl flatbuffers::Verifiable for SequenceStep<'_> {
7984  #[inline]
7985  fn run_verifier(
7986    v: &mut flatbuffers::Verifier, pos: usize
7987  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
7988    use self::flatbuffers::Verifiable;
7989    v.visit_table(pos)?
7990     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("transition_id", Self::VT_TRANSITION_ID, true)?
7991     .visit_field::<flatbuffers::ForwardsUOffset<Duration>>("delay", Self::VT_DELAY, false)?
7992     .visit_field::<bool>("parallel", Self::VT_PARALLEL, false)?
7993     .finish();
7994    Ok(())
7995  }
7996}
7997pub struct SequenceStepArgs<'a> {
7998    pub transition_id: Option<flatbuffers::WIPOffset<&'a str>>,
7999    pub delay: Option<flatbuffers::WIPOffset<Duration<'a>>>,
8000    pub parallel: bool,
8001}
8002impl<'a> Default for SequenceStepArgs<'a> {
8003  #[inline]
8004  fn default() -> Self {
8005    SequenceStepArgs {
8006      transition_id: None, // required field
8007      delay: None,
8008      parallel: false,
8009    }
8010  }
8011}
8012
8013pub struct SequenceStepBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
8014  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
8015  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
8016}
8017impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SequenceStepBuilder<'a, 'b, A> {
8018  #[inline]
8019  pub fn add_transition_id(&mut self, transition_id: flatbuffers::WIPOffset<&'b  str>) {
8020    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(SequenceStep::VT_TRANSITION_ID, transition_id);
8021  }
8022  #[inline]
8023  pub fn add_delay(&mut self, delay: flatbuffers::WIPOffset<Duration<'b >>) {
8024    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Duration>>(SequenceStep::VT_DELAY, delay);
8025  }
8026  #[inline]
8027  pub fn add_parallel(&mut self, parallel: bool) {
8028    self.fbb_.push_slot::<bool>(SequenceStep::VT_PARALLEL, parallel, false);
8029  }
8030  #[inline]
8031  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> SequenceStepBuilder<'a, 'b, A> {
8032    let start = _fbb.start_table();
8033    SequenceStepBuilder {
8034      fbb_: _fbb,
8035      start_: start,
8036    }
8037  }
8038  #[inline]
8039  pub fn finish(self) -> flatbuffers::WIPOffset<SequenceStep<'a>> {
8040    let o = self.fbb_.end_table(self.start_);
8041    self.fbb_.required(o, SequenceStep::VT_TRANSITION_ID,"transition_id");
8042    flatbuffers::WIPOffset::new(o.value())
8043  }
8044}
8045
8046impl core::fmt::Debug for SequenceStep<'_> {
8047  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
8048    let mut ds = f.debug_struct("SequenceStep");
8049      ds.field("transition_id", &self.transition_id());
8050      ds.field("delay", &self.delay());
8051      ds.field("parallel", &self.parallel());
8052      ds.finish()
8053  }
8054}
8055pub enum SequenceOffset {}
8056#[derive(Copy, Clone, PartialEq)]
8057
8058pub struct Sequence<'a> {
8059  pub _tab: flatbuffers::Table<'a>,
8060}
8061
8062impl<'a> flatbuffers::Follow<'a> for Sequence<'a> {
8063  type Inner = Sequence<'a>;
8064  #[inline]
8065  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
8066    Self { _tab: flatbuffers::Table::new(buf, loc) }
8067  }
8068}
8069
8070impl<'a> Sequence<'a> {
8071  pub const VT_NODE_ID: flatbuffers::VOffsetT = 4;
8072  pub const VT_NAME: flatbuffers::VOffsetT = 6;
8073  pub const VT_STEPS: flatbuffers::VOffsetT = 8;
8074  pub const VT_STAGGER: flatbuffers::VOffsetT = 10;
8075  pub const VT_ITERATIONS: flatbuffers::VOffsetT = 12;
8076  pub const VT_ALTERNATE: flatbuffers::VOffsetT = 14;
8077  pub const VT_REDUCED_MOTION: flatbuffers::VOffsetT = 16;
8078
8079  #[inline]
8080  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
8081    Sequence { _tab: table }
8082  }
8083  #[allow(unused_mut)]
8084  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
8085    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
8086    args: &'args SequenceArgs<'args>
8087  ) -> flatbuffers::WIPOffset<Sequence<'bldr>> {
8088    let mut builder = SequenceBuilder::new(_fbb);
8089    if let Some(x) = args.reduced_motion { builder.add_reduced_motion(x); }
8090    builder.add_iterations(args.iterations);
8091    if let Some(x) = args.stagger { builder.add_stagger(x); }
8092    if let Some(x) = args.steps { builder.add_steps(x); }
8093    if let Some(x) = args.name { builder.add_name(x); }
8094    if let Some(x) = args.node_id { builder.add_node_id(x); }
8095    builder.add_alternate(args.alternate);
8096    builder.finish()
8097  }
8098
8099
8100  #[inline]
8101  pub fn node_id(&self) -> &'a str {
8102    // Safety:
8103    // Created from valid Table for this object
8104    // which contains a valid value in this slot
8105    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Sequence::VT_NODE_ID, None).unwrap()}
8106  }
8107  #[inline]
8108  pub fn name(&self) -> Option<&'a str> {
8109    // Safety:
8110    // Created from valid Table for this object
8111    // which contains a valid value in this slot
8112    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Sequence::VT_NAME, None)}
8113  }
8114  #[inline]
8115  pub fn steps(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<SequenceStep<'a>>> {
8116    // Safety:
8117    // Created from valid Table for this object
8118    // which contains a valid value in this slot
8119    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<SequenceStep>>>>(Sequence::VT_STEPS, None).unwrap()}
8120  }
8121  /// Stagger delay between sequential elements (e.g., for list entrance).
8122  #[inline]
8123  pub fn stagger(&self) -> Option<Duration<'a>> {
8124    // Safety:
8125    // Created from valid Table for this object
8126    // which contains a valid value in this slot
8127    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Duration>>(Sequence::VT_STAGGER, None)}
8128  }
8129  /// Number of times to play (0 = infinite).
8130  #[inline]
8131  pub fn iterations(&self) -> i32 {
8132    // Safety:
8133    // Created from valid Table for this object
8134    // which contains a valid value in this slot
8135    unsafe { self._tab.get::<i32>(Sequence::VT_ITERATIONS, Some(1)).unwrap()}
8136  }
8137  /// Whether to reverse on alternate iterations.
8138  #[inline]
8139  pub fn alternate(&self) -> bool {
8140    // Safety:
8141    // Created from valid Table for this object
8142    // which contains a valid value in this slot
8143    unsafe { self._tab.get::<bool>(Sequence::VT_ALTERNATE, Some(false)).unwrap()}
8144  }
8145  /// Reduced motion alternative for the entire sequence.
8146  #[inline]
8147  pub fn reduced_motion(&self) -> Option<ReducedMotion<'a>> {
8148    // Safety:
8149    // Created from valid Table for this object
8150    // which contains a valid value in this slot
8151    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<ReducedMotion>>(Sequence::VT_REDUCED_MOTION, None)}
8152  }
8153}
8154
8155impl flatbuffers::Verifiable for Sequence<'_> {
8156  #[inline]
8157  fn run_verifier(
8158    v: &mut flatbuffers::Verifier, pos: usize
8159  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
8160    use self::flatbuffers::Verifiable;
8161    v.visit_table(pos)?
8162     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("node_id", Self::VT_NODE_ID, true)?
8163     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
8164     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<SequenceStep>>>>("steps", Self::VT_STEPS, true)?
8165     .visit_field::<flatbuffers::ForwardsUOffset<Duration>>("stagger", Self::VT_STAGGER, false)?
8166     .visit_field::<i32>("iterations", Self::VT_ITERATIONS, false)?
8167     .visit_field::<bool>("alternate", Self::VT_ALTERNATE, false)?
8168     .visit_field::<flatbuffers::ForwardsUOffset<ReducedMotion>>("reduced_motion", Self::VT_REDUCED_MOTION, false)?
8169     .finish();
8170    Ok(())
8171  }
8172}
8173pub struct SequenceArgs<'a> {
8174    pub node_id: Option<flatbuffers::WIPOffset<&'a str>>,
8175    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
8176    pub steps: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<SequenceStep<'a>>>>>,
8177    pub stagger: Option<flatbuffers::WIPOffset<Duration<'a>>>,
8178    pub iterations: i32,
8179    pub alternate: bool,
8180    pub reduced_motion: Option<flatbuffers::WIPOffset<ReducedMotion<'a>>>,
8181}
8182impl<'a> Default for SequenceArgs<'a> {
8183  #[inline]
8184  fn default() -> Self {
8185    SequenceArgs {
8186      node_id: None, // required field
8187      name: None,
8188      steps: None, // required field
8189      stagger: None,
8190      iterations: 1,
8191      alternate: false,
8192      reduced_motion: None,
8193    }
8194  }
8195}
8196
8197pub struct SequenceBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
8198  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
8199  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
8200}
8201impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SequenceBuilder<'a, 'b, A> {
8202  #[inline]
8203  pub fn add_node_id(&mut self, node_id: flatbuffers::WIPOffset<&'b  str>) {
8204    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Sequence::VT_NODE_ID, node_id);
8205  }
8206  #[inline]
8207  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
8208    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Sequence::VT_NAME, name);
8209  }
8210  #[inline]
8211  pub fn add_steps(&mut self, steps: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<SequenceStep<'b >>>>) {
8212    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Sequence::VT_STEPS, steps);
8213  }
8214  #[inline]
8215  pub fn add_stagger(&mut self, stagger: flatbuffers::WIPOffset<Duration<'b >>) {
8216    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Duration>>(Sequence::VT_STAGGER, stagger);
8217  }
8218  #[inline]
8219  pub fn add_iterations(&mut self, iterations: i32) {
8220    self.fbb_.push_slot::<i32>(Sequence::VT_ITERATIONS, iterations, 1);
8221  }
8222  #[inline]
8223  pub fn add_alternate(&mut self, alternate: bool) {
8224    self.fbb_.push_slot::<bool>(Sequence::VT_ALTERNATE, alternate, false);
8225  }
8226  #[inline]
8227  pub fn add_reduced_motion(&mut self, reduced_motion: flatbuffers::WIPOffset<ReducedMotion<'b >>) {
8228    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<ReducedMotion>>(Sequence::VT_REDUCED_MOTION, reduced_motion);
8229  }
8230  #[inline]
8231  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> SequenceBuilder<'a, 'b, A> {
8232    let start = _fbb.start_table();
8233    SequenceBuilder {
8234      fbb_: _fbb,
8235      start_: start,
8236    }
8237  }
8238  #[inline]
8239  pub fn finish(self) -> flatbuffers::WIPOffset<Sequence<'a>> {
8240    let o = self.fbb_.end_table(self.start_);
8241    self.fbb_.required(o, Sequence::VT_NODE_ID,"node_id");
8242    self.fbb_.required(o, Sequence::VT_STEPS,"steps");
8243    flatbuffers::WIPOffset::new(o.value())
8244  }
8245}
8246
8247impl core::fmt::Debug for Sequence<'_> {
8248  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
8249    let mut ds = f.debug_struct("Sequence");
8250      ds.field("node_id", &self.node_id());
8251      ds.field("name", &self.name());
8252      ds.field("steps", &self.steps());
8253      ds.field("stagger", &self.stagger());
8254      ds.field("iterations", &self.iterations());
8255      ds.field("alternate", &self.alternate());
8256      ds.field("reduced_motion", &self.reduced_motion());
8257      ds.finish()
8258  }
8259}
8260pub enum GestureHandlerOffset {}
8261#[derive(Copy, Clone, PartialEq)]
8262
8263pub struct GestureHandler<'a> {
8264  pub _tab: flatbuffers::Table<'a>,
8265}
8266
8267impl<'a> flatbuffers::Follow<'a> for GestureHandler<'a> {
8268  type Inner = GestureHandler<'a>;
8269  #[inline]
8270  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
8271    Self { _tab: flatbuffers::Table::new(buf, loc) }
8272  }
8273}
8274
8275impl<'a> GestureHandler<'a> {
8276  pub const VT_NODE_ID: flatbuffers::VOffsetT = 4;
8277  pub const VT_TARGET_NODE_ID: flatbuffers::VOffsetT = 6;
8278  pub const VT_GESTURE_TYPE: flatbuffers::VOffsetT = 8;
8279  pub const VT_TRIGGER_EVENT: flatbuffers::VOffsetT = 10;
8280  pub const VT_TRIGGER_STATE_MACHINE: flatbuffers::VOffsetT = 12;
8281  pub const VT_CONTINUOUS_PROPERTY: flatbuffers::VOffsetT = 14;
8282  pub const VT_CONTINUOUS_AXIS: flatbuffers::VOffsetT = 16;
8283  pub const VT_KEYBOARD_KEY: flatbuffers::VOffsetT = 18;
8284  pub const VT_KEYBOARD_MODIFIER: flatbuffers::VOffsetT = 20;
8285  pub const VT_THRESHOLD_PX: flatbuffers::VOffsetT = 22;
8286  pub const VT_VELOCITY_THRESHOLD: flatbuffers::VOffsetT = 24;
8287
8288  #[inline]
8289  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
8290    GestureHandler { _tab: table }
8291  }
8292  #[allow(unused_mut)]
8293  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
8294    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
8295    args: &'args GestureHandlerArgs<'args>
8296  ) -> flatbuffers::WIPOffset<GestureHandler<'bldr>> {
8297    let mut builder = GestureHandlerBuilder::new(_fbb);
8298    builder.add_velocity_threshold(args.velocity_threshold);
8299    builder.add_threshold_px(args.threshold_px);
8300    if let Some(x) = args.keyboard_modifier { builder.add_keyboard_modifier(x); }
8301    if let Some(x) = args.keyboard_key { builder.add_keyboard_key(x); }
8302    if let Some(x) = args.continuous_axis { builder.add_continuous_axis(x); }
8303    if let Some(x) = args.continuous_property { builder.add_continuous_property(x); }
8304    if let Some(x) = args.trigger_state_machine { builder.add_trigger_state_machine(x); }
8305    if let Some(x) = args.trigger_event { builder.add_trigger_event(x); }
8306    if let Some(x) = args.target_node_id { builder.add_target_node_id(x); }
8307    if let Some(x) = args.node_id { builder.add_node_id(x); }
8308    builder.add_gesture_type(args.gesture_type);
8309    builder.finish()
8310  }
8311
8312
8313  #[inline]
8314  pub fn node_id(&self) -> &'a str {
8315    // Safety:
8316    // Created from valid Table for this object
8317    // which contains a valid value in this slot
8318    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(GestureHandler::VT_NODE_ID, None).unwrap()}
8319  }
8320  /// Target node that receives the gesture.
8321  #[inline]
8322  pub fn target_node_id(&self) -> &'a str {
8323    // Safety:
8324    // Created from valid Table for this object
8325    // which contains a valid value in this slot
8326    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(GestureHandler::VT_TARGET_NODE_ID, None).unwrap()}
8327  }
8328  #[inline]
8329  pub fn gesture_type(&self) -> GestureType {
8330    // Safety:
8331    // Created from valid Table for this object
8332    // which contains a valid value in this slot
8333    unsafe { self._tab.get::<GestureType>(GestureHandler::VT_GESTURE_TYPE, Some(GestureType::Tap)).unwrap()}
8334  }
8335  /// For tap/click: which state machine event to fire.
8336  #[inline]
8337  pub fn trigger_event(&self) -> Option<&'a str> {
8338    // Safety:
8339    // Created from valid Table for this object
8340    // which contains a valid value in this slot
8341    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(GestureHandler::VT_TRIGGER_EVENT, None)}
8342  }
8343  #[inline]
8344  pub fn trigger_state_machine(&self) -> Option<&'a str> {
8345    // Safety:
8346    // Created from valid Table for this object
8347    // which contains a valid value in this slot
8348    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(GestureHandler::VT_TRIGGER_STATE_MACHINE, None)}
8349  }
8350  /// For drag/continuous: property to update and value mapping.
8351  #[inline]
8352  pub fn continuous_property(&self) -> Option<&'a str> {
8353    // Safety:
8354    // Created from valid Table for this object
8355    // which contains a valid value in this slot
8356    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(GestureHandler::VT_CONTINUOUS_PROPERTY, None)}
8357  }
8358  #[inline]
8359  pub fn continuous_axis(&self) -> Option<&'a str> {
8360    // Safety:
8361    // Created from valid Table for this object
8362    // which contains a valid value in this slot
8363    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(GestureHandler::VT_CONTINUOUS_AXIS, None)}
8364  }
8365  /// Keyboard equivalent (required by validator for accessibility).
8366  #[inline]
8367  pub fn keyboard_key(&self) -> Option<&'a str> {
8368    // Safety:
8369    // Created from valid Table for this object
8370    // which contains a valid value in this slot
8371    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(GestureHandler::VT_KEYBOARD_KEY, None)}
8372  }
8373  #[inline]
8374  pub fn keyboard_modifier(&self) -> Option<&'a str> {
8375    // Safety:
8376    // Created from valid Table for this object
8377    // which contains a valid value in this slot
8378    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(GestureHandler::VT_KEYBOARD_MODIFIER, None)}
8379  }
8380  /// Gesture thresholds.
8381  #[inline]
8382  pub fn threshold_px(&self) -> f32 {
8383    // Safety:
8384    // Created from valid Table for this object
8385    // which contains a valid value in this slot
8386    unsafe { self._tab.get::<f32>(GestureHandler::VT_THRESHOLD_PX, Some(0.0)).unwrap()}
8387  }
8388  #[inline]
8389  pub fn velocity_threshold(&self) -> f32 {
8390    // Safety:
8391    // Created from valid Table for this object
8392    // which contains a valid value in this slot
8393    unsafe { self._tab.get::<f32>(GestureHandler::VT_VELOCITY_THRESHOLD, Some(0.0)).unwrap()}
8394  }
8395}
8396
8397impl flatbuffers::Verifiable for GestureHandler<'_> {
8398  #[inline]
8399  fn run_verifier(
8400    v: &mut flatbuffers::Verifier, pos: usize
8401  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
8402    use self::flatbuffers::Verifiable;
8403    v.visit_table(pos)?
8404     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("node_id", Self::VT_NODE_ID, true)?
8405     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("target_node_id", Self::VT_TARGET_NODE_ID, true)?
8406     .visit_field::<GestureType>("gesture_type", Self::VT_GESTURE_TYPE, false)?
8407     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("trigger_event", Self::VT_TRIGGER_EVENT, false)?
8408     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("trigger_state_machine", Self::VT_TRIGGER_STATE_MACHINE, false)?
8409     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("continuous_property", Self::VT_CONTINUOUS_PROPERTY, false)?
8410     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("continuous_axis", Self::VT_CONTINUOUS_AXIS, false)?
8411     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("keyboard_key", Self::VT_KEYBOARD_KEY, false)?
8412     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("keyboard_modifier", Self::VT_KEYBOARD_MODIFIER, false)?
8413     .visit_field::<f32>("threshold_px", Self::VT_THRESHOLD_PX, false)?
8414     .visit_field::<f32>("velocity_threshold", Self::VT_VELOCITY_THRESHOLD, false)?
8415     .finish();
8416    Ok(())
8417  }
8418}
8419pub struct GestureHandlerArgs<'a> {
8420    pub node_id: Option<flatbuffers::WIPOffset<&'a str>>,
8421    pub target_node_id: Option<flatbuffers::WIPOffset<&'a str>>,
8422    pub gesture_type: GestureType,
8423    pub trigger_event: Option<flatbuffers::WIPOffset<&'a str>>,
8424    pub trigger_state_machine: Option<flatbuffers::WIPOffset<&'a str>>,
8425    pub continuous_property: Option<flatbuffers::WIPOffset<&'a str>>,
8426    pub continuous_axis: Option<flatbuffers::WIPOffset<&'a str>>,
8427    pub keyboard_key: Option<flatbuffers::WIPOffset<&'a str>>,
8428    pub keyboard_modifier: Option<flatbuffers::WIPOffset<&'a str>>,
8429    pub threshold_px: f32,
8430    pub velocity_threshold: f32,
8431}
8432impl<'a> Default for GestureHandlerArgs<'a> {
8433  #[inline]
8434  fn default() -> Self {
8435    GestureHandlerArgs {
8436      node_id: None, // required field
8437      target_node_id: None, // required field
8438      gesture_type: GestureType::Tap,
8439      trigger_event: None,
8440      trigger_state_machine: None,
8441      continuous_property: None,
8442      continuous_axis: None,
8443      keyboard_key: None,
8444      keyboard_modifier: None,
8445      threshold_px: 0.0,
8446      velocity_threshold: 0.0,
8447    }
8448  }
8449}
8450
8451pub struct GestureHandlerBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
8452  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
8453  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
8454}
8455impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> GestureHandlerBuilder<'a, 'b, A> {
8456  #[inline]
8457  pub fn add_node_id(&mut self, node_id: flatbuffers::WIPOffset<&'b  str>) {
8458    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(GestureHandler::VT_NODE_ID, node_id);
8459  }
8460  #[inline]
8461  pub fn add_target_node_id(&mut self, target_node_id: flatbuffers::WIPOffset<&'b  str>) {
8462    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(GestureHandler::VT_TARGET_NODE_ID, target_node_id);
8463  }
8464  #[inline]
8465  pub fn add_gesture_type(&mut self, gesture_type: GestureType) {
8466    self.fbb_.push_slot::<GestureType>(GestureHandler::VT_GESTURE_TYPE, gesture_type, GestureType::Tap);
8467  }
8468  #[inline]
8469  pub fn add_trigger_event(&mut self, trigger_event: flatbuffers::WIPOffset<&'b  str>) {
8470    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(GestureHandler::VT_TRIGGER_EVENT, trigger_event);
8471  }
8472  #[inline]
8473  pub fn add_trigger_state_machine(&mut self, trigger_state_machine: flatbuffers::WIPOffset<&'b  str>) {
8474    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(GestureHandler::VT_TRIGGER_STATE_MACHINE, trigger_state_machine);
8475  }
8476  #[inline]
8477  pub fn add_continuous_property(&mut self, continuous_property: flatbuffers::WIPOffset<&'b  str>) {
8478    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(GestureHandler::VT_CONTINUOUS_PROPERTY, continuous_property);
8479  }
8480  #[inline]
8481  pub fn add_continuous_axis(&mut self, continuous_axis: flatbuffers::WIPOffset<&'b  str>) {
8482    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(GestureHandler::VT_CONTINUOUS_AXIS, continuous_axis);
8483  }
8484  #[inline]
8485  pub fn add_keyboard_key(&mut self, keyboard_key: flatbuffers::WIPOffset<&'b  str>) {
8486    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(GestureHandler::VT_KEYBOARD_KEY, keyboard_key);
8487  }
8488  #[inline]
8489  pub fn add_keyboard_modifier(&mut self, keyboard_modifier: flatbuffers::WIPOffset<&'b  str>) {
8490    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(GestureHandler::VT_KEYBOARD_MODIFIER, keyboard_modifier);
8491  }
8492  #[inline]
8493  pub fn add_threshold_px(&mut self, threshold_px: f32) {
8494    self.fbb_.push_slot::<f32>(GestureHandler::VT_THRESHOLD_PX, threshold_px, 0.0);
8495  }
8496  #[inline]
8497  pub fn add_velocity_threshold(&mut self, velocity_threshold: f32) {
8498    self.fbb_.push_slot::<f32>(GestureHandler::VT_VELOCITY_THRESHOLD, velocity_threshold, 0.0);
8499  }
8500  #[inline]
8501  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> GestureHandlerBuilder<'a, 'b, A> {
8502    let start = _fbb.start_table();
8503    GestureHandlerBuilder {
8504      fbb_: _fbb,
8505      start_: start,
8506    }
8507  }
8508  #[inline]
8509  pub fn finish(self) -> flatbuffers::WIPOffset<GestureHandler<'a>> {
8510    let o = self.fbb_.end_table(self.start_);
8511    self.fbb_.required(o, GestureHandler::VT_NODE_ID,"node_id");
8512    self.fbb_.required(o, GestureHandler::VT_TARGET_NODE_ID,"target_node_id");
8513    flatbuffers::WIPOffset::new(o.value())
8514  }
8515}
8516
8517impl core::fmt::Debug for GestureHandler<'_> {
8518  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
8519    let mut ds = f.debug_struct("GestureHandler");
8520      ds.field("node_id", &self.node_id());
8521      ds.field("target_node_id", &self.target_node_id());
8522      ds.field("gesture_type", &self.gesture_type());
8523      ds.field("trigger_event", &self.trigger_event());
8524      ds.field("trigger_state_machine", &self.trigger_state_machine());
8525      ds.field("continuous_property", &self.continuous_property());
8526      ds.field("continuous_axis", &self.continuous_axis());
8527      ds.field("keyboard_key", &self.keyboard_key());
8528      ds.field("keyboard_modifier", &self.keyboard_modifier());
8529      ds.field("threshold_px", &self.threshold_px());
8530      ds.field("velocity_threshold", &self.velocity_threshold());
8531      ds.finish()
8532  }
8533}
8534pub enum ScrollBindingOffset {}
8535#[derive(Copy, Clone, PartialEq)]
8536
8537pub struct ScrollBinding<'a> {
8538  pub _tab: flatbuffers::Table<'a>,
8539}
8540
8541impl<'a> flatbuffers::Follow<'a> for ScrollBinding<'a> {
8542  type Inner = ScrollBinding<'a>;
8543  #[inline]
8544  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
8545    Self { _tab: flatbuffers::Table::new(buf, loc) }
8546  }
8547}
8548
8549impl<'a> ScrollBinding<'a> {
8550  pub const VT_NODE_ID: flatbuffers::VOffsetT = 4;
8551  pub const VT_TARGET_NODE_ID: flatbuffers::VOffsetT = 6;
8552  pub const VT_SCROLL_TRIGGER: flatbuffers::VOffsetT = 8;
8553  pub const VT_SCROLL_AXIS: flatbuffers::VOffsetT = 10;
8554  pub const VT_RANGE_START: flatbuffers::VOffsetT = 12;
8555  pub const VT_RANGE_END: flatbuffers::VOffsetT = 14;
8556  pub const VT_PROPERTIES: flatbuffers::VOffsetT = 16;
8557  pub const VT_SCROLL_CONTAINER_ID: flatbuffers::VOffsetT = 18;
8558  pub const VT_REDUCED_MOTION: flatbuffers::VOffsetT = 20;
8559
8560  #[inline]
8561  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
8562    ScrollBinding { _tab: table }
8563  }
8564  #[allow(unused_mut)]
8565  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
8566    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
8567    args: &'args ScrollBindingArgs<'args>
8568  ) -> flatbuffers::WIPOffset<ScrollBinding<'bldr>> {
8569    let mut builder = ScrollBindingBuilder::new(_fbb);
8570    if let Some(x) = args.reduced_motion { builder.add_reduced_motion(x); }
8571    if let Some(x) = args.scroll_container_id { builder.add_scroll_container_id(x); }
8572    if let Some(x) = args.properties { builder.add_properties(x); }
8573    builder.add_range_end(args.range_end);
8574    builder.add_range_start(args.range_start);
8575    if let Some(x) = args.target_node_id { builder.add_target_node_id(x); }
8576    if let Some(x) = args.node_id { builder.add_node_id(x); }
8577    builder.add_scroll_axis(args.scroll_axis);
8578    builder.add_scroll_trigger(args.scroll_trigger);
8579    builder.finish()
8580  }
8581
8582
8583  #[inline]
8584  pub fn node_id(&self) -> &'a str {
8585    // Safety:
8586    // Created from valid Table for this object
8587    // which contains a valid value in this slot
8588    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ScrollBinding::VT_NODE_ID, None).unwrap()}
8589  }
8590  /// Target node whose properties are scroll-linked.
8591  #[inline]
8592  pub fn target_node_id(&self) -> &'a str {
8593    // Safety:
8594    // Created from valid Table for this object
8595    // which contains a valid value in this slot
8596    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ScrollBinding::VT_TARGET_NODE_ID, None).unwrap()}
8597  }
8598  #[inline]
8599  pub fn scroll_trigger(&self) -> ScrollTrigger {
8600    // Safety:
8601    // Created from valid Table for this object
8602    // which contains a valid value in this slot
8603    unsafe { self._tab.get::<ScrollTrigger>(ScrollBinding::VT_SCROLL_TRIGGER, Some(ScrollTrigger::ViewProgress)).unwrap()}
8604  }
8605  #[inline]
8606  pub fn scroll_axis(&self) -> ScrollAxis {
8607    // Safety:
8608    // Created from valid Table for this object
8609    // which contains a valid value in this slot
8610    unsafe { self._tab.get::<ScrollAxis>(ScrollBinding::VT_SCROLL_AXIS, Some(ScrollAxis::Vertical)).unwrap()}
8611  }
8612  /// Range of scroll progress that maps to animation (0.0 to 1.0).
8613  #[inline]
8614  pub fn range_start(&self) -> f32 {
8615    // Safety:
8616    // Created from valid Table for this object
8617    // which contains a valid value in this slot
8618    unsafe { self._tab.get::<f32>(ScrollBinding::VT_RANGE_START, Some(0.0)).unwrap()}
8619  }
8620  #[inline]
8621  pub fn range_end(&self) -> f32 {
8622    // Safety:
8623    // Created from valid Table for this object
8624    // which contains a valid value in this slot
8625    unsafe { self._tab.get::<f32>(ScrollBinding::VT_RANGE_END, Some(1.0)).unwrap()}
8626  }
8627  /// Properties to animate over the scroll range.
8628  #[inline]
8629  pub fn properties(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<AnimatedProperty<'a>>> {
8630    // Safety:
8631    // Created from valid Table for this object
8632    // which contains a valid value in this slot
8633    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<AnimatedProperty>>>>(ScrollBinding::VT_PROPERTIES, None).unwrap()}
8634  }
8635  /// Optional scroll container (default: nearest scrollable ancestor).
8636  #[inline]
8637  pub fn scroll_container_id(&self) -> Option<&'a str> {
8638    // Safety:
8639    // Created from valid Table for this object
8640    // which contains a valid value in this slot
8641    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ScrollBinding::VT_SCROLL_CONTAINER_ID, None)}
8642  }
8643  /// Reduced motion: if true, skip scroll-linked animation entirely.
8644  #[inline]
8645  pub fn reduced_motion(&self) -> Option<ReducedMotion<'a>> {
8646    // Safety:
8647    // Created from valid Table for this object
8648    // which contains a valid value in this slot
8649    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<ReducedMotion>>(ScrollBinding::VT_REDUCED_MOTION, None)}
8650  }
8651}
8652
8653impl flatbuffers::Verifiable for ScrollBinding<'_> {
8654  #[inline]
8655  fn run_verifier(
8656    v: &mut flatbuffers::Verifier, pos: usize
8657  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
8658    use self::flatbuffers::Verifiable;
8659    v.visit_table(pos)?
8660     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("node_id", Self::VT_NODE_ID, true)?
8661     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("target_node_id", Self::VT_TARGET_NODE_ID, true)?
8662     .visit_field::<ScrollTrigger>("scroll_trigger", Self::VT_SCROLL_TRIGGER, false)?
8663     .visit_field::<ScrollAxis>("scroll_axis", Self::VT_SCROLL_AXIS, false)?
8664     .visit_field::<f32>("range_start", Self::VT_RANGE_START, false)?
8665     .visit_field::<f32>("range_end", Self::VT_RANGE_END, false)?
8666     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<AnimatedProperty>>>>("properties", Self::VT_PROPERTIES, true)?
8667     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("scroll_container_id", Self::VT_SCROLL_CONTAINER_ID, false)?
8668     .visit_field::<flatbuffers::ForwardsUOffset<ReducedMotion>>("reduced_motion", Self::VT_REDUCED_MOTION, false)?
8669     .finish();
8670    Ok(())
8671  }
8672}
8673pub struct ScrollBindingArgs<'a> {
8674    pub node_id: Option<flatbuffers::WIPOffset<&'a str>>,
8675    pub target_node_id: Option<flatbuffers::WIPOffset<&'a str>>,
8676    pub scroll_trigger: ScrollTrigger,
8677    pub scroll_axis: ScrollAxis,
8678    pub range_start: f32,
8679    pub range_end: f32,
8680    pub properties: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<AnimatedProperty<'a>>>>>,
8681    pub scroll_container_id: Option<flatbuffers::WIPOffset<&'a str>>,
8682    pub reduced_motion: Option<flatbuffers::WIPOffset<ReducedMotion<'a>>>,
8683}
8684impl<'a> Default for ScrollBindingArgs<'a> {
8685  #[inline]
8686  fn default() -> Self {
8687    ScrollBindingArgs {
8688      node_id: None, // required field
8689      target_node_id: None, // required field
8690      scroll_trigger: ScrollTrigger::ViewProgress,
8691      scroll_axis: ScrollAxis::Vertical,
8692      range_start: 0.0,
8693      range_end: 1.0,
8694      properties: None, // required field
8695      scroll_container_id: None,
8696      reduced_motion: None,
8697    }
8698  }
8699}
8700
8701pub struct ScrollBindingBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
8702  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
8703  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
8704}
8705impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ScrollBindingBuilder<'a, 'b, A> {
8706  #[inline]
8707  pub fn add_node_id(&mut self, node_id: flatbuffers::WIPOffset<&'b  str>) {
8708    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ScrollBinding::VT_NODE_ID, node_id);
8709  }
8710  #[inline]
8711  pub fn add_target_node_id(&mut self, target_node_id: flatbuffers::WIPOffset<&'b  str>) {
8712    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ScrollBinding::VT_TARGET_NODE_ID, target_node_id);
8713  }
8714  #[inline]
8715  pub fn add_scroll_trigger(&mut self, scroll_trigger: ScrollTrigger) {
8716    self.fbb_.push_slot::<ScrollTrigger>(ScrollBinding::VT_SCROLL_TRIGGER, scroll_trigger, ScrollTrigger::ViewProgress);
8717  }
8718  #[inline]
8719  pub fn add_scroll_axis(&mut self, scroll_axis: ScrollAxis) {
8720    self.fbb_.push_slot::<ScrollAxis>(ScrollBinding::VT_SCROLL_AXIS, scroll_axis, ScrollAxis::Vertical);
8721  }
8722  #[inline]
8723  pub fn add_range_start(&mut self, range_start: f32) {
8724    self.fbb_.push_slot::<f32>(ScrollBinding::VT_RANGE_START, range_start, 0.0);
8725  }
8726  #[inline]
8727  pub fn add_range_end(&mut self, range_end: f32) {
8728    self.fbb_.push_slot::<f32>(ScrollBinding::VT_RANGE_END, range_end, 1.0);
8729  }
8730  #[inline]
8731  pub fn add_properties(&mut self, properties: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<AnimatedProperty<'b >>>>) {
8732    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ScrollBinding::VT_PROPERTIES, properties);
8733  }
8734  #[inline]
8735  pub fn add_scroll_container_id(&mut self, scroll_container_id: flatbuffers::WIPOffset<&'b  str>) {
8736    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ScrollBinding::VT_SCROLL_CONTAINER_ID, scroll_container_id);
8737  }
8738  #[inline]
8739  pub fn add_reduced_motion(&mut self, reduced_motion: flatbuffers::WIPOffset<ReducedMotion<'b >>) {
8740    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<ReducedMotion>>(ScrollBinding::VT_REDUCED_MOTION, reduced_motion);
8741  }
8742  #[inline]
8743  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ScrollBindingBuilder<'a, 'b, A> {
8744    let start = _fbb.start_table();
8745    ScrollBindingBuilder {
8746      fbb_: _fbb,
8747      start_: start,
8748    }
8749  }
8750  #[inline]
8751  pub fn finish(self) -> flatbuffers::WIPOffset<ScrollBinding<'a>> {
8752    let o = self.fbb_.end_table(self.start_);
8753    self.fbb_.required(o, ScrollBinding::VT_NODE_ID,"node_id");
8754    self.fbb_.required(o, ScrollBinding::VT_TARGET_NODE_ID,"target_node_id");
8755    self.fbb_.required(o, ScrollBinding::VT_PROPERTIES,"properties");
8756    flatbuffers::WIPOffset::new(o.value())
8757  }
8758}
8759
8760impl core::fmt::Debug for ScrollBinding<'_> {
8761  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
8762    let mut ds = f.debug_struct("ScrollBinding");
8763      ds.field("node_id", &self.node_id());
8764      ds.field("target_node_id", &self.target_node_id());
8765      ds.field("scroll_trigger", &self.scroll_trigger());
8766      ds.field("scroll_axis", &self.scroll_axis());
8767      ds.field("range_start", &self.range_start());
8768      ds.field("range_end", &self.range_end());
8769      ds.field("properties", &self.properties());
8770      ds.field("scroll_container_id", &self.scroll_container_id());
8771      ds.field("reduced_motion", &self.reduced_motion());
8772      ds.finish()
8773  }
8774}
8775pub enum PhysicsBodyOffset {}
8776#[derive(Copy, Clone, PartialEq)]
8777
8778pub struct PhysicsBody<'a> {
8779  pub _tab: flatbuffers::Table<'a>,
8780}
8781
8782impl<'a> flatbuffers::Follow<'a> for PhysicsBody<'a> {
8783  type Inner = PhysicsBody<'a>;
8784  #[inline]
8785  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
8786    Self { _tab: flatbuffers::Table::new(buf, loc) }
8787  }
8788}
8789
8790impl<'a> PhysicsBody<'a> {
8791  pub const VT_NODE_ID: flatbuffers::VOffsetT = 4;
8792  pub const VT_TARGET_NODE_ID: flatbuffers::VOffsetT = 6;
8793  pub const VT_STIFFNESS: flatbuffers::VOffsetT = 8;
8794  pub const VT_DAMPING: flatbuffers::VOffsetT = 10;
8795  pub const VT_MASS: flatbuffers::VOffsetT = 12;
8796  pub const VT_FRICTION: flatbuffers::VOffsetT = 14;
8797  pub const VT_RESTITUTION: flatbuffers::VOffsetT = 16;
8798  pub const VT_INTERRUPTIBLE: flatbuffers::VOffsetT = 18;
8799
8800  #[inline]
8801  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
8802    PhysicsBody { _tab: table }
8803  }
8804  #[allow(unused_mut)]
8805  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
8806    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
8807    args: &'args PhysicsBodyArgs<'args>
8808  ) -> flatbuffers::WIPOffset<PhysicsBody<'bldr>> {
8809    let mut builder = PhysicsBodyBuilder::new(_fbb);
8810    builder.add_restitution(args.restitution);
8811    builder.add_friction(args.friction);
8812    builder.add_mass(args.mass);
8813    builder.add_damping(args.damping);
8814    builder.add_stiffness(args.stiffness);
8815    if let Some(x) = args.target_node_id { builder.add_target_node_id(x); }
8816    if let Some(x) = args.node_id { builder.add_node_id(x); }
8817    builder.add_interruptible(args.interruptible);
8818    builder.finish()
8819  }
8820
8821
8822  #[inline]
8823  pub fn node_id(&self) -> &'a str {
8824    // Safety:
8825    // Created from valid Table for this object
8826    // which contains a valid value in this slot
8827    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(PhysicsBody::VT_NODE_ID, None).unwrap()}
8828  }
8829  /// Target node to apply physics to.
8830  #[inline]
8831  pub fn target_node_id(&self) -> &'a str {
8832    // Safety:
8833    // Created from valid Table for this object
8834    // which contains a valid value in this slot
8835    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(PhysicsBody::VT_TARGET_NODE_ID, None).unwrap()}
8836  }
8837  /// Spring parameters (the primary use case).
8838  #[inline]
8839  pub fn stiffness(&self) -> f32 {
8840    // Safety:
8841    // Created from valid Table for this object
8842    // which contains a valid value in this slot
8843    unsafe { self._tab.get::<f32>(PhysicsBody::VT_STIFFNESS, Some(300.0)).unwrap()}
8844  }
8845  #[inline]
8846  pub fn damping(&self) -> f32 {
8847    // Safety:
8848    // Created from valid Table for this object
8849    // which contains a valid value in this slot
8850    unsafe { self._tab.get::<f32>(PhysicsBody::VT_DAMPING, Some(25.0)).unwrap()}
8851  }
8852  #[inline]
8853  pub fn mass(&self) -> f32 {
8854    // Safety:
8855    // Created from valid Table for this object
8856    // which contains a valid value in this slot
8857    unsafe { self._tab.get::<f32>(PhysicsBody::VT_MASS, Some(1.0)).unwrap()}
8858  }
8859  /// Friction for momentum decay (0.0 = no friction, 1.0 = instant stop).
8860  #[inline]
8861  pub fn friction(&self) -> f32 {
8862    // Safety:
8863    // Created from valid Table for this object
8864    // which contains a valid value in this slot
8865    unsafe { self._tab.get::<f32>(PhysicsBody::VT_FRICTION, Some(0.05)).unwrap()}
8866  }
8867  /// Restitution / bounciness (0.0 = no bounce, 1.0 = perfect bounce).
8868  #[inline]
8869  pub fn restitution(&self) -> f32 {
8870    // Safety:
8871    // Created from valid Table for this object
8872    // which contains a valid value in this slot
8873    unsafe { self._tab.get::<f32>(PhysicsBody::VT_RESTITUTION, Some(0.0)).unwrap()}
8874  }
8875  /// If true, the compiler emits a per-frame rAF stepper instead of
8876  /// pre-computed CSS linear() easing. Needed when the animation can
8877  /// be interrupted mid-flight (e.g., rapid hover/unhover).
8878  #[inline]
8879  pub fn interruptible(&self) -> bool {
8880    // Safety:
8881    // Created from valid Table for this object
8882    // which contains a valid value in this slot
8883    unsafe { self._tab.get::<bool>(PhysicsBody::VT_INTERRUPTIBLE, Some(false)).unwrap()}
8884  }
8885}
8886
8887impl flatbuffers::Verifiable for PhysicsBody<'_> {
8888  #[inline]
8889  fn run_verifier(
8890    v: &mut flatbuffers::Verifier, pos: usize
8891  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
8892    use self::flatbuffers::Verifiable;
8893    v.visit_table(pos)?
8894     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("node_id", Self::VT_NODE_ID, true)?
8895     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("target_node_id", Self::VT_TARGET_NODE_ID, true)?
8896     .visit_field::<f32>("stiffness", Self::VT_STIFFNESS, false)?
8897     .visit_field::<f32>("damping", Self::VT_DAMPING, false)?
8898     .visit_field::<f32>("mass", Self::VT_MASS, false)?
8899     .visit_field::<f32>("friction", Self::VT_FRICTION, false)?
8900     .visit_field::<f32>("restitution", Self::VT_RESTITUTION, false)?
8901     .visit_field::<bool>("interruptible", Self::VT_INTERRUPTIBLE, false)?
8902     .finish();
8903    Ok(())
8904  }
8905}
8906pub struct PhysicsBodyArgs<'a> {
8907    pub node_id: Option<flatbuffers::WIPOffset<&'a str>>,
8908    pub target_node_id: Option<flatbuffers::WIPOffset<&'a str>>,
8909    pub stiffness: f32,
8910    pub damping: f32,
8911    pub mass: f32,
8912    pub friction: f32,
8913    pub restitution: f32,
8914    pub interruptible: bool,
8915}
8916impl<'a> Default for PhysicsBodyArgs<'a> {
8917  #[inline]
8918  fn default() -> Self {
8919    PhysicsBodyArgs {
8920      node_id: None, // required field
8921      target_node_id: None, // required field
8922      stiffness: 300.0,
8923      damping: 25.0,
8924      mass: 1.0,
8925      friction: 0.05,
8926      restitution: 0.0,
8927      interruptible: false,
8928    }
8929  }
8930}
8931
8932pub struct PhysicsBodyBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
8933  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
8934  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
8935}
8936impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> PhysicsBodyBuilder<'a, 'b, A> {
8937  #[inline]
8938  pub fn add_node_id(&mut self, node_id: flatbuffers::WIPOffset<&'b  str>) {
8939    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PhysicsBody::VT_NODE_ID, node_id);
8940  }
8941  #[inline]
8942  pub fn add_target_node_id(&mut self, target_node_id: flatbuffers::WIPOffset<&'b  str>) {
8943    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PhysicsBody::VT_TARGET_NODE_ID, target_node_id);
8944  }
8945  #[inline]
8946  pub fn add_stiffness(&mut self, stiffness: f32) {
8947    self.fbb_.push_slot::<f32>(PhysicsBody::VT_STIFFNESS, stiffness, 300.0);
8948  }
8949  #[inline]
8950  pub fn add_damping(&mut self, damping: f32) {
8951    self.fbb_.push_slot::<f32>(PhysicsBody::VT_DAMPING, damping, 25.0);
8952  }
8953  #[inline]
8954  pub fn add_mass(&mut self, mass: f32) {
8955    self.fbb_.push_slot::<f32>(PhysicsBody::VT_MASS, mass, 1.0);
8956  }
8957  #[inline]
8958  pub fn add_friction(&mut self, friction: f32) {
8959    self.fbb_.push_slot::<f32>(PhysicsBody::VT_FRICTION, friction, 0.05);
8960  }
8961  #[inline]
8962  pub fn add_restitution(&mut self, restitution: f32) {
8963    self.fbb_.push_slot::<f32>(PhysicsBody::VT_RESTITUTION, restitution, 0.0);
8964  }
8965  #[inline]
8966  pub fn add_interruptible(&mut self, interruptible: bool) {
8967    self.fbb_.push_slot::<bool>(PhysicsBody::VT_INTERRUPTIBLE, interruptible, false);
8968  }
8969  #[inline]
8970  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> PhysicsBodyBuilder<'a, 'b, A> {
8971    let start = _fbb.start_table();
8972    PhysicsBodyBuilder {
8973      fbb_: _fbb,
8974      start_: start,
8975    }
8976  }
8977  #[inline]
8978  pub fn finish(self) -> flatbuffers::WIPOffset<PhysicsBody<'a>> {
8979    let o = self.fbb_.end_table(self.start_);
8980    self.fbb_.required(o, PhysicsBody::VT_NODE_ID,"node_id");
8981    self.fbb_.required(o, PhysicsBody::VT_TARGET_NODE_ID,"target_node_id");
8982    flatbuffers::WIPOffset::new(o.value())
8983  }
8984}
8985
8986impl core::fmt::Debug for PhysicsBody<'_> {
8987  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
8988    let mut ds = f.debug_struct("PhysicsBody");
8989      ds.field("node_id", &self.node_id());
8990      ds.field("target_node_id", &self.target_node_id());
8991      ds.field("stiffness", &self.stiffness());
8992      ds.field("damping", &self.damping());
8993      ds.field("mass", &self.mass());
8994      ds.field("friction", &self.friction());
8995      ds.field("restitution", &self.restitution());
8996      ds.field("interruptible", &self.interruptible());
8997      ds.finish()
8998  }
8999}
9000pub enum ReducedMotionOffset {}
9001#[derive(Copy, Clone, PartialEq)]
9002
9003pub struct ReducedMotion<'a> {
9004  pub _tab: flatbuffers::Table<'a>,
9005}
9006
9007impl<'a> flatbuffers::Follow<'a> for ReducedMotion<'a> {
9008  type Inner = ReducedMotion<'a>;
9009  #[inline]
9010  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
9011    Self { _tab: flatbuffers::Table::new(buf, loc) }
9012  }
9013}
9014
9015impl<'a> ReducedMotion<'a> {
9016  pub const VT_STRATEGY: flatbuffers::VOffsetT = 4;
9017  pub const VT_SIMPLIFIED_PROPERTIES: flatbuffers::VOffsetT = 6;
9018  pub const VT_REDUCED_DURATION: flatbuffers::VOffsetT = 8;
9019
9020  #[inline]
9021  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
9022    ReducedMotion { _tab: table }
9023  }
9024  #[allow(unused_mut)]
9025  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
9026    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
9027    args: &'args ReducedMotionArgs<'args>
9028  ) -> flatbuffers::WIPOffset<ReducedMotion<'bldr>> {
9029    let mut builder = ReducedMotionBuilder::new(_fbb);
9030    if let Some(x) = args.reduced_duration { builder.add_reduced_duration(x); }
9031    if let Some(x) = args.simplified_properties { builder.add_simplified_properties(x); }
9032    builder.add_strategy(args.strategy);
9033    builder.finish()
9034  }
9035
9036
9037  #[inline]
9038  pub fn strategy(&self) -> ReducedMotionStrategy {
9039    // Safety:
9040    // Created from valid Table for this object
9041    // which contains a valid value in this slot
9042    unsafe { self._tab.get::<ReducedMotionStrategy>(ReducedMotion::VT_STRATEGY, Some(ReducedMotionStrategy::Remove)).unwrap()}
9043  }
9044  /// For Simplify: replacement properties to animate instead.
9045  #[inline]
9046  pub fn simplified_properties(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<AnimatedProperty<'a>>>> {
9047    // Safety:
9048    // Created from valid Table for this object
9049    // which contains a valid value in this slot
9050    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<AnimatedProperty>>>>(ReducedMotion::VT_SIMPLIFIED_PROPERTIES, None)}
9051  }
9052  /// For ReduceDuration: the reduced duration (e.g., 1ms for instant).
9053  #[inline]
9054  pub fn reduced_duration(&self) -> Option<Duration<'a>> {
9055    // Safety:
9056    // Created from valid Table for this object
9057    // which contains a valid value in this slot
9058    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Duration>>(ReducedMotion::VT_REDUCED_DURATION, None)}
9059  }
9060}
9061
9062impl flatbuffers::Verifiable for ReducedMotion<'_> {
9063  #[inline]
9064  fn run_verifier(
9065    v: &mut flatbuffers::Verifier, pos: usize
9066  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
9067    use self::flatbuffers::Verifiable;
9068    v.visit_table(pos)?
9069     .visit_field::<ReducedMotionStrategy>("strategy", Self::VT_STRATEGY, false)?
9070     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<AnimatedProperty>>>>("simplified_properties", Self::VT_SIMPLIFIED_PROPERTIES, false)?
9071     .visit_field::<flatbuffers::ForwardsUOffset<Duration>>("reduced_duration", Self::VT_REDUCED_DURATION, false)?
9072     .finish();
9073    Ok(())
9074  }
9075}
9076pub struct ReducedMotionArgs<'a> {
9077    pub strategy: ReducedMotionStrategy,
9078    pub simplified_properties: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<AnimatedProperty<'a>>>>>,
9079    pub reduced_duration: Option<flatbuffers::WIPOffset<Duration<'a>>>,
9080}
9081impl<'a> Default for ReducedMotionArgs<'a> {
9082  #[inline]
9083  fn default() -> Self {
9084    ReducedMotionArgs {
9085      strategy: ReducedMotionStrategy::Remove,
9086      simplified_properties: None,
9087      reduced_duration: None,
9088    }
9089  }
9090}
9091
9092pub struct ReducedMotionBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
9093  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
9094  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
9095}
9096impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ReducedMotionBuilder<'a, 'b, A> {
9097  #[inline]
9098  pub fn add_strategy(&mut self, strategy: ReducedMotionStrategy) {
9099    self.fbb_.push_slot::<ReducedMotionStrategy>(ReducedMotion::VT_STRATEGY, strategy, ReducedMotionStrategy::Remove);
9100  }
9101  #[inline]
9102  pub fn add_simplified_properties(&mut self, simplified_properties: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<AnimatedProperty<'b >>>>) {
9103    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ReducedMotion::VT_SIMPLIFIED_PROPERTIES, simplified_properties);
9104  }
9105  #[inline]
9106  pub fn add_reduced_duration(&mut self, reduced_duration: flatbuffers::WIPOffset<Duration<'b >>) {
9107    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Duration>>(ReducedMotion::VT_REDUCED_DURATION, reduced_duration);
9108  }
9109  #[inline]
9110  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ReducedMotionBuilder<'a, 'b, A> {
9111    let start = _fbb.start_table();
9112    ReducedMotionBuilder {
9113      fbb_: _fbb,
9114      start_: start,
9115    }
9116  }
9117  #[inline]
9118  pub fn finish(self) -> flatbuffers::WIPOffset<ReducedMotion<'a>> {
9119    let o = self.fbb_.end_table(self.start_);
9120    flatbuffers::WIPOffset::new(o.value())
9121  }
9122}
9123
9124impl core::fmt::Debug for ReducedMotion<'_> {
9125  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
9126    let mut ds = f.debug_struct("ReducedMotion");
9127      ds.field("strategy", &self.strategy());
9128      ds.field("simplified_properties", &self.simplified_properties());
9129      ds.field("reduced_duration", &self.reduced_duration());
9130      ds.finish()
9131  }
9132}
9133pub enum SharedElementPairOffset {}
9134#[derive(Copy, Clone, PartialEq)]
9135
9136pub struct SharedElementPair<'a> {
9137  pub _tab: flatbuffers::Table<'a>,
9138}
9139
9140impl<'a> flatbuffers::Follow<'a> for SharedElementPair<'a> {
9141  type Inner = SharedElementPair<'a>;
9142  #[inline]
9143  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
9144    Self { _tab: flatbuffers::Table::new(buf, loc) }
9145  }
9146}
9147
9148impl<'a> SharedElementPair<'a> {
9149  pub const VT_TRANSITION_NAME: flatbuffers::VOffsetT = 4;
9150  pub const VT_SOURCE_NODE_ID: flatbuffers::VOffsetT = 6;
9151  pub const VT_TARGET_NODE_ID: flatbuffers::VOffsetT = 8;
9152
9153  #[inline]
9154  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
9155    SharedElementPair { _tab: table }
9156  }
9157  #[allow(unused_mut)]
9158  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
9159    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
9160    args: &'args SharedElementPairArgs<'args>
9161  ) -> flatbuffers::WIPOffset<SharedElementPair<'bldr>> {
9162    let mut builder = SharedElementPairBuilder::new(_fbb);
9163    if let Some(x) = args.target_node_id { builder.add_target_node_id(x); }
9164    if let Some(x) = args.source_node_id { builder.add_source_node_id(x); }
9165    if let Some(x) = args.transition_name { builder.add_transition_name(x); }
9166    builder.finish()
9167  }
9168
9169
9170  #[inline]
9171  pub fn transition_name(&self) -> &'a str {
9172    // Safety:
9173    // Created from valid Table for this object
9174    // which contains a valid value in this slot
9175    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(SharedElementPair::VT_TRANSITION_NAME, None).unwrap()}
9176  }
9177  #[inline]
9178  pub fn source_node_id(&self) -> Option<&'a str> {
9179    // Safety:
9180    // Created from valid Table for this object
9181    // which contains a valid value in this slot
9182    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(SharedElementPair::VT_SOURCE_NODE_ID, None)}
9183  }
9184  #[inline]
9185  pub fn target_node_id(&self) -> Option<&'a str> {
9186    // Safety:
9187    // Created from valid Table for this object
9188    // which contains a valid value in this slot
9189    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(SharedElementPair::VT_TARGET_NODE_ID, None)}
9190  }
9191}
9192
9193impl flatbuffers::Verifiable for SharedElementPair<'_> {
9194  #[inline]
9195  fn run_verifier(
9196    v: &mut flatbuffers::Verifier, pos: usize
9197  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
9198    use self::flatbuffers::Verifiable;
9199    v.visit_table(pos)?
9200     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("transition_name", Self::VT_TRANSITION_NAME, true)?
9201     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("source_node_id", Self::VT_SOURCE_NODE_ID, false)?
9202     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("target_node_id", Self::VT_TARGET_NODE_ID, false)?
9203     .finish();
9204    Ok(())
9205  }
9206}
9207pub struct SharedElementPairArgs<'a> {
9208    pub transition_name: Option<flatbuffers::WIPOffset<&'a str>>,
9209    pub source_node_id: Option<flatbuffers::WIPOffset<&'a str>>,
9210    pub target_node_id: Option<flatbuffers::WIPOffset<&'a str>>,
9211}
9212impl<'a> Default for SharedElementPairArgs<'a> {
9213  #[inline]
9214  fn default() -> Self {
9215    SharedElementPairArgs {
9216      transition_name: None, // required field
9217      source_node_id: None,
9218      target_node_id: None,
9219    }
9220  }
9221}
9222
9223pub struct SharedElementPairBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
9224  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
9225  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
9226}
9227impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SharedElementPairBuilder<'a, 'b, A> {
9228  #[inline]
9229  pub fn add_transition_name(&mut self, transition_name: flatbuffers::WIPOffset<&'b  str>) {
9230    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(SharedElementPair::VT_TRANSITION_NAME, transition_name);
9231  }
9232  #[inline]
9233  pub fn add_source_node_id(&mut self, source_node_id: flatbuffers::WIPOffset<&'b  str>) {
9234    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(SharedElementPair::VT_SOURCE_NODE_ID, source_node_id);
9235  }
9236  #[inline]
9237  pub fn add_target_node_id(&mut self, target_node_id: flatbuffers::WIPOffset<&'b  str>) {
9238    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(SharedElementPair::VT_TARGET_NODE_ID, target_node_id);
9239  }
9240  #[inline]
9241  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> SharedElementPairBuilder<'a, 'b, A> {
9242    let start = _fbb.start_table();
9243    SharedElementPairBuilder {
9244      fbb_: _fbb,
9245      start_: start,
9246    }
9247  }
9248  #[inline]
9249  pub fn finish(self) -> flatbuffers::WIPOffset<SharedElementPair<'a>> {
9250    let o = self.fbb_.end_table(self.start_);
9251    self.fbb_.required(o, SharedElementPair::VT_TRANSITION_NAME,"transition_name");
9252    flatbuffers::WIPOffset::new(o.value())
9253  }
9254}
9255
9256impl core::fmt::Debug for SharedElementPair<'_> {
9257  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
9258    let mut ds = f.debug_struct("SharedElementPair");
9259      ds.field("transition_name", &self.transition_name());
9260      ds.field("source_node_id", &self.source_node_id());
9261      ds.field("target_node_id", &self.target_node_id());
9262      ds.finish()
9263  }
9264}
9265pub enum RouteGuardOffset {}
9266#[derive(Copy, Clone, PartialEq)]
9267
9268pub struct RouteGuard<'a> {
9269  pub _tab: flatbuffers::Table<'a>,
9270}
9271
9272impl<'a> flatbuffers::Follow<'a> for RouteGuard<'a> {
9273  type Inner = RouteGuard<'a>;
9274  #[inline]
9275  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
9276    Self { _tab: flatbuffers::Table::new(buf, loc) }
9277  }
9278}
9279
9280impl<'a> RouteGuard<'a> {
9281  pub const VT_REQUIRES_AUTH: flatbuffers::VOffsetT = 4;
9282  pub const VT_REQUIRED_ROLES: flatbuffers::VOffsetT = 6;
9283  pub const VT_REDIRECT_ON_FAIL: flatbuffers::VOffsetT = 8;
9284  pub const VT_CUSTOM_GUARD: flatbuffers::VOffsetT = 10;
9285
9286  #[inline]
9287  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
9288    RouteGuard { _tab: table }
9289  }
9290  #[allow(unused_mut)]
9291  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
9292    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
9293    args: &'args RouteGuardArgs<'args>
9294  ) -> flatbuffers::WIPOffset<RouteGuard<'bldr>> {
9295    let mut builder = RouteGuardBuilder::new(_fbb);
9296    if let Some(x) = args.custom_guard { builder.add_custom_guard(x); }
9297    if let Some(x) = args.redirect_on_fail { builder.add_redirect_on_fail(x); }
9298    if let Some(x) = args.required_roles { builder.add_required_roles(x); }
9299    builder.add_requires_auth(args.requires_auth);
9300    builder.finish()
9301  }
9302
9303
9304  #[inline]
9305  pub fn requires_auth(&self) -> bool {
9306    // Safety:
9307    // Created from valid Table for this object
9308    // which contains a valid value in this slot
9309    unsafe { self._tab.get::<bool>(RouteGuard::VT_REQUIRES_AUTH, Some(false)).unwrap()}
9310  }
9311  #[inline]
9312  pub fn required_roles(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>> {
9313    // Safety:
9314    // Created from valid Table for this object
9315    // which contains a valid value in this slot
9316    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>(RouteGuard::VT_REQUIRED_ROLES, None)}
9317  }
9318  #[inline]
9319  pub fn redirect_on_fail(&self) -> Option<&'a str> {
9320    // Safety:
9321    // Created from valid Table for this object
9322    // which contains a valid value in this slot
9323    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(RouteGuard::VT_REDIRECT_ON_FAIL, None)}
9324  }
9325  #[inline]
9326  pub fn custom_guard(&self) -> Option<&'a str> {
9327    // Safety:
9328    // Created from valid Table for this object
9329    // which contains a valid value in this slot
9330    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(RouteGuard::VT_CUSTOM_GUARD, None)}
9331  }
9332}
9333
9334impl flatbuffers::Verifiable for RouteGuard<'_> {
9335  #[inline]
9336  fn run_verifier(
9337    v: &mut flatbuffers::Verifier, pos: usize
9338  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
9339    use self::flatbuffers::Verifiable;
9340    v.visit_table(pos)?
9341     .visit_field::<bool>("requires_auth", Self::VT_REQUIRES_AUTH, false)?
9342     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>>>("required_roles", Self::VT_REQUIRED_ROLES, false)?
9343     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("redirect_on_fail", Self::VT_REDIRECT_ON_FAIL, false)?
9344     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("custom_guard", Self::VT_CUSTOM_GUARD, false)?
9345     .finish();
9346    Ok(())
9347  }
9348}
9349pub struct RouteGuardArgs<'a> {
9350    pub requires_auth: bool,
9351    pub required_roles: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>,
9352    pub redirect_on_fail: Option<flatbuffers::WIPOffset<&'a str>>,
9353    pub custom_guard: Option<flatbuffers::WIPOffset<&'a str>>,
9354}
9355impl<'a> Default for RouteGuardArgs<'a> {
9356  #[inline]
9357  fn default() -> Self {
9358    RouteGuardArgs {
9359      requires_auth: false,
9360      required_roles: None,
9361      redirect_on_fail: None,
9362      custom_guard: None,
9363    }
9364  }
9365}
9366
9367pub struct RouteGuardBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
9368  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
9369  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
9370}
9371impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RouteGuardBuilder<'a, 'b, A> {
9372  #[inline]
9373  pub fn add_requires_auth(&mut self, requires_auth: bool) {
9374    self.fbb_.push_slot::<bool>(RouteGuard::VT_REQUIRES_AUTH, requires_auth, false);
9375  }
9376  #[inline]
9377  pub fn add_required_roles(&mut self, required_roles: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<&'b  str>>>) {
9378    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(RouteGuard::VT_REQUIRED_ROLES, required_roles);
9379  }
9380  #[inline]
9381  pub fn add_redirect_on_fail(&mut self, redirect_on_fail: flatbuffers::WIPOffset<&'b  str>) {
9382    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(RouteGuard::VT_REDIRECT_ON_FAIL, redirect_on_fail);
9383  }
9384  #[inline]
9385  pub fn add_custom_guard(&mut self, custom_guard: flatbuffers::WIPOffset<&'b  str>) {
9386    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(RouteGuard::VT_CUSTOM_GUARD, custom_guard);
9387  }
9388  #[inline]
9389  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> RouteGuardBuilder<'a, 'b, A> {
9390    let start = _fbb.start_table();
9391    RouteGuardBuilder {
9392      fbb_: _fbb,
9393      start_: start,
9394    }
9395  }
9396  #[inline]
9397  pub fn finish(self) -> flatbuffers::WIPOffset<RouteGuard<'a>> {
9398    let o = self.fbb_.end_table(self.start_);
9399    flatbuffers::WIPOffset::new(o.value())
9400  }
9401}
9402
9403impl core::fmt::Debug for RouteGuard<'_> {
9404  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
9405    let mut ds = f.debug_struct("RouteGuard");
9406      ds.field("requires_auth", &self.requires_auth());
9407      ds.field("required_roles", &self.required_roles());
9408      ds.field("redirect_on_fail", &self.redirect_on_fail());
9409      ds.field("custom_guard", &self.custom_guard());
9410      ds.finish()
9411  }
9412}
9413pub enum RouteTransitionConfigOffset {}
9414#[derive(Copy, Clone, PartialEq)]
9415
9416pub struct RouteTransitionConfig<'a> {
9417  pub _tab: flatbuffers::Table<'a>,
9418}
9419
9420impl<'a> flatbuffers::Follow<'a> for RouteTransitionConfig<'a> {
9421  type Inner = RouteTransitionConfig<'a>;
9422  #[inline]
9423  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
9424    Self { _tab: flatbuffers::Table::new(buf, loc) }
9425  }
9426}
9427
9428impl<'a> RouteTransitionConfig<'a> {
9429  pub const VT_TRANSITION_TYPE: flatbuffers::VOffsetT = 4;
9430  pub const VT_DURATION: flatbuffers::VOffsetT = 6;
9431  pub const VT_EASING: flatbuffers::VOffsetT = 8;
9432  pub const VT_SLIDE_DIRECTION: flatbuffers::VOffsetT = 10;
9433  pub const VT_SHARED_ELEMENTS: flatbuffers::VOffsetT = 12;
9434  pub const VT_CUSTOM_SEQUENCE_ID: flatbuffers::VOffsetT = 14;
9435  pub const VT_REDUCED_MOTION: flatbuffers::VOffsetT = 16;
9436
9437  #[inline]
9438  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
9439    RouteTransitionConfig { _tab: table }
9440  }
9441  #[allow(unused_mut)]
9442  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
9443    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
9444    args: &'args RouteTransitionConfigArgs<'args>
9445  ) -> flatbuffers::WIPOffset<RouteTransitionConfig<'bldr>> {
9446    let mut builder = RouteTransitionConfigBuilder::new(_fbb);
9447    if let Some(x) = args.reduced_motion { builder.add_reduced_motion(x); }
9448    if let Some(x) = args.custom_sequence_id { builder.add_custom_sequence_id(x); }
9449    if let Some(x) = args.shared_elements { builder.add_shared_elements(x); }
9450    if let Some(x) = args.easing { builder.add_easing(x); }
9451    if let Some(x) = args.duration { builder.add_duration(x); }
9452    builder.add_slide_direction(args.slide_direction);
9453    builder.add_transition_type(args.transition_type);
9454    builder.finish()
9455  }
9456
9457
9458  #[inline]
9459  pub fn transition_type(&self) -> RouteTransitionType {
9460    // Safety:
9461    // Created from valid Table for this object
9462    // which contains a valid value in this slot
9463    unsafe { self._tab.get::<RouteTransitionType>(RouteTransitionConfig::VT_TRANSITION_TYPE, Some(RouteTransitionType::None)).unwrap()}
9464  }
9465  #[inline]
9466  pub fn duration(&self) -> Option<Duration<'a>> {
9467    // Safety:
9468    // Created from valid Table for this object
9469    // which contains a valid value in this slot
9470    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Duration>>(RouteTransitionConfig::VT_DURATION, None)}
9471  }
9472  #[inline]
9473  pub fn easing(&self) -> Option<Easing<'a>> {
9474    // Safety:
9475    // Created from valid Table for this object
9476    // which contains a valid value in this slot
9477    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Easing>>(RouteTransitionConfig::VT_EASING, None)}
9478  }
9479  #[inline]
9480  pub fn slide_direction(&self) -> SlideDirection {
9481    // Safety:
9482    // Created from valid Table for this object
9483    // which contains a valid value in this slot
9484    unsafe { self._tab.get::<SlideDirection>(RouteTransitionConfig::VT_SLIDE_DIRECTION, Some(SlideDirection::Left)).unwrap()}
9485  }
9486  #[inline]
9487  pub fn shared_elements(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<SharedElementPair<'a>>>> {
9488    // Safety:
9489    // Created from valid Table for this object
9490    // which contains a valid value in this slot
9491    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<SharedElementPair>>>>(RouteTransitionConfig::VT_SHARED_ELEMENTS, None)}
9492  }
9493  #[inline]
9494  pub fn custom_sequence_id(&self) -> Option<&'a str> {
9495    // Safety:
9496    // Created from valid Table for this object
9497    // which contains a valid value in this slot
9498    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(RouteTransitionConfig::VT_CUSTOM_SEQUENCE_ID, None)}
9499  }
9500  #[inline]
9501  pub fn reduced_motion(&self) -> Option<ReducedMotion<'a>> {
9502    // Safety:
9503    // Created from valid Table for this object
9504    // which contains a valid value in this slot
9505    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<ReducedMotion>>(RouteTransitionConfig::VT_REDUCED_MOTION, None)}
9506  }
9507}
9508
9509impl flatbuffers::Verifiable for RouteTransitionConfig<'_> {
9510  #[inline]
9511  fn run_verifier(
9512    v: &mut flatbuffers::Verifier, pos: usize
9513  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
9514    use self::flatbuffers::Verifiable;
9515    v.visit_table(pos)?
9516     .visit_field::<RouteTransitionType>("transition_type", Self::VT_TRANSITION_TYPE, false)?
9517     .visit_field::<flatbuffers::ForwardsUOffset<Duration>>("duration", Self::VT_DURATION, false)?
9518     .visit_field::<flatbuffers::ForwardsUOffset<Easing>>("easing", Self::VT_EASING, false)?
9519     .visit_field::<SlideDirection>("slide_direction", Self::VT_SLIDE_DIRECTION, false)?
9520     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<SharedElementPair>>>>("shared_elements", Self::VT_SHARED_ELEMENTS, false)?
9521     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("custom_sequence_id", Self::VT_CUSTOM_SEQUENCE_ID, false)?
9522     .visit_field::<flatbuffers::ForwardsUOffset<ReducedMotion>>("reduced_motion", Self::VT_REDUCED_MOTION, false)?
9523     .finish();
9524    Ok(())
9525  }
9526}
9527pub struct RouteTransitionConfigArgs<'a> {
9528    pub transition_type: RouteTransitionType,
9529    pub duration: Option<flatbuffers::WIPOffset<Duration<'a>>>,
9530    pub easing: Option<flatbuffers::WIPOffset<Easing<'a>>>,
9531    pub slide_direction: SlideDirection,
9532    pub shared_elements: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<SharedElementPair<'a>>>>>,
9533    pub custom_sequence_id: Option<flatbuffers::WIPOffset<&'a str>>,
9534    pub reduced_motion: Option<flatbuffers::WIPOffset<ReducedMotion<'a>>>,
9535}
9536impl<'a> Default for RouteTransitionConfigArgs<'a> {
9537  #[inline]
9538  fn default() -> Self {
9539    RouteTransitionConfigArgs {
9540      transition_type: RouteTransitionType::None,
9541      duration: None,
9542      easing: None,
9543      slide_direction: SlideDirection::Left,
9544      shared_elements: None,
9545      custom_sequence_id: None,
9546      reduced_motion: None,
9547    }
9548  }
9549}
9550
9551pub struct RouteTransitionConfigBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
9552  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
9553  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
9554}
9555impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RouteTransitionConfigBuilder<'a, 'b, A> {
9556  #[inline]
9557  pub fn add_transition_type(&mut self, transition_type: RouteTransitionType) {
9558    self.fbb_.push_slot::<RouteTransitionType>(RouteTransitionConfig::VT_TRANSITION_TYPE, transition_type, RouteTransitionType::None);
9559  }
9560  #[inline]
9561  pub fn add_duration(&mut self, duration: flatbuffers::WIPOffset<Duration<'b >>) {
9562    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Duration>>(RouteTransitionConfig::VT_DURATION, duration);
9563  }
9564  #[inline]
9565  pub fn add_easing(&mut self, easing: flatbuffers::WIPOffset<Easing<'b >>) {
9566    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Easing>>(RouteTransitionConfig::VT_EASING, easing);
9567  }
9568  #[inline]
9569  pub fn add_slide_direction(&mut self, slide_direction: SlideDirection) {
9570    self.fbb_.push_slot::<SlideDirection>(RouteTransitionConfig::VT_SLIDE_DIRECTION, slide_direction, SlideDirection::Left);
9571  }
9572  #[inline]
9573  pub fn add_shared_elements(&mut self, shared_elements: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<SharedElementPair<'b >>>>) {
9574    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(RouteTransitionConfig::VT_SHARED_ELEMENTS, shared_elements);
9575  }
9576  #[inline]
9577  pub fn add_custom_sequence_id(&mut self, custom_sequence_id: flatbuffers::WIPOffset<&'b  str>) {
9578    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(RouteTransitionConfig::VT_CUSTOM_SEQUENCE_ID, custom_sequence_id);
9579  }
9580  #[inline]
9581  pub fn add_reduced_motion(&mut self, reduced_motion: flatbuffers::WIPOffset<ReducedMotion<'b >>) {
9582    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<ReducedMotion>>(RouteTransitionConfig::VT_REDUCED_MOTION, reduced_motion);
9583  }
9584  #[inline]
9585  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> RouteTransitionConfigBuilder<'a, 'b, A> {
9586    let start = _fbb.start_table();
9587    RouteTransitionConfigBuilder {
9588      fbb_: _fbb,
9589      start_: start,
9590    }
9591  }
9592  #[inline]
9593  pub fn finish(self) -> flatbuffers::WIPOffset<RouteTransitionConfig<'a>> {
9594    let o = self.fbb_.end_table(self.start_);
9595    flatbuffers::WIPOffset::new(o.value())
9596  }
9597}
9598
9599impl core::fmt::Debug for RouteTransitionConfig<'_> {
9600  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
9601    let mut ds = f.debug_struct("RouteTransitionConfig");
9602      ds.field("transition_type", &self.transition_type());
9603      ds.field("duration", &self.duration());
9604      ds.field("easing", &self.easing());
9605      ds.field("slide_direction", &self.slide_direction());
9606      ds.field("shared_elements", &self.shared_elements());
9607      ds.field("custom_sequence_id", &self.custom_sequence_id());
9608      ds.field("reduced_motion", &self.reduced_motion());
9609      ds.finish()
9610  }
9611}
9612pub enum RouteEntryOffset {}
9613#[derive(Copy, Clone, PartialEq)]
9614
9615pub struct RouteEntry<'a> {
9616  pub _tab: flatbuffers::Table<'a>,
9617}
9618
9619impl<'a> flatbuffers::Follow<'a> for RouteEntry<'a> {
9620  type Inner = RouteEntry<'a>;
9621  #[inline]
9622  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
9623    Self { _tab: flatbuffers::Table::new(buf, loc) }
9624  }
9625}
9626
9627impl<'a> RouteEntry<'a> {
9628  pub const VT_PATH: flatbuffers::VOffsetT = 4;
9629  pub const VT_NAME: flatbuffers::VOffsetT = 6;
9630  pub const VT_VIEW_ROOT_ID: flatbuffers::VOffsetT = 8;
9631  pub const VT_GUARD: flatbuffers::VOffsetT = 10;
9632  pub const VT_PRELOAD_DATA: flatbuffers::VOffsetT = 12;
9633  pub const VT_TRANSITION: flatbuffers::VOffsetT = 14;
9634  pub const VT_SITEMAP_PRIORITY: flatbuffers::VOffsetT = 16;
9635  pub const VT_SITEMAP_CHANGE_FREQ: flatbuffers::VOffsetT = 18;
9636  pub const VT_SITEMAP_LAST_MODIFIED: flatbuffers::VOffsetT = 20;
9637  pub const VT_EXCLUDE_FROM_SITEMAP: flatbuffers::VOffsetT = 22;
9638  pub const VT_CHILDREN: flatbuffers::VOffsetT = 24;
9639
9640  #[inline]
9641  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
9642    RouteEntry { _tab: table }
9643  }
9644  #[allow(unused_mut)]
9645  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
9646    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
9647    args: &'args RouteEntryArgs<'args>
9648  ) -> flatbuffers::WIPOffset<RouteEntry<'bldr>> {
9649    let mut builder = RouteEntryBuilder::new(_fbb);
9650    if let Some(x) = args.children { builder.add_children(x); }
9651    if let Some(x) = args.sitemap_last_modified { builder.add_sitemap_last_modified(x); }
9652    builder.add_sitemap_priority(args.sitemap_priority);
9653    if let Some(x) = args.transition { builder.add_transition(x); }
9654    if let Some(x) = args.preload_data { builder.add_preload_data(x); }
9655    if let Some(x) = args.guard { builder.add_guard(x); }
9656    if let Some(x) = args.view_root_id { builder.add_view_root_id(x); }
9657    if let Some(x) = args.name { builder.add_name(x); }
9658    if let Some(x) = args.path { builder.add_path(x); }
9659    builder.add_exclude_from_sitemap(args.exclude_from_sitemap);
9660    builder.add_sitemap_change_freq(args.sitemap_change_freq);
9661    builder.finish()
9662  }
9663
9664
9665  #[inline]
9666  pub fn path(&self) -> &'a str {
9667    // Safety:
9668    // Created from valid Table for this object
9669    // which contains a valid value in this slot
9670    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(RouteEntry::VT_PATH, None).unwrap()}
9671  }
9672  #[inline]
9673  pub fn name(&self) -> Option<&'a str> {
9674    // Safety:
9675    // Created from valid Table for this object
9676    // which contains a valid value in this slot
9677    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(RouteEntry::VT_NAME, None)}
9678  }
9679  #[inline]
9680  pub fn view_root_id(&self) -> &'a str {
9681    // Safety:
9682    // Created from valid Table for this object
9683    // which contains a valid value in this slot
9684    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(RouteEntry::VT_VIEW_ROOT_ID, None).unwrap()}
9685  }
9686  #[inline]
9687  pub fn guard(&self) -> Option<RouteGuard<'a>> {
9688    // Safety:
9689    // Created from valid Table for this object
9690    // which contains a valid value in this slot
9691    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<RouteGuard>>(RouteEntry::VT_GUARD, None)}
9692  }
9693  #[inline]
9694  pub fn preload_data(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>> {
9695    // Safety:
9696    // Created from valid Table for this object
9697    // which contains a valid value in this slot
9698    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>(RouteEntry::VT_PRELOAD_DATA, None)}
9699  }
9700  #[inline]
9701  pub fn transition(&self) -> Option<RouteTransitionConfig<'a>> {
9702    // Safety:
9703    // Created from valid Table for this object
9704    // which contains a valid value in this slot
9705    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<RouteTransitionConfig>>(RouteEntry::VT_TRANSITION, None)}
9706  }
9707  #[inline]
9708  pub fn sitemap_priority(&self) -> f32 {
9709    // Safety:
9710    // Created from valid Table for this object
9711    // which contains a valid value in this slot
9712    unsafe { self._tab.get::<f32>(RouteEntry::VT_SITEMAP_PRIORITY, Some(0.5)).unwrap()}
9713  }
9714  #[inline]
9715  pub fn sitemap_change_freq(&self) -> ChangeFrequency {
9716    // Safety:
9717    // Created from valid Table for this object
9718    // which contains a valid value in this slot
9719    unsafe { self._tab.get::<ChangeFrequency>(RouteEntry::VT_SITEMAP_CHANGE_FREQ, Some(ChangeFrequency::Always)).unwrap()}
9720  }
9721  #[inline]
9722  pub fn sitemap_last_modified(&self) -> Option<&'a str> {
9723    // Safety:
9724    // Created from valid Table for this object
9725    // which contains a valid value in this slot
9726    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(RouteEntry::VT_SITEMAP_LAST_MODIFIED, None)}
9727  }
9728  #[inline]
9729  pub fn exclude_from_sitemap(&self) -> bool {
9730    // Safety:
9731    // Created from valid Table for this object
9732    // which contains a valid value in this slot
9733    unsafe { self._tab.get::<bool>(RouteEntry::VT_EXCLUDE_FROM_SITEMAP, Some(false)).unwrap()}
9734  }
9735  #[inline]
9736  pub fn children(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<RouteEntry<'a>>>> {
9737    // Safety:
9738    // Created from valid Table for this object
9739    // which contains a valid value in this slot
9740    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<RouteEntry>>>>(RouteEntry::VT_CHILDREN, None)}
9741  }
9742}
9743
9744impl flatbuffers::Verifiable for RouteEntry<'_> {
9745  #[inline]
9746  fn run_verifier(
9747    v: &mut flatbuffers::Verifier, pos: usize
9748  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
9749    use self::flatbuffers::Verifiable;
9750    v.visit_table(pos)?
9751     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("path", Self::VT_PATH, true)?
9752     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
9753     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("view_root_id", Self::VT_VIEW_ROOT_ID, true)?
9754     .visit_field::<flatbuffers::ForwardsUOffset<RouteGuard>>("guard", Self::VT_GUARD, false)?
9755     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>>>("preload_data", Self::VT_PRELOAD_DATA, false)?
9756     .visit_field::<flatbuffers::ForwardsUOffset<RouteTransitionConfig>>("transition", Self::VT_TRANSITION, false)?
9757     .visit_field::<f32>("sitemap_priority", Self::VT_SITEMAP_PRIORITY, false)?
9758     .visit_field::<ChangeFrequency>("sitemap_change_freq", Self::VT_SITEMAP_CHANGE_FREQ, false)?
9759     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("sitemap_last_modified", Self::VT_SITEMAP_LAST_MODIFIED, false)?
9760     .visit_field::<bool>("exclude_from_sitemap", Self::VT_EXCLUDE_FROM_SITEMAP, false)?
9761     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<RouteEntry>>>>("children", Self::VT_CHILDREN, false)?
9762     .finish();
9763    Ok(())
9764  }
9765}
9766pub struct RouteEntryArgs<'a> {
9767    pub path: Option<flatbuffers::WIPOffset<&'a str>>,
9768    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
9769    pub view_root_id: Option<flatbuffers::WIPOffset<&'a str>>,
9770    pub guard: Option<flatbuffers::WIPOffset<RouteGuard<'a>>>,
9771    pub preload_data: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>,
9772    pub transition: Option<flatbuffers::WIPOffset<RouteTransitionConfig<'a>>>,
9773    pub sitemap_priority: f32,
9774    pub sitemap_change_freq: ChangeFrequency,
9775    pub sitemap_last_modified: Option<flatbuffers::WIPOffset<&'a str>>,
9776    pub exclude_from_sitemap: bool,
9777    pub children: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<RouteEntry<'a>>>>>,
9778}
9779impl<'a> Default for RouteEntryArgs<'a> {
9780  #[inline]
9781  fn default() -> Self {
9782    RouteEntryArgs {
9783      path: None, // required field
9784      name: None,
9785      view_root_id: None, // required field
9786      guard: None,
9787      preload_data: None,
9788      transition: None,
9789      sitemap_priority: 0.5,
9790      sitemap_change_freq: ChangeFrequency::Always,
9791      sitemap_last_modified: None,
9792      exclude_from_sitemap: false,
9793      children: None,
9794    }
9795  }
9796}
9797
9798pub struct RouteEntryBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
9799  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
9800  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
9801}
9802impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RouteEntryBuilder<'a, 'b, A> {
9803  #[inline]
9804  pub fn add_path(&mut self, path: flatbuffers::WIPOffset<&'b  str>) {
9805    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(RouteEntry::VT_PATH, path);
9806  }
9807  #[inline]
9808  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
9809    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(RouteEntry::VT_NAME, name);
9810  }
9811  #[inline]
9812  pub fn add_view_root_id(&mut self, view_root_id: flatbuffers::WIPOffset<&'b  str>) {
9813    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(RouteEntry::VT_VIEW_ROOT_ID, view_root_id);
9814  }
9815  #[inline]
9816  pub fn add_guard(&mut self, guard: flatbuffers::WIPOffset<RouteGuard<'b >>) {
9817    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<RouteGuard>>(RouteEntry::VT_GUARD, guard);
9818  }
9819  #[inline]
9820  pub fn add_preload_data(&mut self, preload_data: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<&'b  str>>>) {
9821    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(RouteEntry::VT_PRELOAD_DATA, preload_data);
9822  }
9823  #[inline]
9824  pub fn add_transition(&mut self, transition: flatbuffers::WIPOffset<RouteTransitionConfig<'b >>) {
9825    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<RouteTransitionConfig>>(RouteEntry::VT_TRANSITION, transition);
9826  }
9827  #[inline]
9828  pub fn add_sitemap_priority(&mut self, sitemap_priority: f32) {
9829    self.fbb_.push_slot::<f32>(RouteEntry::VT_SITEMAP_PRIORITY, sitemap_priority, 0.5);
9830  }
9831  #[inline]
9832  pub fn add_sitemap_change_freq(&mut self, sitemap_change_freq: ChangeFrequency) {
9833    self.fbb_.push_slot::<ChangeFrequency>(RouteEntry::VT_SITEMAP_CHANGE_FREQ, sitemap_change_freq, ChangeFrequency::Always);
9834  }
9835  #[inline]
9836  pub fn add_sitemap_last_modified(&mut self, sitemap_last_modified: flatbuffers::WIPOffset<&'b  str>) {
9837    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(RouteEntry::VT_SITEMAP_LAST_MODIFIED, sitemap_last_modified);
9838  }
9839  #[inline]
9840  pub fn add_exclude_from_sitemap(&mut self, exclude_from_sitemap: bool) {
9841    self.fbb_.push_slot::<bool>(RouteEntry::VT_EXCLUDE_FROM_SITEMAP, exclude_from_sitemap, false);
9842  }
9843  #[inline]
9844  pub fn add_children(&mut self, children: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<RouteEntry<'b >>>>) {
9845    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(RouteEntry::VT_CHILDREN, children);
9846  }
9847  #[inline]
9848  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> RouteEntryBuilder<'a, 'b, A> {
9849    let start = _fbb.start_table();
9850    RouteEntryBuilder {
9851      fbb_: _fbb,
9852      start_: start,
9853    }
9854  }
9855  #[inline]
9856  pub fn finish(self) -> flatbuffers::WIPOffset<RouteEntry<'a>> {
9857    let o = self.fbb_.end_table(self.start_);
9858    self.fbb_.required(o, RouteEntry::VT_PATH,"path");
9859    self.fbb_.required(o, RouteEntry::VT_VIEW_ROOT_ID,"view_root_id");
9860    flatbuffers::WIPOffset::new(o.value())
9861  }
9862}
9863
9864impl core::fmt::Debug for RouteEntry<'_> {
9865  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
9866    let mut ds = f.debug_struct("RouteEntry");
9867      ds.field("path", &self.path());
9868      ds.field("name", &self.name());
9869      ds.field("view_root_id", &self.view_root_id());
9870      ds.field("guard", &self.guard());
9871      ds.field("preload_data", &self.preload_data());
9872      ds.field("transition", &self.transition());
9873      ds.field("sitemap_priority", &self.sitemap_priority());
9874      ds.field("sitemap_change_freq", &self.sitemap_change_freq());
9875      ds.field("sitemap_last_modified", &self.sitemap_last_modified());
9876      ds.field("exclude_from_sitemap", &self.exclude_from_sitemap());
9877      ds.field("children", &self.children());
9878      ds.finish()
9879  }
9880}
9881pub enum RouteMapOffset {}
9882#[derive(Copy, Clone, PartialEq)]
9883
9884pub struct RouteMap<'a> {
9885  pub _tab: flatbuffers::Table<'a>,
9886}
9887
9888impl<'a> flatbuffers::Follow<'a> for RouteMap<'a> {
9889  type Inner = RouteMap<'a>;
9890  #[inline]
9891  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
9892    Self { _tab: flatbuffers::Table::new(buf, loc) }
9893  }
9894}
9895
9896impl<'a> RouteMap<'a> {
9897  pub const VT_NODE_ID: flatbuffers::VOffsetT = 4;
9898  pub const VT_ROUTES: flatbuffers::VOffsetT = 6;
9899  pub const VT_NOT_FOUND_ROUTE: flatbuffers::VOffsetT = 8;
9900  pub const VT_DEFAULT_TRANSITION: flatbuffers::VOffsetT = 10;
9901
9902  #[inline]
9903  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
9904    RouteMap { _tab: table }
9905  }
9906  #[allow(unused_mut)]
9907  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
9908    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
9909    args: &'args RouteMapArgs<'args>
9910  ) -> flatbuffers::WIPOffset<RouteMap<'bldr>> {
9911    let mut builder = RouteMapBuilder::new(_fbb);
9912    if let Some(x) = args.default_transition { builder.add_default_transition(x); }
9913    if let Some(x) = args.not_found_route { builder.add_not_found_route(x); }
9914    if let Some(x) = args.routes { builder.add_routes(x); }
9915    if let Some(x) = args.node_id { builder.add_node_id(x); }
9916    builder.finish()
9917  }
9918
9919
9920  #[inline]
9921  pub fn node_id(&self) -> &'a str {
9922    // Safety:
9923    // Created from valid Table for this object
9924    // which contains a valid value in this slot
9925    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(RouteMap::VT_NODE_ID, None).unwrap()}
9926  }
9927  #[inline]
9928  pub fn routes(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<RouteEntry<'a>>> {
9929    // Safety:
9930    // Created from valid Table for this object
9931    // which contains a valid value in this slot
9932    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<RouteEntry>>>>(RouteMap::VT_ROUTES, None).unwrap()}
9933  }
9934  #[inline]
9935  pub fn not_found_route(&self) -> Option<&'a str> {
9936    // Safety:
9937    // Created from valid Table for this object
9938    // which contains a valid value in this slot
9939    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(RouteMap::VT_NOT_FOUND_ROUTE, None)}
9940  }
9941  #[inline]
9942  pub fn default_transition(&self) -> Option<RouteTransitionConfig<'a>> {
9943    // Safety:
9944    // Created from valid Table for this object
9945    // which contains a valid value in this slot
9946    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<RouteTransitionConfig>>(RouteMap::VT_DEFAULT_TRANSITION, None)}
9947  }
9948}
9949
9950impl flatbuffers::Verifiable for RouteMap<'_> {
9951  #[inline]
9952  fn run_verifier(
9953    v: &mut flatbuffers::Verifier, pos: usize
9954  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
9955    use self::flatbuffers::Verifiable;
9956    v.visit_table(pos)?
9957     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("node_id", Self::VT_NODE_ID, true)?
9958     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<RouteEntry>>>>("routes", Self::VT_ROUTES, true)?
9959     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("not_found_route", Self::VT_NOT_FOUND_ROUTE, false)?
9960     .visit_field::<flatbuffers::ForwardsUOffset<RouteTransitionConfig>>("default_transition", Self::VT_DEFAULT_TRANSITION, false)?
9961     .finish();
9962    Ok(())
9963  }
9964}
9965pub struct RouteMapArgs<'a> {
9966    pub node_id: Option<flatbuffers::WIPOffset<&'a str>>,
9967    pub routes: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<RouteEntry<'a>>>>>,
9968    pub not_found_route: Option<flatbuffers::WIPOffset<&'a str>>,
9969    pub default_transition: Option<flatbuffers::WIPOffset<RouteTransitionConfig<'a>>>,
9970}
9971impl<'a> Default for RouteMapArgs<'a> {
9972  #[inline]
9973  fn default() -> Self {
9974    RouteMapArgs {
9975      node_id: None, // required field
9976      routes: None, // required field
9977      not_found_route: None,
9978      default_transition: None,
9979    }
9980  }
9981}
9982
9983pub struct RouteMapBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
9984  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
9985  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
9986}
9987impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RouteMapBuilder<'a, 'b, A> {
9988  #[inline]
9989  pub fn add_node_id(&mut self, node_id: flatbuffers::WIPOffset<&'b  str>) {
9990    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(RouteMap::VT_NODE_ID, node_id);
9991  }
9992  #[inline]
9993  pub fn add_routes(&mut self, routes: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<RouteEntry<'b >>>>) {
9994    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(RouteMap::VT_ROUTES, routes);
9995  }
9996  #[inline]
9997  pub fn add_not_found_route(&mut self, not_found_route: flatbuffers::WIPOffset<&'b  str>) {
9998    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(RouteMap::VT_NOT_FOUND_ROUTE, not_found_route);
9999  }
10000  #[inline]
10001  pub fn add_default_transition(&mut self, default_transition: flatbuffers::WIPOffset<RouteTransitionConfig<'b >>) {
10002    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<RouteTransitionConfig>>(RouteMap::VT_DEFAULT_TRANSITION, default_transition);
10003  }
10004  #[inline]
10005  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> RouteMapBuilder<'a, 'b, A> {
10006    let start = _fbb.start_table();
10007    RouteMapBuilder {
10008      fbb_: _fbb,
10009      start_: start,
10010    }
10011  }
10012  #[inline]
10013  pub fn finish(self) -> flatbuffers::WIPOffset<RouteMap<'a>> {
10014    let o = self.fbb_.end_table(self.start_);
10015    self.fbb_.required(o, RouteMap::VT_NODE_ID,"node_id");
10016    self.fbb_.required(o, RouteMap::VT_ROUTES,"routes");
10017    flatbuffers::WIPOffset::new(o.value())
10018  }
10019}
10020
10021impl core::fmt::Debug for RouteMap<'_> {
10022  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
10023    let mut ds = f.debug_struct("RouteMap");
10024      ds.field("node_id", &self.node_id());
10025      ds.field("routes", &self.routes());
10026      ds.field("not_found_route", &self.not_found_route());
10027      ds.field("default_transition", &self.default_transition());
10028      ds.finish()
10029  }
10030}
10031pub enum StateOffset {}
10032#[derive(Copy, Clone, PartialEq)]
10033
10034pub struct State<'a> {
10035  pub _tab: flatbuffers::Table<'a>,
10036}
10037
10038impl<'a> flatbuffers::Follow<'a> for State<'a> {
10039  type Inner = State<'a>;
10040  #[inline]
10041  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
10042    Self { _tab: flatbuffers::Table::new(buf, loc) }
10043  }
10044}
10045
10046impl<'a> State<'a> {
10047  pub const VT_NAME: flatbuffers::VOffsetT = 4;
10048  pub const VT_INITIAL: flatbuffers::VOffsetT = 6;
10049  pub const VT_TERMINAL: flatbuffers::VOffsetT = 8;
10050
10051  #[inline]
10052  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
10053    State { _tab: table }
10054  }
10055  #[allow(unused_mut)]
10056  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
10057    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
10058    args: &'args StateArgs<'args>
10059  ) -> flatbuffers::WIPOffset<State<'bldr>> {
10060    let mut builder = StateBuilder::new(_fbb);
10061    if let Some(x) = args.name { builder.add_name(x); }
10062    builder.add_terminal(args.terminal);
10063    builder.add_initial(args.initial);
10064    builder.finish()
10065  }
10066
10067
10068  #[inline]
10069  pub fn name(&self) -> &'a str {
10070    // Safety:
10071    // Created from valid Table for this object
10072    // which contains a valid value in this slot
10073    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(State::VT_NAME, None).unwrap()}
10074  }
10075  /// If true, this is the initial state of the machine.
10076  #[inline]
10077  pub fn initial(&self) -> bool {
10078    // Safety:
10079    // Created from valid Table for this object
10080    // which contains a valid value in this slot
10081    unsafe { self._tab.get::<bool>(State::VT_INITIAL, Some(false)).unwrap()}
10082  }
10083  /// If true, this is a terminal/final state (no outgoing transitions expected).
10084  #[inline]
10085  pub fn terminal(&self) -> bool {
10086    // Safety:
10087    // Created from valid Table for this object
10088    // which contains a valid value in this slot
10089    unsafe { self._tab.get::<bool>(State::VT_TERMINAL, Some(false)).unwrap()}
10090  }
10091}
10092
10093impl flatbuffers::Verifiable for State<'_> {
10094  #[inline]
10095  fn run_verifier(
10096    v: &mut flatbuffers::Verifier, pos: usize
10097  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
10098    use self::flatbuffers::Verifiable;
10099    v.visit_table(pos)?
10100     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
10101     .visit_field::<bool>("initial", Self::VT_INITIAL, false)?
10102     .visit_field::<bool>("terminal", Self::VT_TERMINAL, false)?
10103     .finish();
10104    Ok(())
10105  }
10106}
10107pub struct StateArgs<'a> {
10108    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
10109    pub initial: bool,
10110    pub terminal: bool,
10111}
10112impl<'a> Default for StateArgs<'a> {
10113  #[inline]
10114  fn default() -> Self {
10115    StateArgs {
10116      name: None, // required field
10117      initial: false,
10118      terminal: false,
10119    }
10120  }
10121}
10122
10123pub struct StateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
10124  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
10125  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
10126}
10127impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> StateBuilder<'a, 'b, A> {
10128  #[inline]
10129  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
10130    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(State::VT_NAME, name);
10131  }
10132  #[inline]
10133  pub fn add_initial(&mut self, initial: bool) {
10134    self.fbb_.push_slot::<bool>(State::VT_INITIAL, initial, false);
10135  }
10136  #[inline]
10137  pub fn add_terminal(&mut self, terminal: bool) {
10138    self.fbb_.push_slot::<bool>(State::VT_TERMINAL, terminal, false);
10139  }
10140  #[inline]
10141  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> StateBuilder<'a, 'b, A> {
10142    let start = _fbb.start_table();
10143    StateBuilder {
10144      fbb_: _fbb,
10145      start_: start,
10146    }
10147  }
10148  #[inline]
10149  pub fn finish(self) -> flatbuffers::WIPOffset<State<'a>> {
10150    let o = self.fbb_.end_table(self.start_);
10151    self.fbb_.required(o, State::VT_NAME,"name");
10152    flatbuffers::WIPOffset::new(o.value())
10153  }
10154}
10155
10156impl core::fmt::Debug for State<'_> {
10157  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
10158    let mut ds = f.debug_struct("State");
10159      ds.field("name", &self.name());
10160      ds.field("initial", &self.initial());
10161      ds.field("terminal", &self.terminal());
10162      ds.finish()
10163  }
10164}
10165pub enum TransitionOffset {}
10166#[derive(Copy, Clone, PartialEq)]
10167
10168pub struct Transition<'a> {
10169  pub _tab: flatbuffers::Table<'a>,
10170}
10171
10172impl<'a> flatbuffers::Follow<'a> for Transition<'a> {
10173  type Inner = Transition<'a>;
10174  #[inline]
10175  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
10176    Self { _tab: flatbuffers::Table::new(buf, loc) }
10177  }
10178}
10179
10180impl<'a> Transition<'a> {
10181  pub const VT_EVENT: flatbuffers::VOffsetT = 4;
10182  pub const VT_FROM: flatbuffers::VOffsetT = 6;
10183  pub const VT_TO: flatbuffers::VOffsetT = 8;
10184  pub const VT_GUARD: flatbuffers::VOffsetT = 10;
10185  pub const VT_EFFECT: flatbuffers::VOffsetT = 12;
10186
10187  #[inline]
10188  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
10189    Transition { _tab: table }
10190  }
10191  #[allow(unused_mut)]
10192  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
10193    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
10194    args: &'args TransitionArgs<'args>
10195  ) -> flatbuffers::WIPOffset<Transition<'bldr>> {
10196    let mut builder = TransitionBuilder::new(_fbb);
10197    if let Some(x) = args.effect { builder.add_effect(x); }
10198    if let Some(x) = args.guard { builder.add_guard(x); }
10199    if let Some(x) = args.to { builder.add_to(x); }
10200    if let Some(x) = args.from { builder.add_from(x); }
10201    if let Some(x) = args.event { builder.add_event(x); }
10202    builder.finish()
10203  }
10204
10205
10206  /// Event name that triggers this transition (e.g., "click", "hover", "submit").
10207  #[inline]
10208  pub fn event(&self) -> &'a str {
10209    // Safety:
10210    // Created from valid Table for this object
10211    // which contains a valid value in this slot
10212    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Transition::VT_EVENT, None).unwrap()}
10213  }
10214  /// Source state name.
10215  #[inline]
10216  pub fn from(&self) -> &'a str {
10217    // Safety:
10218    // Created from valid Table for this object
10219    // which contains a valid value in this slot
10220    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Transition::VT_FROM, None).unwrap()}
10221  }
10222  /// Target state name.
10223  #[inline]
10224  pub fn to(&self) -> &'a str {
10225    // Safety:
10226    // Created from valid Table for this object
10227    // which contains a valid value in this slot
10228    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Transition::VT_TO, None).unwrap()}
10229  }
10230  /// Optional guard condition — reference to a ComputeNode that returns bool.
10231  #[inline]
10232  pub fn guard(&self) -> Option<&'a str> {
10233    // Safety:
10234    // Created from valid Table for this object
10235    // which contains a valid value in this slot
10236    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Transition::VT_GUARD, None)}
10237  }
10238  /// Optional effect — reference to an EffectNode to execute on transition.
10239  #[inline]
10240  pub fn effect(&self) -> Option<&'a str> {
10241    // Safety:
10242    // Created from valid Table for this object
10243    // which contains a valid value in this slot
10244    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Transition::VT_EFFECT, None)}
10245  }
10246}
10247
10248impl flatbuffers::Verifiable for Transition<'_> {
10249  #[inline]
10250  fn run_verifier(
10251    v: &mut flatbuffers::Verifier, pos: usize
10252  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
10253    use self::flatbuffers::Verifiable;
10254    v.visit_table(pos)?
10255     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("event", Self::VT_EVENT, true)?
10256     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("from", Self::VT_FROM, true)?
10257     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("to", Self::VT_TO, true)?
10258     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("guard", Self::VT_GUARD, false)?
10259     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("effect", Self::VT_EFFECT, false)?
10260     .finish();
10261    Ok(())
10262  }
10263}
10264pub struct TransitionArgs<'a> {
10265    pub event: Option<flatbuffers::WIPOffset<&'a str>>,
10266    pub from: Option<flatbuffers::WIPOffset<&'a str>>,
10267    pub to: Option<flatbuffers::WIPOffset<&'a str>>,
10268    pub guard: Option<flatbuffers::WIPOffset<&'a str>>,
10269    pub effect: Option<flatbuffers::WIPOffset<&'a str>>,
10270}
10271impl<'a> Default for TransitionArgs<'a> {
10272  #[inline]
10273  fn default() -> Self {
10274    TransitionArgs {
10275      event: None, // required field
10276      from: None, // required field
10277      to: None, // required field
10278      guard: None,
10279      effect: None,
10280    }
10281  }
10282}
10283
10284pub struct TransitionBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
10285  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
10286  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
10287}
10288impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TransitionBuilder<'a, 'b, A> {
10289  #[inline]
10290  pub fn add_event(&mut self, event: flatbuffers::WIPOffset<&'b  str>) {
10291    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Transition::VT_EVENT, event);
10292  }
10293  #[inline]
10294  pub fn add_from(&mut self, from: flatbuffers::WIPOffset<&'b  str>) {
10295    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Transition::VT_FROM, from);
10296  }
10297  #[inline]
10298  pub fn add_to(&mut self, to: flatbuffers::WIPOffset<&'b  str>) {
10299    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Transition::VT_TO, to);
10300  }
10301  #[inline]
10302  pub fn add_guard(&mut self, guard: flatbuffers::WIPOffset<&'b  str>) {
10303    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Transition::VT_GUARD, guard);
10304  }
10305  #[inline]
10306  pub fn add_effect(&mut self, effect: flatbuffers::WIPOffset<&'b  str>) {
10307    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Transition::VT_EFFECT, effect);
10308  }
10309  #[inline]
10310  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TransitionBuilder<'a, 'b, A> {
10311    let start = _fbb.start_table();
10312    TransitionBuilder {
10313      fbb_: _fbb,
10314      start_: start,
10315    }
10316  }
10317  #[inline]
10318  pub fn finish(self) -> flatbuffers::WIPOffset<Transition<'a>> {
10319    let o = self.fbb_.end_table(self.start_);
10320    self.fbb_.required(o, Transition::VT_EVENT,"event");
10321    self.fbb_.required(o, Transition::VT_FROM,"from");
10322    self.fbb_.required(o, Transition::VT_TO,"to");
10323    flatbuffers::WIPOffset::new(o.value())
10324  }
10325}
10326
10327impl core::fmt::Debug for Transition<'_> {
10328  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
10329    let mut ds = f.debug_struct("Transition");
10330      ds.field("event", &self.event());
10331      ds.field("from", &self.from());
10332      ds.field("to", &self.to());
10333      ds.field("guard", &self.guard());
10334      ds.field("effect", &self.effect());
10335      ds.finish()
10336  }
10337}
10338pub enum StateMachineOffset {}
10339#[derive(Copy, Clone, PartialEq)]
10340
10341pub struct StateMachine<'a> {
10342  pub _tab: flatbuffers::Table<'a>,
10343}
10344
10345impl<'a> flatbuffers::Follow<'a> for StateMachine<'a> {
10346  type Inner = StateMachine<'a>;
10347  #[inline]
10348  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
10349    Self { _tab: flatbuffers::Table::new(buf, loc) }
10350  }
10351}
10352
10353impl<'a> StateMachine<'a> {
10354  pub const VT_NODE_ID: flatbuffers::VOffsetT = 4;
10355  pub const VT_NAME: flatbuffers::VOffsetT = 6;
10356  pub const VT_STATES: flatbuffers::VOffsetT = 8;
10357  pub const VT_TRANSITIONS: flatbuffers::VOffsetT = 10;
10358
10359  #[inline]
10360  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
10361    StateMachine { _tab: table }
10362  }
10363  #[allow(unused_mut)]
10364  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
10365    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
10366    args: &'args StateMachineArgs<'args>
10367  ) -> flatbuffers::WIPOffset<StateMachine<'bldr>> {
10368    let mut builder = StateMachineBuilder::new(_fbb);
10369    if let Some(x) = args.transitions { builder.add_transitions(x); }
10370    if let Some(x) = args.states { builder.add_states(x); }
10371    if let Some(x) = args.name { builder.add_name(x); }
10372    if let Some(x) = args.node_id { builder.add_node_id(x); }
10373    builder.finish()
10374  }
10375
10376
10377  #[inline]
10378  pub fn node_id(&self) -> &'a str {
10379    // Safety:
10380    // Created from valid Table for this object
10381    // which contains a valid value in this slot
10382    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(StateMachine::VT_NODE_ID, None).unwrap()}
10383  }
10384  /// Human-readable name for this machine (e.g., "button-state", "auth-flow").
10385  #[inline]
10386  pub fn name(&self) -> Option<&'a str> {
10387    // Safety:
10388    // Created from valid Table for this object
10389    // which contains a valid value in this slot
10390    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(StateMachine::VT_NAME, None)}
10391  }
10392  #[inline]
10393  pub fn states(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<State<'a>>> {
10394    // Safety:
10395    // Created from valid Table for this object
10396    // which contains a valid value in this slot
10397    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<State>>>>(StateMachine::VT_STATES, None).unwrap()}
10398  }
10399  #[inline]
10400  pub fn transitions(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Transition<'a>>> {
10401    // Safety:
10402    // Created from valid Table for this object
10403    // which contains a valid value in this slot
10404    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Transition>>>>(StateMachine::VT_TRANSITIONS, None).unwrap()}
10405  }
10406}
10407
10408impl flatbuffers::Verifiable for StateMachine<'_> {
10409  #[inline]
10410  fn run_verifier(
10411    v: &mut flatbuffers::Verifier, pos: usize
10412  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
10413    use self::flatbuffers::Verifiable;
10414    v.visit_table(pos)?
10415     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("node_id", Self::VT_NODE_ID, true)?
10416     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
10417     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<State>>>>("states", Self::VT_STATES, true)?
10418     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Transition>>>>("transitions", Self::VT_TRANSITIONS, true)?
10419     .finish();
10420    Ok(())
10421  }
10422}
10423pub struct StateMachineArgs<'a> {
10424    pub node_id: Option<flatbuffers::WIPOffset<&'a str>>,
10425    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
10426    pub states: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<State<'a>>>>>,
10427    pub transitions: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Transition<'a>>>>>,
10428}
10429impl<'a> Default for StateMachineArgs<'a> {
10430  #[inline]
10431  fn default() -> Self {
10432    StateMachineArgs {
10433      node_id: None, // required field
10434      name: None,
10435      states: None, // required field
10436      transitions: None, // required field
10437    }
10438  }
10439}
10440
10441pub struct StateMachineBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
10442  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
10443  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
10444}
10445impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> StateMachineBuilder<'a, 'b, A> {
10446  #[inline]
10447  pub fn add_node_id(&mut self, node_id: flatbuffers::WIPOffset<&'b  str>) {
10448    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(StateMachine::VT_NODE_ID, node_id);
10449  }
10450  #[inline]
10451  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
10452    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(StateMachine::VT_NAME, name);
10453  }
10454  #[inline]
10455  pub fn add_states(&mut self, states: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<State<'b >>>>) {
10456    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(StateMachine::VT_STATES, states);
10457  }
10458  #[inline]
10459  pub fn add_transitions(&mut self, transitions: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<Transition<'b >>>>) {
10460    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(StateMachine::VT_TRANSITIONS, transitions);
10461  }
10462  #[inline]
10463  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> StateMachineBuilder<'a, 'b, A> {
10464    let start = _fbb.start_table();
10465    StateMachineBuilder {
10466      fbb_: _fbb,
10467      start_: start,
10468    }
10469  }
10470  #[inline]
10471  pub fn finish(self) -> flatbuffers::WIPOffset<StateMachine<'a>> {
10472    let o = self.fbb_.end_table(self.start_);
10473    self.fbb_.required(o, StateMachine::VT_NODE_ID,"node_id");
10474    self.fbb_.required(o, StateMachine::VT_STATES,"states");
10475    self.fbb_.required(o, StateMachine::VT_TRANSITIONS,"transitions");
10476    flatbuffers::WIPOffset::new(o.value())
10477  }
10478}
10479
10480impl core::fmt::Debug for StateMachine<'_> {
10481  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
10482    let mut ds = f.debug_struct("StateMachine");
10483      ds.field("node_id", &self.node_id());
10484      ds.field("name", &self.name());
10485      ds.field("states", &self.states());
10486      ds.field("transitions", &self.transitions());
10487      ds.finish()
10488  }
10489}
10490pub enum DataSourceOffset {}
10491#[derive(Copy, Clone, PartialEq)]
10492
10493pub struct DataSource<'a> {
10494  pub _tab: flatbuffers::Table<'a>,
10495}
10496
10497impl<'a> flatbuffers::Follow<'a> for DataSource<'a> {
10498  type Inner = DataSource<'a>;
10499  #[inline]
10500  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
10501    Self { _tab: flatbuffers::Table::new(buf, loc) }
10502  }
10503}
10504
10505impl<'a> DataSource<'a> {
10506  pub const VT_PROVIDER: flatbuffers::VOffsetT = 4;
10507  pub const VT_ENDPOINT: flatbuffers::VOffsetT = 6;
10508  pub const VT_RESOURCE: flatbuffers::VOffsetT = 8;
10509  pub const VT_METHOD: flatbuffers::VOffsetT = 10;
10510  pub const VT_HEADERS: flatbuffers::VOffsetT = 12;
10511
10512  #[inline]
10513  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
10514    DataSource { _tab: table }
10515  }
10516  #[allow(unused_mut)]
10517  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
10518    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
10519    args: &'args DataSourceArgs<'args>
10520  ) -> flatbuffers::WIPOffset<DataSource<'bldr>> {
10521    let mut builder = DataSourceBuilder::new(_fbb);
10522    if let Some(x) = args.headers { builder.add_headers(x); }
10523    if let Some(x) = args.resource { builder.add_resource(x); }
10524    if let Some(x) = args.endpoint { builder.add_endpoint(x); }
10525    builder.add_method(args.method);
10526    builder.add_provider(args.provider);
10527    builder.finish()
10528  }
10529
10530
10531  #[inline]
10532  pub fn provider(&self) -> DataSourceProvider {
10533    // Safety:
10534    // Created from valid Table for this object
10535    // which contains a valid value in this slot
10536    unsafe { self._tab.get::<DataSourceProvider>(DataSource::VT_PROVIDER, Some(DataSourceProvider::Rest)).unwrap()}
10537  }
10538  #[inline]
10539  pub fn endpoint(&self) -> Option<&'a str> {
10540    // Safety:
10541    // Created from valid Table for this object
10542    // which contains a valid value in this slot
10543    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(DataSource::VT_ENDPOINT, None)}
10544  }
10545  #[inline]
10546  pub fn resource(&self) -> Option<&'a str> {
10547    // Safety:
10548    // Created from valid Table for this object
10549    // which contains a valid value in this slot
10550    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(DataSource::VT_RESOURCE, None)}
10551  }
10552  #[inline]
10553  pub fn method(&self) -> HttpMethod {
10554    // Safety:
10555    // Created from valid Table for this object
10556    // which contains a valid value in this slot
10557    unsafe { self._tab.get::<HttpMethod>(DataSource::VT_METHOD, Some(HttpMethod::GET)).unwrap()}
10558  }
10559  #[inline]
10560  pub fn headers(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>> {
10561    // Safety:
10562    // Created from valid Table for this object
10563    // which contains a valid value in this slot
10564    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue>>>>(DataSource::VT_HEADERS, None)}
10565  }
10566}
10567
10568impl flatbuffers::Verifiable for DataSource<'_> {
10569  #[inline]
10570  fn run_verifier(
10571    v: &mut flatbuffers::Verifier, pos: usize
10572  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
10573    use self::flatbuffers::Verifiable;
10574    v.visit_table(pos)?
10575     .visit_field::<DataSourceProvider>("provider", Self::VT_PROVIDER, false)?
10576     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("endpoint", Self::VT_ENDPOINT, false)?
10577     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("resource", Self::VT_RESOURCE, false)?
10578     .visit_field::<HttpMethod>("method", Self::VT_METHOD, false)?
10579     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValue>>>>("headers", Self::VT_HEADERS, false)?
10580     .finish();
10581    Ok(())
10582  }
10583}
10584pub struct DataSourceArgs<'a> {
10585    pub provider: DataSourceProvider,
10586    pub endpoint: Option<flatbuffers::WIPOffset<&'a str>>,
10587    pub resource: Option<flatbuffers::WIPOffset<&'a str>>,
10588    pub method: HttpMethod,
10589    pub headers: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>>>,
10590}
10591impl<'a> Default for DataSourceArgs<'a> {
10592  #[inline]
10593  fn default() -> Self {
10594    DataSourceArgs {
10595      provider: DataSourceProvider::Rest,
10596      endpoint: None,
10597      resource: None,
10598      method: HttpMethod::GET,
10599      headers: None,
10600    }
10601  }
10602}
10603
10604pub struct DataSourceBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
10605  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
10606  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
10607}
10608impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> DataSourceBuilder<'a, 'b, A> {
10609  #[inline]
10610  pub fn add_provider(&mut self, provider: DataSourceProvider) {
10611    self.fbb_.push_slot::<DataSourceProvider>(DataSource::VT_PROVIDER, provider, DataSourceProvider::Rest);
10612  }
10613  #[inline]
10614  pub fn add_endpoint(&mut self, endpoint: flatbuffers::WIPOffset<&'b  str>) {
10615    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(DataSource::VT_ENDPOINT, endpoint);
10616  }
10617  #[inline]
10618  pub fn add_resource(&mut self, resource: flatbuffers::WIPOffset<&'b  str>) {
10619    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(DataSource::VT_RESOURCE, resource);
10620  }
10621  #[inline]
10622  pub fn add_method(&mut self, method: HttpMethod) {
10623    self.fbb_.push_slot::<HttpMethod>(DataSource::VT_METHOD, method, HttpMethod::GET);
10624  }
10625  #[inline]
10626  pub fn add_headers(&mut self, headers: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<KeyValue<'b >>>>) {
10627    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(DataSource::VT_HEADERS, headers);
10628  }
10629  #[inline]
10630  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> DataSourceBuilder<'a, 'b, A> {
10631    let start = _fbb.start_table();
10632    DataSourceBuilder {
10633      fbb_: _fbb,
10634      start_: start,
10635    }
10636  }
10637  #[inline]
10638  pub fn finish(self) -> flatbuffers::WIPOffset<DataSource<'a>> {
10639    let o = self.fbb_.end_table(self.start_);
10640    flatbuffers::WIPOffset::new(o.value())
10641  }
10642}
10643
10644impl core::fmt::Debug for DataSource<'_> {
10645  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
10646    let mut ds = f.debug_struct("DataSource");
10647      ds.field("provider", &self.provider());
10648      ds.field("endpoint", &self.endpoint());
10649      ds.field("resource", &self.resource());
10650      ds.field("method", &self.method());
10651      ds.field("headers", &self.headers());
10652      ds.finish()
10653  }
10654}
10655pub enum KeyValueOffset {}
10656#[derive(Copy, Clone, PartialEq)]
10657
10658pub struct KeyValue<'a> {
10659  pub _tab: flatbuffers::Table<'a>,
10660}
10661
10662impl<'a> flatbuffers::Follow<'a> for KeyValue<'a> {
10663  type Inner = KeyValue<'a>;
10664  #[inline]
10665  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
10666    Self { _tab: flatbuffers::Table::new(buf, loc) }
10667  }
10668}
10669
10670impl<'a> KeyValue<'a> {
10671  pub const VT_KEY: flatbuffers::VOffsetT = 4;
10672  pub const VT_VALUE: flatbuffers::VOffsetT = 6;
10673
10674  #[inline]
10675  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
10676    KeyValue { _tab: table }
10677  }
10678  #[allow(unused_mut)]
10679  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
10680    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
10681    args: &'args KeyValueArgs<'args>
10682  ) -> flatbuffers::WIPOffset<KeyValue<'bldr>> {
10683    let mut builder = KeyValueBuilder::new(_fbb);
10684    if let Some(x) = args.value { builder.add_value(x); }
10685    if let Some(x) = args.key { builder.add_key(x); }
10686    builder.finish()
10687  }
10688
10689
10690  #[inline]
10691  pub fn key(&self) -> &'a str {
10692    // Safety:
10693    // Created from valid Table for this object
10694    // which contains a valid value in this slot
10695    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(KeyValue::VT_KEY, None).unwrap()}
10696  }
10697  #[inline]
10698  pub fn value(&self) -> &'a str {
10699    // Safety:
10700    // Created from valid Table for this object
10701    // which contains a valid value in this slot
10702    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(KeyValue::VT_VALUE, None).unwrap()}
10703  }
10704}
10705
10706impl flatbuffers::Verifiable for KeyValue<'_> {
10707  #[inline]
10708  fn run_verifier(
10709    v: &mut flatbuffers::Verifier, pos: usize
10710  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
10711    use self::flatbuffers::Verifiable;
10712    v.visit_table(pos)?
10713     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("key", Self::VT_KEY, true)?
10714     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("value", Self::VT_VALUE, true)?
10715     .finish();
10716    Ok(())
10717  }
10718}
10719pub struct KeyValueArgs<'a> {
10720    pub key: Option<flatbuffers::WIPOffset<&'a str>>,
10721    pub value: Option<flatbuffers::WIPOffset<&'a str>>,
10722}
10723impl<'a> Default for KeyValueArgs<'a> {
10724  #[inline]
10725  fn default() -> Self {
10726    KeyValueArgs {
10727      key: None, // required field
10728      value: None, // required field
10729    }
10730  }
10731}
10732
10733pub struct KeyValueBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
10734  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
10735  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
10736}
10737impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> KeyValueBuilder<'a, 'b, A> {
10738  #[inline]
10739  pub fn add_key(&mut self, key: flatbuffers::WIPOffset<&'b  str>) {
10740    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(KeyValue::VT_KEY, key);
10741  }
10742  #[inline]
10743  pub fn add_value(&mut self, value: flatbuffers::WIPOffset<&'b  str>) {
10744    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(KeyValue::VT_VALUE, value);
10745  }
10746  #[inline]
10747  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> KeyValueBuilder<'a, 'b, A> {
10748    let start = _fbb.start_table();
10749    KeyValueBuilder {
10750      fbb_: _fbb,
10751      start_: start,
10752    }
10753  }
10754  #[inline]
10755  pub fn finish(self) -> flatbuffers::WIPOffset<KeyValue<'a>> {
10756    let o = self.fbb_.end_table(self.start_);
10757    self.fbb_.required(o, KeyValue::VT_KEY,"key");
10758    self.fbb_.required(o, KeyValue::VT_VALUE,"value");
10759    flatbuffers::WIPOffset::new(o.value())
10760  }
10761}
10762
10763impl core::fmt::Debug for KeyValue<'_> {
10764  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
10765    let mut ds = f.debug_struct("KeyValue");
10766      ds.field("key", &self.key());
10767      ds.field("value", &self.value());
10768      ds.finish()
10769  }
10770}
10771pub enum DataNodeOffset {}
10772#[derive(Copy, Clone, PartialEq)]
10773
10774pub struct DataNode<'a> {
10775  pub _tab: flatbuffers::Table<'a>,
10776}
10777
10778impl<'a> flatbuffers::Follow<'a> for DataNode<'a> {
10779  type Inner = DataNode<'a>;
10780  #[inline]
10781  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
10782    Self { _tab: flatbuffers::Table::new(buf, loc) }
10783  }
10784}
10785
10786impl<'a> DataNode<'a> {
10787  pub const VT_NODE_ID: flatbuffers::VOffsetT = 4;
10788  pub const VT_NAME: flatbuffers::VOffsetT = 6;
10789  pub const VT_SOURCE: flatbuffers::VOffsetT = 8;
10790  pub const VT_CACHE_STRATEGY: flatbuffers::VOffsetT = 10;
10791  pub const VT_STALE_TIME: flatbuffers::VOffsetT = 12;
10792  pub const VT_CACHE_TIME: flatbuffers::VOffsetT = 14;
10793  pub const VT_CACHE_TAGS: flatbuffers::VOffsetT = 16;
10794  pub const VT_AUTH_REQUIRED: flatbuffers::VOffsetT = 18;
10795  pub const VT_LOADING_STATE_MACHINE: flatbuffers::VOffsetT = 20;
10796  pub const VT_QUERY_PARAMS: flatbuffers::VOffsetT = 22;
10797
10798  #[inline]
10799  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
10800    DataNode { _tab: table }
10801  }
10802  #[allow(unused_mut)]
10803  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
10804    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
10805    args: &'args DataNodeArgs<'args>
10806  ) -> flatbuffers::WIPOffset<DataNode<'bldr>> {
10807    let mut builder = DataNodeBuilder::new(_fbb);
10808    if let Some(x) = args.query_params { builder.add_query_params(x); }
10809    if let Some(x) = args.loading_state_machine { builder.add_loading_state_machine(x); }
10810    if let Some(x) = args.cache_tags { builder.add_cache_tags(x); }
10811    builder.add_cache_time(args.cache_time);
10812    builder.add_stale_time(args.stale_time);
10813    if let Some(x) = args.source { builder.add_source(x); }
10814    if let Some(x) = args.name { builder.add_name(x); }
10815    if let Some(x) = args.node_id { builder.add_node_id(x); }
10816    builder.add_auth_required(args.auth_required);
10817    builder.add_cache_strategy(args.cache_strategy);
10818    builder.finish()
10819  }
10820
10821
10822  #[inline]
10823  pub fn node_id(&self) -> &'a str {
10824    // Safety:
10825    // Created from valid Table for this object
10826    // which contains a valid value in this slot
10827    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(DataNode::VT_NODE_ID, None).unwrap()}
10828  }
10829  #[inline]
10830  pub fn name(&self) -> Option<&'a str> {
10831    // Safety:
10832    // Created from valid Table for this object
10833    // which contains a valid value in this slot
10834    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(DataNode::VT_NAME, None)}
10835  }
10836  #[inline]
10837  pub fn source(&self) -> DataSource<'a> {
10838    // Safety:
10839    // Created from valid Table for this object
10840    // which contains a valid value in this slot
10841    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<DataSource>>(DataNode::VT_SOURCE, None).unwrap()}
10842  }
10843  /// Cache behavior.
10844  #[inline]
10845  pub fn cache_strategy(&self) -> CacheStrategy {
10846    // Safety:
10847    // Created from valid Table for this object
10848    // which contains a valid value in this slot
10849    unsafe { self._tab.get::<CacheStrategy>(DataNode::VT_CACHE_STRATEGY, Some(CacheStrategy::StaleWhileRevalidate)).unwrap()}
10850  }
10851  /// How long data is considered fresh (ms).
10852  #[inline]
10853  pub fn stale_time(&self) -> u32 {
10854    // Safety:
10855    // Created from valid Table for this object
10856    // which contains a valid value in this slot
10857    unsafe { self._tab.get::<u32>(DataNode::VT_STALE_TIME, Some(30000)).unwrap()}
10858  }
10859  /// How long to keep unused data in cache (ms).
10860  #[inline]
10861  pub fn cache_time(&self) -> u32 {
10862    // Safety:
10863    // Created from valid Table for this object
10864    // which contains a valid value in this slot
10865    unsafe { self._tab.get::<u32>(DataNode::VT_CACHE_TIME, Some(300000)).unwrap()}
10866  }
10867  /// Tags for invalidation (ActionNode references these).
10868  #[inline]
10869  pub fn cache_tags(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>> {
10870    // Safety:
10871    // Created from valid Table for this object
10872    // which contains a valid value in this slot
10873    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>(DataNode::VT_CACHE_TAGS, None)}
10874  }
10875  /// Whether this data requires authentication.
10876  #[inline]
10877  pub fn auth_required(&self) -> bool {
10878    // Safety:
10879    // Created from valid Table for this object
10880    // which contains a valid value in this slot
10881    unsafe { self._tab.get::<bool>(DataNode::VT_AUTH_REQUIRED, Some(false)).unwrap()}
10882  }
10883  /// Reference to a StateMachine that tracks loading/error/success state.
10884  #[inline]
10885  pub fn loading_state_machine(&self) -> Option<&'a str> {
10886    // Safety:
10887    // Created from valid Table for this object
10888    // which contains a valid value in this slot
10889    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(DataNode::VT_LOADING_STATE_MACHINE, None)}
10890  }
10891  /// Query parameters — filters, sort, pagination.
10892  #[inline]
10893  pub fn query_params(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>> {
10894    // Safety:
10895    // Created from valid Table for this object
10896    // which contains a valid value in this slot
10897    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue>>>>(DataNode::VT_QUERY_PARAMS, None)}
10898  }
10899}
10900
10901impl flatbuffers::Verifiable for DataNode<'_> {
10902  #[inline]
10903  fn run_verifier(
10904    v: &mut flatbuffers::Verifier, pos: usize
10905  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
10906    use self::flatbuffers::Verifiable;
10907    v.visit_table(pos)?
10908     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("node_id", Self::VT_NODE_ID, true)?
10909     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
10910     .visit_field::<flatbuffers::ForwardsUOffset<DataSource>>("source", Self::VT_SOURCE, true)?
10911     .visit_field::<CacheStrategy>("cache_strategy", Self::VT_CACHE_STRATEGY, false)?
10912     .visit_field::<u32>("stale_time", Self::VT_STALE_TIME, false)?
10913     .visit_field::<u32>("cache_time", Self::VT_CACHE_TIME, false)?
10914     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>>>("cache_tags", Self::VT_CACHE_TAGS, false)?
10915     .visit_field::<bool>("auth_required", Self::VT_AUTH_REQUIRED, false)?
10916     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("loading_state_machine", Self::VT_LOADING_STATE_MACHINE, false)?
10917     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValue>>>>("query_params", Self::VT_QUERY_PARAMS, false)?
10918     .finish();
10919    Ok(())
10920  }
10921}
10922pub struct DataNodeArgs<'a> {
10923    pub node_id: Option<flatbuffers::WIPOffset<&'a str>>,
10924    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
10925    pub source: Option<flatbuffers::WIPOffset<DataSource<'a>>>,
10926    pub cache_strategy: CacheStrategy,
10927    pub stale_time: u32,
10928    pub cache_time: u32,
10929    pub cache_tags: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>,
10930    pub auth_required: bool,
10931    pub loading_state_machine: Option<flatbuffers::WIPOffset<&'a str>>,
10932    pub query_params: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>>>,
10933}
10934impl<'a> Default for DataNodeArgs<'a> {
10935  #[inline]
10936  fn default() -> Self {
10937    DataNodeArgs {
10938      node_id: None, // required field
10939      name: None,
10940      source: None, // required field
10941      cache_strategy: CacheStrategy::StaleWhileRevalidate,
10942      stale_time: 30000,
10943      cache_time: 300000,
10944      cache_tags: None,
10945      auth_required: false,
10946      loading_state_machine: None,
10947      query_params: None,
10948    }
10949  }
10950}
10951
10952pub struct DataNodeBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
10953  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
10954  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
10955}
10956impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> DataNodeBuilder<'a, 'b, A> {
10957  #[inline]
10958  pub fn add_node_id(&mut self, node_id: flatbuffers::WIPOffset<&'b  str>) {
10959    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(DataNode::VT_NODE_ID, node_id);
10960  }
10961  #[inline]
10962  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
10963    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(DataNode::VT_NAME, name);
10964  }
10965  #[inline]
10966  pub fn add_source(&mut self, source: flatbuffers::WIPOffset<DataSource<'b >>) {
10967    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<DataSource>>(DataNode::VT_SOURCE, source);
10968  }
10969  #[inline]
10970  pub fn add_cache_strategy(&mut self, cache_strategy: CacheStrategy) {
10971    self.fbb_.push_slot::<CacheStrategy>(DataNode::VT_CACHE_STRATEGY, cache_strategy, CacheStrategy::StaleWhileRevalidate);
10972  }
10973  #[inline]
10974  pub fn add_stale_time(&mut self, stale_time: u32) {
10975    self.fbb_.push_slot::<u32>(DataNode::VT_STALE_TIME, stale_time, 30000);
10976  }
10977  #[inline]
10978  pub fn add_cache_time(&mut self, cache_time: u32) {
10979    self.fbb_.push_slot::<u32>(DataNode::VT_CACHE_TIME, cache_time, 300000);
10980  }
10981  #[inline]
10982  pub fn add_cache_tags(&mut self, cache_tags: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<&'b  str>>>) {
10983    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(DataNode::VT_CACHE_TAGS, cache_tags);
10984  }
10985  #[inline]
10986  pub fn add_auth_required(&mut self, auth_required: bool) {
10987    self.fbb_.push_slot::<bool>(DataNode::VT_AUTH_REQUIRED, auth_required, false);
10988  }
10989  #[inline]
10990  pub fn add_loading_state_machine(&mut self, loading_state_machine: flatbuffers::WIPOffset<&'b  str>) {
10991    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(DataNode::VT_LOADING_STATE_MACHINE, loading_state_machine);
10992  }
10993  #[inline]
10994  pub fn add_query_params(&mut self, query_params: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<KeyValue<'b >>>>) {
10995    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(DataNode::VT_QUERY_PARAMS, query_params);
10996  }
10997  #[inline]
10998  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> DataNodeBuilder<'a, 'b, A> {
10999    let start = _fbb.start_table();
11000    DataNodeBuilder {
11001      fbb_: _fbb,
11002      start_: start,
11003    }
11004  }
11005  #[inline]
11006  pub fn finish(self) -> flatbuffers::WIPOffset<DataNode<'a>> {
11007    let o = self.fbb_.end_table(self.start_);
11008    self.fbb_.required(o, DataNode::VT_NODE_ID,"node_id");
11009    self.fbb_.required(o, DataNode::VT_SOURCE,"source");
11010    flatbuffers::WIPOffset::new(o.value())
11011  }
11012}
11013
11014impl core::fmt::Debug for DataNode<'_> {
11015  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
11016    let mut ds = f.debug_struct("DataNode");
11017      ds.field("node_id", &self.node_id());
11018      ds.field("name", &self.name());
11019      ds.field("source", &self.source());
11020      ds.field("cache_strategy", &self.cache_strategy());
11021      ds.field("stale_time", &self.stale_time());
11022      ds.field("cache_time", &self.cache_time());
11023      ds.field("cache_tags", &self.cache_tags());
11024      ds.field("auth_required", &self.auth_required());
11025      ds.field("loading_state_machine", &self.loading_state_machine());
11026      ds.field("query_params", &self.query_params());
11027      ds.finish()
11028  }
11029}
11030pub enum ComputeInputOffset {}
11031#[derive(Copy, Clone, PartialEq)]
11032
11033pub struct ComputeInput<'a> {
11034  pub _tab: flatbuffers::Table<'a>,
11035}
11036
11037impl<'a> flatbuffers::Follow<'a> for ComputeInput<'a> {
11038  type Inner = ComputeInput<'a>;
11039  #[inline]
11040  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
11041    Self { _tab: flatbuffers::Table::new(buf, loc) }
11042  }
11043}
11044
11045impl<'a> ComputeInput<'a> {
11046  pub const VT_NAME: flatbuffers::VOffsetT = 4;
11047  pub const VT_SOURCE_NODE_ID: flatbuffers::VOffsetT = 6;
11048  pub const VT_FIELD_PATH: flatbuffers::VOffsetT = 8;
11049
11050  #[inline]
11051  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
11052    ComputeInput { _tab: table }
11053  }
11054  #[allow(unused_mut)]
11055  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
11056    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
11057    args: &'args ComputeInputArgs<'args>
11058  ) -> flatbuffers::WIPOffset<ComputeInput<'bldr>> {
11059    let mut builder = ComputeInputBuilder::new(_fbb);
11060    if let Some(x) = args.field_path { builder.add_field_path(x); }
11061    if let Some(x) = args.source_node_id { builder.add_source_node_id(x); }
11062    if let Some(x) = args.name { builder.add_name(x); }
11063    builder.finish()
11064  }
11065
11066
11067  #[inline]
11068  pub fn name(&self) -> &'a str {
11069    // Safety:
11070    // Created from valid Table for this object
11071    // which contains a valid value in this slot
11072    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ComputeInput::VT_NAME, None).unwrap()}
11073  }
11074  /// Source node ID (DataNode, ContextNode, or another ComputeNode).
11075  #[inline]
11076  pub fn source_node_id(&self) -> &'a str {
11077    // Safety:
11078    // Created from valid Table for this object
11079    // which contains a valid value in this slot
11080    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ComputeInput::VT_SOURCE_NODE_ID, None).unwrap()}
11081  }
11082  #[inline]
11083  pub fn field_path(&self) -> Option<&'a str> {
11084    // Safety:
11085    // Created from valid Table for this object
11086    // which contains a valid value in this slot
11087    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ComputeInput::VT_FIELD_PATH, None)}
11088  }
11089}
11090
11091impl flatbuffers::Verifiable for ComputeInput<'_> {
11092  #[inline]
11093  fn run_verifier(
11094    v: &mut flatbuffers::Verifier, pos: usize
11095  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
11096    use self::flatbuffers::Verifiable;
11097    v.visit_table(pos)?
11098     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
11099     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("source_node_id", Self::VT_SOURCE_NODE_ID, true)?
11100     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("field_path", Self::VT_FIELD_PATH, false)?
11101     .finish();
11102    Ok(())
11103  }
11104}
11105pub struct ComputeInputArgs<'a> {
11106    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
11107    pub source_node_id: Option<flatbuffers::WIPOffset<&'a str>>,
11108    pub field_path: Option<flatbuffers::WIPOffset<&'a str>>,
11109}
11110impl<'a> Default for ComputeInputArgs<'a> {
11111  #[inline]
11112  fn default() -> Self {
11113    ComputeInputArgs {
11114      name: None, // required field
11115      source_node_id: None, // required field
11116      field_path: None,
11117    }
11118  }
11119}
11120
11121pub struct ComputeInputBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
11122  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
11123  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
11124}
11125impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ComputeInputBuilder<'a, 'b, A> {
11126  #[inline]
11127  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
11128    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ComputeInput::VT_NAME, name);
11129  }
11130  #[inline]
11131  pub fn add_source_node_id(&mut self, source_node_id: flatbuffers::WIPOffset<&'b  str>) {
11132    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ComputeInput::VT_SOURCE_NODE_ID, source_node_id);
11133  }
11134  #[inline]
11135  pub fn add_field_path(&mut self, field_path: flatbuffers::WIPOffset<&'b  str>) {
11136    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ComputeInput::VT_FIELD_PATH, field_path);
11137  }
11138  #[inline]
11139  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ComputeInputBuilder<'a, 'b, A> {
11140    let start = _fbb.start_table();
11141    ComputeInputBuilder {
11142      fbb_: _fbb,
11143      start_: start,
11144    }
11145  }
11146  #[inline]
11147  pub fn finish(self) -> flatbuffers::WIPOffset<ComputeInput<'a>> {
11148    let o = self.fbb_.end_table(self.start_);
11149    self.fbb_.required(o, ComputeInput::VT_NAME,"name");
11150    self.fbb_.required(o, ComputeInput::VT_SOURCE_NODE_ID,"source_node_id");
11151    flatbuffers::WIPOffset::new(o.value())
11152  }
11153}
11154
11155impl core::fmt::Debug for ComputeInput<'_> {
11156  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
11157    let mut ds = f.debug_struct("ComputeInput");
11158      ds.field("name", &self.name());
11159      ds.field("source_node_id", &self.source_node_id());
11160      ds.field("field_path", &self.field_path());
11161      ds.finish()
11162  }
11163}
11164pub enum ComputeNodeOffset {}
11165#[derive(Copy, Clone, PartialEq)]
11166
11167pub struct ComputeNode<'a> {
11168  pub _tab: flatbuffers::Table<'a>,
11169}
11170
11171impl<'a> flatbuffers::Follow<'a> for ComputeNode<'a> {
11172  type Inner = ComputeNode<'a>;
11173  #[inline]
11174  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
11175    Self { _tab: flatbuffers::Table::new(buf, loc) }
11176  }
11177}
11178
11179impl<'a> ComputeNode<'a> {
11180  pub const VT_NODE_ID: flatbuffers::VOffsetT = 4;
11181  pub const VT_NAME: flatbuffers::VOffsetT = 6;
11182  pub const VT_INPUTS: flatbuffers::VOffsetT = 8;
11183  pub const VT_EXPRESSION: flatbuffers::VOffsetT = 10;
11184  pub const VT_OUTPUT_TYPE: flatbuffers::VOffsetT = 12;
11185
11186  #[inline]
11187  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
11188    ComputeNode { _tab: table }
11189  }
11190  #[allow(unused_mut)]
11191  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
11192    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
11193    args: &'args ComputeNodeArgs<'args>
11194  ) -> flatbuffers::WIPOffset<ComputeNode<'bldr>> {
11195    let mut builder = ComputeNodeBuilder::new(_fbb);
11196    if let Some(x) = args.output_type { builder.add_output_type(x); }
11197    if let Some(x) = args.expression { builder.add_expression(x); }
11198    if let Some(x) = args.inputs { builder.add_inputs(x); }
11199    if let Some(x) = args.name { builder.add_name(x); }
11200    if let Some(x) = args.node_id { builder.add_node_id(x); }
11201    builder.finish()
11202  }
11203
11204
11205  #[inline]
11206  pub fn node_id(&self) -> &'a str {
11207    // Safety:
11208    // Created from valid Table for this object
11209    // which contains a valid value in this slot
11210    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ComputeNode::VT_NODE_ID, None).unwrap()}
11211  }
11212  #[inline]
11213  pub fn name(&self) -> Option<&'a str> {
11214    // Safety:
11215    // Created from valid Table for this object
11216    // which contains a valid value in this slot
11217    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ComputeNode::VT_NAME, None)}
11218  }
11219  #[inline]
11220  pub fn inputs(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ComputeInput<'a>>> {
11221    // Safety:
11222    // Created from valid Table for this object
11223    // which contains a valid value in this slot
11224    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ComputeInput>>>>(ComputeNode::VT_INPUTS, None).unwrap()}
11225  }
11226  /// Expression to evaluate. Simple expressions only — complex logic
11227  /// belongs in ActionNode/EffectNode. Examples:
11228  /// "price * quantity", "items.length > 0", "firstName + ' ' + lastName"
11229  #[inline]
11230  pub fn expression(&self) -> &'a str {
11231    // Safety:
11232    // Created from valid Table for this object
11233    // which contains a valid value in this slot
11234    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ComputeNode::VT_EXPRESSION, None).unwrap()}
11235  }
11236  /// Output type hint for the compiler.
11237  #[inline]
11238  pub fn output_type(&self) -> Option<&'a str> {
11239    // Safety:
11240    // Created from valid Table for this object
11241    // which contains a valid value in this slot
11242    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ComputeNode::VT_OUTPUT_TYPE, None)}
11243  }
11244}
11245
11246impl flatbuffers::Verifiable for ComputeNode<'_> {
11247  #[inline]
11248  fn run_verifier(
11249    v: &mut flatbuffers::Verifier, pos: usize
11250  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
11251    use self::flatbuffers::Verifiable;
11252    v.visit_table(pos)?
11253     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("node_id", Self::VT_NODE_ID, true)?
11254     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
11255     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<ComputeInput>>>>("inputs", Self::VT_INPUTS, true)?
11256     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("expression", Self::VT_EXPRESSION, true)?
11257     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("output_type", Self::VT_OUTPUT_TYPE, false)?
11258     .finish();
11259    Ok(())
11260  }
11261}
11262pub struct ComputeNodeArgs<'a> {
11263    pub node_id: Option<flatbuffers::WIPOffset<&'a str>>,
11264    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
11265    pub inputs: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ComputeInput<'a>>>>>,
11266    pub expression: Option<flatbuffers::WIPOffset<&'a str>>,
11267    pub output_type: Option<flatbuffers::WIPOffset<&'a str>>,
11268}
11269impl<'a> Default for ComputeNodeArgs<'a> {
11270  #[inline]
11271  fn default() -> Self {
11272    ComputeNodeArgs {
11273      node_id: None, // required field
11274      name: None,
11275      inputs: None, // required field
11276      expression: None, // required field
11277      output_type: None,
11278    }
11279  }
11280}
11281
11282pub struct ComputeNodeBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
11283  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
11284  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
11285}
11286impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ComputeNodeBuilder<'a, 'b, A> {
11287  #[inline]
11288  pub fn add_node_id(&mut self, node_id: flatbuffers::WIPOffset<&'b  str>) {
11289    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ComputeNode::VT_NODE_ID, node_id);
11290  }
11291  #[inline]
11292  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
11293    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ComputeNode::VT_NAME, name);
11294  }
11295  #[inline]
11296  pub fn add_inputs(&mut self, inputs: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<ComputeInput<'b >>>>) {
11297    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ComputeNode::VT_INPUTS, inputs);
11298  }
11299  #[inline]
11300  pub fn add_expression(&mut self, expression: flatbuffers::WIPOffset<&'b  str>) {
11301    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ComputeNode::VT_EXPRESSION, expression);
11302  }
11303  #[inline]
11304  pub fn add_output_type(&mut self, output_type: flatbuffers::WIPOffset<&'b  str>) {
11305    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ComputeNode::VT_OUTPUT_TYPE, output_type);
11306  }
11307  #[inline]
11308  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ComputeNodeBuilder<'a, 'b, A> {
11309    let start = _fbb.start_table();
11310    ComputeNodeBuilder {
11311      fbb_: _fbb,
11312      start_: start,
11313    }
11314  }
11315  #[inline]
11316  pub fn finish(self) -> flatbuffers::WIPOffset<ComputeNode<'a>> {
11317    let o = self.fbb_.end_table(self.start_);
11318    self.fbb_.required(o, ComputeNode::VT_NODE_ID,"node_id");
11319    self.fbb_.required(o, ComputeNode::VT_INPUTS,"inputs");
11320    self.fbb_.required(o, ComputeNode::VT_EXPRESSION,"expression");
11321    flatbuffers::WIPOffset::new(o.value())
11322  }
11323}
11324
11325impl core::fmt::Debug for ComputeNode<'_> {
11326  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
11327    let mut ds = f.debug_struct("ComputeNode");
11328      ds.field("node_id", &self.node_id());
11329      ds.field("name", &self.name());
11330      ds.field("inputs", &self.inputs());
11331      ds.field("expression", &self.expression());
11332      ds.field("output_type", &self.output_type());
11333      ds.finish()
11334  }
11335}
11336pub enum EffectNodeOffset {}
11337#[derive(Copy, Clone, PartialEq)]
11338
11339pub struct EffectNode<'a> {
11340  pub _tab: flatbuffers::Table<'a>,
11341}
11342
11343impl<'a> flatbuffers::Follow<'a> for EffectNode<'a> {
11344  type Inner = EffectNode<'a>;
11345  #[inline]
11346  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
11347    Self { _tab: flatbuffers::Table::new(buf, loc) }
11348  }
11349}
11350
11351impl<'a> EffectNode<'a> {
11352  pub const VT_NODE_ID: flatbuffers::VOffsetT = 4;
11353  pub const VT_NAME: flatbuffers::VOffsetT = 6;
11354  pub const VT_EFFECT_TYPE: flatbuffers::VOffsetT = 8;
11355  pub const VT_CONFIG: flatbuffers::VOffsetT = 10;
11356  pub const VT_API_SOURCE: flatbuffers::VOffsetT = 12;
11357  pub const VT_IDEMPOTENT: flatbuffers::VOffsetT = 14;
11358
11359  #[inline]
11360  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
11361    EffectNode { _tab: table }
11362  }
11363  #[allow(unused_mut)]
11364  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
11365    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
11366    args: &'args EffectNodeArgs<'args>
11367  ) -> flatbuffers::WIPOffset<EffectNode<'bldr>> {
11368    let mut builder = EffectNodeBuilder::new(_fbb);
11369    if let Some(x) = args.api_source { builder.add_api_source(x); }
11370    if let Some(x) = args.config { builder.add_config(x); }
11371    if let Some(x) = args.name { builder.add_name(x); }
11372    if let Some(x) = args.node_id { builder.add_node_id(x); }
11373    builder.add_idempotent(args.idempotent);
11374    builder.add_effect_type(args.effect_type);
11375    builder.finish()
11376  }
11377
11378
11379  #[inline]
11380  pub fn node_id(&self) -> &'a str {
11381    // Safety:
11382    // Created from valid Table for this object
11383    // which contains a valid value in this slot
11384    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(EffectNode::VT_NODE_ID, None).unwrap()}
11385  }
11386  #[inline]
11387  pub fn name(&self) -> Option<&'a str> {
11388    // Safety:
11389    // Created from valid Table for this object
11390    // which contains a valid value in this slot
11391    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(EffectNode::VT_NAME, None)}
11392  }
11393  #[inline]
11394  pub fn effect_type(&self) -> EffectType {
11395    // Safety:
11396    // Created from valid Table for this object
11397    // which contains a valid value in this slot
11398    unsafe { self._tab.get::<EffectType>(EffectNode::VT_EFFECT_TYPE, Some(EffectType::Analytics)).unwrap()}
11399  }
11400  /// Configuration payload (JSON-like key-value pairs).
11401  #[inline]
11402  pub fn config(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>> {
11403    // Safety:
11404    // Created from valid Table for this object
11405    // which contains a valid value in this slot
11406    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue>>>>(EffectNode::VT_CONFIG, None)}
11407  }
11408  /// For ApiCall effects — the endpoint and method.
11409  #[inline]
11410  pub fn api_source(&self) -> Option<DataSource<'a>> {
11411    // Safety:
11412    // Created from valid Table for this object
11413    // which contains a valid value in this slot
11414    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<DataSource>>(EffectNode::VT_API_SOURCE, None)}
11415  }
11416  /// Whether this effect is idempotent (safe to retry).
11417  #[inline]
11418  pub fn idempotent(&self) -> bool {
11419    // Safety:
11420    // Created from valid Table for this object
11421    // which contains a valid value in this slot
11422    unsafe { self._tab.get::<bool>(EffectNode::VT_IDEMPOTENT, Some(false)).unwrap()}
11423  }
11424}
11425
11426impl flatbuffers::Verifiable for EffectNode<'_> {
11427  #[inline]
11428  fn run_verifier(
11429    v: &mut flatbuffers::Verifier, pos: usize
11430  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
11431    use self::flatbuffers::Verifiable;
11432    v.visit_table(pos)?
11433     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("node_id", Self::VT_NODE_ID, true)?
11434     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
11435     .visit_field::<EffectType>("effect_type", Self::VT_EFFECT_TYPE, false)?
11436     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValue>>>>("config", Self::VT_CONFIG, false)?
11437     .visit_field::<flatbuffers::ForwardsUOffset<DataSource>>("api_source", Self::VT_API_SOURCE, false)?
11438     .visit_field::<bool>("idempotent", Self::VT_IDEMPOTENT, false)?
11439     .finish();
11440    Ok(())
11441  }
11442}
11443pub struct EffectNodeArgs<'a> {
11444    pub node_id: Option<flatbuffers::WIPOffset<&'a str>>,
11445    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
11446    pub effect_type: EffectType,
11447    pub config: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>>>,
11448    pub api_source: Option<flatbuffers::WIPOffset<DataSource<'a>>>,
11449    pub idempotent: bool,
11450}
11451impl<'a> Default for EffectNodeArgs<'a> {
11452  #[inline]
11453  fn default() -> Self {
11454    EffectNodeArgs {
11455      node_id: None, // required field
11456      name: None,
11457      effect_type: EffectType::Analytics,
11458      config: None,
11459      api_source: None,
11460      idempotent: false,
11461    }
11462  }
11463}
11464
11465pub struct EffectNodeBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
11466  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
11467  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
11468}
11469impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> EffectNodeBuilder<'a, 'b, A> {
11470  #[inline]
11471  pub fn add_node_id(&mut self, node_id: flatbuffers::WIPOffset<&'b  str>) {
11472    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(EffectNode::VT_NODE_ID, node_id);
11473  }
11474  #[inline]
11475  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
11476    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(EffectNode::VT_NAME, name);
11477  }
11478  #[inline]
11479  pub fn add_effect_type(&mut self, effect_type: EffectType) {
11480    self.fbb_.push_slot::<EffectType>(EffectNode::VT_EFFECT_TYPE, effect_type, EffectType::Analytics);
11481  }
11482  #[inline]
11483  pub fn add_config(&mut self, config: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<KeyValue<'b >>>>) {
11484    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(EffectNode::VT_CONFIG, config);
11485  }
11486  #[inline]
11487  pub fn add_api_source(&mut self, api_source: flatbuffers::WIPOffset<DataSource<'b >>) {
11488    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<DataSource>>(EffectNode::VT_API_SOURCE, api_source);
11489  }
11490  #[inline]
11491  pub fn add_idempotent(&mut self, idempotent: bool) {
11492    self.fbb_.push_slot::<bool>(EffectNode::VT_IDEMPOTENT, idempotent, false);
11493  }
11494  #[inline]
11495  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> EffectNodeBuilder<'a, 'b, A> {
11496    let start = _fbb.start_table();
11497    EffectNodeBuilder {
11498      fbb_: _fbb,
11499      start_: start,
11500    }
11501  }
11502  #[inline]
11503  pub fn finish(self) -> flatbuffers::WIPOffset<EffectNode<'a>> {
11504    let o = self.fbb_.end_table(self.start_);
11505    self.fbb_.required(o, EffectNode::VT_NODE_ID,"node_id");
11506    flatbuffers::WIPOffset::new(o.value())
11507  }
11508}
11509
11510impl core::fmt::Debug for EffectNode<'_> {
11511  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
11512    let mut ds = f.debug_struct("EffectNode");
11513      ds.field("node_id", &self.node_id());
11514      ds.field("name", &self.name());
11515      ds.field("effect_type", &self.effect_type());
11516      ds.field("config", &self.config());
11517      ds.field("api_source", &self.api_source());
11518      ds.field("idempotent", &self.idempotent());
11519      ds.finish()
11520  }
11521}
11522pub enum ContextNodeOffset {}
11523#[derive(Copy, Clone, PartialEq)]
11524
11525pub struct ContextNode<'a> {
11526  pub _tab: flatbuffers::Table<'a>,
11527}
11528
11529impl<'a> flatbuffers::Follow<'a> for ContextNode<'a> {
11530  type Inner = ContextNode<'a>;
11531  #[inline]
11532  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
11533    Self { _tab: flatbuffers::Table::new(buf, loc) }
11534  }
11535}
11536
11537impl<'a> ContextNode<'a> {
11538  pub const VT_NODE_ID: flatbuffers::VOffsetT = 4;
11539  pub const VT_NAME: flatbuffers::VOffsetT = 6;
11540  pub const VT_INITIAL_VALUE: flatbuffers::VOffsetT = 8;
11541  pub const VT_WRITERS: flatbuffers::VOffsetT = 10;
11542  pub const VT_GLOBAL: flatbuffers::VOffsetT = 12;
11543
11544  #[inline]
11545  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
11546    ContextNode { _tab: table }
11547  }
11548  #[allow(unused_mut)]
11549  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
11550    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
11551    args: &'args ContextNodeArgs<'args>
11552  ) -> flatbuffers::WIPOffset<ContextNode<'bldr>> {
11553    let mut builder = ContextNodeBuilder::new(_fbb);
11554    if let Some(x) = args.writers { builder.add_writers(x); }
11555    if let Some(x) = args.initial_value { builder.add_initial_value(x); }
11556    if let Some(x) = args.name { builder.add_name(x); }
11557    if let Some(x) = args.node_id { builder.add_node_id(x); }
11558    builder.add_global(args.global);
11559    builder.finish()
11560  }
11561
11562
11563  #[inline]
11564  pub fn node_id(&self) -> &'a str {
11565    // Safety:
11566    // Created from valid Table for this object
11567    // which contains a valid value in this slot
11568    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ContextNode::VT_NODE_ID, None).unwrap()}
11569  }
11570  #[inline]
11571  pub fn name(&self) -> &'a str {
11572    // Safety:
11573    // Created from valid Table for this object
11574    // which contains a valid value in this slot
11575    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ContextNode::VT_NAME, None).unwrap()}
11576  }
11577  /// Initial value as a JSON string (parsed by the compiler).
11578  #[inline]
11579  pub fn initial_value(&self) -> Option<&'a str> {
11580    // Safety:
11581    // Created from valid Table for this object
11582    // which contains a valid value in this slot
11583    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ContextNode::VT_INITIAL_VALUE, None)}
11584  }
11585  /// Node IDs that can write to this context (empty = any descendant can write).
11586  #[inline]
11587  pub fn writers(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>> {
11588    // Safety:
11589    // Created from valid Table for this object
11590    // which contains a valid value in this slot
11591    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>(ContextNode::VT_WRITERS, None)}
11592  }
11593  /// If true, this context is globally accessible (not scoped to subtree).
11594  #[inline]
11595  pub fn global(&self) -> bool {
11596    // Safety:
11597    // Created from valid Table for this object
11598    // which contains a valid value in this slot
11599    unsafe { self._tab.get::<bool>(ContextNode::VT_GLOBAL, Some(false)).unwrap()}
11600  }
11601}
11602
11603impl flatbuffers::Verifiable for ContextNode<'_> {
11604  #[inline]
11605  fn run_verifier(
11606    v: &mut flatbuffers::Verifier, pos: usize
11607  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
11608    use self::flatbuffers::Verifiable;
11609    v.visit_table(pos)?
11610     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("node_id", Self::VT_NODE_ID, true)?
11611     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
11612     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("initial_value", Self::VT_INITIAL_VALUE, false)?
11613     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>>>("writers", Self::VT_WRITERS, false)?
11614     .visit_field::<bool>("global", Self::VT_GLOBAL, false)?
11615     .finish();
11616    Ok(())
11617  }
11618}
11619pub struct ContextNodeArgs<'a> {
11620    pub node_id: Option<flatbuffers::WIPOffset<&'a str>>,
11621    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
11622    pub initial_value: Option<flatbuffers::WIPOffset<&'a str>>,
11623    pub writers: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>,
11624    pub global: bool,
11625}
11626impl<'a> Default for ContextNodeArgs<'a> {
11627  #[inline]
11628  fn default() -> Self {
11629    ContextNodeArgs {
11630      node_id: None, // required field
11631      name: None, // required field
11632      initial_value: None,
11633      writers: None,
11634      global: false,
11635    }
11636  }
11637}
11638
11639pub struct ContextNodeBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
11640  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
11641  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
11642}
11643impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ContextNodeBuilder<'a, 'b, A> {
11644  #[inline]
11645  pub fn add_node_id(&mut self, node_id: flatbuffers::WIPOffset<&'b  str>) {
11646    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ContextNode::VT_NODE_ID, node_id);
11647  }
11648  #[inline]
11649  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
11650    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ContextNode::VT_NAME, name);
11651  }
11652  #[inline]
11653  pub fn add_initial_value(&mut self, initial_value: flatbuffers::WIPOffset<&'b  str>) {
11654    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ContextNode::VT_INITIAL_VALUE, initial_value);
11655  }
11656  #[inline]
11657  pub fn add_writers(&mut self, writers: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<&'b  str>>>) {
11658    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ContextNode::VT_WRITERS, writers);
11659  }
11660  #[inline]
11661  pub fn add_global(&mut self, global: bool) {
11662    self.fbb_.push_slot::<bool>(ContextNode::VT_GLOBAL, global, false);
11663  }
11664  #[inline]
11665  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ContextNodeBuilder<'a, 'b, A> {
11666    let start = _fbb.start_table();
11667    ContextNodeBuilder {
11668      fbb_: _fbb,
11669      start_: start,
11670    }
11671  }
11672  #[inline]
11673  pub fn finish(self) -> flatbuffers::WIPOffset<ContextNode<'a>> {
11674    let o = self.fbb_.end_table(self.start_);
11675    self.fbb_.required(o, ContextNode::VT_NODE_ID,"node_id");
11676    self.fbb_.required(o, ContextNode::VT_NAME,"name");
11677    flatbuffers::WIPOffset::new(o.value())
11678  }
11679}
11680
11681impl core::fmt::Debug for ContextNode<'_> {
11682  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
11683    let mut ds = f.debug_struct("ContextNode");
11684      ds.field("node_id", &self.node_id());
11685      ds.field("name", &self.name());
11686      ds.field("initial_value", &self.initial_value());
11687      ds.field("writers", &self.writers());
11688      ds.field("global", &self.global());
11689      ds.finish()
11690  }
11691}
11692pub enum SemanticNodeOffset {}
11693#[derive(Copy, Clone, PartialEq)]
11694
11695pub struct SemanticNode<'a> {
11696  pub _tab: flatbuffers::Table<'a>,
11697}
11698
11699impl<'a> flatbuffers::Follow<'a> for SemanticNode<'a> {
11700  type Inner = SemanticNode<'a>;
11701  #[inline]
11702  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
11703    Self { _tab: flatbuffers::Table::new(buf, loc) }
11704  }
11705}
11706
11707impl<'a> SemanticNode<'a> {
11708  pub const VT_NODE_ID: flatbuffers::VOffsetT = 4;
11709  pub const VT_ROLE: flatbuffers::VOffsetT = 6;
11710  pub const VT_LABEL: flatbuffers::VOffsetT = 8;
11711  pub const VT_LABELLED_BY: flatbuffers::VOffsetT = 10;
11712  pub const VT_DESCRIBED_BY: flatbuffers::VOffsetT = 12;
11713  pub const VT_CONTROLS: flatbuffers::VOffsetT = 14;
11714  pub const VT_OWNED_BY: flatbuffers::VOffsetT = 16;
11715  pub const VT_HEADING_LEVEL: flatbuffers::VOffsetT = 18;
11716  pub const VT_TAB_INDEX: flatbuffers::VOffsetT = 20;
11717  pub const VT_HIDDEN: flatbuffers::VOffsetT = 22;
11718  pub const VT_ARIA_EXPANDED: flatbuffers::VOffsetT = 24;
11719  pub const VT_ARIA_SELECTED: flatbuffers::VOffsetT = 26;
11720  pub const VT_ARIA_CHECKED: flatbuffers::VOffsetT = 28;
11721  pub const VT_ARIA_DISABLED: flatbuffers::VOffsetT = 30;
11722  pub const VT_ARIA_REQUIRED: flatbuffers::VOffsetT = 32;
11723  pub const VT_ARIA_INVALID: flatbuffers::VOffsetT = 34;
11724  pub const VT_ARIA_VALUE_MIN: flatbuffers::VOffsetT = 36;
11725  pub const VT_ARIA_VALUE_MAX: flatbuffers::VOffsetT = 38;
11726  pub const VT_ARIA_VALUE_NOW: flatbuffers::VOffsetT = 40;
11727  pub const VT_ARIA_VALUE_TEXT: flatbuffers::VOffsetT = 42;
11728  pub const VT_CUSTOM_ARIA: flatbuffers::VOffsetT = 44;
11729
11730  #[inline]
11731  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
11732    SemanticNode { _tab: table }
11733  }
11734  #[allow(unused_mut)]
11735  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
11736    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
11737    args: &'args SemanticNodeArgs<'args>
11738  ) -> flatbuffers::WIPOffset<SemanticNode<'bldr>> {
11739    let mut builder = SemanticNodeBuilder::new(_fbb);
11740    if let Some(x) = args.custom_aria { builder.add_custom_aria(x); }
11741    if let Some(x) = args.aria_value_text { builder.add_aria_value_text(x); }
11742    builder.add_aria_value_now(args.aria_value_now);
11743    builder.add_aria_value_max(args.aria_value_max);
11744    builder.add_aria_value_min(args.aria_value_min);
11745    builder.add_tab_index(args.tab_index);
11746    if let Some(x) = args.owned_by { builder.add_owned_by(x); }
11747    if let Some(x) = args.controls { builder.add_controls(x); }
11748    if let Some(x) = args.described_by { builder.add_described_by(x); }
11749    if let Some(x) = args.labelled_by { builder.add_labelled_by(x); }
11750    if let Some(x) = args.label { builder.add_label(x); }
11751    if let Some(x) = args.role { builder.add_role(x); }
11752    if let Some(x) = args.node_id { builder.add_node_id(x); }
11753    builder.add_aria_invalid(args.aria_invalid);
11754    builder.add_aria_required(args.aria_required);
11755    builder.add_aria_disabled(args.aria_disabled);
11756    builder.add_aria_checked(args.aria_checked);
11757    builder.add_aria_selected(args.aria_selected);
11758    builder.add_aria_expanded(args.aria_expanded);
11759    builder.add_hidden(args.hidden);
11760    builder.add_heading_level(args.heading_level);
11761    builder.finish()
11762  }
11763
11764
11765  #[inline]
11766  pub fn node_id(&self) -> &'a str {
11767    // Safety:
11768    // Created from valid Table for this object
11769    // which contains a valid value in this slot
11770    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(SemanticNode::VT_NODE_ID, None).unwrap()}
11771  }
11772  /// ARIA role (e.g., "button", "heading", "navigation", "main").
11773  /// Validated against WAI-ARIA 1.2 role list by the validator.
11774  #[inline]
11775  pub fn role(&self) -> &'a str {
11776    // Safety:
11777    // Created from valid Table for this object
11778    // which contains a valid value in this slot
11779    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(SemanticNode::VT_ROLE, None).unwrap()}
11780  }
11781  /// Human-readable accessible label.
11782  /// For buttons/links: the text announced by screen readers.
11783  /// For images: the alt text equivalent.
11784  /// For headings: usually matches the visible text.
11785  #[inline]
11786  pub fn label(&self) -> Option<&'a str> {
11787    // Safety:
11788    // Created from valid Table for this object
11789    // which contains a valid value in this slot
11790    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(SemanticNode::VT_LABEL, None)}
11791  }
11792  /// Reference to another node whose content labels this node (aria-labelledby).
11793  #[inline]
11794  pub fn labelled_by(&self) -> Option<&'a str> {
11795    // Safety:
11796    // Created from valid Table for this object
11797    // which contains a valid value in this slot
11798    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(SemanticNode::VT_LABELLED_BY, None)}
11799  }
11800  /// Reference to a node providing extended description (aria-describedby).
11801  #[inline]
11802  pub fn described_by(&self) -> Option<&'a str> {
11803    // Safety:
11804    // Created from valid Table for this object
11805    // which contains a valid value in this slot
11806    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(SemanticNode::VT_DESCRIBED_BY, None)}
11807  }
11808  /// Reference to a node this element controls (aria-controls).
11809  #[inline]
11810  pub fn controls(&self) -> Option<&'a str> {
11811    // Safety:
11812    // Created from valid Table for this object
11813    // which contains a valid value in this slot
11814    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(SemanticNode::VT_CONTROLS, None)}
11815  }
11816  /// Reference to a node that owns this element (aria-owns).
11817  #[inline]
11818  pub fn owned_by(&self) -> Option<&'a str> {
11819    // Safety:
11820    // Created from valid Table for this object
11821    // which contains a valid value in this slot
11822    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(SemanticNode::VT_OWNED_BY, None)}
11823  }
11824  /// Heading level (1-6). Only valid when role = "heading".
11825  #[inline]
11826  pub fn heading_level(&self) -> i8 {
11827    // Safety:
11828    // Created from valid Table for this object
11829    // which contains a valid value in this slot
11830    unsafe { self._tab.get::<i8>(SemanticNode::VT_HEADING_LEVEL, Some(0)).unwrap()}
11831  }
11832  /// Tab index for keyboard focus order.
11833  /// -1 = focusable but not in tab order (programmatic focus only).
11834  /// 0 = focusable in natural tab order.
11835  /// >0 = explicit order (discouraged but supported).
11836  #[inline]
11837  pub fn tab_index(&self) -> i32 {
11838    // Safety:
11839    // Created from valid Table for this object
11840    // which contains a valid value in this slot
11841    unsafe { self._tab.get::<i32>(SemanticNode::VT_TAB_INDEX, Some(-2)).unwrap()}
11842  }
11843  /// Whether this element is currently hidden from the a11y tree.
11844  #[inline]
11845  pub fn hidden(&self) -> bool {
11846    // Safety:
11847    // Created from valid Table for this object
11848    // which contains a valid value in this slot
11849    unsafe { self._tab.get::<bool>(SemanticNode::VT_HIDDEN, Some(false)).unwrap()}
11850  }
11851  /// ARIA states (set dynamically by state machines).
11852  #[inline]
11853  pub fn aria_expanded(&self) -> i8 {
11854    // Safety:
11855    // Created from valid Table for this object
11856    // which contains a valid value in this slot
11857    unsafe { self._tab.get::<i8>(SemanticNode::VT_ARIA_EXPANDED, Some(-1)).unwrap()}
11858  }
11859  #[inline]
11860  pub fn aria_selected(&self) -> i8 {
11861    // Safety:
11862    // Created from valid Table for this object
11863    // which contains a valid value in this slot
11864    unsafe { self._tab.get::<i8>(SemanticNode::VT_ARIA_SELECTED, Some(-1)).unwrap()}
11865  }
11866  #[inline]
11867  pub fn aria_checked(&self) -> i8 {
11868    // Safety:
11869    // Created from valid Table for this object
11870    // which contains a valid value in this slot
11871    unsafe { self._tab.get::<i8>(SemanticNode::VT_ARIA_CHECKED, Some(-1)).unwrap()}
11872  }
11873  #[inline]
11874  pub fn aria_disabled(&self) -> bool {
11875    // Safety:
11876    // Created from valid Table for this object
11877    // which contains a valid value in this slot
11878    unsafe { self._tab.get::<bool>(SemanticNode::VT_ARIA_DISABLED, Some(false)).unwrap()}
11879  }
11880  #[inline]
11881  pub fn aria_required(&self) -> bool {
11882    // Safety:
11883    // Created from valid Table for this object
11884    // which contains a valid value in this slot
11885    unsafe { self._tab.get::<bool>(SemanticNode::VT_ARIA_REQUIRED, Some(false)).unwrap()}
11886  }
11887  #[inline]
11888  pub fn aria_invalid(&self) -> bool {
11889    // Safety:
11890    // Created from valid Table for this object
11891    // which contains a valid value in this slot
11892    unsafe { self._tab.get::<bool>(SemanticNode::VT_ARIA_INVALID, Some(false)).unwrap()}
11893  }
11894  /// For range widgets (slider, progressbar, spinbutton).
11895  #[inline]
11896  pub fn aria_value_min(&self) -> f32 {
11897    // Safety:
11898    // Created from valid Table for this object
11899    // which contains a valid value in this slot
11900    unsafe { self._tab.get::<f32>(SemanticNode::VT_ARIA_VALUE_MIN, Some(0.0)).unwrap()}
11901  }
11902  #[inline]
11903  pub fn aria_value_max(&self) -> f32 {
11904    // Safety:
11905    // Created from valid Table for this object
11906    // which contains a valid value in this slot
11907    unsafe { self._tab.get::<f32>(SemanticNode::VT_ARIA_VALUE_MAX, Some(0.0)).unwrap()}
11908  }
11909  #[inline]
11910  pub fn aria_value_now(&self) -> f32 {
11911    // Safety:
11912    // Created from valid Table for this object
11913    // which contains a valid value in this slot
11914    unsafe { self._tab.get::<f32>(SemanticNode::VT_ARIA_VALUE_NOW, Some(0.0)).unwrap()}
11915  }
11916  #[inline]
11917  pub fn aria_value_text(&self) -> Option<&'a str> {
11918    // Safety:
11919    // Created from valid Table for this object
11920    // which contains a valid value in this slot
11921    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(SemanticNode::VT_ARIA_VALUE_TEXT, None)}
11922  }
11923  /// Custom ARIA attributes (escape hatch for uncommon attributes).
11924  #[inline]
11925  pub fn custom_aria(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>> {
11926    // Safety:
11927    // Created from valid Table for this object
11928    // which contains a valid value in this slot
11929    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue>>>>(SemanticNode::VT_CUSTOM_ARIA, None)}
11930  }
11931}
11932
11933impl flatbuffers::Verifiable for SemanticNode<'_> {
11934  #[inline]
11935  fn run_verifier(
11936    v: &mut flatbuffers::Verifier, pos: usize
11937  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
11938    use self::flatbuffers::Verifiable;
11939    v.visit_table(pos)?
11940     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("node_id", Self::VT_NODE_ID, true)?
11941     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("role", Self::VT_ROLE, true)?
11942     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("label", Self::VT_LABEL, false)?
11943     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("labelled_by", Self::VT_LABELLED_BY, false)?
11944     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("described_by", Self::VT_DESCRIBED_BY, false)?
11945     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("controls", Self::VT_CONTROLS, false)?
11946     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("owned_by", Self::VT_OWNED_BY, false)?
11947     .visit_field::<i8>("heading_level", Self::VT_HEADING_LEVEL, false)?
11948     .visit_field::<i32>("tab_index", Self::VT_TAB_INDEX, false)?
11949     .visit_field::<bool>("hidden", Self::VT_HIDDEN, false)?
11950     .visit_field::<i8>("aria_expanded", Self::VT_ARIA_EXPANDED, false)?
11951     .visit_field::<i8>("aria_selected", Self::VT_ARIA_SELECTED, false)?
11952     .visit_field::<i8>("aria_checked", Self::VT_ARIA_CHECKED, false)?
11953     .visit_field::<bool>("aria_disabled", Self::VT_ARIA_DISABLED, false)?
11954     .visit_field::<bool>("aria_required", Self::VT_ARIA_REQUIRED, false)?
11955     .visit_field::<bool>("aria_invalid", Self::VT_ARIA_INVALID, false)?
11956     .visit_field::<f32>("aria_value_min", Self::VT_ARIA_VALUE_MIN, false)?
11957     .visit_field::<f32>("aria_value_max", Self::VT_ARIA_VALUE_MAX, false)?
11958     .visit_field::<f32>("aria_value_now", Self::VT_ARIA_VALUE_NOW, false)?
11959     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("aria_value_text", Self::VT_ARIA_VALUE_TEXT, false)?
11960     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValue>>>>("custom_aria", Self::VT_CUSTOM_ARIA, false)?
11961     .finish();
11962    Ok(())
11963  }
11964}
11965pub struct SemanticNodeArgs<'a> {
11966    pub node_id: Option<flatbuffers::WIPOffset<&'a str>>,
11967    pub role: Option<flatbuffers::WIPOffset<&'a str>>,
11968    pub label: Option<flatbuffers::WIPOffset<&'a str>>,
11969    pub labelled_by: Option<flatbuffers::WIPOffset<&'a str>>,
11970    pub described_by: Option<flatbuffers::WIPOffset<&'a str>>,
11971    pub controls: Option<flatbuffers::WIPOffset<&'a str>>,
11972    pub owned_by: Option<flatbuffers::WIPOffset<&'a str>>,
11973    pub heading_level: i8,
11974    pub tab_index: i32,
11975    pub hidden: bool,
11976    pub aria_expanded: i8,
11977    pub aria_selected: i8,
11978    pub aria_checked: i8,
11979    pub aria_disabled: bool,
11980    pub aria_required: bool,
11981    pub aria_invalid: bool,
11982    pub aria_value_min: f32,
11983    pub aria_value_max: f32,
11984    pub aria_value_now: f32,
11985    pub aria_value_text: Option<flatbuffers::WIPOffset<&'a str>>,
11986    pub custom_aria: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>>>,
11987}
11988impl<'a> Default for SemanticNodeArgs<'a> {
11989  #[inline]
11990  fn default() -> Self {
11991    SemanticNodeArgs {
11992      node_id: None, // required field
11993      role: None, // required field
11994      label: None,
11995      labelled_by: None,
11996      described_by: None,
11997      controls: None,
11998      owned_by: None,
11999      heading_level: 0,
12000      tab_index: -2,
12001      hidden: false,
12002      aria_expanded: -1,
12003      aria_selected: -1,
12004      aria_checked: -1,
12005      aria_disabled: false,
12006      aria_required: false,
12007      aria_invalid: false,
12008      aria_value_min: 0.0,
12009      aria_value_max: 0.0,
12010      aria_value_now: 0.0,
12011      aria_value_text: None,
12012      custom_aria: None,
12013    }
12014  }
12015}
12016
12017pub struct SemanticNodeBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
12018  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
12019  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
12020}
12021impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SemanticNodeBuilder<'a, 'b, A> {
12022  #[inline]
12023  pub fn add_node_id(&mut self, node_id: flatbuffers::WIPOffset<&'b  str>) {
12024    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(SemanticNode::VT_NODE_ID, node_id);
12025  }
12026  #[inline]
12027  pub fn add_role(&mut self, role: flatbuffers::WIPOffset<&'b  str>) {
12028    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(SemanticNode::VT_ROLE, role);
12029  }
12030  #[inline]
12031  pub fn add_label(&mut self, label: flatbuffers::WIPOffset<&'b  str>) {
12032    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(SemanticNode::VT_LABEL, label);
12033  }
12034  #[inline]
12035  pub fn add_labelled_by(&mut self, labelled_by: flatbuffers::WIPOffset<&'b  str>) {
12036    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(SemanticNode::VT_LABELLED_BY, labelled_by);
12037  }
12038  #[inline]
12039  pub fn add_described_by(&mut self, described_by: flatbuffers::WIPOffset<&'b  str>) {
12040    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(SemanticNode::VT_DESCRIBED_BY, described_by);
12041  }
12042  #[inline]
12043  pub fn add_controls(&mut self, controls: flatbuffers::WIPOffset<&'b  str>) {
12044    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(SemanticNode::VT_CONTROLS, controls);
12045  }
12046  #[inline]
12047  pub fn add_owned_by(&mut self, owned_by: flatbuffers::WIPOffset<&'b  str>) {
12048    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(SemanticNode::VT_OWNED_BY, owned_by);
12049  }
12050  #[inline]
12051  pub fn add_heading_level(&mut self, heading_level: i8) {
12052    self.fbb_.push_slot::<i8>(SemanticNode::VT_HEADING_LEVEL, heading_level, 0);
12053  }
12054  #[inline]
12055  pub fn add_tab_index(&mut self, tab_index: i32) {
12056    self.fbb_.push_slot::<i32>(SemanticNode::VT_TAB_INDEX, tab_index, -2);
12057  }
12058  #[inline]
12059  pub fn add_hidden(&mut self, hidden: bool) {
12060    self.fbb_.push_slot::<bool>(SemanticNode::VT_HIDDEN, hidden, false);
12061  }
12062  #[inline]
12063  pub fn add_aria_expanded(&mut self, aria_expanded: i8) {
12064    self.fbb_.push_slot::<i8>(SemanticNode::VT_ARIA_EXPANDED, aria_expanded, -1);
12065  }
12066  #[inline]
12067  pub fn add_aria_selected(&mut self, aria_selected: i8) {
12068    self.fbb_.push_slot::<i8>(SemanticNode::VT_ARIA_SELECTED, aria_selected, -1);
12069  }
12070  #[inline]
12071  pub fn add_aria_checked(&mut self, aria_checked: i8) {
12072    self.fbb_.push_slot::<i8>(SemanticNode::VT_ARIA_CHECKED, aria_checked, -1);
12073  }
12074  #[inline]
12075  pub fn add_aria_disabled(&mut self, aria_disabled: bool) {
12076    self.fbb_.push_slot::<bool>(SemanticNode::VT_ARIA_DISABLED, aria_disabled, false);
12077  }
12078  #[inline]
12079  pub fn add_aria_required(&mut self, aria_required: bool) {
12080    self.fbb_.push_slot::<bool>(SemanticNode::VT_ARIA_REQUIRED, aria_required, false);
12081  }
12082  #[inline]
12083  pub fn add_aria_invalid(&mut self, aria_invalid: bool) {
12084    self.fbb_.push_slot::<bool>(SemanticNode::VT_ARIA_INVALID, aria_invalid, false);
12085  }
12086  #[inline]
12087  pub fn add_aria_value_min(&mut self, aria_value_min: f32) {
12088    self.fbb_.push_slot::<f32>(SemanticNode::VT_ARIA_VALUE_MIN, aria_value_min, 0.0);
12089  }
12090  #[inline]
12091  pub fn add_aria_value_max(&mut self, aria_value_max: f32) {
12092    self.fbb_.push_slot::<f32>(SemanticNode::VT_ARIA_VALUE_MAX, aria_value_max, 0.0);
12093  }
12094  #[inline]
12095  pub fn add_aria_value_now(&mut self, aria_value_now: f32) {
12096    self.fbb_.push_slot::<f32>(SemanticNode::VT_ARIA_VALUE_NOW, aria_value_now, 0.0);
12097  }
12098  #[inline]
12099  pub fn add_aria_value_text(&mut self, aria_value_text: flatbuffers::WIPOffset<&'b  str>) {
12100    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(SemanticNode::VT_ARIA_VALUE_TEXT, aria_value_text);
12101  }
12102  #[inline]
12103  pub fn add_custom_aria(&mut self, custom_aria: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<KeyValue<'b >>>>) {
12104    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(SemanticNode::VT_CUSTOM_ARIA, custom_aria);
12105  }
12106  #[inline]
12107  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> SemanticNodeBuilder<'a, 'b, A> {
12108    let start = _fbb.start_table();
12109    SemanticNodeBuilder {
12110      fbb_: _fbb,
12111      start_: start,
12112    }
12113  }
12114  #[inline]
12115  pub fn finish(self) -> flatbuffers::WIPOffset<SemanticNode<'a>> {
12116    let o = self.fbb_.end_table(self.start_);
12117    self.fbb_.required(o, SemanticNode::VT_NODE_ID,"node_id");
12118    self.fbb_.required(o, SemanticNode::VT_ROLE,"role");
12119    flatbuffers::WIPOffset::new(o.value())
12120  }
12121}
12122
12123impl core::fmt::Debug for SemanticNode<'_> {
12124  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
12125    let mut ds = f.debug_struct("SemanticNode");
12126      ds.field("node_id", &self.node_id());
12127      ds.field("role", &self.role());
12128      ds.field("label", &self.label());
12129      ds.field("labelled_by", &self.labelled_by());
12130      ds.field("described_by", &self.described_by());
12131      ds.field("controls", &self.controls());
12132      ds.field("owned_by", &self.owned_by());
12133      ds.field("heading_level", &self.heading_level());
12134      ds.field("tab_index", &self.tab_index());
12135      ds.field("hidden", &self.hidden());
12136      ds.field("aria_expanded", &self.aria_expanded());
12137      ds.field("aria_selected", &self.aria_selected());
12138      ds.field("aria_checked", &self.aria_checked());
12139      ds.field("aria_disabled", &self.aria_disabled());
12140      ds.field("aria_required", &self.aria_required());
12141      ds.field("aria_invalid", &self.aria_invalid());
12142      ds.field("aria_value_min", &self.aria_value_min());
12143      ds.field("aria_value_max", &self.aria_value_max());
12144      ds.field("aria_value_now", &self.aria_value_now());
12145      ds.field("aria_value_text", &self.aria_value_text());
12146      ds.field("custom_aria", &self.custom_aria());
12147      ds.finish()
12148  }
12149}
12150pub enum LiveRegionOffset {}
12151#[derive(Copy, Clone, PartialEq)]
12152
12153pub struct LiveRegion<'a> {
12154  pub _tab: flatbuffers::Table<'a>,
12155}
12156
12157impl<'a> flatbuffers::Follow<'a> for LiveRegion<'a> {
12158  type Inner = LiveRegion<'a>;
12159  #[inline]
12160  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
12161    Self { _tab: flatbuffers::Table::new(buf, loc) }
12162  }
12163}
12164
12165impl<'a> LiveRegion<'a> {
12166  pub const VT_NODE_ID: flatbuffers::VOffsetT = 4;
12167  pub const VT_TARGET_NODE_ID: flatbuffers::VOffsetT = 6;
12168  pub const VT_POLITENESS: flatbuffers::VOffsetT = 8;
12169  pub const VT_ATOMIC: flatbuffers::VOffsetT = 10;
12170  pub const VT_RELEVANT: flatbuffers::VOffsetT = 12;
12171  pub const VT_ROLE_DESCRIPTION: flatbuffers::VOffsetT = 14;
12172
12173  #[inline]
12174  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
12175    LiveRegion { _tab: table }
12176  }
12177  #[allow(unused_mut)]
12178  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
12179    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
12180    args: &'args LiveRegionArgs<'args>
12181  ) -> flatbuffers::WIPOffset<LiveRegion<'bldr>> {
12182    let mut builder = LiveRegionBuilder::new(_fbb);
12183    if let Some(x) = args.role_description { builder.add_role_description(x); }
12184    if let Some(x) = args.target_node_id { builder.add_target_node_id(x); }
12185    if let Some(x) = args.node_id { builder.add_node_id(x); }
12186    builder.add_relevant(args.relevant);
12187    builder.add_atomic(args.atomic);
12188    builder.add_politeness(args.politeness);
12189    builder.finish()
12190  }
12191
12192
12193  #[inline]
12194  pub fn node_id(&self) -> &'a str {
12195    // Safety:
12196    // Created from valid Table for this object
12197    // which contains a valid value in this slot
12198    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(LiveRegion::VT_NODE_ID, None).unwrap()}
12199  }
12200  /// Which visual node this live region is attached to.
12201  #[inline]
12202  pub fn target_node_id(&self) -> &'a str {
12203    // Safety:
12204    // Created from valid Table for this object
12205    // which contains a valid value in this slot
12206    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(LiveRegion::VT_TARGET_NODE_ID, None).unwrap()}
12207  }
12208  #[inline]
12209  pub fn politeness(&self) -> LiveRegionPoliteness {
12210    // Safety:
12211    // Created from valid Table for this object
12212    // which contains a valid value in this slot
12213    unsafe { self._tab.get::<LiveRegionPoliteness>(LiveRegion::VT_POLITENESS, Some(LiveRegionPoliteness::Polite)).unwrap()}
12214  }
12215  /// If true, announce the entire region on change (not just the diff).
12216  #[inline]
12217  pub fn atomic(&self) -> bool {
12218    // Safety:
12219    // Created from valid Table for this object
12220    // which contains a valid value in this slot
12221    unsafe { self._tab.get::<bool>(LiveRegion::VT_ATOMIC, Some(false)).unwrap()}
12222  }
12223  #[inline]
12224  pub fn relevant(&self) -> LiveRegionRelevant {
12225    // Safety:
12226    // Created from valid Table for this object
12227    // which contains a valid value in this slot
12228    unsafe { self._tab.get::<LiveRegionRelevant>(LiveRegion::VT_RELEVANT, Some(LiveRegionRelevant::Additions)).unwrap()}
12229  }
12230  /// Human-readable role description (e.g., "Shopping cart updates").
12231  #[inline]
12232  pub fn role_description(&self) -> Option<&'a str> {
12233    // Safety:
12234    // Created from valid Table for this object
12235    // which contains a valid value in this slot
12236    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(LiveRegion::VT_ROLE_DESCRIPTION, None)}
12237  }
12238}
12239
12240impl flatbuffers::Verifiable for LiveRegion<'_> {
12241  #[inline]
12242  fn run_verifier(
12243    v: &mut flatbuffers::Verifier, pos: usize
12244  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
12245    use self::flatbuffers::Verifiable;
12246    v.visit_table(pos)?
12247     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("node_id", Self::VT_NODE_ID, true)?
12248     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("target_node_id", Self::VT_TARGET_NODE_ID, true)?
12249     .visit_field::<LiveRegionPoliteness>("politeness", Self::VT_POLITENESS, false)?
12250     .visit_field::<bool>("atomic", Self::VT_ATOMIC, false)?
12251     .visit_field::<LiveRegionRelevant>("relevant", Self::VT_RELEVANT, false)?
12252     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("role_description", Self::VT_ROLE_DESCRIPTION, false)?
12253     .finish();
12254    Ok(())
12255  }
12256}
12257pub struct LiveRegionArgs<'a> {
12258    pub node_id: Option<flatbuffers::WIPOffset<&'a str>>,
12259    pub target_node_id: Option<flatbuffers::WIPOffset<&'a str>>,
12260    pub politeness: LiveRegionPoliteness,
12261    pub atomic: bool,
12262    pub relevant: LiveRegionRelevant,
12263    pub role_description: Option<flatbuffers::WIPOffset<&'a str>>,
12264}
12265impl<'a> Default for LiveRegionArgs<'a> {
12266  #[inline]
12267  fn default() -> Self {
12268    LiveRegionArgs {
12269      node_id: None, // required field
12270      target_node_id: None, // required field
12271      politeness: LiveRegionPoliteness::Polite,
12272      atomic: false,
12273      relevant: LiveRegionRelevant::Additions,
12274      role_description: None,
12275    }
12276  }
12277}
12278
12279pub struct LiveRegionBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
12280  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
12281  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
12282}
12283impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> LiveRegionBuilder<'a, 'b, A> {
12284  #[inline]
12285  pub fn add_node_id(&mut self, node_id: flatbuffers::WIPOffset<&'b  str>) {
12286    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(LiveRegion::VT_NODE_ID, node_id);
12287  }
12288  #[inline]
12289  pub fn add_target_node_id(&mut self, target_node_id: flatbuffers::WIPOffset<&'b  str>) {
12290    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(LiveRegion::VT_TARGET_NODE_ID, target_node_id);
12291  }
12292  #[inline]
12293  pub fn add_politeness(&mut self, politeness: LiveRegionPoliteness) {
12294    self.fbb_.push_slot::<LiveRegionPoliteness>(LiveRegion::VT_POLITENESS, politeness, LiveRegionPoliteness::Polite);
12295  }
12296  #[inline]
12297  pub fn add_atomic(&mut self, atomic: bool) {
12298    self.fbb_.push_slot::<bool>(LiveRegion::VT_ATOMIC, atomic, false);
12299  }
12300  #[inline]
12301  pub fn add_relevant(&mut self, relevant: LiveRegionRelevant) {
12302    self.fbb_.push_slot::<LiveRegionRelevant>(LiveRegion::VT_RELEVANT, relevant, LiveRegionRelevant::Additions);
12303  }
12304  #[inline]
12305  pub fn add_role_description(&mut self, role_description: flatbuffers::WIPOffset<&'b  str>) {
12306    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(LiveRegion::VT_ROLE_DESCRIPTION, role_description);
12307  }
12308  #[inline]
12309  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> LiveRegionBuilder<'a, 'b, A> {
12310    let start = _fbb.start_table();
12311    LiveRegionBuilder {
12312      fbb_: _fbb,
12313      start_: start,
12314    }
12315  }
12316  #[inline]
12317  pub fn finish(self) -> flatbuffers::WIPOffset<LiveRegion<'a>> {
12318    let o = self.fbb_.end_table(self.start_);
12319    self.fbb_.required(o, LiveRegion::VT_NODE_ID,"node_id");
12320    self.fbb_.required(o, LiveRegion::VT_TARGET_NODE_ID,"target_node_id");
12321    flatbuffers::WIPOffset::new(o.value())
12322  }
12323}
12324
12325impl core::fmt::Debug for LiveRegion<'_> {
12326  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
12327    let mut ds = f.debug_struct("LiveRegion");
12328      ds.field("node_id", &self.node_id());
12329      ds.field("target_node_id", &self.target_node_id());
12330      ds.field("politeness", &self.politeness());
12331      ds.field("atomic", &self.atomic());
12332      ds.field("relevant", &self.relevant());
12333      ds.field("role_description", &self.role_description());
12334      ds.finish()
12335  }
12336}
12337pub enum FocusTrapOffset {}
12338#[derive(Copy, Clone, PartialEq)]
12339
12340pub struct FocusTrap<'a> {
12341  pub _tab: flatbuffers::Table<'a>,
12342}
12343
12344impl<'a> flatbuffers::Follow<'a> for FocusTrap<'a> {
12345  type Inner = FocusTrap<'a>;
12346  #[inline]
12347  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
12348    Self { _tab: flatbuffers::Table::new(buf, loc) }
12349  }
12350}
12351
12352impl<'a> FocusTrap<'a> {
12353  pub const VT_NODE_ID: flatbuffers::VOffsetT = 4;
12354  pub const VT_CONTAINER_NODE_ID: flatbuffers::VOffsetT = 6;
12355  pub const VT_INITIAL_FOCUS_NODE_ID: flatbuffers::VOffsetT = 8;
12356  pub const VT_ESCAPE_BEHAVIOR: flatbuffers::VOffsetT = 10;
12357  pub const VT_ESCAPE_STATE_MACHINE: flatbuffers::VOffsetT = 12;
12358  pub const VT_ESCAPE_EVENT: flatbuffers::VOffsetT = 14;
12359  pub const VT_RESTORE_FOCUS: flatbuffers::VOffsetT = 16;
12360
12361  #[inline]
12362  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
12363    FocusTrap { _tab: table }
12364  }
12365  #[allow(unused_mut)]
12366  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
12367    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
12368    args: &'args FocusTrapArgs<'args>
12369  ) -> flatbuffers::WIPOffset<FocusTrap<'bldr>> {
12370    let mut builder = FocusTrapBuilder::new(_fbb);
12371    if let Some(x) = args.escape_event { builder.add_escape_event(x); }
12372    if let Some(x) = args.escape_state_machine { builder.add_escape_state_machine(x); }
12373    if let Some(x) = args.initial_focus_node_id { builder.add_initial_focus_node_id(x); }
12374    if let Some(x) = args.container_node_id { builder.add_container_node_id(x); }
12375    if let Some(x) = args.node_id { builder.add_node_id(x); }
12376    builder.add_restore_focus(args.restore_focus);
12377    builder.add_escape_behavior(args.escape_behavior);
12378    builder.finish()
12379  }
12380
12381
12382  #[inline]
12383  pub fn node_id(&self) -> &'a str {
12384    // Safety:
12385    // Created from valid Table for this object
12386    // which contains a valid value in this slot
12387    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FocusTrap::VT_NODE_ID, None).unwrap()}
12388  }
12389  /// The container node whose subtree receives trapped focus.
12390  #[inline]
12391  pub fn container_node_id(&self) -> &'a str {
12392    // Safety:
12393    // Created from valid Table for this object
12394    // which contains a valid value in this slot
12395    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FocusTrap::VT_CONTAINER_NODE_ID, None).unwrap()}
12396  }
12397  /// Node to focus when the trap activates. If not set, focuses
12398  /// the first focusable element in the container.
12399  #[inline]
12400  pub fn initial_focus_node_id(&self) -> Option<&'a str> {
12401    // Safety:
12402    // Created from valid Table for this object
12403    // which contains a valid value in this slot
12404    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FocusTrap::VT_INITIAL_FOCUS_NODE_ID, None)}
12405  }
12406  /// What happens when Escape is pressed.
12407  #[inline]
12408  pub fn escape_behavior(&self) -> FocusTrapEscape {
12409    // Safety:
12410    // Created from valid Table for this object
12411    // which contains a valid value in this slot
12412    unsafe { self._tab.get::<FocusTrapEscape>(FocusTrap::VT_ESCAPE_BEHAVIOR, Some(FocusTrapEscape::CloseOnEscape)).unwrap()}
12413  }
12414  /// For FireEvent escape: which state machine and event to fire.
12415  #[inline]
12416  pub fn escape_state_machine(&self) -> Option<&'a str> {
12417    // Safety:
12418    // Created from valid Table for this object
12419    // which contains a valid value in this slot
12420    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FocusTrap::VT_ESCAPE_STATE_MACHINE, None)}
12421  }
12422  #[inline]
12423  pub fn escape_event(&self) -> Option<&'a str> {
12424    // Safety:
12425    // Created from valid Table for this object
12426    // which contains a valid value in this slot
12427    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FocusTrap::VT_ESCAPE_EVENT, None)}
12428  }
12429  /// Whether to restore focus to the previously focused element
12430  /// when the trap deactivates.
12431  #[inline]
12432  pub fn restore_focus(&self) -> bool {
12433    // Safety:
12434    // Created from valid Table for this object
12435    // which contains a valid value in this slot
12436    unsafe { self._tab.get::<bool>(FocusTrap::VT_RESTORE_FOCUS, Some(true)).unwrap()}
12437  }
12438}
12439
12440impl flatbuffers::Verifiable for FocusTrap<'_> {
12441  #[inline]
12442  fn run_verifier(
12443    v: &mut flatbuffers::Verifier, pos: usize
12444  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
12445    use self::flatbuffers::Verifiable;
12446    v.visit_table(pos)?
12447     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("node_id", Self::VT_NODE_ID, true)?
12448     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("container_node_id", Self::VT_CONTAINER_NODE_ID, true)?
12449     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("initial_focus_node_id", Self::VT_INITIAL_FOCUS_NODE_ID, false)?
12450     .visit_field::<FocusTrapEscape>("escape_behavior", Self::VT_ESCAPE_BEHAVIOR, false)?
12451     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("escape_state_machine", Self::VT_ESCAPE_STATE_MACHINE, false)?
12452     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("escape_event", Self::VT_ESCAPE_EVENT, false)?
12453     .visit_field::<bool>("restore_focus", Self::VT_RESTORE_FOCUS, false)?
12454     .finish();
12455    Ok(())
12456  }
12457}
12458pub struct FocusTrapArgs<'a> {
12459    pub node_id: Option<flatbuffers::WIPOffset<&'a str>>,
12460    pub container_node_id: Option<flatbuffers::WIPOffset<&'a str>>,
12461    pub initial_focus_node_id: Option<flatbuffers::WIPOffset<&'a str>>,
12462    pub escape_behavior: FocusTrapEscape,
12463    pub escape_state_machine: Option<flatbuffers::WIPOffset<&'a str>>,
12464    pub escape_event: Option<flatbuffers::WIPOffset<&'a str>>,
12465    pub restore_focus: bool,
12466}
12467impl<'a> Default for FocusTrapArgs<'a> {
12468  #[inline]
12469  fn default() -> Self {
12470    FocusTrapArgs {
12471      node_id: None, // required field
12472      container_node_id: None, // required field
12473      initial_focus_node_id: None,
12474      escape_behavior: FocusTrapEscape::CloseOnEscape,
12475      escape_state_machine: None,
12476      escape_event: None,
12477      restore_focus: true,
12478    }
12479  }
12480}
12481
12482pub struct FocusTrapBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
12483  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
12484  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
12485}
12486impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> FocusTrapBuilder<'a, 'b, A> {
12487  #[inline]
12488  pub fn add_node_id(&mut self, node_id: flatbuffers::WIPOffset<&'b  str>) {
12489    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FocusTrap::VT_NODE_ID, node_id);
12490  }
12491  #[inline]
12492  pub fn add_container_node_id(&mut self, container_node_id: flatbuffers::WIPOffset<&'b  str>) {
12493    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FocusTrap::VT_CONTAINER_NODE_ID, container_node_id);
12494  }
12495  #[inline]
12496  pub fn add_initial_focus_node_id(&mut self, initial_focus_node_id: flatbuffers::WIPOffset<&'b  str>) {
12497    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FocusTrap::VT_INITIAL_FOCUS_NODE_ID, initial_focus_node_id);
12498  }
12499  #[inline]
12500  pub fn add_escape_behavior(&mut self, escape_behavior: FocusTrapEscape) {
12501    self.fbb_.push_slot::<FocusTrapEscape>(FocusTrap::VT_ESCAPE_BEHAVIOR, escape_behavior, FocusTrapEscape::CloseOnEscape);
12502  }
12503  #[inline]
12504  pub fn add_escape_state_machine(&mut self, escape_state_machine: flatbuffers::WIPOffset<&'b  str>) {
12505    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FocusTrap::VT_ESCAPE_STATE_MACHINE, escape_state_machine);
12506  }
12507  #[inline]
12508  pub fn add_escape_event(&mut self, escape_event: flatbuffers::WIPOffset<&'b  str>) {
12509    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FocusTrap::VT_ESCAPE_EVENT, escape_event);
12510  }
12511  #[inline]
12512  pub fn add_restore_focus(&mut self, restore_focus: bool) {
12513    self.fbb_.push_slot::<bool>(FocusTrap::VT_RESTORE_FOCUS, restore_focus, true);
12514  }
12515  #[inline]
12516  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> FocusTrapBuilder<'a, 'b, A> {
12517    let start = _fbb.start_table();
12518    FocusTrapBuilder {
12519      fbb_: _fbb,
12520      start_: start,
12521    }
12522  }
12523  #[inline]
12524  pub fn finish(self) -> flatbuffers::WIPOffset<FocusTrap<'a>> {
12525    let o = self.fbb_.end_table(self.start_);
12526    self.fbb_.required(o, FocusTrap::VT_NODE_ID,"node_id");
12527    self.fbb_.required(o, FocusTrap::VT_CONTAINER_NODE_ID,"container_node_id");
12528    flatbuffers::WIPOffset::new(o.value())
12529  }
12530}
12531
12532impl core::fmt::Debug for FocusTrap<'_> {
12533  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
12534    let mut ds = f.debug_struct("FocusTrap");
12535      ds.field("node_id", &self.node_id());
12536      ds.field("container_node_id", &self.container_node_id());
12537      ds.field("initial_focus_node_id", &self.initial_focus_node_id());
12538      ds.field("escape_behavior", &self.escape_behavior());
12539      ds.field("escape_state_machine", &self.escape_state_machine());
12540      ds.field("escape_event", &self.escape_event());
12541      ds.field("restore_focus", &self.restore_focus());
12542      ds.finish()
12543  }
12544}
12545pub enum ColorPaletteOffset {}
12546#[derive(Copy, Clone, PartialEq)]
12547
12548pub struct ColorPalette<'a> {
12549  pub _tab: flatbuffers::Table<'a>,
12550}
12551
12552impl<'a> flatbuffers::Follow<'a> for ColorPalette<'a> {
12553  type Inner = ColorPalette<'a>;
12554  #[inline]
12555  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
12556    Self { _tab: flatbuffers::Table::new(buf, loc) }
12557  }
12558}
12559
12560impl<'a> ColorPalette<'a> {
12561  pub const VT_PRIMARY: flatbuffers::VOffsetT = 4;
12562  pub const VT_PRIMARY_FOREGROUND: flatbuffers::VOffsetT = 6;
12563  pub const VT_SECONDARY: flatbuffers::VOffsetT = 8;
12564  pub const VT_SECONDARY_FOREGROUND: flatbuffers::VOffsetT = 10;
12565  pub const VT_ACCENT: flatbuffers::VOffsetT = 12;
12566  pub const VT_ACCENT_FOREGROUND: flatbuffers::VOffsetT = 14;
12567  pub const VT_BACKGROUND: flatbuffers::VOffsetT = 16;
12568  pub const VT_FOREGROUND: flatbuffers::VOffsetT = 18;
12569  pub const VT_SURFACE: flatbuffers::VOffsetT = 20;
12570  pub const VT_SURFACE_FOREGROUND: flatbuffers::VOffsetT = 22;
12571  pub const VT_MUTED: flatbuffers::VOffsetT = 24;
12572  pub const VT_MUTED_FOREGROUND: flatbuffers::VOffsetT = 26;
12573  pub const VT_BORDER_COLOR: flatbuffers::VOffsetT = 28;
12574  pub const VT_ERROR: flatbuffers::VOffsetT = 30;
12575  pub const VT_ERROR_FOREGROUND: flatbuffers::VOffsetT = 32;
12576  pub const VT_SUCCESS: flatbuffers::VOffsetT = 34;
12577  pub const VT_SUCCESS_FOREGROUND: flatbuffers::VOffsetT = 36;
12578  pub const VT_WARNING: flatbuffers::VOffsetT = 38;
12579  pub const VT_WARNING_FOREGROUND: flatbuffers::VOffsetT = 40;
12580  pub const VT_INFO: flatbuffers::VOffsetT = 42;
12581  pub const VT_INFO_FOREGROUND: flatbuffers::VOffsetT = 44;
12582
12583  #[inline]
12584  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
12585    ColorPalette { _tab: table }
12586  }
12587  #[allow(unused_mut)]
12588  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
12589    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
12590    args: &'args ColorPaletteArgs<'args>
12591  ) -> flatbuffers::WIPOffset<ColorPalette<'bldr>> {
12592    let mut builder = ColorPaletteBuilder::new(_fbb);
12593    if let Some(x) = args.info_foreground { builder.add_info_foreground(x); }
12594    if let Some(x) = args.info { builder.add_info(x); }
12595    if let Some(x) = args.warning_foreground { builder.add_warning_foreground(x); }
12596    if let Some(x) = args.warning { builder.add_warning(x); }
12597    if let Some(x) = args.success_foreground { builder.add_success_foreground(x); }
12598    if let Some(x) = args.success { builder.add_success(x); }
12599    if let Some(x) = args.error_foreground { builder.add_error_foreground(x); }
12600    if let Some(x) = args.error { builder.add_error(x); }
12601    if let Some(x) = args.border_color { builder.add_border_color(x); }
12602    if let Some(x) = args.muted_foreground { builder.add_muted_foreground(x); }
12603    if let Some(x) = args.muted { builder.add_muted(x); }
12604    if let Some(x) = args.surface_foreground { builder.add_surface_foreground(x); }
12605    if let Some(x) = args.surface { builder.add_surface(x); }
12606    if let Some(x) = args.foreground { builder.add_foreground(x); }
12607    if let Some(x) = args.background { builder.add_background(x); }
12608    if let Some(x) = args.accent_foreground { builder.add_accent_foreground(x); }
12609    if let Some(x) = args.accent { builder.add_accent(x); }
12610    if let Some(x) = args.secondary_foreground { builder.add_secondary_foreground(x); }
12611    if let Some(x) = args.secondary { builder.add_secondary(x); }
12612    if let Some(x) = args.primary_foreground { builder.add_primary_foreground(x); }
12613    if let Some(x) = args.primary { builder.add_primary(x); }
12614    builder.finish()
12615  }
12616
12617
12618  #[inline]
12619  pub fn primary(&self) -> Option<&'a Color> {
12620    // Safety:
12621    // Created from valid Table for this object
12622    // which contains a valid value in this slot
12623    unsafe { self._tab.get::<Color>(ColorPalette::VT_PRIMARY, None)}
12624  }
12625  #[inline]
12626  pub fn primary_foreground(&self) -> Option<&'a Color> {
12627    // Safety:
12628    // Created from valid Table for this object
12629    // which contains a valid value in this slot
12630    unsafe { self._tab.get::<Color>(ColorPalette::VT_PRIMARY_FOREGROUND, None)}
12631  }
12632  #[inline]
12633  pub fn secondary(&self) -> Option<&'a Color> {
12634    // Safety:
12635    // Created from valid Table for this object
12636    // which contains a valid value in this slot
12637    unsafe { self._tab.get::<Color>(ColorPalette::VT_SECONDARY, None)}
12638  }
12639  #[inline]
12640  pub fn secondary_foreground(&self) -> Option<&'a Color> {
12641    // Safety:
12642    // Created from valid Table for this object
12643    // which contains a valid value in this slot
12644    unsafe { self._tab.get::<Color>(ColorPalette::VT_SECONDARY_FOREGROUND, None)}
12645  }
12646  #[inline]
12647  pub fn accent(&self) -> Option<&'a Color> {
12648    // Safety:
12649    // Created from valid Table for this object
12650    // which contains a valid value in this slot
12651    unsafe { self._tab.get::<Color>(ColorPalette::VT_ACCENT, None)}
12652  }
12653  #[inline]
12654  pub fn accent_foreground(&self) -> Option<&'a Color> {
12655    // Safety:
12656    // Created from valid Table for this object
12657    // which contains a valid value in this slot
12658    unsafe { self._tab.get::<Color>(ColorPalette::VT_ACCENT_FOREGROUND, None)}
12659  }
12660  #[inline]
12661  pub fn background(&self) -> Option<&'a Color> {
12662    // Safety:
12663    // Created from valid Table for this object
12664    // which contains a valid value in this slot
12665    unsafe { self._tab.get::<Color>(ColorPalette::VT_BACKGROUND, None)}
12666  }
12667  #[inline]
12668  pub fn foreground(&self) -> Option<&'a Color> {
12669    // Safety:
12670    // Created from valid Table for this object
12671    // which contains a valid value in this slot
12672    unsafe { self._tab.get::<Color>(ColorPalette::VT_FOREGROUND, None)}
12673  }
12674  #[inline]
12675  pub fn surface(&self) -> Option<&'a Color> {
12676    // Safety:
12677    // Created from valid Table for this object
12678    // which contains a valid value in this slot
12679    unsafe { self._tab.get::<Color>(ColorPalette::VT_SURFACE, None)}
12680  }
12681  #[inline]
12682  pub fn surface_foreground(&self) -> Option<&'a Color> {
12683    // Safety:
12684    // Created from valid Table for this object
12685    // which contains a valid value in this slot
12686    unsafe { self._tab.get::<Color>(ColorPalette::VT_SURFACE_FOREGROUND, None)}
12687  }
12688  #[inline]
12689  pub fn muted(&self) -> Option<&'a Color> {
12690    // Safety:
12691    // Created from valid Table for this object
12692    // which contains a valid value in this slot
12693    unsafe { self._tab.get::<Color>(ColorPalette::VT_MUTED, None)}
12694  }
12695  #[inline]
12696  pub fn muted_foreground(&self) -> Option<&'a Color> {
12697    // Safety:
12698    // Created from valid Table for this object
12699    // which contains a valid value in this slot
12700    unsafe { self._tab.get::<Color>(ColorPalette::VT_MUTED_FOREGROUND, None)}
12701  }
12702  #[inline]
12703  pub fn border_color(&self) -> Option<&'a Color> {
12704    // Safety:
12705    // Created from valid Table for this object
12706    // which contains a valid value in this slot
12707    unsafe { self._tab.get::<Color>(ColorPalette::VT_BORDER_COLOR, None)}
12708  }
12709  #[inline]
12710  pub fn error(&self) -> Option<&'a Color> {
12711    // Safety:
12712    // Created from valid Table for this object
12713    // which contains a valid value in this slot
12714    unsafe { self._tab.get::<Color>(ColorPalette::VT_ERROR, None)}
12715  }
12716  #[inline]
12717  pub fn error_foreground(&self) -> Option<&'a Color> {
12718    // Safety:
12719    // Created from valid Table for this object
12720    // which contains a valid value in this slot
12721    unsafe { self._tab.get::<Color>(ColorPalette::VT_ERROR_FOREGROUND, None)}
12722  }
12723  #[inline]
12724  pub fn success(&self) -> Option<&'a Color> {
12725    // Safety:
12726    // Created from valid Table for this object
12727    // which contains a valid value in this slot
12728    unsafe { self._tab.get::<Color>(ColorPalette::VT_SUCCESS, None)}
12729  }
12730  #[inline]
12731  pub fn success_foreground(&self) -> Option<&'a Color> {
12732    // Safety:
12733    // Created from valid Table for this object
12734    // which contains a valid value in this slot
12735    unsafe { self._tab.get::<Color>(ColorPalette::VT_SUCCESS_FOREGROUND, None)}
12736  }
12737  #[inline]
12738  pub fn warning(&self) -> Option<&'a Color> {
12739    // Safety:
12740    // Created from valid Table for this object
12741    // which contains a valid value in this slot
12742    unsafe { self._tab.get::<Color>(ColorPalette::VT_WARNING, None)}
12743  }
12744  #[inline]
12745  pub fn warning_foreground(&self) -> Option<&'a Color> {
12746    // Safety:
12747    // Created from valid Table for this object
12748    // which contains a valid value in this slot
12749    unsafe { self._tab.get::<Color>(ColorPalette::VT_WARNING_FOREGROUND, None)}
12750  }
12751  #[inline]
12752  pub fn info(&self) -> Option<&'a Color> {
12753    // Safety:
12754    // Created from valid Table for this object
12755    // which contains a valid value in this slot
12756    unsafe { self._tab.get::<Color>(ColorPalette::VT_INFO, None)}
12757  }
12758  #[inline]
12759  pub fn info_foreground(&self) -> Option<&'a Color> {
12760    // Safety:
12761    // Created from valid Table for this object
12762    // which contains a valid value in this slot
12763    unsafe { self._tab.get::<Color>(ColorPalette::VT_INFO_FOREGROUND, None)}
12764  }
12765}
12766
12767impl flatbuffers::Verifiable for ColorPalette<'_> {
12768  #[inline]
12769  fn run_verifier(
12770    v: &mut flatbuffers::Verifier, pos: usize
12771  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
12772    use self::flatbuffers::Verifiable;
12773    v.visit_table(pos)?
12774     .visit_field::<Color>("primary", Self::VT_PRIMARY, false)?
12775     .visit_field::<Color>("primary_foreground", Self::VT_PRIMARY_FOREGROUND, false)?
12776     .visit_field::<Color>("secondary", Self::VT_SECONDARY, false)?
12777     .visit_field::<Color>("secondary_foreground", Self::VT_SECONDARY_FOREGROUND, false)?
12778     .visit_field::<Color>("accent", Self::VT_ACCENT, false)?
12779     .visit_field::<Color>("accent_foreground", Self::VT_ACCENT_FOREGROUND, false)?
12780     .visit_field::<Color>("background", Self::VT_BACKGROUND, false)?
12781     .visit_field::<Color>("foreground", Self::VT_FOREGROUND, false)?
12782     .visit_field::<Color>("surface", Self::VT_SURFACE, false)?
12783     .visit_field::<Color>("surface_foreground", Self::VT_SURFACE_FOREGROUND, false)?
12784     .visit_field::<Color>("muted", Self::VT_MUTED, false)?
12785     .visit_field::<Color>("muted_foreground", Self::VT_MUTED_FOREGROUND, false)?
12786     .visit_field::<Color>("border_color", Self::VT_BORDER_COLOR, false)?
12787     .visit_field::<Color>("error", Self::VT_ERROR, false)?
12788     .visit_field::<Color>("error_foreground", Self::VT_ERROR_FOREGROUND, false)?
12789     .visit_field::<Color>("success", Self::VT_SUCCESS, false)?
12790     .visit_field::<Color>("success_foreground", Self::VT_SUCCESS_FOREGROUND, false)?
12791     .visit_field::<Color>("warning", Self::VT_WARNING, false)?
12792     .visit_field::<Color>("warning_foreground", Self::VT_WARNING_FOREGROUND, false)?
12793     .visit_field::<Color>("info", Self::VT_INFO, false)?
12794     .visit_field::<Color>("info_foreground", Self::VT_INFO_FOREGROUND, false)?
12795     .finish();
12796    Ok(())
12797  }
12798}
12799pub struct ColorPaletteArgs<'a> {
12800    pub primary: Option<&'a Color>,
12801    pub primary_foreground: Option<&'a Color>,
12802    pub secondary: Option<&'a Color>,
12803    pub secondary_foreground: Option<&'a Color>,
12804    pub accent: Option<&'a Color>,
12805    pub accent_foreground: Option<&'a Color>,
12806    pub background: Option<&'a Color>,
12807    pub foreground: Option<&'a Color>,
12808    pub surface: Option<&'a Color>,
12809    pub surface_foreground: Option<&'a Color>,
12810    pub muted: Option<&'a Color>,
12811    pub muted_foreground: Option<&'a Color>,
12812    pub border_color: Option<&'a Color>,
12813    pub error: Option<&'a Color>,
12814    pub error_foreground: Option<&'a Color>,
12815    pub success: Option<&'a Color>,
12816    pub success_foreground: Option<&'a Color>,
12817    pub warning: Option<&'a Color>,
12818    pub warning_foreground: Option<&'a Color>,
12819    pub info: Option<&'a Color>,
12820    pub info_foreground: Option<&'a Color>,
12821}
12822impl<'a> Default for ColorPaletteArgs<'a> {
12823  #[inline]
12824  fn default() -> Self {
12825    ColorPaletteArgs {
12826      primary: None,
12827      primary_foreground: None,
12828      secondary: None,
12829      secondary_foreground: None,
12830      accent: None,
12831      accent_foreground: None,
12832      background: None,
12833      foreground: None,
12834      surface: None,
12835      surface_foreground: None,
12836      muted: None,
12837      muted_foreground: None,
12838      border_color: None,
12839      error: None,
12840      error_foreground: None,
12841      success: None,
12842      success_foreground: None,
12843      warning: None,
12844      warning_foreground: None,
12845      info: None,
12846      info_foreground: None,
12847    }
12848  }
12849}
12850
12851pub struct ColorPaletteBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
12852  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
12853  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
12854}
12855impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ColorPaletteBuilder<'a, 'b, A> {
12856  #[inline]
12857  pub fn add_primary(&mut self, primary: &Color) {
12858    self.fbb_.push_slot_always::<&Color>(ColorPalette::VT_PRIMARY, primary);
12859  }
12860  #[inline]
12861  pub fn add_primary_foreground(&mut self, primary_foreground: &Color) {
12862    self.fbb_.push_slot_always::<&Color>(ColorPalette::VT_PRIMARY_FOREGROUND, primary_foreground);
12863  }
12864  #[inline]
12865  pub fn add_secondary(&mut self, secondary: &Color) {
12866    self.fbb_.push_slot_always::<&Color>(ColorPalette::VT_SECONDARY, secondary);
12867  }
12868  #[inline]
12869  pub fn add_secondary_foreground(&mut self, secondary_foreground: &Color) {
12870    self.fbb_.push_slot_always::<&Color>(ColorPalette::VT_SECONDARY_FOREGROUND, secondary_foreground);
12871  }
12872  #[inline]
12873  pub fn add_accent(&mut self, accent: &Color) {
12874    self.fbb_.push_slot_always::<&Color>(ColorPalette::VT_ACCENT, accent);
12875  }
12876  #[inline]
12877  pub fn add_accent_foreground(&mut self, accent_foreground: &Color) {
12878    self.fbb_.push_slot_always::<&Color>(ColorPalette::VT_ACCENT_FOREGROUND, accent_foreground);
12879  }
12880  #[inline]
12881  pub fn add_background(&mut self, background: &Color) {
12882    self.fbb_.push_slot_always::<&Color>(ColorPalette::VT_BACKGROUND, background);
12883  }
12884  #[inline]
12885  pub fn add_foreground(&mut self, foreground: &Color) {
12886    self.fbb_.push_slot_always::<&Color>(ColorPalette::VT_FOREGROUND, foreground);
12887  }
12888  #[inline]
12889  pub fn add_surface(&mut self, surface: &Color) {
12890    self.fbb_.push_slot_always::<&Color>(ColorPalette::VT_SURFACE, surface);
12891  }
12892  #[inline]
12893  pub fn add_surface_foreground(&mut self, surface_foreground: &Color) {
12894    self.fbb_.push_slot_always::<&Color>(ColorPalette::VT_SURFACE_FOREGROUND, surface_foreground);
12895  }
12896  #[inline]
12897  pub fn add_muted(&mut self, muted: &Color) {
12898    self.fbb_.push_slot_always::<&Color>(ColorPalette::VT_MUTED, muted);
12899  }
12900  #[inline]
12901  pub fn add_muted_foreground(&mut self, muted_foreground: &Color) {
12902    self.fbb_.push_slot_always::<&Color>(ColorPalette::VT_MUTED_FOREGROUND, muted_foreground);
12903  }
12904  #[inline]
12905  pub fn add_border_color(&mut self, border_color: &Color) {
12906    self.fbb_.push_slot_always::<&Color>(ColorPalette::VT_BORDER_COLOR, border_color);
12907  }
12908  #[inline]
12909  pub fn add_error(&mut self, error: &Color) {
12910    self.fbb_.push_slot_always::<&Color>(ColorPalette::VT_ERROR, error);
12911  }
12912  #[inline]
12913  pub fn add_error_foreground(&mut self, error_foreground: &Color) {
12914    self.fbb_.push_slot_always::<&Color>(ColorPalette::VT_ERROR_FOREGROUND, error_foreground);
12915  }
12916  #[inline]
12917  pub fn add_success(&mut self, success: &Color) {
12918    self.fbb_.push_slot_always::<&Color>(ColorPalette::VT_SUCCESS, success);
12919  }
12920  #[inline]
12921  pub fn add_success_foreground(&mut self, success_foreground: &Color) {
12922    self.fbb_.push_slot_always::<&Color>(ColorPalette::VT_SUCCESS_FOREGROUND, success_foreground);
12923  }
12924  #[inline]
12925  pub fn add_warning(&mut self, warning: &Color) {
12926    self.fbb_.push_slot_always::<&Color>(ColorPalette::VT_WARNING, warning);
12927  }
12928  #[inline]
12929  pub fn add_warning_foreground(&mut self, warning_foreground: &Color) {
12930    self.fbb_.push_slot_always::<&Color>(ColorPalette::VT_WARNING_FOREGROUND, warning_foreground);
12931  }
12932  #[inline]
12933  pub fn add_info(&mut self, info: &Color) {
12934    self.fbb_.push_slot_always::<&Color>(ColorPalette::VT_INFO, info);
12935  }
12936  #[inline]
12937  pub fn add_info_foreground(&mut self, info_foreground: &Color) {
12938    self.fbb_.push_slot_always::<&Color>(ColorPalette::VT_INFO_FOREGROUND, info_foreground);
12939  }
12940  #[inline]
12941  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ColorPaletteBuilder<'a, 'b, A> {
12942    let start = _fbb.start_table();
12943    ColorPaletteBuilder {
12944      fbb_: _fbb,
12945      start_: start,
12946    }
12947  }
12948  #[inline]
12949  pub fn finish(self) -> flatbuffers::WIPOffset<ColorPalette<'a>> {
12950    let o = self.fbb_.end_table(self.start_);
12951    flatbuffers::WIPOffset::new(o.value())
12952  }
12953}
12954
12955impl core::fmt::Debug for ColorPalette<'_> {
12956  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
12957    let mut ds = f.debug_struct("ColorPalette");
12958      ds.field("primary", &self.primary());
12959      ds.field("primary_foreground", &self.primary_foreground());
12960      ds.field("secondary", &self.secondary());
12961      ds.field("secondary_foreground", &self.secondary_foreground());
12962      ds.field("accent", &self.accent());
12963      ds.field("accent_foreground", &self.accent_foreground());
12964      ds.field("background", &self.background());
12965      ds.field("foreground", &self.foreground());
12966      ds.field("surface", &self.surface());
12967      ds.field("surface_foreground", &self.surface_foreground());
12968      ds.field("muted", &self.muted());
12969      ds.field("muted_foreground", &self.muted_foreground());
12970      ds.field("border_color", &self.border_color());
12971      ds.field("error", &self.error());
12972      ds.field("error_foreground", &self.error_foreground());
12973      ds.field("success", &self.success());
12974      ds.field("success_foreground", &self.success_foreground());
12975      ds.field("warning", &self.warning());
12976      ds.field("warning_foreground", &self.warning_foreground());
12977      ds.field("info", &self.info());
12978      ds.field("info_foreground", &self.info_foreground());
12979      ds.finish()
12980  }
12981}
12982pub enum FontDefinitionOffset {}
12983#[derive(Copy, Clone, PartialEq)]
12984
12985pub struct FontDefinition<'a> {
12986  pub _tab: flatbuffers::Table<'a>,
12987}
12988
12989impl<'a> flatbuffers::Follow<'a> for FontDefinition<'a> {
12990  type Inner = FontDefinition<'a>;
12991  #[inline]
12992  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
12993    Self { _tab: flatbuffers::Table::new(buf, loc) }
12994  }
12995}
12996
12997impl<'a> FontDefinition<'a> {
12998  pub const VT_FAMILY: flatbuffers::VOffsetT = 4;
12999  pub const VT_SRC: flatbuffers::VOffsetT = 6;
13000  pub const VT_WEIGHT_RANGE: flatbuffers::VOffsetT = 8;
13001  pub const VT_VARIABLE: flatbuffers::VOffsetT = 10;
13002
13003  #[inline]
13004  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
13005    FontDefinition { _tab: table }
13006  }
13007  #[allow(unused_mut)]
13008  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
13009    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
13010    args: &'args FontDefinitionArgs<'args>
13011  ) -> flatbuffers::WIPOffset<FontDefinition<'bldr>> {
13012    let mut builder = FontDefinitionBuilder::new(_fbb);
13013    if let Some(x) = args.weight_range { builder.add_weight_range(x); }
13014    if let Some(x) = args.src { builder.add_src(x); }
13015    if let Some(x) = args.family { builder.add_family(x); }
13016    builder.add_variable(args.variable);
13017    builder.finish()
13018  }
13019
13020
13021  #[inline]
13022  pub fn family(&self) -> &'a str {
13023    // Safety:
13024    // Created from valid Table for this object
13025    // which contains a valid value in this slot
13026    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FontDefinition::VT_FAMILY, None).unwrap()}
13027  }
13028  /// URL to font file (for compiler to subset and optimize).
13029  #[inline]
13030  pub fn src(&self) -> Option<&'a str> {
13031    // Safety:
13032    // Created from valid Table for this object
13033    // which contains a valid value in this slot
13034    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FontDefinition::VT_SRC, None)}
13035  }
13036  /// Weight range for variable fonts (e.g., "100 900").
13037  #[inline]
13038  pub fn weight_range(&self) -> Option<&'a str> {
13039    // Safety:
13040    // Created from valid Table for this object
13041    // which contains a valid value in this slot
13042    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FontDefinition::VT_WEIGHT_RANGE, None)}
13043  }
13044  /// Whether this is a variable font.
13045  #[inline]
13046  pub fn variable(&self) -> bool {
13047    // Safety:
13048    // Created from valid Table for this object
13049    // which contains a valid value in this slot
13050    unsafe { self._tab.get::<bool>(FontDefinition::VT_VARIABLE, Some(false)).unwrap()}
13051  }
13052}
13053
13054impl flatbuffers::Verifiable for FontDefinition<'_> {
13055  #[inline]
13056  fn run_verifier(
13057    v: &mut flatbuffers::Verifier, pos: usize
13058  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
13059    use self::flatbuffers::Verifiable;
13060    v.visit_table(pos)?
13061     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("family", Self::VT_FAMILY, true)?
13062     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("src", Self::VT_SRC, false)?
13063     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("weight_range", Self::VT_WEIGHT_RANGE, false)?
13064     .visit_field::<bool>("variable", Self::VT_VARIABLE, false)?
13065     .finish();
13066    Ok(())
13067  }
13068}
13069pub struct FontDefinitionArgs<'a> {
13070    pub family: Option<flatbuffers::WIPOffset<&'a str>>,
13071    pub src: Option<flatbuffers::WIPOffset<&'a str>>,
13072    pub weight_range: Option<flatbuffers::WIPOffset<&'a str>>,
13073    pub variable: bool,
13074}
13075impl<'a> Default for FontDefinitionArgs<'a> {
13076  #[inline]
13077  fn default() -> Self {
13078    FontDefinitionArgs {
13079      family: None, // required field
13080      src: None,
13081      weight_range: None,
13082      variable: false,
13083    }
13084  }
13085}
13086
13087pub struct FontDefinitionBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
13088  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
13089  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
13090}
13091impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> FontDefinitionBuilder<'a, 'b, A> {
13092  #[inline]
13093  pub fn add_family(&mut self, family: flatbuffers::WIPOffset<&'b  str>) {
13094    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FontDefinition::VT_FAMILY, family);
13095  }
13096  #[inline]
13097  pub fn add_src(&mut self, src: flatbuffers::WIPOffset<&'b  str>) {
13098    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FontDefinition::VT_SRC, src);
13099  }
13100  #[inline]
13101  pub fn add_weight_range(&mut self, weight_range: flatbuffers::WIPOffset<&'b  str>) {
13102    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FontDefinition::VT_WEIGHT_RANGE, weight_range);
13103  }
13104  #[inline]
13105  pub fn add_variable(&mut self, variable: bool) {
13106    self.fbb_.push_slot::<bool>(FontDefinition::VT_VARIABLE, variable, false);
13107  }
13108  #[inline]
13109  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> FontDefinitionBuilder<'a, 'b, A> {
13110    let start = _fbb.start_table();
13111    FontDefinitionBuilder {
13112      fbb_: _fbb,
13113      start_: start,
13114    }
13115  }
13116  #[inline]
13117  pub fn finish(self) -> flatbuffers::WIPOffset<FontDefinition<'a>> {
13118    let o = self.fbb_.end_table(self.start_);
13119    self.fbb_.required(o, FontDefinition::VT_FAMILY,"family");
13120    flatbuffers::WIPOffset::new(o.value())
13121  }
13122}
13123
13124impl core::fmt::Debug for FontDefinition<'_> {
13125  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
13126    let mut ds = f.debug_struct("FontDefinition");
13127      ds.field("family", &self.family());
13128      ds.field("src", &self.src());
13129      ds.field("weight_range", &self.weight_range());
13130      ds.field("variable", &self.variable());
13131      ds.finish()
13132  }
13133}
13134pub enum TypographyScaleOffset {}
13135#[derive(Copy, Clone, PartialEq)]
13136
13137pub struct TypographyScale<'a> {
13138  pub _tab: flatbuffers::Table<'a>,
13139}
13140
13141impl<'a> flatbuffers::Follow<'a> for TypographyScale<'a> {
13142  type Inner = TypographyScale<'a>;
13143  #[inline]
13144  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
13145    Self { _tab: flatbuffers::Table::new(buf, loc) }
13146  }
13147}
13148
13149impl<'a> TypographyScale<'a> {
13150  pub const VT_FONT_BODY: flatbuffers::VOffsetT = 4;
13151  pub const VT_FONT_DISPLAY: flatbuffers::VOffsetT = 6;
13152  pub const VT_FONT_MONO: flatbuffers::VOffsetT = 8;
13153  pub const VT_SIZE_SCALE: flatbuffers::VOffsetT = 10;
13154  pub const VT_LINE_HEIGHT_SCALE: flatbuffers::VOffsetT = 12;
13155  pub const VT_LETTER_SPACING: flatbuffers::VOffsetT = 14;
13156
13157  #[inline]
13158  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
13159    TypographyScale { _tab: table }
13160  }
13161  #[allow(unused_mut)]
13162  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
13163    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
13164    args: &'args TypographyScaleArgs<'args>
13165  ) -> flatbuffers::WIPOffset<TypographyScale<'bldr>> {
13166    let mut builder = TypographyScaleBuilder::new(_fbb);
13167    if let Some(x) = args.letter_spacing { builder.add_letter_spacing(x); }
13168    if let Some(x) = args.line_height_scale { builder.add_line_height_scale(x); }
13169    if let Some(x) = args.size_scale { builder.add_size_scale(x); }
13170    if let Some(x) = args.font_mono { builder.add_font_mono(x); }
13171    if let Some(x) = args.font_display { builder.add_font_display(x); }
13172    if let Some(x) = args.font_body { builder.add_font_body(x); }
13173    builder.finish()
13174  }
13175
13176
13177  #[inline]
13178  pub fn font_body(&self) -> Option<FontDefinition<'a>> {
13179    // Safety:
13180    // Created from valid Table for this object
13181    // which contains a valid value in this slot
13182    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<FontDefinition>>(TypographyScale::VT_FONT_BODY, None)}
13183  }
13184  #[inline]
13185  pub fn font_display(&self) -> Option<FontDefinition<'a>> {
13186    // Safety:
13187    // Created from valid Table for this object
13188    // which contains a valid value in this slot
13189    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<FontDefinition>>(TypographyScale::VT_FONT_DISPLAY, None)}
13190  }
13191  #[inline]
13192  pub fn font_mono(&self) -> Option<FontDefinition<'a>> {
13193    // Safety:
13194    // Created from valid Table for this object
13195    // which contains a valid value in this slot
13196    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<FontDefinition>>(TypographyScale::VT_FONT_MONO, None)}
13197  }
13198  /// Size scale (indexes: 0=xs, 1=sm, 2=base, 3=lg, 4=xl, 5=2xl, 6=3xl, 7=4xl).
13199  #[inline]
13200  pub fn size_scale(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Length<'a>>>> {
13201    // Safety:
13202    // Created from valid Table for this object
13203    // which contains a valid value in this slot
13204    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Length>>>>(TypographyScale::VT_SIZE_SCALE, None)}
13205  }
13206  /// Line height scale (matching size_scale indexes).
13207  #[inline]
13208  pub fn line_height_scale(&self) -> Option<flatbuffers::Vector<'a, f32>> {
13209    // Safety:
13210    // Created from valid Table for this object
13211    // which contains a valid value in this slot
13212    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, f32>>>(TypographyScale::VT_LINE_HEIGHT_SCALE, None)}
13213  }
13214  /// Default letter spacing.
13215  #[inline]
13216  pub fn letter_spacing(&self) -> Option<Length<'a>> {
13217    // Safety:
13218    // Created from valid Table for this object
13219    // which contains a valid value in this slot
13220    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(TypographyScale::VT_LETTER_SPACING, None)}
13221  }
13222}
13223
13224impl flatbuffers::Verifiable for TypographyScale<'_> {
13225  #[inline]
13226  fn run_verifier(
13227    v: &mut flatbuffers::Verifier, pos: usize
13228  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
13229    use self::flatbuffers::Verifiable;
13230    v.visit_table(pos)?
13231     .visit_field::<flatbuffers::ForwardsUOffset<FontDefinition>>("font_body", Self::VT_FONT_BODY, false)?
13232     .visit_field::<flatbuffers::ForwardsUOffset<FontDefinition>>("font_display", Self::VT_FONT_DISPLAY, false)?
13233     .visit_field::<flatbuffers::ForwardsUOffset<FontDefinition>>("font_mono", Self::VT_FONT_MONO, false)?
13234     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Length>>>>("size_scale", Self::VT_SIZE_SCALE, false)?
13235     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, f32>>>("line_height_scale", Self::VT_LINE_HEIGHT_SCALE, false)?
13236     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("letter_spacing", Self::VT_LETTER_SPACING, false)?
13237     .finish();
13238    Ok(())
13239  }
13240}
13241pub struct TypographyScaleArgs<'a> {
13242    pub font_body: Option<flatbuffers::WIPOffset<FontDefinition<'a>>>,
13243    pub font_display: Option<flatbuffers::WIPOffset<FontDefinition<'a>>>,
13244    pub font_mono: Option<flatbuffers::WIPOffset<FontDefinition<'a>>>,
13245    pub size_scale: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Length<'a>>>>>,
13246    pub line_height_scale: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, f32>>>,
13247    pub letter_spacing: Option<flatbuffers::WIPOffset<Length<'a>>>,
13248}
13249impl<'a> Default for TypographyScaleArgs<'a> {
13250  #[inline]
13251  fn default() -> Self {
13252    TypographyScaleArgs {
13253      font_body: None,
13254      font_display: None,
13255      font_mono: None,
13256      size_scale: None,
13257      line_height_scale: None,
13258      letter_spacing: None,
13259    }
13260  }
13261}
13262
13263pub struct TypographyScaleBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
13264  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
13265  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
13266}
13267impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TypographyScaleBuilder<'a, 'b, A> {
13268  #[inline]
13269  pub fn add_font_body(&mut self, font_body: flatbuffers::WIPOffset<FontDefinition<'b >>) {
13270    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<FontDefinition>>(TypographyScale::VT_FONT_BODY, font_body);
13271  }
13272  #[inline]
13273  pub fn add_font_display(&mut self, font_display: flatbuffers::WIPOffset<FontDefinition<'b >>) {
13274    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<FontDefinition>>(TypographyScale::VT_FONT_DISPLAY, font_display);
13275  }
13276  #[inline]
13277  pub fn add_font_mono(&mut self, font_mono: flatbuffers::WIPOffset<FontDefinition<'b >>) {
13278    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<FontDefinition>>(TypographyScale::VT_FONT_MONO, font_mono);
13279  }
13280  #[inline]
13281  pub fn add_size_scale(&mut self, size_scale: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<Length<'b >>>>) {
13282    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(TypographyScale::VT_SIZE_SCALE, size_scale);
13283  }
13284  #[inline]
13285  pub fn add_line_height_scale(&mut self, line_height_scale: flatbuffers::WIPOffset<flatbuffers::Vector<'b , f32>>) {
13286    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(TypographyScale::VT_LINE_HEIGHT_SCALE, line_height_scale);
13287  }
13288  #[inline]
13289  pub fn add_letter_spacing(&mut self, letter_spacing: flatbuffers::WIPOffset<Length<'b >>) {
13290    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(TypographyScale::VT_LETTER_SPACING, letter_spacing);
13291  }
13292  #[inline]
13293  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TypographyScaleBuilder<'a, 'b, A> {
13294    let start = _fbb.start_table();
13295    TypographyScaleBuilder {
13296      fbb_: _fbb,
13297      start_: start,
13298    }
13299  }
13300  #[inline]
13301  pub fn finish(self) -> flatbuffers::WIPOffset<TypographyScale<'a>> {
13302    let o = self.fbb_.end_table(self.start_);
13303    flatbuffers::WIPOffset::new(o.value())
13304  }
13305}
13306
13307impl core::fmt::Debug for TypographyScale<'_> {
13308  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
13309    let mut ds = f.debug_struct("TypographyScale");
13310      ds.field("font_body", &self.font_body());
13311      ds.field("font_display", &self.font_display());
13312      ds.field("font_mono", &self.font_mono());
13313      ds.field("size_scale", &self.size_scale());
13314      ds.field("line_height_scale", &self.line_height_scale());
13315      ds.field("letter_spacing", &self.letter_spacing());
13316      ds.finish()
13317  }
13318}
13319pub enum SpacingScaleOffset {}
13320#[derive(Copy, Clone, PartialEq)]
13321
13322pub struct SpacingScale<'a> {
13323  pub _tab: flatbuffers::Table<'a>,
13324}
13325
13326impl<'a> flatbuffers::Follow<'a> for SpacingScale<'a> {
13327  type Inner = SpacingScale<'a>;
13328  #[inline]
13329  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
13330    Self { _tab: flatbuffers::Table::new(buf, loc) }
13331  }
13332}
13333
13334impl<'a> SpacingScale<'a> {
13335  pub const VT_BASE: flatbuffers::VOffsetT = 4;
13336  pub const VT_MULTIPLIERS: flatbuffers::VOffsetT = 6;
13337
13338  #[inline]
13339  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
13340    SpacingScale { _tab: table }
13341  }
13342  #[allow(unused_mut)]
13343  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
13344    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
13345    args: &'args SpacingScaleArgs<'args>
13346  ) -> flatbuffers::WIPOffset<SpacingScale<'bldr>> {
13347    let mut builder = SpacingScaleBuilder::new(_fbb);
13348    if let Some(x) = args.multipliers { builder.add_multipliers(x); }
13349    if let Some(x) = args.base { builder.add_base(x); }
13350    builder.finish()
13351  }
13352
13353
13354  /// Base spacing unit (e.g., 4px or 0.25rem).
13355  #[inline]
13356  pub fn base(&self) -> Option<Length<'a>> {
13357    // Safety:
13358    // Created from valid Table for this object
13359    // which contains a valid value in this slot
13360    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(SpacingScale::VT_BASE, None)}
13361  }
13362  /// Multiplier scale (e.g., [0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64]).
13363  /// Actual spacing = base.value * multiplier[i].
13364  #[inline]
13365  pub fn multipliers(&self) -> Option<flatbuffers::Vector<'a, f32>> {
13366    // Safety:
13367    // Created from valid Table for this object
13368    // which contains a valid value in this slot
13369    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, f32>>>(SpacingScale::VT_MULTIPLIERS, None)}
13370  }
13371}
13372
13373impl flatbuffers::Verifiable for SpacingScale<'_> {
13374  #[inline]
13375  fn run_verifier(
13376    v: &mut flatbuffers::Verifier, pos: usize
13377  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
13378    use self::flatbuffers::Verifiable;
13379    v.visit_table(pos)?
13380     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("base", Self::VT_BASE, false)?
13381     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, f32>>>("multipliers", Self::VT_MULTIPLIERS, false)?
13382     .finish();
13383    Ok(())
13384  }
13385}
13386pub struct SpacingScaleArgs<'a> {
13387    pub base: Option<flatbuffers::WIPOffset<Length<'a>>>,
13388    pub multipliers: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, f32>>>,
13389}
13390impl<'a> Default for SpacingScaleArgs<'a> {
13391  #[inline]
13392  fn default() -> Self {
13393    SpacingScaleArgs {
13394      base: None,
13395      multipliers: None,
13396    }
13397  }
13398}
13399
13400pub struct SpacingScaleBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
13401  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
13402  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
13403}
13404impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SpacingScaleBuilder<'a, 'b, A> {
13405  #[inline]
13406  pub fn add_base(&mut self, base: flatbuffers::WIPOffset<Length<'b >>) {
13407    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(SpacingScale::VT_BASE, base);
13408  }
13409  #[inline]
13410  pub fn add_multipliers(&mut self, multipliers: flatbuffers::WIPOffset<flatbuffers::Vector<'b , f32>>) {
13411    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(SpacingScale::VT_MULTIPLIERS, multipliers);
13412  }
13413  #[inline]
13414  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> SpacingScaleBuilder<'a, 'b, A> {
13415    let start = _fbb.start_table();
13416    SpacingScaleBuilder {
13417      fbb_: _fbb,
13418      start_: start,
13419    }
13420  }
13421  #[inline]
13422  pub fn finish(self) -> flatbuffers::WIPOffset<SpacingScale<'a>> {
13423    let o = self.fbb_.end_table(self.start_);
13424    flatbuffers::WIPOffset::new(o.value())
13425  }
13426}
13427
13428impl core::fmt::Debug for SpacingScale<'_> {
13429  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
13430    let mut ds = f.debug_struct("SpacingScale");
13431      ds.field("base", &self.base());
13432      ds.field("multipliers", &self.multipliers());
13433      ds.finish()
13434  }
13435}
13436pub enum ShadowScaleOffset {}
13437#[derive(Copy, Clone, PartialEq)]
13438
13439pub struct ShadowScale<'a> {
13440  pub _tab: flatbuffers::Table<'a>,
13441}
13442
13443impl<'a> flatbuffers::Follow<'a> for ShadowScale<'a> {
13444  type Inner = ShadowScale<'a>;
13445  #[inline]
13446  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
13447    Self { _tab: flatbuffers::Table::new(buf, loc) }
13448  }
13449}
13450
13451impl<'a> ShadowScale<'a> {
13452  pub const VT_SHADOWS: flatbuffers::VOffsetT = 4;
13453
13454  #[inline]
13455  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
13456    ShadowScale { _tab: table }
13457  }
13458  #[allow(unused_mut)]
13459  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
13460    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
13461    args: &'args ShadowScaleArgs<'args>
13462  ) -> flatbuffers::WIPOffset<ShadowScale<'bldr>> {
13463    let mut builder = ShadowScaleBuilder::new(_fbb);
13464    if let Some(x) = args.shadows { builder.add_shadows(x); }
13465    builder.finish()
13466  }
13467
13468
13469  /// Named shadows: sm, md, lg, xl, 2xl (indexed).
13470  #[inline]
13471  pub fn shadows(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Shadow<'a>>>> {
13472    // Safety:
13473    // Created from valid Table for this object
13474    // which contains a valid value in this slot
13475    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Shadow>>>>(ShadowScale::VT_SHADOWS, None)}
13476  }
13477}
13478
13479impl flatbuffers::Verifiable for ShadowScale<'_> {
13480  #[inline]
13481  fn run_verifier(
13482    v: &mut flatbuffers::Verifier, pos: usize
13483  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
13484    use self::flatbuffers::Verifiable;
13485    v.visit_table(pos)?
13486     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Shadow>>>>("shadows", Self::VT_SHADOWS, false)?
13487     .finish();
13488    Ok(())
13489  }
13490}
13491pub struct ShadowScaleArgs<'a> {
13492    pub shadows: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Shadow<'a>>>>>,
13493}
13494impl<'a> Default for ShadowScaleArgs<'a> {
13495  #[inline]
13496  fn default() -> Self {
13497    ShadowScaleArgs {
13498      shadows: None,
13499    }
13500  }
13501}
13502
13503pub struct ShadowScaleBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
13504  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
13505  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
13506}
13507impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ShadowScaleBuilder<'a, 'b, A> {
13508  #[inline]
13509  pub fn add_shadows(&mut self, shadows: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<Shadow<'b >>>>) {
13510    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ShadowScale::VT_SHADOWS, shadows);
13511  }
13512  #[inline]
13513  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ShadowScaleBuilder<'a, 'b, A> {
13514    let start = _fbb.start_table();
13515    ShadowScaleBuilder {
13516      fbb_: _fbb,
13517      start_: start,
13518    }
13519  }
13520  #[inline]
13521  pub fn finish(self) -> flatbuffers::WIPOffset<ShadowScale<'a>> {
13522    let o = self.fbb_.end_table(self.start_);
13523    flatbuffers::WIPOffset::new(o.value())
13524  }
13525}
13526
13527impl core::fmt::Debug for ShadowScale<'_> {
13528  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
13529    let mut ds = f.debug_struct("ShadowScale");
13530      ds.field("shadows", &self.shadows());
13531      ds.finish()
13532  }
13533}
13534pub enum RadiusScaleOffset {}
13535#[derive(Copy, Clone, PartialEq)]
13536
13537pub struct RadiusScale<'a> {
13538  pub _tab: flatbuffers::Table<'a>,
13539}
13540
13541impl<'a> flatbuffers::Follow<'a> for RadiusScale<'a> {
13542  type Inner = RadiusScale<'a>;
13543  #[inline]
13544  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
13545    Self { _tab: flatbuffers::Table::new(buf, loc) }
13546  }
13547}
13548
13549impl<'a> RadiusScale<'a> {
13550  pub const VT_RADII: flatbuffers::VOffsetT = 4;
13551
13552  #[inline]
13553  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
13554    RadiusScale { _tab: table }
13555  }
13556  #[allow(unused_mut)]
13557  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
13558    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
13559    args: &'args RadiusScaleArgs<'args>
13560  ) -> flatbuffers::WIPOffset<RadiusScale<'bldr>> {
13561    let mut builder = RadiusScaleBuilder::new(_fbb);
13562    if let Some(x) = args.radii { builder.add_radii(x); }
13563    builder.finish()
13564  }
13565
13566
13567  /// Named radii: none, sm, md, lg, xl, full (indexed).
13568  #[inline]
13569  pub fn radii(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Length<'a>>>> {
13570    // Safety:
13571    // Created from valid Table for this object
13572    // which contains a valid value in this slot
13573    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Length>>>>(RadiusScale::VT_RADII, None)}
13574  }
13575}
13576
13577impl flatbuffers::Verifiable for RadiusScale<'_> {
13578  #[inline]
13579  fn run_verifier(
13580    v: &mut flatbuffers::Verifier, pos: usize
13581  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
13582    use self::flatbuffers::Verifiable;
13583    v.visit_table(pos)?
13584     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Length>>>>("radii", Self::VT_RADII, false)?
13585     .finish();
13586    Ok(())
13587  }
13588}
13589pub struct RadiusScaleArgs<'a> {
13590    pub radii: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Length<'a>>>>>,
13591}
13592impl<'a> Default for RadiusScaleArgs<'a> {
13593  #[inline]
13594  fn default() -> Self {
13595    RadiusScaleArgs {
13596      radii: None,
13597    }
13598  }
13599}
13600
13601pub struct RadiusScaleBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
13602  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
13603  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
13604}
13605impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RadiusScaleBuilder<'a, 'b, A> {
13606  #[inline]
13607  pub fn add_radii(&mut self, radii: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<Length<'b >>>>) {
13608    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(RadiusScale::VT_RADII, radii);
13609  }
13610  #[inline]
13611  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> RadiusScaleBuilder<'a, 'b, A> {
13612    let start = _fbb.start_table();
13613    RadiusScaleBuilder {
13614      fbb_: _fbb,
13615      start_: start,
13616    }
13617  }
13618  #[inline]
13619  pub fn finish(self) -> flatbuffers::WIPOffset<RadiusScale<'a>> {
13620    let o = self.fbb_.end_table(self.start_);
13621    flatbuffers::WIPOffset::new(o.value())
13622  }
13623}
13624
13625impl core::fmt::Debug for RadiusScale<'_> {
13626  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
13627    let mut ds = f.debug_struct("RadiusScale");
13628      ds.field("radii", &self.radii());
13629      ds.finish()
13630  }
13631}
13632pub enum ThemeNodeOffset {}
13633#[derive(Copy, Clone, PartialEq)]
13634
13635pub struct ThemeNode<'a> {
13636  pub _tab: flatbuffers::Table<'a>,
13637}
13638
13639impl<'a> flatbuffers::Follow<'a> for ThemeNode<'a> {
13640  type Inner = ThemeNode<'a>;
13641  #[inline]
13642  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
13643    Self { _tab: flatbuffers::Table::new(buf, loc) }
13644  }
13645}
13646
13647impl<'a> ThemeNode<'a> {
13648  pub const VT_NODE_ID: flatbuffers::VOffsetT = 4;
13649  pub const VT_NAME: flatbuffers::VOffsetT = 6;
13650  pub const VT_COLORS: flatbuffers::VOffsetT = 8;
13651  pub const VT_TYPOGRAPHY: flatbuffers::VOffsetT = 10;
13652  pub const VT_SPACING: flatbuffers::VOffsetT = 12;
13653  pub const VT_SHADOWS: flatbuffers::VOffsetT = 14;
13654  pub const VT_RADII: flatbuffers::VOffsetT = 16;
13655  pub const VT_TRANSITION_DURATION: flatbuffers::VOffsetT = 18;
13656  pub const VT_TRANSITION_EASING: flatbuffers::VOffsetT = 20;
13657
13658  #[inline]
13659  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
13660    ThemeNode { _tab: table }
13661  }
13662  #[allow(unused_mut)]
13663  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
13664    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
13665    args: &'args ThemeNodeArgs<'args>
13666  ) -> flatbuffers::WIPOffset<ThemeNode<'bldr>> {
13667    let mut builder = ThemeNodeBuilder::new(_fbb);
13668    if let Some(x) = args.transition_easing { builder.add_transition_easing(x); }
13669    if let Some(x) = args.transition_duration { builder.add_transition_duration(x); }
13670    if let Some(x) = args.radii { builder.add_radii(x); }
13671    if let Some(x) = args.shadows { builder.add_shadows(x); }
13672    if let Some(x) = args.spacing { builder.add_spacing(x); }
13673    if let Some(x) = args.typography { builder.add_typography(x); }
13674    if let Some(x) = args.colors { builder.add_colors(x); }
13675    if let Some(x) = args.name { builder.add_name(x); }
13676    if let Some(x) = args.node_id { builder.add_node_id(x); }
13677    builder.finish()
13678  }
13679
13680
13681  #[inline]
13682  pub fn node_id(&self) -> &'a str {
13683    // Safety:
13684    // Created from valid Table for this object
13685    // which contains a valid value in this slot
13686    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ThemeNode::VT_NODE_ID, None).unwrap()}
13687  }
13688  /// Theme name (e.g., "light", "dark", "high-contrast").
13689  #[inline]
13690  pub fn name(&self) -> &'a str {
13691    // Safety:
13692    // Created from valid Table for this object
13693    // which contains a valid value in this slot
13694    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ThemeNode::VT_NAME, None).unwrap()}
13695  }
13696  #[inline]
13697  pub fn colors(&self) -> Option<ColorPalette<'a>> {
13698    // Safety:
13699    // Created from valid Table for this object
13700    // which contains a valid value in this slot
13701    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<ColorPalette>>(ThemeNode::VT_COLORS, None)}
13702  }
13703  #[inline]
13704  pub fn typography(&self) -> Option<TypographyScale<'a>> {
13705    // Safety:
13706    // Created from valid Table for this object
13707    // which contains a valid value in this slot
13708    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<TypographyScale>>(ThemeNode::VT_TYPOGRAPHY, None)}
13709  }
13710  #[inline]
13711  pub fn spacing(&self) -> Option<SpacingScale<'a>> {
13712    // Safety:
13713    // Created from valid Table for this object
13714    // which contains a valid value in this slot
13715    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<SpacingScale>>(ThemeNode::VT_SPACING, None)}
13716  }
13717  #[inline]
13718  pub fn shadows(&self) -> Option<ShadowScale<'a>> {
13719    // Safety:
13720    // Created from valid Table for this object
13721    // which contains a valid value in this slot
13722    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<ShadowScale>>(ThemeNode::VT_SHADOWS, None)}
13723  }
13724  #[inline]
13725  pub fn radii(&self) -> Option<RadiusScale<'a>> {
13726    // Safety:
13727    // Created from valid Table for this object
13728    // which contains a valid value in this slot
13729    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<RadiusScale>>(ThemeNode::VT_RADII, None)}
13730  }
13731  /// Transition animation when switching to this theme.
13732  #[inline]
13733  pub fn transition_duration(&self) -> Option<Duration<'a>> {
13734    // Safety:
13735    // Created from valid Table for this object
13736    // which contains a valid value in this slot
13737    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Duration>>(ThemeNode::VT_TRANSITION_DURATION, None)}
13738  }
13739  #[inline]
13740  pub fn transition_easing(&self) -> Option<Easing<'a>> {
13741    // Safety:
13742    // Created from valid Table for this object
13743    // which contains a valid value in this slot
13744    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Easing>>(ThemeNode::VT_TRANSITION_EASING, None)}
13745  }
13746}
13747
13748impl flatbuffers::Verifiable for ThemeNode<'_> {
13749  #[inline]
13750  fn run_verifier(
13751    v: &mut flatbuffers::Verifier, pos: usize
13752  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
13753    use self::flatbuffers::Verifiable;
13754    v.visit_table(pos)?
13755     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("node_id", Self::VT_NODE_ID, true)?
13756     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
13757     .visit_field::<flatbuffers::ForwardsUOffset<ColorPalette>>("colors", Self::VT_COLORS, false)?
13758     .visit_field::<flatbuffers::ForwardsUOffset<TypographyScale>>("typography", Self::VT_TYPOGRAPHY, false)?
13759     .visit_field::<flatbuffers::ForwardsUOffset<SpacingScale>>("spacing", Self::VT_SPACING, false)?
13760     .visit_field::<flatbuffers::ForwardsUOffset<ShadowScale>>("shadows", Self::VT_SHADOWS, false)?
13761     .visit_field::<flatbuffers::ForwardsUOffset<RadiusScale>>("radii", Self::VT_RADII, false)?
13762     .visit_field::<flatbuffers::ForwardsUOffset<Duration>>("transition_duration", Self::VT_TRANSITION_DURATION, false)?
13763     .visit_field::<flatbuffers::ForwardsUOffset<Easing>>("transition_easing", Self::VT_TRANSITION_EASING, false)?
13764     .finish();
13765    Ok(())
13766  }
13767}
13768pub struct ThemeNodeArgs<'a> {
13769    pub node_id: Option<flatbuffers::WIPOffset<&'a str>>,
13770    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
13771    pub colors: Option<flatbuffers::WIPOffset<ColorPalette<'a>>>,
13772    pub typography: Option<flatbuffers::WIPOffset<TypographyScale<'a>>>,
13773    pub spacing: Option<flatbuffers::WIPOffset<SpacingScale<'a>>>,
13774    pub shadows: Option<flatbuffers::WIPOffset<ShadowScale<'a>>>,
13775    pub radii: Option<flatbuffers::WIPOffset<RadiusScale<'a>>>,
13776    pub transition_duration: Option<flatbuffers::WIPOffset<Duration<'a>>>,
13777    pub transition_easing: Option<flatbuffers::WIPOffset<Easing<'a>>>,
13778}
13779impl<'a> Default for ThemeNodeArgs<'a> {
13780  #[inline]
13781  fn default() -> Self {
13782    ThemeNodeArgs {
13783      node_id: None, // required field
13784      name: None, // required field
13785      colors: None,
13786      typography: None,
13787      spacing: None,
13788      shadows: None,
13789      radii: None,
13790      transition_duration: None,
13791      transition_easing: None,
13792    }
13793  }
13794}
13795
13796pub struct ThemeNodeBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
13797  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
13798  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
13799}
13800impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ThemeNodeBuilder<'a, 'b, A> {
13801  #[inline]
13802  pub fn add_node_id(&mut self, node_id: flatbuffers::WIPOffset<&'b  str>) {
13803    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ThemeNode::VT_NODE_ID, node_id);
13804  }
13805  #[inline]
13806  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
13807    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ThemeNode::VT_NAME, name);
13808  }
13809  #[inline]
13810  pub fn add_colors(&mut self, colors: flatbuffers::WIPOffset<ColorPalette<'b >>) {
13811    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<ColorPalette>>(ThemeNode::VT_COLORS, colors);
13812  }
13813  #[inline]
13814  pub fn add_typography(&mut self, typography: flatbuffers::WIPOffset<TypographyScale<'b >>) {
13815    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<TypographyScale>>(ThemeNode::VT_TYPOGRAPHY, typography);
13816  }
13817  #[inline]
13818  pub fn add_spacing(&mut self, spacing: flatbuffers::WIPOffset<SpacingScale<'b >>) {
13819    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<SpacingScale>>(ThemeNode::VT_SPACING, spacing);
13820  }
13821  #[inline]
13822  pub fn add_shadows(&mut self, shadows: flatbuffers::WIPOffset<ShadowScale<'b >>) {
13823    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<ShadowScale>>(ThemeNode::VT_SHADOWS, shadows);
13824  }
13825  #[inline]
13826  pub fn add_radii(&mut self, radii: flatbuffers::WIPOffset<RadiusScale<'b >>) {
13827    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<RadiusScale>>(ThemeNode::VT_RADII, radii);
13828  }
13829  #[inline]
13830  pub fn add_transition_duration(&mut self, transition_duration: flatbuffers::WIPOffset<Duration<'b >>) {
13831    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Duration>>(ThemeNode::VT_TRANSITION_DURATION, transition_duration);
13832  }
13833  #[inline]
13834  pub fn add_transition_easing(&mut self, transition_easing: flatbuffers::WIPOffset<Easing<'b >>) {
13835    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Easing>>(ThemeNode::VT_TRANSITION_EASING, transition_easing);
13836  }
13837  #[inline]
13838  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ThemeNodeBuilder<'a, 'b, A> {
13839    let start = _fbb.start_table();
13840    ThemeNodeBuilder {
13841      fbb_: _fbb,
13842      start_: start,
13843    }
13844  }
13845  #[inline]
13846  pub fn finish(self) -> flatbuffers::WIPOffset<ThemeNode<'a>> {
13847    let o = self.fbb_.end_table(self.start_);
13848    self.fbb_.required(o, ThemeNode::VT_NODE_ID,"node_id");
13849    self.fbb_.required(o, ThemeNode::VT_NAME,"name");
13850    flatbuffers::WIPOffset::new(o.value())
13851  }
13852}
13853
13854impl core::fmt::Debug for ThemeNode<'_> {
13855  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
13856    let mut ds = f.debug_struct("ThemeNode");
13857      ds.field("node_id", &self.node_id());
13858      ds.field("name", &self.name());
13859      ds.field("colors", &self.colors());
13860      ds.field("typography", &self.typography());
13861      ds.field("spacing", &self.spacing());
13862      ds.field("shadows", &self.shadows());
13863      ds.field("radii", &self.radii());
13864      ds.field("transition_duration", &self.transition_duration());
13865      ds.field("transition_easing", &self.transition_easing());
13866      ds.finish()
13867  }
13868}
13869pub enum PersonalizationConditionOffset {}
13870#[derive(Copy, Clone, PartialEq)]
13871
13872pub struct PersonalizationCondition<'a> {
13873  pub _tab: flatbuffers::Table<'a>,
13874}
13875
13876impl<'a> flatbuffers::Follow<'a> for PersonalizationCondition<'a> {
13877  type Inner = PersonalizationCondition<'a>;
13878  #[inline]
13879  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
13880    Self { _tab: flatbuffers::Table::new(buf, loc) }
13881  }
13882}
13883
13884impl<'a> PersonalizationCondition<'a> {
13885  pub const VT_CONDITION_TYPE: flatbuffers::VOffsetT = 4;
13886  pub const VT_OPERATOR: flatbuffers::VOffsetT = 6;
13887  pub const VT_VALUE: flatbuffers::VOffsetT = 8;
13888
13889  #[inline]
13890  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
13891    PersonalizationCondition { _tab: table }
13892  }
13893  #[allow(unused_mut)]
13894  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
13895    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
13896    args: &'args PersonalizationConditionArgs<'args>
13897  ) -> flatbuffers::WIPOffset<PersonalizationCondition<'bldr>> {
13898    let mut builder = PersonalizationConditionBuilder::new(_fbb);
13899    if let Some(x) = args.value { builder.add_value(x); }
13900    if let Some(x) = args.operator { builder.add_operator(x); }
13901    builder.add_condition_type(args.condition_type);
13902    builder.finish()
13903  }
13904
13905
13906  #[inline]
13907  pub fn condition_type(&self) -> PersonalizationConditionType {
13908    // Safety:
13909    // Created from valid Table for this object
13910    // which contains a valid value in this slot
13911    unsafe { self._tab.get::<PersonalizationConditionType>(PersonalizationCondition::VT_CONDITION_TYPE, Some(PersonalizationConditionType::Locale)).unwrap()}
13912  }
13913  /// Operator: "eq", "neq", "gt", "lt", "gte", "lte", "contains".
13914  #[inline]
13915  pub fn operator(&self) -> Option<&'a str> {
13916    // Safety:
13917    // Created from valid Table for this object
13918    // which contains a valid value in this slot
13919    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(PersonalizationCondition::VT_OPERATOR, None)}
13920  }
13921  /// Value to compare against (e.g., "dark", "mobile", "en-US").
13922  #[inline]
13923  pub fn value(&self) -> Option<&'a str> {
13924    // Safety:
13925    // Created from valid Table for this object
13926    // which contains a valid value in this slot
13927    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(PersonalizationCondition::VT_VALUE, None)}
13928  }
13929}
13930
13931impl flatbuffers::Verifiable for PersonalizationCondition<'_> {
13932  #[inline]
13933  fn run_verifier(
13934    v: &mut flatbuffers::Verifier, pos: usize
13935  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
13936    use self::flatbuffers::Verifiable;
13937    v.visit_table(pos)?
13938     .visit_field::<PersonalizationConditionType>("condition_type", Self::VT_CONDITION_TYPE, false)?
13939     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("operator", Self::VT_OPERATOR, false)?
13940     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("value", Self::VT_VALUE, false)?
13941     .finish();
13942    Ok(())
13943  }
13944}
13945pub struct PersonalizationConditionArgs<'a> {
13946    pub condition_type: PersonalizationConditionType,
13947    pub operator: Option<flatbuffers::WIPOffset<&'a str>>,
13948    pub value: Option<flatbuffers::WIPOffset<&'a str>>,
13949}
13950impl<'a> Default for PersonalizationConditionArgs<'a> {
13951  #[inline]
13952  fn default() -> Self {
13953    PersonalizationConditionArgs {
13954      condition_type: PersonalizationConditionType::Locale,
13955      operator: None,
13956      value: None,
13957    }
13958  }
13959}
13960
13961pub struct PersonalizationConditionBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
13962  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
13963  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
13964}
13965impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> PersonalizationConditionBuilder<'a, 'b, A> {
13966  #[inline]
13967  pub fn add_condition_type(&mut self, condition_type: PersonalizationConditionType) {
13968    self.fbb_.push_slot::<PersonalizationConditionType>(PersonalizationCondition::VT_CONDITION_TYPE, condition_type, PersonalizationConditionType::Locale);
13969  }
13970  #[inline]
13971  pub fn add_operator(&mut self, operator: flatbuffers::WIPOffset<&'b  str>) {
13972    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PersonalizationCondition::VT_OPERATOR, operator);
13973  }
13974  #[inline]
13975  pub fn add_value(&mut self, value: flatbuffers::WIPOffset<&'b  str>) {
13976    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PersonalizationCondition::VT_VALUE, value);
13977  }
13978  #[inline]
13979  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> PersonalizationConditionBuilder<'a, 'b, A> {
13980    let start = _fbb.start_table();
13981    PersonalizationConditionBuilder {
13982      fbb_: _fbb,
13983      start_: start,
13984    }
13985  }
13986  #[inline]
13987  pub fn finish(self) -> flatbuffers::WIPOffset<PersonalizationCondition<'a>> {
13988    let o = self.fbb_.end_table(self.start_);
13989    flatbuffers::WIPOffset::new(o.value())
13990  }
13991}
13992
13993impl core::fmt::Debug for PersonalizationCondition<'_> {
13994  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
13995    let mut ds = f.debug_struct("PersonalizationCondition");
13996      ds.field("condition_type", &self.condition_type());
13997      ds.field("operator", &self.operator());
13998      ds.field("value", &self.value());
13999      ds.finish()
14000  }
14001}
14002pub enum PersonalizationVariantOffset {}
14003#[derive(Copy, Clone, PartialEq)]
14004
14005pub struct PersonalizationVariant<'a> {
14006  pub _tab: flatbuffers::Table<'a>,
14007}
14008
14009impl<'a> flatbuffers::Follow<'a> for PersonalizationVariant<'a> {
14010  type Inner = PersonalizationVariant<'a>;
14011  #[inline]
14012  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
14013    Self { _tab: flatbuffers::Table::new(buf, loc) }
14014  }
14015}
14016
14017impl<'a> PersonalizationVariant<'a> {
14018  pub const VT_CONDITIONS: flatbuffers::VOffsetT = 4;
14019  pub const VT_SHOW_NODES: flatbuffers::VOffsetT = 6;
14020  pub const VT_HIDE_NODES: flatbuffers::VOffsetT = 8;
14021  pub const VT_OVERRIDES: flatbuffers::VOffsetT = 10;
14022
14023  #[inline]
14024  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
14025    PersonalizationVariant { _tab: table }
14026  }
14027  #[allow(unused_mut)]
14028  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
14029    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
14030    args: &'args PersonalizationVariantArgs<'args>
14031  ) -> flatbuffers::WIPOffset<PersonalizationVariant<'bldr>> {
14032    let mut builder = PersonalizationVariantBuilder::new(_fbb);
14033    if let Some(x) = args.overrides { builder.add_overrides(x); }
14034    if let Some(x) = args.hide_nodes { builder.add_hide_nodes(x); }
14035    if let Some(x) = args.show_nodes { builder.add_show_nodes(x); }
14036    if let Some(x) = args.conditions { builder.add_conditions(x); }
14037    builder.finish()
14038  }
14039
14040
14041  /// Conditions that must all be true for this variant to activate.
14042  #[inline]
14043  pub fn conditions(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<PersonalizationCondition<'a>>> {
14044    // Safety:
14045    // Created from valid Table for this object
14046    // which contains a valid value in this slot
14047    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<PersonalizationCondition>>>>(PersonalizationVariant::VT_CONDITIONS, None).unwrap()}
14048  }
14049  /// Node IDs to show when this variant is active.
14050  #[inline]
14051  pub fn show_nodes(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>> {
14052    // Safety:
14053    // Created from valid Table for this object
14054    // which contains a valid value in this slot
14055    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>(PersonalizationVariant::VT_SHOW_NODES, None)}
14056  }
14057  /// Node IDs to hide when this variant is active.
14058  #[inline]
14059  pub fn hide_nodes(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>> {
14060    // Safety:
14061    // Created from valid Table for this object
14062    // which contains a valid value in this slot
14063    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>(PersonalizationVariant::VT_HIDE_NODES, None)}
14064  }
14065  /// Property overrides to apply (node_id + property + value).
14066  #[inline]
14067  pub fn overrides(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<PropertyOverride<'a>>>> {
14068    // Safety:
14069    // Created from valid Table for this object
14070    // which contains a valid value in this slot
14071    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<PropertyOverride>>>>(PersonalizationVariant::VT_OVERRIDES, None)}
14072  }
14073}
14074
14075impl flatbuffers::Verifiable for PersonalizationVariant<'_> {
14076  #[inline]
14077  fn run_verifier(
14078    v: &mut flatbuffers::Verifier, pos: usize
14079  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
14080    use self::flatbuffers::Verifiable;
14081    v.visit_table(pos)?
14082     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<PersonalizationCondition>>>>("conditions", Self::VT_CONDITIONS, true)?
14083     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>>>("show_nodes", Self::VT_SHOW_NODES, false)?
14084     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>>>("hide_nodes", Self::VT_HIDE_NODES, false)?
14085     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<PropertyOverride>>>>("overrides", Self::VT_OVERRIDES, false)?
14086     .finish();
14087    Ok(())
14088  }
14089}
14090pub struct PersonalizationVariantArgs<'a> {
14091    pub conditions: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<PersonalizationCondition<'a>>>>>,
14092    pub show_nodes: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>,
14093    pub hide_nodes: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>,
14094    pub overrides: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<PropertyOverride<'a>>>>>,
14095}
14096impl<'a> Default for PersonalizationVariantArgs<'a> {
14097  #[inline]
14098  fn default() -> Self {
14099    PersonalizationVariantArgs {
14100      conditions: None, // required field
14101      show_nodes: None,
14102      hide_nodes: None,
14103      overrides: None,
14104    }
14105  }
14106}
14107
14108pub struct PersonalizationVariantBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
14109  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
14110  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
14111}
14112impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> PersonalizationVariantBuilder<'a, 'b, A> {
14113  #[inline]
14114  pub fn add_conditions(&mut self, conditions: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<PersonalizationCondition<'b >>>>) {
14115    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PersonalizationVariant::VT_CONDITIONS, conditions);
14116  }
14117  #[inline]
14118  pub fn add_show_nodes(&mut self, show_nodes: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<&'b  str>>>) {
14119    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PersonalizationVariant::VT_SHOW_NODES, show_nodes);
14120  }
14121  #[inline]
14122  pub fn add_hide_nodes(&mut self, hide_nodes: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<&'b  str>>>) {
14123    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PersonalizationVariant::VT_HIDE_NODES, hide_nodes);
14124  }
14125  #[inline]
14126  pub fn add_overrides(&mut self, overrides: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<PropertyOverride<'b >>>>) {
14127    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PersonalizationVariant::VT_OVERRIDES, overrides);
14128  }
14129  #[inline]
14130  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> PersonalizationVariantBuilder<'a, 'b, A> {
14131    let start = _fbb.start_table();
14132    PersonalizationVariantBuilder {
14133      fbb_: _fbb,
14134      start_: start,
14135    }
14136  }
14137  #[inline]
14138  pub fn finish(self) -> flatbuffers::WIPOffset<PersonalizationVariant<'a>> {
14139    let o = self.fbb_.end_table(self.start_);
14140    self.fbb_.required(o, PersonalizationVariant::VT_CONDITIONS,"conditions");
14141    flatbuffers::WIPOffset::new(o.value())
14142  }
14143}
14144
14145impl core::fmt::Debug for PersonalizationVariant<'_> {
14146  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
14147    let mut ds = f.debug_struct("PersonalizationVariant");
14148      ds.field("conditions", &self.conditions());
14149      ds.field("show_nodes", &self.show_nodes());
14150      ds.field("hide_nodes", &self.hide_nodes());
14151      ds.field("overrides", &self.overrides());
14152      ds.finish()
14153  }
14154}
14155pub enum PropertyOverrideOffset {}
14156#[derive(Copy, Clone, PartialEq)]
14157
14158pub struct PropertyOverride<'a> {
14159  pub _tab: flatbuffers::Table<'a>,
14160}
14161
14162impl<'a> flatbuffers::Follow<'a> for PropertyOverride<'a> {
14163  type Inner = PropertyOverride<'a>;
14164  #[inline]
14165  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
14166    Self { _tab: flatbuffers::Table::new(buf, loc) }
14167  }
14168}
14169
14170impl<'a> PropertyOverride<'a> {
14171  pub const VT_TARGET_NODE_ID: flatbuffers::VOffsetT = 4;
14172  pub const VT_PROPERTY: flatbuffers::VOffsetT = 6;
14173  pub const VT_VALUE: flatbuffers::VOffsetT = 8;
14174
14175  #[inline]
14176  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
14177    PropertyOverride { _tab: table }
14178  }
14179  #[allow(unused_mut)]
14180  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
14181    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
14182    args: &'args PropertyOverrideArgs<'args>
14183  ) -> flatbuffers::WIPOffset<PropertyOverride<'bldr>> {
14184    let mut builder = PropertyOverrideBuilder::new(_fbb);
14185    if let Some(x) = args.value { builder.add_value(x); }
14186    if let Some(x) = args.property { builder.add_property(x); }
14187    if let Some(x) = args.target_node_id { builder.add_target_node_id(x); }
14188    builder.finish()
14189  }
14190
14191
14192  #[inline]
14193  pub fn target_node_id(&self) -> &'a str {
14194    // Safety:
14195    // Created from valid Table for this object
14196    // which contains a valid value in this slot
14197    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(PropertyOverride::VT_TARGET_NODE_ID, None).unwrap()}
14198  }
14199  #[inline]
14200  pub fn property(&self) -> &'a str {
14201    // Safety:
14202    // Created from valid Table for this object
14203    // which contains a valid value in this slot
14204    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(PropertyOverride::VT_PROPERTY, None).unwrap()}
14205  }
14206  #[inline]
14207  pub fn value(&self) -> &'a str {
14208    // Safety:
14209    // Created from valid Table for this object
14210    // which contains a valid value in this slot
14211    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(PropertyOverride::VT_VALUE, None).unwrap()}
14212  }
14213}
14214
14215impl flatbuffers::Verifiable for PropertyOverride<'_> {
14216  #[inline]
14217  fn run_verifier(
14218    v: &mut flatbuffers::Verifier, pos: usize
14219  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
14220    use self::flatbuffers::Verifiable;
14221    v.visit_table(pos)?
14222     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("target_node_id", Self::VT_TARGET_NODE_ID, true)?
14223     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("property", Self::VT_PROPERTY, true)?
14224     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("value", Self::VT_VALUE, true)?
14225     .finish();
14226    Ok(())
14227  }
14228}
14229pub struct PropertyOverrideArgs<'a> {
14230    pub target_node_id: Option<flatbuffers::WIPOffset<&'a str>>,
14231    pub property: Option<flatbuffers::WIPOffset<&'a str>>,
14232    pub value: Option<flatbuffers::WIPOffset<&'a str>>,
14233}
14234impl<'a> Default for PropertyOverrideArgs<'a> {
14235  #[inline]
14236  fn default() -> Self {
14237    PropertyOverrideArgs {
14238      target_node_id: None, // required field
14239      property: None, // required field
14240      value: None, // required field
14241    }
14242  }
14243}
14244
14245pub struct PropertyOverrideBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
14246  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
14247  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
14248}
14249impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> PropertyOverrideBuilder<'a, 'b, A> {
14250  #[inline]
14251  pub fn add_target_node_id(&mut self, target_node_id: flatbuffers::WIPOffset<&'b  str>) {
14252    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PropertyOverride::VT_TARGET_NODE_ID, target_node_id);
14253  }
14254  #[inline]
14255  pub fn add_property(&mut self, property: flatbuffers::WIPOffset<&'b  str>) {
14256    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PropertyOverride::VT_PROPERTY, property);
14257  }
14258  #[inline]
14259  pub fn add_value(&mut self, value: flatbuffers::WIPOffset<&'b  str>) {
14260    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PropertyOverride::VT_VALUE, value);
14261  }
14262  #[inline]
14263  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> PropertyOverrideBuilder<'a, 'b, A> {
14264    let start = _fbb.start_table();
14265    PropertyOverrideBuilder {
14266      fbb_: _fbb,
14267      start_: start,
14268    }
14269  }
14270  #[inline]
14271  pub fn finish(self) -> flatbuffers::WIPOffset<PropertyOverride<'a>> {
14272    let o = self.fbb_.end_table(self.start_);
14273    self.fbb_.required(o, PropertyOverride::VT_TARGET_NODE_ID,"target_node_id");
14274    self.fbb_.required(o, PropertyOverride::VT_PROPERTY,"property");
14275    self.fbb_.required(o, PropertyOverride::VT_VALUE,"value");
14276    flatbuffers::WIPOffset::new(o.value())
14277  }
14278}
14279
14280impl core::fmt::Debug for PropertyOverride<'_> {
14281  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
14282    let mut ds = f.debug_struct("PropertyOverride");
14283      ds.field("target_node_id", &self.target_node_id());
14284      ds.field("property", &self.property());
14285      ds.field("value", &self.value());
14286      ds.finish()
14287  }
14288}
14289pub enum PersonalizationSlotOffset {}
14290#[derive(Copy, Clone, PartialEq)]
14291
14292pub struct PersonalizationSlot<'a> {
14293  pub _tab: flatbuffers::Table<'a>,
14294}
14295
14296impl<'a> flatbuffers::Follow<'a> for PersonalizationSlot<'a> {
14297  type Inner = PersonalizationSlot<'a>;
14298  #[inline]
14299  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
14300    Self { _tab: flatbuffers::Table::new(buf, loc) }
14301  }
14302}
14303
14304impl<'a> PersonalizationSlot<'a> {
14305  pub const VT_NODE_ID: flatbuffers::VOffsetT = 4;
14306  pub const VT_NAME: flatbuffers::VOffsetT = 6;
14307  pub const VT_VARIANTS: flatbuffers::VOffsetT = 8;
14308  pub const VT_DEFAULT_VARIANT_INDEX: flatbuffers::VOffsetT = 10;
14309
14310  #[inline]
14311  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
14312    PersonalizationSlot { _tab: table }
14313  }
14314  #[allow(unused_mut)]
14315  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
14316    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
14317    args: &'args PersonalizationSlotArgs<'args>
14318  ) -> flatbuffers::WIPOffset<PersonalizationSlot<'bldr>> {
14319    let mut builder = PersonalizationSlotBuilder::new(_fbb);
14320    builder.add_default_variant_index(args.default_variant_index);
14321    if let Some(x) = args.variants { builder.add_variants(x); }
14322    if let Some(x) = args.name { builder.add_name(x); }
14323    if let Some(x) = args.node_id { builder.add_node_id(x); }
14324    builder.finish()
14325  }
14326
14327
14328  #[inline]
14329  pub fn node_id(&self) -> &'a str {
14330    // Safety:
14331    // Created from valid Table for this object
14332    // which contains a valid value in this slot
14333    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(PersonalizationSlot::VT_NODE_ID, None).unwrap()}
14334  }
14335  #[inline]
14336  pub fn name(&self) -> Option<&'a str> {
14337    // Safety:
14338    // Created from valid Table for this object
14339    // which contains a valid value in this slot
14340    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(PersonalizationSlot::VT_NAME, None)}
14341  }
14342  #[inline]
14343  pub fn variants(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<PersonalizationVariant<'a>>> {
14344    // Safety:
14345    // Created from valid Table for this object
14346    // which contains a valid value in this slot
14347    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<PersonalizationVariant>>>>(PersonalizationSlot::VT_VARIANTS, None).unwrap()}
14348  }
14349  /// Fallback: what to show if no variant matches.
14350  #[inline]
14351  pub fn default_variant_index(&self) -> i32 {
14352    // Safety:
14353    // Created from valid Table for this object
14354    // which contains a valid value in this slot
14355    unsafe { self._tab.get::<i32>(PersonalizationSlot::VT_DEFAULT_VARIANT_INDEX, Some(0)).unwrap()}
14356  }
14357}
14358
14359impl flatbuffers::Verifiable for PersonalizationSlot<'_> {
14360  #[inline]
14361  fn run_verifier(
14362    v: &mut flatbuffers::Verifier, pos: usize
14363  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
14364    use self::flatbuffers::Verifiable;
14365    v.visit_table(pos)?
14366     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("node_id", Self::VT_NODE_ID, true)?
14367     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
14368     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<PersonalizationVariant>>>>("variants", Self::VT_VARIANTS, true)?
14369     .visit_field::<i32>("default_variant_index", Self::VT_DEFAULT_VARIANT_INDEX, false)?
14370     .finish();
14371    Ok(())
14372  }
14373}
14374pub struct PersonalizationSlotArgs<'a> {
14375    pub node_id: Option<flatbuffers::WIPOffset<&'a str>>,
14376    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
14377    pub variants: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<PersonalizationVariant<'a>>>>>,
14378    pub default_variant_index: i32,
14379}
14380impl<'a> Default for PersonalizationSlotArgs<'a> {
14381  #[inline]
14382  fn default() -> Self {
14383    PersonalizationSlotArgs {
14384      node_id: None, // required field
14385      name: None,
14386      variants: None, // required field
14387      default_variant_index: 0,
14388    }
14389  }
14390}
14391
14392pub struct PersonalizationSlotBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
14393  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
14394  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
14395}
14396impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> PersonalizationSlotBuilder<'a, 'b, A> {
14397  #[inline]
14398  pub fn add_node_id(&mut self, node_id: flatbuffers::WIPOffset<&'b  str>) {
14399    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PersonalizationSlot::VT_NODE_ID, node_id);
14400  }
14401  #[inline]
14402  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
14403    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PersonalizationSlot::VT_NAME, name);
14404  }
14405  #[inline]
14406  pub fn add_variants(&mut self, variants: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<PersonalizationVariant<'b >>>>) {
14407    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PersonalizationSlot::VT_VARIANTS, variants);
14408  }
14409  #[inline]
14410  pub fn add_default_variant_index(&mut self, default_variant_index: i32) {
14411    self.fbb_.push_slot::<i32>(PersonalizationSlot::VT_DEFAULT_VARIANT_INDEX, default_variant_index, 0);
14412  }
14413  #[inline]
14414  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> PersonalizationSlotBuilder<'a, 'b, A> {
14415    let start = _fbb.start_table();
14416    PersonalizationSlotBuilder {
14417      fbb_: _fbb,
14418      start_: start,
14419    }
14420  }
14421  #[inline]
14422  pub fn finish(self) -> flatbuffers::WIPOffset<PersonalizationSlot<'a>> {
14423    let o = self.fbb_.end_table(self.start_);
14424    self.fbb_.required(o, PersonalizationSlot::VT_NODE_ID,"node_id");
14425    self.fbb_.required(o, PersonalizationSlot::VT_VARIANTS,"variants");
14426    flatbuffers::WIPOffset::new(o.value())
14427  }
14428}
14429
14430impl core::fmt::Debug for PersonalizationSlot<'_> {
14431  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
14432    let mut ds = f.debug_struct("PersonalizationSlot");
14433      ds.field("node_id", &self.node_id());
14434      ds.field("name", &self.name());
14435      ds.field("variants", &self.variants());
14436      ds.field("default_variant_index", &self.default_variant_index());
14437      ds.finish()
14438  }
14439}
14440pub enum BreakpointOffset {}
14441#[derive(Copy, Clone, PartialEq)]
14442
14443pub struct Breakpoint<'a> {
14444  pub _tab: flatbuffers::Table<'a>,
14445}
14446
14447impl<'a> flatbuffers::Follow<'a> for Breakpoint<'a> {
14448  type Inner = Breakpoint<'a>;
14449  #[inline]
14450  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
14451    Self { _tab: flatbuffers::Table::new(buf, loc) }
14452  }
14453}
14454
14455impl<'a> Breakpoint<'a> {
14456  pub const VT_NAME: flatbuffers::VOffsetT = 4;
14457  pub const VT_MIN_WIDTH: flatbuffers::VOffsetT = 6;
14458
14459  #[inline]
14460  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
14461    Breakpoint { _tab: table }
14462  }
14463  #[allow(unused_mut)]
14464  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
14465    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
14466    args: &'args BreakpointArgs<'args>
14467  ) -> flatbuffers::WIPOffset<Breakpoint<'bldr>> {
14468    let mut builder = BreakpointBuilder::new(_fbb);
14469    if let Some(x) = args.min_width { builder.add_min_width(x); }
14470    if let Some(x) = args.name { builder.add_name(x); }
14471    builder.finish()
14472  }
14473
14474
14475  /// Breakpoint name (e.g., "sm", "md", "lg", "xl", "2xl").
14476  #[inline]
14477  pub fn name(&self) -> &'a str {
14478    // Safety:
14479    // Created from valid Table for this object
14480    // which contains a valid value in this slot
14481    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Breakpoint::VT_NAME, None).unwrap()}
14482  }
14483  /// Minimum viewport width for this breakpoint.
14484  #[inline]
14485  pub fn min_width(&self) -> Length<'a> {
14486    // Safety:
14487    // Created from valid Table for this object
14488    // which contains a valid value in this slot
14489    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(Breakpoint::VT_MIN_WIDTH, None).unwrap()}
14490  }
14491}
14492
14493impl flatbuffers::Verifiable for Breakpoint<'_> {
14494  #[inline]
14495  fn run_verifier(
14496    v: &mut flatbuffers::Verifier, pos: usize
14497  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
14498    use self::flatbuffers::Verifiable;
14499    v.visit_table(pos)?
14500     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
14501     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("min_width", Self::VT_MIN_WIDTH, true)?
14502     .finish();
14503    Ok(())
14504  }
14505}
14506pub struct BreakpointArgs<'a> {
14507    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
14508    pub min_width: Option<flatbuffers::WIPOffset<Length<'a>>>,
14509}
14510impl<'a> Default for BreakpointArgs<'a> {
14511  #[inline]
14512  fn default() -> Self {
14513    BreakpointArgs {
14514      name: None, // required field
14515      min_width: None, // required field
14516    }
14517  }
14518}
14519
14520pub struct BreakpointBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
14521  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
14522  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
14523}
14524impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> BreakpointBuilder<'a, 'b, A> {
14525  #[inline]
14526  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
14527    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Breakpoint::VT_NAME, name);
14528  }
14529  #[inline]
14530  pub fn add_min_width(&mut self, min_width: flatbuffers::WIPOffset<Length<'b >>) {
14531    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(Breakpoint::VT_MIN_WIDTH, min_width);
14532  }
14533  #[inline]
14534  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> BreakpointBuilder<'a, 'b, A> {
14535    let start = _fbb.start_table();
14536    BreakpointBuilder {
14537      fbb_: _fbb,
14538      start_: start,
14539    }
14540  }
14541  #[inline]
14542  pub fn finish(self) -> flatbuffers::WIPOffset<Breakpoint<'a>> {
14543    let o = self.fbb_.end_table(self.start_);
14544    self.fbb_.required(o, Breakpoint::VT_NAME,"name");
14545    self.fbb_.required(o, Breakpoint::VT_MIN_WIDTH,"min_width");
14546    flatbuffers::WIPOffset::new(o.value())
14547  }
14548}
14549
14550impl core::fmt::Debug for Breakpoint<'_> {
14551  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
14552    let mut ds = f.debug_struct("Breakpoint");
14553      ds.field("name", &self.name());
14554      ds.field("min_width", &self.min_width());
14555      ds.finish()
14556  }
14557}
14558pub enum ResponsiveOverrideOffset {}
14559#[derive(Copy, Clone, PartialEq)]
14560
14561pub struct ResponsiveOverride<'a> {
14562  pub _tab: flatbuffers::Table<'a>,
14563}
14564
14565impl<'a> flatbuffers::Follow<'a> for ResponsiveOverride<'a> {
14566  type Inner = ResponsiveOverride<'a>;
14567  #[inline]
14568  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
14569    Self { _tab: flatbuffers::Table::new(buf, loc) }
14570  }
14571}
14572
14573impl<'a> ResponsiveOverride<'a> {
14574  pub const VT_BREAKPOINT_NAME: flatbuffers::VOffsetT = 4;
14575  pub const VT_OVERRIDES: flatbuffers::VOffsetT = 6;
14576
14577  #[inline]
14578  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
14579    ResponsiveOverride { _tab: table }
14580  }
14581  #[allow(unused_mut)]
14582  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
14583    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
14584    args: &'args ResponsiveOverrideArgs<'args>
14585  ) -> flatbuffers::WIPOffset<ResponsiveOverride<'bldr>> {
14586    let mut builder = ResponsiveOverrideBuilder::new(_fbb);
14587    if let Some(x) = args.overrides { builder.add_overrides(x); }
14588    if let Some(x) = args.breakpoint_name { builder.add_breakpoint_name(x); }
14589    builder.finish()
14590  }
14591
14592
14593  /// Which breakpoint this override applies at.
14594  #[inline]
14595  pub fn breakpoint_name(&self) -> &'a str {
14596    // Safety:
14597    // Created from valid Table for this object
14598    // which contains a valid value in this slot
14599    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ResponsiveOverride::VT_BREAKPOINT_NAME, None).unwrap()}
14600  }
14601  /// Property overrides at this breakpoint.
14602  #[inline]
14603  pub fn overrides(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<PropertyOverride<'a>>> {
14604    // Safety:
14605    // Created from valid Table for this object
14606    // which contains a valid value in this slot
14607    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<PropertyOverride>>>>(ResponsiveOverride::VT_OVERRIDES, None).unwrap()}
14608  }
14609}
14610
14611impl flatbuffers::Verifiable for ResponsiveOverride<'_> {
14612  #[inline]
14613  fn run_verifier(
14614    v: &mut flatbuffers::Verifier, pos: usize
14615  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
14616    use self::flatbuffers::Verifiable;
14617    v.visit_table(pos)?
14618     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("breakpoint_name", Self::VT_BREAKPOINT_NAME, true)?
14619     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<PropertyOverride>>>>("overrides", Self::VT_OVERRIDES, true)?
14620     .finish();
14621    Ok(())
14622  }
14623}
14624pub struct ResponsiveOverrideArgs<'a> {
14625    pub breakpoint_name: Option<flatbuffers::WIPOffset<&'a str>>,
14626    pub overrides: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<PropertyOverride<'a>>>>>,
14627}
14628impl<'a> Default for ResponsiveOverrideArgs<'a> {
14629  #[inline]
14630  fn default() -> Self {
14631    ResponsiveOverrideArgs {
14632      breakpoint_name: None, // required field
14633      overrides: None, // required field
14634    }
14635  }
14636}
14637
14638pub struct ResponsiveOverrideBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
14639  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
14640  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
14641}
14642impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ResponsiveOverrideBuilder<'a, 'b, A> {
14643  #[inline]
14644  pub fn add_breakpoint_name(&mut self, breakpoint_name: flatbuffers::WIPOffset<&'b  str>) {
14645    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ResponsiveOverride::VT_BREAKPOINT_NAME, breakpoint_name);
14646  }
14647  #[inline]
14648  pub fn add_overrides(&mut self, overrides: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<PropertyOverride<'b >>>>) {
14649    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ResponsiveOverride::VT_OVERRIDES, overrides);
14650  }
14651  #[inline]
14652  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ResponsiveOverrideBuilder<'a, 'b, A> {
14653    let start = _fbb.start_table();
14654    ResponsiveOverrideBuilder {
14655      fbb_: _fbb,
14656      start_: start,
14657    }
14658  }
14659  #[inline]
14660  pub fn finish(self) -> flatbuffers::WIPOffset<ResponsiveOverride<'a>> {
14661    let o = self.fbb_.end_table(self.start_);
14662    self.fbb_.required(o, ResponsiveOverride::VT_BREAKPOINT_NAME,"breakpoint_name");
14663    self.fbb_.required(o, ResponsiveOverride::VT_OVERRIDES,"overrides");
14664    flatbuffers::WIPOffset::new(o.value())
14665  }
14666}
14667
14668impl core::fmt::Debug for ResponsiveOverride<'_> {
14669  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
14670    let mut ds = f.debug_struct("ResponsiveOverride");
14671      ds.field("breakpoint_name", &self.breakpoint_name());
14672      ds.field("overrides", &self.overrides());
14673      ds.finish()
14674  }
14675}
14676pub enum ResponsiveRuleOffset {}
14677#[derive(Copy, Clone, PartialEq)]
14678
14679pub struct ResponsiveRule<'a> {
14680  pub _tab: flatbuffers::Table<'a>,
14681}
14682
14683impl<'a> flatbuffers::Follow<'a> for ResponsiveRule<'a> {
14684  type Inner = ResponsiveRule<'a>;
14685  #[inline]
14686  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
14687    Self { _tab: flatbuffers::Table::new(buf, loc) }
14688  }
14689}
14690
14691impl<'a> ResponsiveRule<'a> {
14692  pub const VT_NODE_ID: flatbuffers::VOffsetT = 4;
14693  pub const VT_BREAKPOINTS: flatbuffers::VOffsetT = 6;
14694  pub const VT_RESPONSIVE_OVERRIDES: flatbuffers::VOffsetT = 8;
14695
14696  #[inline]
14697  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
14698    ResponsiveRule { _tab: table }
14699  }
14700  #[allow(unused_mut)]
14701  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
14702    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
14703    args: &'args ResponsiveRuleArgs<'args>
14704  ) -> flatbuffers::WIPOffset<ResponsiveRule<'bldr>> {
14705    let mut builder = ResponsiveRuleBuilder::new(_fbb);
14706    if let Some(x) = args.responsive_overrides { builder.add_responsive_overrides(x); }
14707    if let Some(x) = args.breakpoints { builder.add_breakpoints(x); }
14708    if let Some(x) = args.node_id { builder.add_node_id(x); }
14709    builder.finish()
14710  }
14711
14712
14713  #[inline]
14714  pub fn node_id(&self) -> &'a str {
14715    // Safety:
14716    // Created from valid Table for this object
14717    // which contains a valid value in this slot
14718    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ResponsiveRule::VT_NODE_ID, None).unwrap()}
14719  }
14720  /// Breakpoint definitions (shared across the rule).
14721  #[inline]
14722  pub fn breakpoints(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Breakpoint<'a>>> {
14723    // Safety:
14724    // Created from valid Table for this object
14725    // which contains a valid value in this slot
14726    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Breakpoint>>>>(ResponsiveRule::VT_BREAKPOINTS, None).unwrap()}
14727  }
14728  /// Per-breakpoint property overrides.
14729  #[inline]
14730  pub fn responsive_overrides(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ResponsiveOverride<'a>>> {
14731    // Safety:
14732    // Created from valid Table for this object
14733    // which contains a valid value in this slot
14734    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ResponsiveOverride>>>>(ResponsiveRule::VT_RESPONSIVE_OVERRIDES, None).unwrap()}
14735  }
14736}
14737
14738impl flatbuffers::Verifiable for ResponsiveRule<'_> {
14739  #[inline]
14740  fn run_verifier(
14741    v: &mut flatbuffers::Verifier, pos: usize
14742  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
14743    use self::flatbuffers::Verifiable;
14744    v.visit_table(pos)?
14745     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("node_id", Self::VT_NODE_ID, true)?
14746     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Breakpoint>>>>("breakpoints", Self::VT_BREAKPOINTS, true)?
14747     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<ResponsiveOverride>>>>("responsive_overrides", Self::VT_RESPONSIVE_OVERRIDES, true)?
14748     .finish();
14749    Ok(())
14750  }
14751}
14752pub struct ResponsiveRuleArgs<'a> {
14753    pub node_id: Option<flatbuffers::WIPOffset<&'a str>>,
14754    pub breakpoints: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Breakpoint<'a>>>>>,
14755    pub responsive_overrides: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ResponsiveOverride<'a>>>>>,
14756}
14757impl<'a> Default for ResponsiveRuleArgs<'a> {
14758  #[inline]
14759  fn default() -> Self {
14760    ResponsiveRuleArgs {
14761      node_id: None, // required field
14762      breakpoints: None, // required field
14763      responsive_overrides: None, // required field
14764    }
14765  }
14766}
14767
14768pub struct ResponsiveRuleBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
14769  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
14770  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
14771}
14772impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ResponsiveRuleBuilder<'a, 'b, A> {
14773  #[inline]
14774  pub fn add_node_id(&mut self, node_id: flatbuffers::WIPOffset<&'b  str>) {
14775    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ResponsiveRule::VT_NODE_ID, node_id);
14776  }
14777  #[inline]
14778  pub fn add_breakpoints(&mut self, breakpoints: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<Breakpoint<'b >>>>) {
14779    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ResponsiveRule::VT_BREAKPOINTS, breakpoints);
14780  }
14781  #[inline]
14782  pub fn add_responsive_overrides(&mut self, responsive_overrides: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<ResponsiveOverride<'b >>>>) {
14783    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ResponsiveRule::VT_RESPONSIVE_OVERRIDES, responsive_overrides);
14784  }
14785  #[inline]
14786  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ResponsiveRuleBuilder<'a, 'b, A> {
14787    let start = _fbb.start_table();
14788    ResponsiveRuleBuilder {
14789      fbb_: _fbb,
14790      start_: start,
14791    }
14792  }
14793  #[inline]
14794  pub fn finish(self) -> flatbuffers::WIPOffset<ResponsiveRule<'a>> {
14795    let o = self.fbb_.end_table(self.start_);
14796    self.fbb_.required(o, ResponsiveRule::VT_NODE_ID,"node_id");
14797    self.fbb_.required(o, ResponsiveRule::VT_BREAKPOINTS,"breakpoints");
14798    self.fbb_.required(o, ResponsiveRule::VT_RESPONSIVE_OVERRIDES,"responsive_overrides");
14799    flatbuffers::WIPOffset::new(o.value())
14800  }
14801}
14802
14803impl core::fmt::Debug for ResponsiveRule<'_> {
14804  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
14805    let mut ds = f.debug_struct("ResponsiveRule");
14806      ds.field("node_id", &self.node_id());
14807      ds.field("breakpoints", &self.breakpoints());
14808      ds.field("responsive_overrides", &self.responsive_overrides());
14809      ds.finish()
14810  }
14811}
14812pub enum RetryConfigOffset {}
14813#[derive(Copy, Clone, PartialEq)]
14814
14815pub struct RetryConfig<'a> {
14816  pub _tab: flatbuffers::Table<'a>,
14817}
14818
14819impl<'a> flatbuffers::Follow<'a> for RetryConfig<'a> {
14820  type Inner = RetryConfig<'a>;
14821  #[inline]
14822  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
14823    Self { _tab: flatbuffers::Table::new(buf, loc) }
14824  }
14825}
14826
14827impl<'a> RetryConfig<'a> {
14828  pub const VT_MAX_ATTEMPTS: flatbuffers::VOffsetT = 4;
14829  pub const VT_BACKOFF: flatbuffers::VOffsetT = 6;
14830
14831  #[inline]
14832  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
14833    RetryConfig { _tab: table }
14834  }
14835  #[allow(unused_mut)]
14836  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
14837    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
14838    args: &'args RetryConfigArgs<'args>
14839  ) -> flatbuffers::WIPOffset<RetryConfig<'bldr>> {
14840    let mut builder = RetryConfigBuilder::new(_fbb);
14841    if let Some(x) = args.backoff { builder.add_backoff(x); }
14842    builder.add_max_attempts(args.max_attempts);
14843    builder.finish()
14844  }
14845
14846
14847  #[inline]
14848  pub fn max_attempts(&self) -> i32 {
14849    // Safety:
14850    // Created from valid Table for this object
14851    // which contains a valid value in this slot
14852    unsafe { self._tab.get::<i32>(RetryConfig::VT_MAX_ATTEMPTS, Some(3)).unwrap()}
14853  }
14854  /// Backoff strategy: "exponential" or "linear".
14855  #[inline]
14856  pub fn backoff(&self) -> Option<&'a str> {
14857    // Safety:
14858    // Created from valid Table for this object
14859    // which contains a valid value in this slot
14860    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(RetryConfig::VT_BACKOFF, None)}
14861  }
14862}
14863
14864impl flatbuffers::Verifiable for RetryConfig<'_> {
14865  #[inline]
14866  fn run_verifier(
14867    v: &mut flatbuffers::Verifier, pos: usize
14868  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
14869    use self::flatbuffers::Verifiable;
14870    v.visit_table(pos)?
14871     .visit_field::<i32>("max_attempts", Self::VT_MAX_ATTEMPTS, false)?
14872     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("backoff", Self::VT_BACKOFF, false)?
14873     .finish();
14874    Ok(())
14875  }
14876}
14877pub struct RetryConfigArgs<'a> {
14878    pub max_attempts: i32,
14879    pub backoff: Option<flatbuffers::WIPOffset<&'a str>>,
14880}
14881impl<'a> Default for RetryConfigArgs<'a> {
14882  #[inline]
14883  fn default() -> Self {
14884    RetryConfigArgs {
14885      max_attempts: 3,
14886      backoff: None,
14887    }
14888  }
14889}
14890
14891pub struct RetryConfigBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
14892  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
14893  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
14894}
14895impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RetryConfigBuilder<'a, 'b, A> {
14896  #[inline]
14897  pub fn add_max_attempts(&mut self, max_attempts: i32) {
14898    self.fbb_.push_slot::<i32>(RetryConfig::VT_MAX_ATTEMPTS, max_attempts, 3);
14899  }
14900  #[inline]
14901  pub fn add_backoff(&mut self, backoff: flatbuffers::WIPOffset<&'b  str>) {
14902    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(RetryConfig::VT_BACKOFF, backoff);
14903  }
14904  #[inline]
14905  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> RetryConfigBuilder<'a, 'b, A> {
14906    let start = _fbb.start_table();
14907    RetryConfigBuilder {
14908      fbb_: _fbb,
14909      start_: start,
14910    }
14911  }
14912  #[inline]
14913  pub fn finish(self) -> flatbuffers::WIPOffset<RetryConfig<'a>> {
14914    let o = self.fbb_.end_table(self.start_);
14915    flatbuffers::WIPOffset::new(o.value())
14916  }
14917}
14918
14919impl core::fmt::Debug for RetryConfig<'_> {
14920  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
14921    let mut ds = f.debug_struct("RetryConfig");
14922      ds.field("max_attempts", &self.max_attempts());
14923      ds.field("backoff", &self.backoff());
14924      ds.finish()
14925  }
14926}
14927pub enum OptimisticConfigOffset {}
14928#[derive(Copy, Clone, PartialEq)]
14929
14930pub struct OptimisticConfig<'a> {
14931  pub _tab: flatbuffers::Table<'a>,
14932}
14933
14934impl<'a> flatbuffers::Follow<'a> for OptimisticConfig<'a> {
14935  type Inner = OptimisticConfig<'a>;
14936  #[inline]
14937  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
14938    Self { _tab: flatbuffers::Table::new(buf, loc) }
14939  }
14940}
14941
14942impl<'a> OptimisticConfig<'a> {
14943  pub const VT_STRATEGY: flatbuffers::VOffsetT = 4;
14944  pub const VT_TARGET_DATA_NODE_ID: flatbuffers::VOffsetT = 6;
14945  pub const VT_ROLLBACK: flatbuffers::VOffsetT = 8;
14946
14947  #[inline]
14948  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
14949    OptimisticConfig { _tab: table }
14950  }
14951  #[allow(unused_mut)]
14952  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
14953    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
14954    args: &'args OptimisticConfigArgs<'args>
14955  ) -> flatbuffers::WIPOffset<OptimisticConfig<'bldr>> {
14956    let mut builder = OptimisticConfigBuilder::new(_fbb);
14957    if let Some(x) = args.target_data_node_id { builder.add_target_data_node_id(x); }
14958    builder.add_rollback(args.rollback);
14959    builder.add_strategy(args.strategy);
14960    builder.finish()
14961  }
14962
14963
14964  #[inline]
14965  pub fn strategy(&self) -> OptimisticStrategy {
14966    // Safety:
14967    // Created from valid Table for this object
14968    // which contains a valid value in this slot
14969    unsafe { self._tab.get::<OptimisticStrategy>(OptimisticConfig::VT_STRATEGY, Some(OptimisticStrategy::None)).unwrap()}
14970  }
14971  /// Which DataNode to optimistically update.
14972  #[inline]
14973  pub fn target_data_node_id(&self) -> Option<&'a str> {
14974    // Safety:
14975    // Created from valid Table for this object
14976    // which contains a valid value in this slot
14977    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(OptimisticConfig::VT_TARGET_DATA_NODE_ID, None)}
14978  }
14979  #[inline]
14980  pub fn rollback(&self) -> RollbackStrategy {
14981    // Safety:
14982    // Created from valid Table for this object
14983    // which contains a valid value in this slot
14984    unsafe { self._tab.get::<RollbackStrategy>(OptimisticConfig::VT_ROLLBACK, Some(RollbackStrategy::Revert)).unwrap()}
14985  }
14986}
14987
14988impl flatbuffers::Verifiable for OptimisticConfig<'_> {
14989  #[inline]
14990  fn run_verifier(
14991    v: &mut flatbuffers::Verifier, pos: usize
14992  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
14993    use self::flatbuffers::Verifiable;
14994    v.visit_table(pos)?
14995     .visit_field::<OptimisticStrategy>("strategy", Self::VT_STRATEGY, false)?
14996     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("target_data_node_id", Self::VT_TARGET_DATA_NODE_ID, false)?
14997     .visit_field::<RollbackStrategy>("rollback", Self::VT_ROLLBACK, false)?
14998     .finish();
14999    Ok(())
15000  }
15001}
15002pub struct OptimisticConfigArgs<'a> {
15003    pub strategy: OptimisticStrategy,
15004    pub target_data_node_id: Option<flatbuffers::WIPOffset<&'a str>>,
15005    pub rollback: RollbackStrategy,
15006}
15007impl<'a> Default for OptimisticConfigArgs<'a> {
15008  #[inline]
15009  fn default() -> Self {
15010    OptimisticConfigArgs {
15011      strategy: OptimisticStrategy::None,
15012      target_data_node_id: None,
15013      rollback: RollbackStrategy::Revert,
15014    }
15015  }
15016}
15017
15018pub struct OptimisticConfigBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
15019  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
15020  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
15021}
15022impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> OptimisticConfigBuilder<'a, 'b, A> {
15023  #[inline]
15024  pub fn add_strategy(&mut self, strategy: OptimisticStrategy) {
15025    self.fbb_.push_slot::<OptimisticStrategy>(OptimisticConfig::VT_STRATEGY, strategy, OptimisticStrategy::None);
15026  }
15027  #[inline]
15028  pub fn add_target_data_node_id(&mut self, target_data_node_id: flatbuffers::WIPOffset<&'b  str>) {
15029    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(OptimisticConfig::VT_TARGET_DATA_NODE_ID, target_data_node_id);
15030  }
15031  #[inline]
15032  pub fn add_rollback(&mut self, rollback: RollbackStrategy) {
15033    self.fbb_.push_slot::<RollbackStrategy>(OptimisticConfig::VT_ROLLBACK, rollback, RollbackStrategy::Revert);
15034  }
15035  #[inline]
15036  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> OptimisticConfigBuilder<'a, 'b, A> {
15037    let start = _fbb.start_table();
15038    OptimisticConfigBuilder {
15039      fbb_: _fbb,
15040      start_: start,
15041    }
15042  }
15043  #[inline]
15044  pub fn finish(self) -> flatbuffers::WIPOffset<OptimisticConfig<'a>> {
15045    let o = self.fbb_.end_table(self.start_);
15046    flatbuffers::WIPOffset::new(o.value())
15047  }
15048}
15049
15050impl core::fmt::Debug for OptimisticConfig<'_> {
15051  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
15052    let mut ds = f.debug_struct("OptimisticConfig");
15053      ds.field("strategy", &self.strategy());
15054      ds.field("target_data_node_id", &self.target_data_node_id());
15055      ds.field("rollback", &self.rollback());
15056      ds.finish()
15057  }
15058}
15059pub enum ErrorHandlingOffset {}
15060#[derive(Copy, Clone, PartialEq)]
15061
15062pub struct ErrorHandling<'a> {
15063  pub _tab: flatbuffers::Table<'a>,
15064}
15065
15066impl<'a> flatbuffers::Follow<'a> for ErrorHandling<'a> {
15067  type Inner = ErrorHandling<'a>;
15068  #[inline]
15069  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
15070    Self { _tab: flatbuffers::Table::new(buf, loc) }
15071  }
15072}
15073
15074impl<'a> ErrorHandling<'a> {
15075  pub const VT_RETRY: flatbuffers::VOffsetT = 4;
15076  pub const VT_FALLBACK: flatbuffers::VOffsetT = 6;
15077  pub const VT_REDIRECT_PATH: flatbuffers::VOffsetT = 8;
15078
15079  #[inline]
15080  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
15081    ErrorHandling { _tab: table }
15082  }
15083  #[allow(unused_mut)]
15084  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
15085    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
15086    args: &'args ErrorHandlingArgs<'args>
15087  ) -> flatbuffers::WIPOffset<ErrorHandling<'bldr>> {
15088    let mut builder = ErrorHandlingBuilder::new(_fbb);
15089    if let Some(x) = args.redirect_path { builder.add_redirect_path(x); }
15090    if let Some(x) = args.retry { builder.add_retry(x); }
15091    builder.add_fallback(args.fallback);
15092    builder.finish()
15093  }
15094
15095
15096  #[inline]
15097  pub fn retry(&self) -> Option<RetryConfig<'a>> {
15098    // Safety:
15099    // Created from valid Table for this object
15100    // which contains a valid value in this slot
15101    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<RetryConfig>>(ErrorHandling::VT_RETRY, None)}
15102  }
15103  #[inline]
15104  pub fn fallback(&self) -> ErrorFallback {
15105    // Safety:
15106    // Created from valid Table for this object
15107    // which contains a valid value in this slot
15108    unsafe { self._tab.get::<ErrorFallback>(ErrorHandling::VT_FALLBACK, Some(ErrorFallback::ShowToast)).unwrap()}
15109  }
15110  /// Route to redirect to on error (for Redirect fallback).
15111  #[inline]
15112  pub fn redirect_path(&self) -> Option<&'a str> {
15113    // Safety:
15114    // Created from valid Table for this object
15115    // which contains a valid value in this slot
15116    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ErrorHandling::VT_REDIRECT_PATH, None)}
15117  }
15118}
15119
15120impl flatbuffers::Verifiable for ErrorHandling<'_> {
15121  #[inline]
15122  fn run_verifier(
15123    v: &mut flatbuffers::Verifier, pos: usize
15124  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
15125    use self::flatbuffers::Verifiable;
15126    v.visit_table(pos)?
15127     .visit_field::<flatbuffers::ForwardsUOffset<RetryConfig>>("retry", Self::VT_RETRY, false)?
15128     .visit_field::<ErrorFallback>("fallback", Self::VT_FALLBACK, false)?
15129     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("redirect_path", Self::VT_REDIRECT_PATH, false)?
15130     .finish();
15131    Ok(())
15132  }
15133}
15134pub struct ErrorHandlingArgs<'a> {
15135    pub retry: Option<flatbuffers::WIPOffset<RetryConfig<'a>>>,
15136    pub fallback: ErrorFallback,
15137    pub redirect_path: Option<flatbuffers::WIPOffset<&'a str>>,
15138}
15139impl<'a> Default for ErrorHandlingArgs<'a> {
15140  #[inline]
15141  fn default() -> Self {
15142    ErrorHandlingArgs {
15143      retry: None,
15144      fallback: ErrorFallback::ShowToast,
15145      redirect_path: None,
15146    }
15147  }
15148}
15149
15150pub struct ErrorHandlingBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
15151  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
15152  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
15153}
15154impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ErrorHandlingBuilder<'a, 'b, A> {
15155  #[inline]
15156  pub fn add_retry(&mut self, retry: flatbuffers::WIPOffset<RetryConfig<'b >>) {
15157    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<RetryConfig>>(ErrorHandling::VT_RETRY, retry);
15158  }
15159  #[inline]
15160  pub fn add_fallback(&mut self, fallback: ErrorFallback) {
15161    self.fbb_.push_slot::<ErrorFallback>(ErrorHandling::VT_FALLBACK, fallback, ErrorFallback::ShowToast);
15162  }
15163  #[inline]
15164  pub fn add_redirect_path(&mut self, redirect_path: flatbuffers::WIPOffset<&'b  str>) {
15165    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ErrorHandling::VT_REDIRECT_PATH, redirect_path);
15166  }
15167  #[inline]
15168  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ErrorHandlingBuilder<'a, 'b, A> {
15169    let start = _fbb.start_table();
15170    ErrorHandlingBuilder {
15171      fbb_: _fbb,
15172      start_: start,
15173    }
15174  }
15175  #[inline]
15176  pub fn finish(self) -> flatbuffers::WIPOffset<ErrorHandling<'a>> {
15177    let o = self.fbb_.end_table(self.start_);
15178    flatbuffers::WIPOffset::new(o.value())
15179  }
15180}
15181
15182impl core::fmt::Debug for ErrorHandling<'_> {
15183  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
15184    let mut ds = f.debug_struct("ErrorHandling");
15185      ds.field("retry", &self.retry());
15186      ds.field("fallback", &self.fallback());
15187      ds.field("redirect_path", &self.redirect_path());
15188      ds.finish()
15189  }
15190}
15191pub enum ActionNodeOffset {}
15192#[derive(Copy, Clone, PartialEq)]
15193
15194pub struct ActionNode<'a> {
15195  pub _tab: flatbuffers::Table<'a>,
15196}
15197
15198impl<'a> flatbuffers::Follow<'a> for ActionNode<'a> {
15199  type Inner = ActionNode<'a>;
15200  #[inline]
15201  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
15202    Self { _tab: flatbuffers::Table::new(buf, loc) }
15203  }
15204}
15205
15206impl<'a> ActionNode<'a> {
15207  pub const VT_NODE_ID: flatbuffers::VOffsetT = 4;
15208  pub const VT_NAME: flatbuffers::VOffsetT = 6;
15209  pub const VT_SOURCE: flatbuffers::VOffsetT = 8;
15210  pub const VT_METHOD: flatbuffers::VOffsetT = 10;
15211  pub const VT_INPUT_TYPE: flatbuffers::VOffsetT = 12;
15212  pub const VT_OUTPUT_TYPE: flatbuffers::VOffsetT = 14;
15213  pub const VT_OPTIMISTIC: flatbuffers::VOffsetT = 16;
15214  pub const VT_INVALIDATES: flatbuffers::VOffsetT = 18;
15215  pub const VT_INVALIDATE_TAGS: flatbuffers::VOffsetT = 20;
15216  pub const VT_ERROR_HANDLING: flatbuffers::VOffsetT = 22;
15217  pub const VT_AUTH_REQUIRED: flatbuffers::VOffsetT = 24;
15218  pub const VT_REQUIRED_ROLES: flatbuffers::VOffsetT = 26;
15219  pub const VT_CSRF_PROTECTED: flatbuffers::VOffsetT = 28;
15220  pub const VT_IDEMPOTENT: flatbuffers::VOffsetT = 30;
15221
15222  #[inline]
15223  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
15224    ActionNode { _tab: table }
15225  }
15226  #[allow(unused_mut)]
15227  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
15228    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
15229    args: &'args ActionNodeArgs<'args>
15230  ) -> flatbuffers::WIPOffset<ActionNode<'bldr>> {
15231    let mut builder = ActionNodeBuilder::new(_fbb);
15232    if let Some(x) = args.required_roles { builder.add_required_roles(x); }
15233    if let Some(x) = args.error_handling { builder.add_error_handling(x); }
15234    if let Some(x) = args.invalidate_tags { builder.add_invalidate_tags(x); }
15235    if let Some(x) = args.invalidates { builder.add_invalidates(x); }
15236    if let Some(x) = args.optimistic { builder.add_optimistic(x); }
15237    if let Some(x) = args.output_type { builder.add_output_type(x); }
15238    if let Some(x) = args.input_type { builder.add_input_type(x); }
15239    if let Some(x) = args.source { builder.add_source(x); }
15240    if let Some(x) = args.name { builder.add_name(x); }
15241    if let Some(x) = args.node_id { builder.add_node_id(x); }
15242    builder.add_idempotent(args.idempotent);
15243    builder.add_csrf_protected(args.csrf_protected);
15244    builder.add_auth_required(args.auth_required);
15245    builder.add_method(args.method);
15246    builder.finish()
15247  }
15248
15249
15250  #[inline]
15251  pub fn node_id(&self) -> &'a str {
15252    // Safety:
15253    // Created from valid Table for this object
15254    // which contains a valid value in this slot
15255    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ActionNode::VT_NODE_ID, None).unwrap()}
15256  }
15257  #[inline]
15258  pub fn name(&self) -> Option<&'a str> {
15259    // Safety:
15260    // Created from valid Table for this object
15261    // which contains a valid value in this slot
15262    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ActionNode::VT_NAME, None)}
15263  }
15264  /// Endpoint configuration (reuses DataSource from state.fbs).
15265  #[inline]
15266  pub fn source(&self) -> DataSource<'a> {
15267    // Safety:
15268    // Created from valid Table for this object
15269    // which contains a valid value in this slot
15270    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<DataSource>>(ActionNode::VT_SOURCE, None).unwrap()}
15271  }
15272  #[inline]
15273  pub fn method(&self) -> HttpMethod {
15274    // Safety:
15275    // Created from valid Table for this object
15276    // which contains a valid value in this slot
15277    unsafe { self._tab.get::<HttpMethod>(ActionNode::VT_METHOD, Some(HttpMethod::POST)).unwrap()}
15278  }
15279  /// Input/output type hints for the compiler.
15280  #[inline]
15281  pub fn input_type(&self) -> Option<&'a str> {
15282    // Safety:
15283    // Created from valid Table for this object
15284    // which contains a valid value in this slot
15285    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ActionNode::VT_INPUT_TYPE, None)}
15286  }
15287  #[inline]
15288  pub fn output_type(&self) -> Option<&'a str> {
15289    // Safety:
15290    // Created from valid Table for this object
15291    // which contains a valid value in this slot
15292    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ActionNode::VT_OUTPUT_TYPE, None)}
15293  }
15294  /// Optimistic update behavior.
15295  #[inline]
15296  pub fn optimistic(&self) -> Option<OptimisticConfig<'a>> {
15297    // Safety:
15298    // Created from valid Table for this object
15299    // which contains a valid value in this slot
15300    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<OptimisticConfig>>(ActionNode::VT_OPTIMISTIC, None)}
15301  }
15302  /// DataNode IDs to refetch after successful mutation.
15303  #[inline]
15304  pub fn invalidates(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>> {
15305    // Safety:
15306    // Created from valid Table for this object
15307    // which contains a valid value in this slot
15308    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>(ActionNode::VT_INVALIDATES, None)}
15309  }
15310  /// Cache tags to invalidate (matches DataNode.cache_tags).
15311  #[inline]
15312  pub fn invalidate_tags(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>> {
15313    // Safety:
15314    // Created from valid Table for this object
15315    // which contains a valid value in this slot
15316    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>(ActionNode::VT_INVALIDATE_TAGS, None)}
15317  }
15318  /// Error handling.
15319  #[inline]
15320  pub fn error_handling(&self) -> Option<ErrorHandling<'a>> {
15321    // Safety:
15322    // Created from valid Table for this object
15323    // which contains a valid value in this slot
15324    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<ErrorHandling>>(ActionNode::VT_ERROR_HANDLING, None)}
15325  }
15326  /// Auth requirements.
15327  #[inline]
15328  pub fn auth_required(&self) -> bool {
15329    // Safety:
15330    // Created from valid Table for this object
15331    // which contains a valid value in this slot
15332    unsafe { self._tab.get::<bool>(ActionNode::VT_AUTH_REQUIRED, Some(false)).unwrap()}
15333  }
15334  #[inline]
15335  pub fn required_roles(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>> {
15336    // Safety:
15337    // Created from valid Table for this object
15338    // which contains a valid value in this slot
15339    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>(ActionNode::VT_REQUIRED_ROLES, None)}
15340  }
15341  /// Security.
15342  #[inline]
15343  pub fn csrf_protected(&self) -> bool {
15344    // Safety:
15345    // Created from valid Table for this object
15346    // which contains a valid value in this slot
15347    unsafe { self._tab.get::<bool>(ActionNode::VT_CSRF_PROTECTED, Some(true)).unwrap()}
15348  }
15349  #[inline]
15350  pub fn idempotent(&self) -> bool {
15351    // Safety:
15352    // Created from valid Table for this object
15353    // which contains a valid value in this slot
15354    unsafe { self._tab.get::<bool>(ActionNode::VT_IDEMPOTENT, Some(false)).unwrap()}
15355  }
15356}
15357
15358impl flatbuffers::Verifiable for ActionNode<'_> {
15359  #[inline]
15360  fn run_verifier(
15361    v: &mut flatbuffers::Verifier, pos: usize
15362  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
15363    use self::flatbuffers::Verifiable;
15364    v.visit_table(pos)?
15365     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("node_id", Self::VT_NODE_ID, true)?
15366     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
15367     .visit_field::<flatbuffers::ForwardsUOffset<DataSource>>("source", Self::VT_SOURCE, true)?
15368     .visit_field::<HttpMethod>("method", Self::VT_METHOD, false)?
15369     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("input_type", Self::VT_INPUT_TYPE, false)?
15370     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("output_type", Self::VT_OUTPUT_TYPE, false)?
15371     .visit_field::<flatbuffers::ForwardsUOffset<OptimisticConfig>>("optimistic", Self::VT_OPTIMISTIC, false)?
15372     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>>>("invalidates", Self::VT_INVALIDATES, false)?
15373     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>>>("invalidate_tags", Self::VT_INVALIDATE_TAGS, false)?
15374     .visit_field::<flatbuffers::ForwardsUOffset<ErrorHandling>>("error_handling", Self::VT_ERROR_HANDLING, false)?
15375     .visit_field::<bool>("auth_required", Self::VT_AUTH_REQUIRED, false)?
15376     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>>>("required_roles", Self::VT_REQUIRED_ROLES, false)?
15377     .visit_field::<bool>("csrf_protected", Self::VT_CSRF_PROTECTED, false)?
15378     .visit_field::<bool>("idempotent", Self::VT_IDEMPOTENT, false)?
15379     .finish();
15380    Ok(())
15381  }
15382}
15383pub struct ActionNodeArgs<'a> {
15384    pub node_id: Option<flatbuffers::WIPOffset<&'a str>>,
15385    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
15386    pub source: Option<flatbuffers::WIPOffset<DataSource<'a>>>,
15387    pub method: HttpMethod,
15388    pub input_type: Option<flatbuffers::WIPOffset<&'a str>>,
15389    pub output_type: Option<flatbuffers::WIPOffset<&'a str>>,
15390    pub optimistic: Option<flatbuffers::WIPOffset<OptimisticConfig<'a>>>,
15391    pub invalidates: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>,
15392    pub invalidate_tags: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>,
15393    pub error_handling: Option<flatbuffers::WIPOffset<ErrorHandling<'a>>>,
15394    pub auth_required: bool,
15395    pub required_roles: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>,
15396    pub csrf_protected: bool,
15397    pub idempotent: bool,
15398}
15399impl<'a> Default for ActionNodeArgs<'a> {
15400  #[inline]
15401  fn default() -> Self {
15402    ActionNodeArgs {
15403      node_id: None, // required field
15404      name: None,
15405      source: None, // required field
15406      method: HttpMethod::POST,
15407      input_type: None,
15408      output_type: None,
15409      optimistic: None,
15410      invalidates: None,
15411      invalidate_tags: None,
15412      error_handling: None,
15413      auth_required: false,
15414      required_roles: None,
15415      csrf_protected: true,
15416      idempotent: false,
15417    }
15418  }
15419}
15420
15421pub struct ActionNodeBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
15422  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
15423  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
15424}
15425impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ActionNodeBuilder<'a, 'b, A> {
15426  #[inline]
15427  pub fn add_node_id(&mut self, node_id: flatbuffers::WIPOffset<&'b  str>) {
15428    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ActionNode::VT_NODE_ID, node_id);
15429  }
15430  #[inline]
15431  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
15432    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ActionNode::VT_NAME, name);
15433  }
15434  #[inline]
15435  pub fn add_source(&mut self, source: flatbuffers::WIPOffset<DataSource<'b >>) {
15436    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<DataSource>>(ActionNode::VT_SOURCE, source);
15437  }
15438  #[inline]
15439  pub fn add_method(&mut self, method: HttpMethod) {
15440    self.fbb_.push_slot::<HttpMethod>(ActionNode::VT_METHOD, method, HttpMethod::POST);
15441  }
15442  #[inline]
15443  pub fn add_input_type(&mut self, input_type: flatbuffers::WIPOffset<&'b  str>) {
15444    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ActionNode::VT_INPUT_TYPE, input_type);
15445  }
15446  #[inline]
15447  pub fn add_output_type(&mut self, output_type: flatbuffers::WIPOffset<&'b  str>) {
15448    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ActionNode::VT_OUTPUT_TYPE, output_type);
15449  }
15450  #[inline]
15451  pub fn add_optimistic(&mut self, optimistic: flatbuffers::WIPOffset<OptimisticConfig<'b >>) {
15452    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<OptimisticConfig>>(ActionNode::VT_OPTIMISTIC, optimistic);
15453  }
15454  #[inline]
15455  pub fn add_invalidates(&mut self, invalidates: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<&'b  str>>>) {
15456    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ActionNode::VT_INVALIDATES, invalidates);
15457  }
15458  #[inline]
15459  pub fn add_invalidate_tags(&mut self, invalidate_tags: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<&'b  str>>>) {
15460    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ActionNode::VT_INVALIDATE_TAGS, invalidate_tags);
15461  }
15462  #[inline]
15463  pub fn add_error_handling(&mut self, error_handling: flatbuffers::WIPOffset<ErrorHandling<'b >>) {
15464    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<ErrorHandling>>(ActionNode::VT_ERROR_HANDLING, error_handling);
15465  }
15466  #[inline]
15467  pub fn add_auth_required(&mut self, auth_required: bool) {
15468    self.fbb_.push_slot::<bool>(ActionNode::VT_AUTH_REQUIRED, auth_required, false);
15469  }
15470  #[inline]
15471  pub fn add_required_roles(&mut self, required_roles: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<&'b  str>>>) {
15472    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ActionNode::VT_REQUIRED_ROLES, required_roles);
15473  }
15474  #[inline]
15475  pub fn add_csrf_protected(&mut self, csrf_protected: bool) {
15476    self.fbb_.push_slot::<bool>(ActionNode::VT_CSRF_PROTECTED, csrf_protected, true);
15477  }
15478  #[inline]
15479  pub fn add_idempotent(&mut self, idempotent: bool) {
15480    self.fbb_.push_slot::<bool>(ActionNode::VT_IDEMPOTENT, idempotent, false);
15481  }
15482  #[inline]
15483  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ActionNodeBuilder<'a, 'b, A> {
15484    let start = _fbb.start_table();
15485    ActionNodeBuilder {
15486      fbb_: _fbb,
15487      start_: start,
15488    }
15489  }
15490  #[inline]
15491  pub fn finish(self) -> flatbuffers::WIPOffset<ActionNode<'a>> {
15492    let o = self.fbb_.end_table(self.start_);
15493    self.fbb_.required(o, ActionNode::VT_NODE_ID,"node_id");
15494    self.fbb_.required(o, ActionNode::VT_SOURCE,"source");
15495    flatbuffers::WIPOffset::new(o.value())
15496  }
15497}
15498
15499impl core::fmt::Debug for ActionNode<'_> {
15500  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
15501    let mut ds = f.debug_struct("ActionNode");
15502      ds.field("node_id", &self.node_id());
15503      ds.field("name", &self.name());
15504      ds.field("source", &self.source());
15505      ds.field("method", &self.method());
15506      ds.field("input_type", &self.input_type());
15507      ds.field("output_type", &self.output_type());
15508      ds.field("optimistic", &self.optimistic());
15509      ds.field("invalidates", &self.invalidates());
15510      ds.field("invalidate_tags", &self.invalidate_tags());
15511      ds.field("error_handling", &self.error_handling());
15512      ds.field("auth_required", &self.auth_required());
15513      ds.field("required_roles", &self.required_roles());
15514      ds.field("csrf_protected", &self.csrf_protected());
15515      ds.field("idempotent", &self.idempotent());
15516      ds.finish()
15517  }
15518}
15519pub enum ConnectionConfigOffset {}
15520#[derive(Copy, Clone, PartialEq)]
15521
15522pub struct ConnectionConfig<'a> {
15523  pub _tab: flatbuffers::Table<'a>,
15524}
15525
15526impl<'a> flatbuffers::Follow<'a> for ConnectionConfig<'a> {
15527  type Inner = ConnectionConfig<'a>;
15528  #[inline]
15529  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
15530    Self { _tab: flatbuffers::Table::new(buf, loc) }
15531  }
15532}
15533
15534impl<'a> ConnectionConfig<'a> {
15535  pub const VT_RECONNECT: flatbuffers::VOffsetT = 4;
15536  pub const VT_RECONNECT_INTERVAL_MS: flatbuffers::VOffsetT = 6;
15537  pub const VT_MAX_RETRIES: flatbuffers::VOffsetT = 8;
15538  pub const VT_HEARTBEAT_INTERVAL_MS: flatbuffers::VOffsetT = 10;
15539
15540  #[inline]
15541  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
15542    ConnectionConfig { _tab: table }
15543  }
15544  #[allow(unused_mut)]
15545  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
15546    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
15547    args: &'args ConnectionConfigArgs
15548  ) -> flatbuffers::WIPOffset<ConnectionConfig<'bldr>> {
15549    let mut builder = ConnectionConfigBuilder::new(_fbb);
15550    builder.add_heartbeat_interval_ms(args.heartbeat_interval_ms);
15551    builder.add_max_retries(args.max_retries);
15552    builder.add_reconnect_interval_ms(args.reconnect_interval_ms);
15553    builder.add_reconnect(args.reconnect);
15554    builder.finish()
15555  }
15556
15557
15558  #[inline]
15559  pub fn reconnect(&self) -> bool {
15560    // Safety:
15561    // Created from valid Table for this object
15562    // which contains a valid value in this slot
15563    unsafe { self._tab.get::<bool>(ConnectionConfig::VT_RECONNECT, Some(true)).unwrap()}
15564  }
15565  #[inline]
15566  pub fn reconnect_interval_ms(&self) -> u32 {
15567    // Safety:
15568    // Created from valid Table for this object
15569    // which contains a valid value in this slot
15570    unsafe { self._tab.get::<u32>(ConnectionConfig::VT_RECONNECT_INTERVAL_MS, Some(3000)).unwrap()}
15571  }
15572  #[inline]
15573  pub fn max_retries(&self) -> i32 {
15574    // Safety:
15575    // Created from valid Table for this object
15576    // which contains a valid value in this slot
15577    unsafe { self._tab.get::<i32>(ConnectionConfig::VT_MAX_RETRIES, Some(10)).unwrap()}
15578  }
15579  #[inline]
15580  pub fn heartbeat_interval_ms(&self) -> u32 {
15581    // Safety:
15582    // Created from valid Table for this object
15583    // which contains a valid value in this slot
15584    unsafe { self._tab.get::<u32>(ConnectionConfig::VT_HEARTBEAT_INTERVAL_MS, Some(30000)).unwrap()}
15585  }
15586}
15587
15588impl flatbuffers::Verifiable for ConnectionConfig<'_> {
15589  #[inline]
15590  fn run_verifier(
15591    v: &mut flatbuffers::Verifier, pos: usize
15592  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
15593    use self::flatbuffers::Verifiable;
15594    v.visit_table(pos)?
15595     .visit_field::<bool>("reconnect", Self::VT_RECONNECT, false)?
15596     .visit_field::<u32>("reconnect_interval_ms", Self::VT_RECONNECT_INTERVAL_MS, false)?
15597     .visit_field::<i32>("max_retries", Self::VT_MAX_RETRIES, false)?
15598     .visit_field::<u32>("heartbeat_interval_ms", Self::VT_HEARTBEAT_INTERVAL_MS, false)?
15599     .finish();
15600    Ok(())
15601  }
15602}
15603pub struct ConnectionConfigArgs {
15604    pub reconnect: bool,
15605    pub reconnect_interval_ms: u32,
15606    pub max_retries: i32,
15607    pub heartbeat_interval_ms: u32,
15608}
15609impl<'a> Default for ConnectionConfigArgs {
15610  #[inline]
15611  fn default() -> Self {
15612    ConnectionConfigArgs {
15613      reconnect: true,
15614      reconnect_interval_ms: 3000,
15615      max_retries: 10,
15616      heartbeat_interval_ms: 30000,
15617    }
15618  }
15619}
15620
15621pub struct ConnectionConfigBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
15622  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
15623  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
15624}
15625impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ConnectionConfigBuilder<'a, 'b, A> {
15626  #[inline]
15627  pub fn add_reconnect(&mut self, reconnect: bool) {
15628    self.fbb_.push_slot::<bool>(ConnectionConfig::VT_RECONNECT, reconnect, true);
15629  }
15630  #[inline]
15631  pub fn add_reconnect_interval_ms(&mut self, reconnect_interval_ms: u32) {
15632    self.fbb_.push_slot::<u32>(ConnectionConfig::VT_RECONNECT_INTERVAL_MS, reconnect_interval_ms, 3000);
15633  }
15634  #[inline]
15635  pub fn add_max_retries(&mut self, max_retries: i32) {
15636    self.fbb_.push_slot::<i32>(ConnectionConfig::VT_MAX_RETRIES, max_retries, 10);
15637  }
15638  #[inline]
15639  pub fn add_heartbeat_interval_ms(&mut self, heartbeat_interval_ms: u32) {
15640    self.fbb_.push_slot::<u32>(ConnectionConfig::VT_HEARTBEAT_INTERVAL_MS, heartbeat_interval_ms, 30000);
15641  }
15642  #[inline]
15643  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ConnectionConfigBuilder<'a, 'b, A> {
15644    let start = _fbb.start_table();
15645    ConnectionConfigBuilder {
15646      fbb_: _fbb,
15647      start_: start,
15648    }
15649  }
15650  #[inline]
15651  pub fn finish(self) -> flatbuffers::WIPOffset<ConnectionConfig<'a>> {
15652    let o = self.fbb_.end_table(self.start_);
15653    flatbuffers::WIPOffset::new(o.value())
15654  }
15655}
15656
15657impl core::fmt::Debug for ConnectionConfig<'_> {
15658  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
15659    let mut ds = f.debug_struct("ConnectionConfig");
15660      ds.field("reconnect", &self.reconnect());
15661      ds.field("reconnect_interval_ms", &self.reconnect_interval_ms());
15662      ds.field("max_retries", &self.max_retries());
15663      ds.field("heartbeat_interval_ms", &self.heartbeat_interval_ms());
15664      ds.finish()
15665  }
15666}
15667pub enum SubscriptionNodeOffset {}
15668#[derive(Copy, Clone, PartialEq)]
15669
15670pub struct SubscriptionNode<'a> {
15671  pub _tab: flatbuffers::Table<'a>,
15672}
15673
15674impl<'a> flatbuffers::Follow<'a> for SubscriptionNode<'a> {
15675  type Inner = SubscriptionNode<'a>;
15676  #[inline]
15677  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
15678    Self { _tab: flatbuffers::Table::new(buf, loc) }
15679  }
15680}
15681
15682impl<'a> SubscriptionNode<'a> {
15683  pub const VT_NODE_ID: flatbuffers::VOffsetT = 4;
15684  pub const VT_NAME: flatbuffers::VOffsetT = 6;
15685  pub const VT_SOURCE: flatbuffers::VOffsetT = 8;
15686  pub const VT_TRANSPORT: flatbuffers::VOffsetT = 10;
15687  pub const VT_CHANNEL: flatbuffers::VOffsetT = 12;
15688  pub const VT_FILTER: flatbuffers::VOffsetT = 14;
15689  pub const VT_UPDATE_STRATEGY: flatbuffers::VOffsetT = 16;
15690  pub const VT_TARGET_DATA_NODE_ID: flatbuffers::VOffsetT = 18;
15691  pub const VT_CONNECTION: flatbuffers::VOffsetT = 20;
15692
15693  #[inline]
15694  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
15695    SubscriptionNode { _tab: table }
15696  }
15697  #[allow(unused_mut)]
15698  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
15699    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
15700    args: &'args SubscriptionNodeArgs<'args>
15701  ) -> flatbuffers::WIPOffset<SubscriptionNode<'bldr>> {
15702    let mut builder = SubscriptionNodeBuilder::new(_fbb);
15703    if let Some(x) = args.connection { builder.add_connection(x); }
15704    if let Some(x) = args.target_data_node_id { builder.add_target_data_node_id(x); }
15705    if let Some(x) = args.filter { builder.add_filter(x); }
15706    if let Some(x) = args.channel { builder.add_channel(x); }
15707    if let Some(x) = args.source { builder.add_source(x); }
15708    if let Some(x) = args.name { builder.add_name(x); }
15709    if let Some(x) = args.node_id { builder.add_node_id(x); }
15710    builder.add_update_strategy(args.update_strategy);
15711    builder.add_transport(args.transport);
15712    builder.finish()
15713  }
15714
15715
15716  #[inline]
15717  pub fn node_id(&self) -> &'a str {
15718    // Safety:
15719    // Created from valid Table for this object
15720    // which contains a valid value in this slot
15721    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(SubscriptionNode::VT_NODE_ID, None).unwrap()}
15722  }
15723  #[inline]
15724  pub fn name(&self) -> Option<&'a str> {
15725    // Safety:
15726    // Created from valid Table for this object
15727    // which contains a valid value in this slot
15728    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(SubscriptionNode::VT_NAME, None)}
15729  }
15730  #[inline]
15731  pub fn source(&self) -> DataSource<'a> {
15732    // Safety:
15733    // Created from valid Table for this object
15734    // which contains a valid value in this slot
15735    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<DataSource>>(SubscriptionNode::VT_SOURCE, None).unwrap()}
15736  }
15737  #[inline]
15738  pub fn transport(&self) -> SubscriptionTransport {
15739    // Safety:
15740    // Created from valid Table for this object
15741    // which contains a valid value in this slot
15742    unsafe { self._tab.get::<SubscriptionTransport>(SubscriptionNode::VT_TRANSPORT, Some(SubscriptionTransport::WebSocket)).unwrap()}
15743  }
15744  /// Channel/topic/table to subscribe to.
15745  #[inline]
15746  pub fn channel(&self) -> Option<&'a str> {
15747    // Safety:
15748    // Created from valid Table for this object
15749    // which contains a valid value in this slot
15750    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(SubscriptionNode::VT_CHANNEL, None)}
15751  }
15752  /// Filter expression for the subscription.
15753  #[inline]
15754  pub fn filter(&self) -> Option<&'a str> {
15755    // Safety:
15756    // Created from valid Table for this object
15757    // which contains a valid value in this slot
15758    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(SubscriptionNode::VT_FILTER, None)}
15759  }
15760  /// How to apply incoming updates to the target DataNode.
15761  #[inline]
15762  pub fn update_strategy(&self) -> UpdateStrategy {
15763    // Safety:
15764    // Created from valid Table for this object
15765    // which contains a valid value in this slot
15766    unsafe { self._tab.get::<UpdateStrategy>(SubscriptionNode::VT_UPDATE_STRATEGY, Some(UpdateStrategy::Replace)).unwrap()}
15767  }
15768  /// Which DataNode to keep updated.
15769  #[inline]
15770  pub fn target_data_node_id(&self) -> &'a str {
15771    // Safety:
15772    // Created from valid Table for this object
15773    // which contains a valid value in this slot
15774    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(SubscriptionNode::VT_TARGET_DATA_NODE_ID, None).unwrap()}
15775  }
15776  #[inline]
15777  pub fn connection(&self) -> Option<ConnectionConfig<'a>> {
15778    // Safety:
15779    // Created from valid Table for this object
15780    // which contains a valid value in this slot
15781    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<ConnectionConfig>>(SubscriptionNode::VT_CONNECTION, None)}
15782  }
15783}
15784
15785impl flatbuffers::Verifiable for SubscriptionNode<'_> {
15786  #[inline]
15787  fn run_verifier(
15788    v: &mut flatbuffers::Verifier, pos: usize
15789  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
15790    use self::flatbuffers::Verifiable;
15791    v.visit_table(pos)?
15792     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("node_id", Self::VT_NODE_ID, true)?
15793     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
15794     .visit_field::<flatbuffers::ForwardsUOffset<DataSource>>("source", Self::VT_SOURCE, true)?
15795     .visit_field::<SubscriptionTransport>("transport", Self::VT_TRANSPORT, false)?
15796     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("channel", Self::VT_CHANNEL, false)?
15797     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("filter", Self::VT_FILTER, false)?
15798     .visit_field::<UpdateStrategy>("update_strategy", Self::VT_UPDATE_STRATEGY, false)?
15799     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("target_data_node_id", Self::VT_TARGET_DATA_NODE_ID, true)?
15800     .visit_field::<flatbuffers::ForwardsUOffset<ConnectionConfig>>("connection", Self::VT_CONNECTION, false)?
15801     .finish();
15802    Ok(())
15803  }
15804}
15805pub struct SubscriptionNodeArgs<'a> {
15806    pub node_id: Option<flatbuffers::WIPOffset<&'a str>>,
15807    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
15808    pub source: Option<flatbuffers::WIPOffset<DataSource<'a>>>,
15809    pub transport: SubscriptionTransport,
15810    pub channel: Option<flatbuffers::WIPOffset<&'a str>>,
15811    pub filter: Option<flatbuffers::WIPOffset<&'a str>>,
15812    pub update_strategy: UpdateStrategy,
15813    pub target_data_node_id: Option<flatbuffers::WIPOffset<&'a str>>,
15814    pub connection: Option<flatbuffers::WIPOffset<ConnectionConfig<'a>>>,
15815}
15816impl<'a> Default for SubscriptionNodeArgs<'a> {
15817  #[inline]
15818  fn default() -> Self {
15819    SubscriptionNodeArgs {
15820      node_id: None, // required field
15821      name: None,
15822      source: None, // required field
15823      transport: SubscriptionTransport::WebSocket,
15824      channel: None,
15825      filter: None,
15826      update_strategy: UpdateStrategy::Replace,
15827      target_data_node_id: None, // required field
15828      connection: None,
15829    }
15830  }
15831}
15832
15833pub struct SubscriptionNodeBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
15834  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
15835  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
15836}
15837impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SubscriptionNodeBuilder<'a, 'b, A> {
15838  #[inline]
15839  pub fn add_node_id(&mut self, node_id: flatbuffers::WIPOffset<&'b  str>) {
15840    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(SubscriptionNode::VT_NODE_ID, node_id);
15841  }
15842  #[inline]
15843  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
15844    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(SubscriptionNode::VT_NAME, name);
15845  }
15846  #[inline]
15847  pub fn add_source(&mut self, source: flatbuffers::WIPOffset<DataSource<'b >>) {
15848    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<DataSource>>(SubscriptionNode::VT_SOURCE, source);
15849  }
15850  #[inline]
15851  pub fn add_transport(&mut self, transport: SubscriptionTransport) {
15852    self.fbb_.push_slot::<SubscriptionTransport>(SubscriptionNode::VT_TRANSPORT, transport, SubscriptionTransport::WebSocket);
15853  }
15854  #[inline]
15855  pub fn add_channel(&mut self, channel: flatbuffers::WIPOffset<&'b  str>) {
15856    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(SubscriptionNode::VT_CHANNEL, channel);
15857  }
15858  #[inline]
15859  pub fn add_filter(&mut self, filter: flatbuffers::WIPOffset<&'b  str>) {
15860    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(SubscriptionNode::VT_FILTER, filter);
15861  }
15862  #[inline]
15863  pub fn add_update_strategy(&mut self, update_strategy: UpdateStrategy) {
15864    self.fbb_.push_slot::<UpdateStrategy>(SubscriptionNode::VT_UPDATE_STRATEGY, update_strategy, UpdateStrategy::Replace);
15865  }
15866  #[inline]
15867  pub fn add_target_data_node_id(&mut self, target_data_node_id: flatbuffers::WIPOffset<&'b  str>) {
15868    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(SubscriptionNode::VT_TARGET_DATA_NODE_ID, target_data_node_id);
15869  }
15870  #[inline]
15871  pub fn add_connection(&mut self, connection: flatbuffers::WIPOffset<ConnectionConfig<'b >>) {
15872    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<ConnectionConfig>>(SubscriptionNode::VT_CONNECTION, connection);
15873  }
15874  #[inline]
15875  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> SubscriptionNodeBuilder<'a, 'b, A> {
15876    let start = _fbb.start_table();
15877    SubscriptionNodeBuilder {
15878      fbb_: _fbb,
15879      start_: start,
15880    }
15881  }
15882  #[inline]
15883  pub fn finish(self) -> flatbuffers::WIPOffset<SubscriptionNode<'a>> {
15884    let o = self.fbb_.end_table(self.start_);
15885    self.fbb_.required(o, SubscriptionNode::VT_NODE_ID,"node_id");
15886    self.fbb_.required(o, SubscriptionNode::VT_SOURCE,"source");
15887    self.fbb_.required(o, SubscriptionNode::VT_TARGET_DATA_NODE_ID,"target_data_node_id");
15888    flatbuffers::WIPOffset::new(o.value())
15889  }
15890}
15891
15892impl core::fmt::Debug for SubscriptionNode<'_> {
15893  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
15894    let mut ds = f.debug_struct("SubscriptionNode");
15895      ds.field("node_id", &self.node_id());
15896      ds.field("name", &self.name());
15897      ds.field("source", &self.source());
15898      ds.field("transport", &self.transport());
15899      ds.field("channel", &self.channel());
15900      ds.field("filter", &self.filter());
15901      ds.field("update_strategy", &self.update_strategy());
15902      ds.field("target_data_node_id", &self.target_data_node_id());
15903      ds.field("connection", &self.connection());
15904      ds.finish()
15905  }
15906}
15907pub enum AuthContextNodeOffset {}
15908#[derive(Copy, Clone, PartialEq)]
15909
15910pub struct AuthContextNode<'a> {
15911  pub _tab: flatbuffers::Table<'a>,
15912}
15913
15914impl<'a> flatbuffers::Follow<'a> for AuthContextNode<'a> {
15915  type Inner = AuthContextNode<'a>;
15916  #[inline]
15917  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
15918    Self { _tab: flatbuffers::Table::new(buf, loc) }
15919  }
15920}
15921
15922impl<'a> AuthContextNode<'a> {
15923  pub const VT_NODE_ID: flatbuffers::VOffsetT = 4;
15924  pub const VT_NAME: flatbuffers::VOffsetT = 6;
15925  pub const VT_PROVIDER: flatbuffers::VOffsetT = 8;
15926  pub const VT_SESSION_STRATEGY: flatbuffers::VOffsetT = 10;
15927  pub const VT_USER_TYPE: flatbuffers::VOffsetT = 12;
15928  pub const VT_ROLE_FIELD: flatbuffers::VOffsetT = 14;
15929  pub const VT_LOGIN_ACTION_ID: flatbuffers::VOffsetT = 16;
15930  pub const VT_LOGOUT_ACTION_ID: flatbuffers::VOffsetT = 18;
15931  pub const VT_REFRESH_ACTION_ID: flatbuffers::VOffsetT = 20;
15932
15933  #[inline]
15934  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
15935    AuthContextNode { _tab: table }
15936  }
15937  #[allow(unused_mut)]
15938  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
15939    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
15940    args: &'args AuthContextNodeArgs<'args>
15941  ) -> flatbuffers::WIPOffset<AuthContextNode<'bldr>> {
15942    let mut builder = AuthContextNodeBuilder::new(_fbb);
15943    if let Some(x) = args.refresh_action_id { builder.add_refresh_action_id(x); }
15944    if let Some(x) = args.logout_action_id { builder.add_logout_action_id(x); }
15945    if let Some(x) = args.login_action_id { builder.add_login_action_id(x); }
15946    if let Some(x) = args.role_field { builder.add_role_field(x); }
15947    if let Some(x) = args.user_type { builder.add_user_type(x); }
15948    if let Some(x) = args.name { builder.add_name(x); }
15949    if let Some(x) = args.node_id { builder.add_node_id(x); }
15950    builder.add_session_strategy(args.session_strategy);
15951    builder.add_provider(args.provider);
15952    builder.finish()
15953  }
15954
15955
15956  #[inline]
15957  pub fn node_id(&self) -> &'a str {
15958    // Safety:
15959    // Created from valid Table for this object
15960    // which contains a valid value in this slot
15961    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(AuthContextNode::VT_NODE_ID, None).unwrap()}
15962  }
15963  #[inline]
15964  pub fn name(&self) -> Option<&'a str> {
15965    // Safety:
15966    // Created from valid Table for this object
15967    // which contains a valid value in this slot
15968    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(AuthContextNode::VT_NAME, None)}
15969  }
15970  #[inline]
15971  pub fn provider(&self) -> AuthProvider {
15972    // Safety:
15973    // Created from valid Table for this object
15974    // which contains a valid value in this slot
15975    unsafe { self._tab.get::<AuthProvider>(AuthContextNode::VT_PROVIDER, Some(AuthProvider::Auth0)).unwrap()}
15976  }
15977  #[inline]
15978  pub fn session_strategy(&self) -> SessionStrategy {
15979    // Safety:
15980    // Created from valid Table for this object
15981    // which contains a valid value in this slot
15982    unsafe { self._tab.get::<SessionStrategy>(AuthContextNode::VT_SESSION_STRATEGY, Some(SessionStrategy::JwtCookie)).unwrap()}
15983  }
15984  /// Type hint for the user object shape.
15985  #[inline]
15986  pub fn user_type(&self) -> Option<&'a str> {
15987    // Safety:
15988    // Created from valid Table for this object
15989    // which contains a valid value in this slot
15990    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(AuthContextNode::VT_USER_TYPE, None)}
15991  }
15992  /// Field path for roles in the user object.
15993  #[inline]
15994  pub fn role_field(&self) -> Option<&'a str> {
15995    // Safety:
15996    // Created from valid Table for this object
15997    // which contains a valid value in this slot
15998    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(AuthContextNode::VT_ROLE_FIELD, None)}
15999  }
16000  /// Action references for auth operations.
16001  #[inline]
16002  pub fn login_action_id(&self) -> Option<&'a str> {
16003    // Safety:
16004    // Created from valid Table for this object
16005    // which contains a valid value in this slot
16006    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(AuthContextNode::VT_LOGIN_ACTION_ID, None)}
16007  }
16008  #[inline]
16009  pub fn logout_action_id(&self) -> Option<&'a str> {
16010    // Safety:
16011    // Created from valid Table for this object
16012    // which contains a valid value in this slot
16013    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(AuthContextNode::VT_LOGOUT_ACTION_ID, None)}
16014  }
16015  #[inline]
16016  pub fn refresh_action_id(&self) -> Option<&'a str> {
16017    // Safety:
16018    // Created from valid Table for this object
16019    // which contains a valid value in this slot
16020    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(AuthContextNode::VT_REFRESH_ACTION_ID, None)}
16021  }
16022}
16023
16024impl flatbuffers::Verifiable for AuthContextNode<'_> {
16025  #[inline]
16026  fn run_verifier(
16027    v: &mut flatbuffers::Verifier, pos: usize
16028  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
16029    use self::flatbuffers::Verifiable;
16030    v.visit_table(pos)?
16031     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("node_id", Self::VT_NODE_ID, true)?
16032     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
16033     .visit_field::<AuthProvider>("provider", Self::VT_PROVIDER, false)?
16034     .visit_field::<SessionStrategy>("session_strategy", Self::VT_SESSION_STRATEGY, false)?
16035     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("user_type", Self::VT_USER_TYPE, false)?
16036     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("role_field", Self::VT_ROLE_FIELD, false)?
16037     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("login_action_id", Self::VT_LOGIN_ACTION_ID, false)?
16038     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("logout_action_id", Self::VT_LOGOUT_ACTION_ID, false)?
16039     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("refresh_action_id", Self::VT_REFRESH_ACTION_ID, false)?
16040     .finish();
16041    Ok(())
16042  }
16043}
16044pub struct AuthContextNodeArgs<'a> {
16045    pub node_id: Option<flatbuffers::WIPOffset<&'a str>>,
16046    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
16047    pub provider: AuthProvider,
16048    pub session_strategy: SessionStrategy,
16049    pub user_type: Option<flatbuffers::WIPOffset<&'a str>>,
16050    pub role_field: Option<flatbuffers::WIPOffset<&'a str>>,
16051    pub login_action_id: Option<flatbuffers::WIPOffset<&'a str>>,
16052    pub logout_action_id: Option<flatbuffers::WIPOffset<&'a str>>,
16053    pub refresh_action_id: Option<flatbuffers::WIPOffset<&'a str>>,
16054}
16055impl<'a> Default for AuthContextNodeArgs<'a> {
16056  #[inline]
16057  fn default() -> Self {
16058    AuthContextNodeArgs {
16059      node_id: None, // required field
16060      name: None,
16061      provider: AuthProvider::Auth0,
16062      session_strategy: SessionStrategy::JwtCookie,
16063      user_type: None,
16064      role_field: None,
16065      login_action_id: None,
16066      logout_action_id: None,
16067      refresh_action_id: None,
16068    }
16069  }
16070}
16071
16072pub struct AuthContextNodeBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
16073  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
16074  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
16075}
16076impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> AuthContextNodeBuilder<'a, 'b, A> {
16077  #[inline]
16078  pub fn add_node_id(&mut self, node_id: flatbuffers::WIPOffset<&'b  str>) {
16079    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(AuthContextNode::VT_NODE_ID, node_id);
16080  }
16081  #[inline]
16082  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
16083    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(AuthContextNode::VT_NAME, name);
16084  }
16085  #[inline]
16086  pub fn add_provider(&mut self, provider: AuthProvider) {
16087    self.fbb_.push_slot::<AuthProvider>(AuthContextNode::VT_PROVIDER, provider, AuthProvider::Auth0);
16088  }
16089  #[inline]
16090  pub fn add_session_strategy(&mut self, session_strategy: SessionStrategy) {
16091    self.fbb_.push_slot::<SessionStrategy>(AuthContextNode::VT_SESSION_STRATEGY, session_strategy, SessionStrategy::JwtCookie);
16092  }
16093  #[inline]
16094  pub fn add_user_type(&mut self, user_type: flatbuffers::WIPOffset<&'b  str>) {
16095    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(AuthContextNode::VT_USER_TYPE, user_type);
16096  }
16097  #[inline]
16098  pub fn add_role_field(&mut self, role_field: flatbuffers::WIPOffset<&'b  str>) {
16099    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(AuthContextNode::VT_ROLE_FIELD, role_field);
16100  }
16101  #[inline]
16102  pub fn add_login_action_id(&mut self, login_action_id: flatbuffers::WIPOffset<&'b  str>) {
16103    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(AuthContextNode::VT_LOGIN_ACTION_ID, login_action_id);
16104  }
16105  #[inline]
16106  pub fn add_logout_action_id(&mut self, logout_action_id: flatbuffers::WIPOffset<&'b  str>) {
16107    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(AuthContextNode::VT_LOGOUT_ACTION_ID, logout_action_id);
16108  }
16109  #[inline]
16110  pub fn add_refresh_action_id(&mut self, refresh_action_id: flatbuffers::WIPOffset<&'b  str>) {
16111    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(AuthContextNode::VT_REFRESH_ACTION_ID, refresh_action_id);
16112  }
16113  #[inline]
16114  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> AuthContextNodeBuilder<'a, 'b, A> {
16115    let start = _fbb.start_table();
16116    AuthContextNodeBuilder {
16117      fbb_: _fbb,
16118      start_: start,
16119    }
16120  }
16121  #[inline]
16122  pub fn finish(self) -> flatbuffers::WIPOffset<AuthContextNode<'a>> {
16123    let o = self.fbb_.end_table(self.start_);
16124    self.fbb_.required(o, AuthContextNode::VT_NODE_ID,"node_id");
16125    flatbuffers::WIPOffset::new(o.value())
16126  }
16127}
16128
16129impl core::fmt::Debug for AuthContextNode<'_> {
16130  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
16131    let mut ds = f.debug_struct("AuthContextNode");
16132      ds.field("node_id", &self.node_id());
16133      ds.field("name", &self.name());
16134      ds.field("provider", &self.provider());
16135      ds.field("session_strategy", &self.session_strategy());
16136      ds.field("user_type", &self.user_type());
16137      ds.field("role_field", &self.role_field());
16138      ds.field("login_action_id", &self.login_action_id());
16139      ds.field("logout_action_id", &self.logout_action_id());
16140      ds.field("refresh_action_id", &self.refresh_action_id());
16141      ds.finish()
16142  }
16143}
16144pub enum ContentSourceOffset {}
16145#[derive(Copy, Clone, PartialEq)]
16146
16147pub struct ContentSource<'a> {
16148  pub _tab: flatbuffers::Table<'a>,
16149}
16150
16151impl<'a> flatbuffers::Follow<'a> for ContentSource<'a> {
16152  type Inner = ContentSource<'a>;
16153  #[inline]
16154  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
16155    Self { _tab: flatbuffers::Table::new(buf, loc) }
16156  }
16157}
16158
16159impl<'a> ContentSource<'a> {
16160  pub const VT_PROVIDER: flatbuffers::VOffsetT = 4;
16161  pub const VT_ENDPOINT: flatbuffers::VOffsetT = 6;
16162  pub const VT_AUTH_METHOD: flatbuffers::VOffsetT = 8;
16163
16164  #[inline]
16165  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
16166    ContentSource { _tab: table }
16167  }
16168  #[allow(unused_mut)]
16169  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
16170    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
16171    args: &'args ContentSourceArgs<'args>
16172  ) -> flatbuffers::WIPOffset<ContentSource<'bldr>> {
16173    let mut builder = ContentSourceBuilder::new(_fbb);
16174    if let Some(x) = args.auth_method { builder.add_auth_method(x); }
16175    if let Some(x) = args.endpoint { builder.add_endpoint(x); }
16176    if let Some(x) = args.provider { builder.add_provider(x); }
16177    builder.finish()
16178  }
16179
16180
16181  /// CMS provider.
16182  #[inline]
16183  pub fn provider(&self) -> Option<&'a str> {
16184    // Safety:
16185    // Created from valid Table for this object
16186    // which contains a valid value in this slot
16187    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ContentSource::VT_PROVIDER, None)}
16188  }
16189  /// API endpoint or base URL.
16190  #[inline]
16191  pub fn endpoint(&self) -> Option<&'a str> {
16192    // Safety:
16193    // Created from valid Table for this object
16194    // which contains a valid value in this slot
16195    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ContentSource::VT_ENDPOINT, None)}
16196  }
16197  /// Authentication method for the CMS API.
16198  #[inline]
16199  pub fn auth_method(&self) -> Option<&'a str> {
16200    // Safety:
16201    // Created from valid Table for this object
16202    // which contains a valid value in this slot
16203    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ContentSource::VT_AUTH_METHOD, None)}
16204  }
16205}
16206
16207impl flatbuffers::Verifiable for ContentSource<'_> {
16208  #[inline]
16209  fn run_verifier(
16210    v: &mut flatbuffers::Verifier, pos: usize
16211  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
16212    use self::flatbuffers::Verifiable;
16213    v.visit_table(pos)?
16214     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("provider", Self::VT_PROVIDER, false)?
16215     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("endpoint", Self::VT_ENDPOINT, false)?
16216     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("auth_method", Self::VT_AUTH_METHOD, false)?
16217     .finish();
16218    Ok(())
16219  }
16220}
16221pub struct ContentSourceArgs<'a> {
16222    pub provider: Option<flatbuffers::WIPOffset<&'a str>>,
16223    pub endpoint: Option<flatbuffers::WIPOffset<&'a str>>,
16224    pub auth_method: Option<flatbuffers::WIPOffset<&'a str>>,
16225}
16226impl<'a> Default for ContentSourceArgs<'a> {
16227  #[inline]
16228  fn default() -> Self {
16229    ContentSourceArgs {
16230      provider: None,
16231      endpoint: None,
16232      auth_method: None,
16233    }
16234  }
16235}
16236
16237pub struct ContentSourceBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
16238  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
16239  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
16240}
16241impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ContentSourceBuilder<'a, 'b, A> {
16242  #[inline]
16243  pub fn add_provider(&mut self, provider: flatbuffers::WIPOffset<&'b  str>) {
16244    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ContentSource::VT_PROVIDER, provider);
16245  }
16246  #[inline]
16247  pub fn add_endpoint(&mut self, endpoint: flatbuffers::WIPOffset<&'b  str>) {
16248    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ContentSource::VT_ENDPOINT, endpoint);
16249  }
16250  #[inline]
16251  pub fn add_auth_method(&mut self, auth_method: flatbuffers::WIPOffset<&'b  str>) {
16252    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ContentSource::VT_AUTH_METHOD, auth_method);
16253  }
16254  #[inline]
16255  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ContentSourceBuilder<'a, 'b, A> {
16256    let start = _fbb.start_table();
16257    ContentSourceBuilder {
16258      fbb_: _fbb,
16259      start_: start,
16260    }
16261  }
16262  #[inline]
16263  pub fn finish(self) -> flatbuffers::WIPOffset<ContentSource<'a>> {
16264    let o = self.fbb_.end_table(self.start_);
16265    flatbuffers::WIPOffset::new(o.value())
16266  }
16267}
16268
16269impl core::fmt::Debug for ContentSource<'_> {
16270  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
16271    let mut ds = f.debug_struct("ContentSource");
16272      ds.field("provider", &self.provider());
16273      ds.field("endpoint", &self.endpoint());
16274      ds.field("auth_method", &self.auth_method());
16275      ds.finish()
16276  }
16277}
16278pub enum ContentSlotOffset {}
16279#[derive(Copy, Clone, PartialEq)]
16280
16281pub struct ContentSlot<'a> {
16282  pub _tab: flatbuffers::Table<'a>,
16283}
16284
16285impl<'a> flatbuffers::Follow<'a> for ContentSlot<'a> {
16286  type Inner = ContentSlot<'a>;
16287  #[inline]
16288  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
16289    Self { _tab: flatbuffers::Table::new(buf, loc) }
16290  }
16291}
16292
16293impl<'a> ContentSlot<'a> {
16294  pub const VT_NODE_ID: flatbuffers::VOffsetT = 4;
16295  pub const VT_CONTENT_KEY: flatbuffers::VOffsetT = 6;
16296  pub const VT_SOURCE: flatbuffers::VOffsetT = 8;
16297  pub const VT_FALLBACK: flatbuffers::VOffsetT = 10;
16298  pub const VT_CACHE_STRATEGY: flatbuffers::VOffsetT = 12;
16299  pub const VT_CONTENT_TYPE: flatbuffers::VOffsetT = 14;
16300  pub const VT_LOCALE: flatbuffers::VOffsetT = 16;
16301
16302  #[inline]
16303  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
16304    ContentSlot { _tab: table }
16305  }
16306  #[allow(unused_mut)]
16307  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
16308    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
16309    args: &'args ContentSlotArgs<'args>
16310  ) -> flatbuffers::WIPOffset<ContentSlot<'bldr>> {
16311    let mut builder = ContentSlotBuilder::new(_fbb);
16312    if let Some(x) = args.locale { builder.add_locale(x); }
16313    if let Some(x) = args.fallback { builder.add_fallback(x); }
16314    if let Some(x) = args.source { builder.add_source(x); }
16315    if let Some(x) = args.content_key { builder.add_content_key(x); }
16316    if let Some(x) = args.node_id { builder.add_node_id(x); }
16317    builder.add_content_type(args.content_type);
16318    builder.add_cache_strategy(args.cache_strategy);
16319    builder.finish()
16320  }
16321
16322
16323  #[inline]
16324  pub fn node_id(&self) -> &'a str {
16325    // Safety:
16326    // Created from valid Table for this object
16327    // which contains a valid value in this slot
16328    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ContentSlot::VT_NODE_ID, None).unwrap()}
16329  }
16330  /// Content key in the CMS (entry ID or content path).
16331  #[inline]
16332  pub fn content_key(&self) -> &'a str {
16333    // Safety:
16334    // Created from valid Table for this object
16335    // which contains a valid value in this slot
16336    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ContentSlot::VT_CONTENT_KEY, None).unwrap()}
16337  }
16338  #[inline]
16339  pub fn source(&self) -> Option<ContentSource<'a>> {
16340    // Safety:
16341    // Created from valid Table for this object
16342    // which contains a valid value in this slot
16343    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<ContentSource>>(ContentSlot::VT_SOURCE, None)}
16344  }
16345  /// Fallback content if CMS fetch fails.
16346  #[inline]
16347  pub fn fallback(&self) -> Option<&'a str> {
16348    // Safety:
16349    // Created from valid Table for this object
16350    // which contains a valid value in this slot
16351    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ContentSlot::VT_FALLBACK, None)}
16352  }
16353  #[inline]
16354  pub fn cache_strategy(&self) -> ContentCacheStrategy {
16355    // Safety:
16356    // Created from valid Table for this object
16357    // which contains a valid value in this slot
16358    unsafe { self._tab.get::<ContentCacheStrategy>(ContentSlot::VT_CACHE_STRATEGY, Some(ContentCacheStrategy::Static)).unwrap()}
16359  }
16360  #[inline]
16361  pub fn content_type(&self) -> ContentType {
16362    // Safety:
16363    // Created from valid Table for this object
16364    // which contains a valid value in this slot
16365    unsafe { self._tab.get::<ContentType>(ContentSlot::VT_CONTENT_TYPE, Some(ContentType::Text)).unwrap()}
16366  }
16367  /// Locale for this content slot (i18n).
16368  #[inline]
16369  pub fn locale(&self) -> Option<&'a str> {
16370    // Safety:
16371    // Created from valid Table for this object
16372    // which contains a valid value in this slot
16373    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ContentSlot::VT_LOCALE, None)}
16374  }
16375}
16376
16377impl flatbuffers::Verifiable for ContentSlot<'_> {
16378  #[inline]
16379  fn run_verifier(
16380    v: &mut flatbuffers::Verifier, pos: usize
16381  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
16382    use self::flatbuffers::Verifiable;
16383    v.visit_table(pos)?
16384     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("node_id", Self::VT_NODE_ID, true)?
16385     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("content_key", Self::VT_CONTENT_KEY, true)?
16386     .visit_field::<flatbuffers::ForwardsUOffset<ContentSource>>("source", Self::VT_SOURCE, false)?
16387     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("fallback", Self::VT_FALLBACK, false)?
16388     .visit_field::<ContentCacheStrategy>("cache_strategy", Self::VT_CACHE_STRATEGY, false)?
16389     .visit_field::<ContentType>("content_type", Self::VT_CONTENT_TYPE, false)?
16390     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("locale", Self::VT_LOCALE, false)?
16391     .finish();
16392    Ok(())
16393  }
16394}
16395pub struct ContentSlotArgs<'a> {
16396    pub node_id: Option<flatbuffers::WIPOffset<&'a str>>,
16397    pub content_key: Option<flatbuffers::WIPOffset<&'a str>>,
16398    pub source: Option<flatbuffers::WIPOffset<ContentSource<'a>>>,
16399    pub fallback: Option<flatbuffers::WIPOffset<&'a str>>,
16400    pub cache_strategy: ContentCacheStrategy,
16401    pub content_type: ContentType,
16402    pub locale: Option<flatbuffers::WIPOffset<&'a str>>,
16403}
16404impl<'a> Default for ContentSlotArgs<'a> {
16405  #[inline]
16406  fn default() -> Self {
16407    ContentSlotArgs {
16408      node_id: None, // required field
16409      content_key: None, // required field
16410      source: None,
16411      fallback: None,
16412      cache_strategy: ContentCacheStrategy::Static,
16413      content_type: ContentType::Text,
16414      locale: None,
16415    }
16416  }
16417}
16418
16419pub struct ContentSlotBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
16420  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
16421  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
16422}
16423impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ContentSlotBuilder<'a, 'b, A> {
16424  #[inline]
16425  pub fn add_node_id(&mut self, node_id: flatbuffers::WIPOffset<&'b  str>) {
16426    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ContentSlot::VT_NODE_ID, node_id);
16427  }
16428  #[inline]
16429  pub fn add_content_key(&mut self, content_key: flatbuffers::WIPOffset<&'b  str>) {
16430    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ContentSlot::VT_CONTENT_KEY, content_key);
16431  }
16432  #[inline]
16433  pub fn add_source(&mut self, source: flatbuffers::WIPOffset<ContentSource<'b >>) {
16434    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<ContentSource>>(ContentSlot::VT_SOURCE, source);
16435  }
16436  #[inline]
16437  pub fn add_fallback(&mut self, fallback: flatbuffers::WIPOffset<&'b  str>) {
16438    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ContentSlot::VT_FALLBACK, fallback);
16439  }
16440  #[inline]
16441  pub fn add_cache_strategy(&mut self, cache_strategy: ContentCacheStrategy) {
16442    self.fbb_.push_slot::<ContentCacheStrategy>(ContentSlot::VT_CACHE_STRATEGY, cache_strategy, ContentCacheStrategy::Static);
16443  }
16444  #[inline]
16445  pub fn add_content_type(&mut self, content_type: ContentType) {
16446    self.fbb_.push_slot::<ContentType>(ContentSlot::VT_CONTENT_TYPE, content_type, ContentType::Text);
16447  }
16448  #[inline]
16449  pub fn add_locale(&mut self, locale: flatbuffers::WIPOffset<&'b  str>) {
16450    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ContentSlot::VT_LOCALE, locale);
16451  }
16452  #[inline]
16453  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ContentSlotBuilder<'a, 'b, A> {
16454    let start = _fbb.start_table();
16455    ContentSlotBuilder {
16456      fbb_: _fbb,
16457      start_: start,
16458    }
16459  }
16460  #[inline]
16461  pub fn finish(self) -> flatbuffers::WIPOffset<ContentSlot<'a>> {
16462    let o = self.fbb_.end_table(self.start_);
16463    self.fbb_.required(o, ContentSlot::VT_NODE_ID,"node_id");
16464    self.fbb_.required(o, ContentSlot::VT_CONTENT_KEY,"content_key");
16465    flatbuffers::WIPOffset::new(o.value())
16466  }
16467}
16468
16469impl core::fmt::Debug for ContentSlot<'_> {
16470  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
16471    let mut ds = f.debug_struct("ContentSlot");
16472      ds.field("node_id", &self.node_id());
16473      ds.field("content_key", &self.content_key());
16474      ds.field("source", &self.source());
16475      ds.field("fallback", &self.fallback());
16476      ds.field("cache_strategy", &self.cache_strategy());
16477      ds.field("content_type", &self.content_type());
16478      ds.field("locale", &self.locale());
16479      ds.finish()
16480  }
16481}
16482pub enum RichTextSpanOffset {}
16483#[derive(Copy, Clone, PartialEq)]
16484
16485pub struct RichTextSpan<'a> {
16486  pub _tab: flatbuffers::Table<'a>,
16487}
16488
16489impl<'a> flatbuffers::Follow<'a> for RichTextSpan<'a> {
16490  type Inner = RichTextSpan<'a>;
16491  #[inline]
16492  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
16493    Self { _tab: flatbuffers::Table::new(buf, loc) }
16494  }
16495}
16496
16497impl<'a> RichTextSpan<'a> {
16498  pub const VT_TEXT: flatbuffers::VOffsetT = 4;
16499  pub const VT_MARKS: flatbuffers::VOffsetT = 6;
16500  pub const VT_LINK_URL: flatbuffers::VOffsetT = 8;
16501
16502  #[inline]
16503  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
16504    RichTextSpan { _tab: table }
16505  }
16506  #[allow(unused_mut)]
16507  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
16508    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
16509    args: &'args RichTextSpanArgs<'args>
16510  ) -> flatbuffers::WIPOffset<RichTextSpan<'bldr>> {
16511    let mut builder = RichTextSpanBuilder::new(_fbb);
16512    if let Some(x) = args.link_url { builder.add_link_url(x); }
16513    if let Some(x) = args.marks { builder.add_marks(x); }
16514    if let Some(x) = args.text { builder.add_text(x); }
16515    builder.finish()
16516  }
16517
16518
16519  #[inline]
16520  pub fn text(&self) -> &'a str {
16521    // Safety:
16522    // Created from valid Table for this object
16523    // which contains a valid value in this slot
16524    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(RichTextSpan::VT_TEXT, None).unwrap()}
16525  }
16526  #[inline]
16527  pub fn marks(&self) -> Option<flatbuffers::Vector<'a, RichTextMark>> {
16528    // Safety:
16529    // Created from valid Table for this object
16530    // which contains a valid value in this slot
16531    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, RichTextMark>>>(RichTextSpan::VT_MARKS, None)}
16532  }
16533  /// If this span is a link, the URL.
16534  #[inline]
16535  pub fn link_url(&self) -> Option<&'a str> {
16536    // Safety:
16537    // Created from valid Table for this object
16538    // which contains a valid value in this slot
16539    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(RichTextSpan::VT_LINK_URL, None)}
16540  }
16541}
16542
16543impl flatbuffers::Verifiable for RichTextSpan<'_> {
16544  #[inline]
16545  fn run_verifier(
16546    v: &mut flatbuffers::Verifier, pos: usize
16547  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
16548    use self::flatbuffers::Verifiable;
16549    v.visit_table(pos)?
16550     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("text", Self::VT_TEXT, true)?
16551     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, RichTextMark>>>("marks", Self::VT_MARKS, false)?
16552     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("link_url", Self::VT_LINK_URL, false)?
16553     .finish();
16554    Ok(())
16555  }
16556}
16557pub struct RichTextSpanArgs<'a> {
16558    pub text: Option<flatbuffers::WIPOffset<&'a str>>,
16559    pub marks: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, RichTextMark>>>,
16560    pub link_url: Option<flatbuffers::WIPOffset<&'a str>>,
16561}
16562impl<'a> Default for RichTextSpanArgs<'a> {
16563  #[inline]
16564  fn default() -> Self {
16565    RichTextSpanArgs {
16566      text: None, // required field
16567      marks: None,
16568      link_url: None,
16569    }
16570  }
16571}
16572
16573pub struct RichTextSpanBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
16574  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
16575  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
16576}
16577impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RichTextSpanBuilder<'a, 'b, A> {
16578  #[inline]
16579  pub fn add_text(&mut self, text: flatbuffers::WIPOffset<&'b  str>) {
16580    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(RichTextSpan::VT_TEXT, text);
16581  }
16582  #[inline]
16583  pub fn add_marks(&mut self, marks: flatbuffers::WIPOffset<flatbuffers::Vector<'b , RichTextMark>>) {
16584    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(RichTextSpan::VT_MARKS, marks);
16585  }
16586  #[inline]
16587  pub fn add_link_url(&mut self, link_url: flatbuffers::WIPOffset<&'b  str>) {
16588    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(RichTextSpan::VT_LINK_URL, link_url);
16589  }
16590  #[inline]
16591  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> RichTextSpanBuilder<'a, 'b, A> {
16592    let start = _fbb.start_table();
16593    RichTextSpanBuilder {
16594      fbb_: _fbb,
16595      start_: start,
16596    }
16597  }
16598  #[inline]
16599  pub fn finish(self) -> flatbuffers::WIPOffset<RichTextSpan<'a>> {
16600    let o = self.fbb_.end_table(self.start_);
16601    self.fbb_.required(o, RichTextSpan::VT_TEXT,"text");
16602    flatbuffers::WIPOffset::new(o.value())
16603  }
16604}
16605
16606impl core::fmt::Debug for RichTextSpan<'_> {
16607  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
16608    let mut ds = f.debug_struct("RichTextSpan");
16609      ds.field("text", &self.text());
16610      ds.field("marks", &self.marks());
16611      ds.field("link_url", &self.link_url());
16612      ds.finish()
16613  }
16614}
16615pub enum RichTextBlockOffset {}
16616#[derive(Copy, Clone, PartialEq)]
16617
16618pub struct RichTextBlock<'a> {
16619  pub _tab: flatbuffers::Table<'a>,
16620}
16621
16622impl<'a> flatbuffers::Follow<'a> for RichTextBlock<'a> {
16623  type Inner = RichTextBlock<'a>;
16624  #[inline]
16625  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
16626    Self { _tab: flatbuffers::Table::new(buf, loc) }
16627  }
16628}
16629
16630impl<'a> RichTextBlock<'a> {
16631  pub const VT_BLOCK_TYPE: flatbuffers::VOffsetT = 4;
16632  pub const VT_LEVEL: flatbuffers::VOffsetT = 6;
16633  pub const VT_CHILDREN: flatbuffers::VOffsetT = 8;
16634  pub const VT_MEDIA_SRC: flatbuffers::VOffsetT = 10;
16635  pub const VT_MEDIA_ALT: flatbuffers::VOffsetT = 12;
16636  pub const VT_CODE_LANGUAGE: flatbuffers::VOffsetT = 14;
16637  pub const VT_ROWS: flatbuffers::VOffsetT = 16;
16638
16639  #[inline]
16640  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
16641    RichTextBlock { _tab: table }
16642  }
16643  #[allow(unused_mut)]
16644  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
16645    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
16646    args: &'args RichTextBlockArgs<'args>
16647  ) -> flatbuffers::WIPOffset<RichTextBlock<'bldr>> {
16648    let mut builder = RichTextBlockBuilder::new(_fbb);
16649    if let Some(x) = args.rows { builder.add_rows(x); }
16650    if let Some(x) = args.code_language { builder.add_code_language(x); }
16651    if let Some(x) = args.media_alt { builder.add_media_alt(x); }
16652    if let Some(x) = args.media_src { builder.add_media_src(x); }
16653    if let Some(x) = args.children { builder.add_children(x); }
16654    builder.add_level(args.level);
16655    builder.add_block_type(args.block_type);
16656    builder.finish()
16657  }
16658
16659
16660  #[inline]
16661  pub fn block_type(&self) -> RichTextBlockType {
16662    // Safety:
16663    // Created from valid Table for this object
16664    // which contains a valid value in this slot
16665    unsafe { self._tab.get::<RichTextBlockType>(RichTextBlock::VT_BLOCK_TYPE, Some(RichTextBlockType::Paragraph)).unwrap()}
16666  }
16667  /// Heading level (1-6), list depth, etc.
16668  #[inline]
16669  pub fn level(&self) -> i8 {
16670    // Safety:
16671    // Created from valid Table for this object
16672    // which contains a valid value in this slot
16673    unsafe { self._tab.get::<i8>(RichTextBlock::VT_LEVEL, Some(0)).unwrap()}
16674  }
16675  /// Inline text content.
16676  #[inline]
16677  pub fn children(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<RichTextSpan<'a>>>> {
16678    // Safety:
16679    // Created from valid Table for this object
16680    // which contains a valid value in this slot
16681    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<RichTextSpan>>>>(RichTextBlock::VT_CHILDREN, None)}
16682  }
16683  /// For Image blocks — embedded media.
16684  #[inline]
16685  pub fn media_src(&self) -> Option<&'a str> {
16686    // Safety:
16687    // Created from valid Table for this object
16688    // which contains a valid value in this slot
16689    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(RichTextBlock::VT_MEDIA_SRC, None)}
16690  }
16691  #[inline]
16692  pub fn media_alt(&self) -> Option<&'a str> {
16693    // Safety:
16694    // Created from valid Table for this object
16695    // which contains a valid value in this slot
16696    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(RichTextBlock::VT_MEDIA_ALT, None)}
16697  }
16698  /// For CodeBlock — language hint.
16699  #[inline]
16700  pub fn code_language(&self) -> Option<&'a str> {
16701    // Safety:
16702    // Created from valid Table for this object
16703    // which contains a valid value in this slot
16704    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(RichTextBlock::VT_CODE_LANGUAGE, None)}
16705  }
16706  /// For Table — nested rows.
16707  #[inline]
16708  pub fn rows(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<RichTextBlock<'a>>>> {
16709    // Safety:
16710    // Created from valid Table for this object
16711    // which contains a valid value in this slot
16712    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<RichTextBlock>>>>(RichTextBlock::VT_ROWS, None)}
16713  }
16714}
16715
16716impl flatbuffers::Verifiable for RichTextBlock<'_> {
16717  #[inline]
16718  fn run_verifier(
16719    v: &mut flatbuffers::Verifier, pos: usize
16720  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
16721    use self::flatbuffers::Verifiable;
16722    v.visit_table(pos)?
16723     .visit_field::<RichTextBlockType>("block_type", Self::VT_BLOCK_TYPE, false)?
16724     .visit_field::<i8>("level", Self::VT_LEVEL, false)?
16725     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<RichTextSpan>>>>("children", Self::VT_CHILDREN, false)?
16726     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("media_src", Self::VT_MEDIA_SRC, false)?
16727     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("media_alt", Self::VT_MEDIA_ALT, false)?
16728     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("code_language", Self::VT_CODE_LANGUAGE, false)?
16729     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<RichTextBlock>>>>("rows", Self::VT_ROWS, false)?
16730     .finish();
16731    Ok(())
16732  }
16733}
16734pub struct RichTextBlockArgs<'a> {
16735    pub block_type: RichTextBlockType,
16736    pub level: i8,
16737    pub children: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<RichTextSpan<'a>>>>>,
16738    pub media_src: Option<flatbuffers::WIPOffset<&'a str>>,
16739    pub media_alt: Option<flatbuffers::WIPOffset<&'a str>>,
16740    pub code_language: Option<flatbuffers::WIPOffset<&'a str>>,
16741    pub rows: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<RichTextBlock<'a>>>>>,
16742}
16743impl<'a> Default for RichTextBlockArgs<'a> {
16744  #[inline]
16745  fn default() -> Self {
16746    RichTextBlockArgs {
16747      block_type: RichTextBlockType::Paragraph,
16748      level: 0,
16749      children: None,
16750      media_src: None,
16751      media_alt: None,
16752      code_language: None,
16753      rows: None,
16754    }
16755  }
16756}
16757
16758pub struct RichTextBlockBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
16759  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
16760  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
16761}
16762impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RichTextBlockBuilder<'a, 'b, A> {
16763  #[inline]
16764  pub fn add_block_type(&mut self, block_type: RichTextBlockType) {
16765    self.fbb_.push_slot::<RichTextBlockType>(RichTextBlock::VT_BLOCK_TYPE, block_type, RichTextBlockType::Paragraph);
16766  }
16767  #[inline]
16768  pub fn add_level(&mut self, level: i8) {
16769    self.fbb_.push_slot::<i8>(RichTextBlock::VT_LEVEL, level, 0);
16770  }
16771  #[inline]
16772  pub fn add_children(&mut self, children: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<RichTextSpan<'b >>>>) {
16773    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(RichTextBlock::VT_CHILDREN, children);
16774  }
16775  #[inline]
16776  pub fn add_media_src(&mut self, media_src: flatbuffers::WIPOffset<&'b  str>) {
16777    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(RichTextBlock::VT_MEDIA_SRC, media_src);
16778  }
16779  #[inline]
16780  pub fn add_media_alt(&mut self, media_alt: flatbuffers::WIPOffset<&'b  str>) {
16781    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(RichTextBlock::VT_MEDIA_ALT, media_alt);
16782  }
16783  #[inline]
16784  pub fn add_code_language(&mut self, code_language: flatbuffers::WIPOffset<&'b  str>) {
16785    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(RichTextBlock::VT_CODE_LANGUAGE, code_language);
16786  }
16787  #[inline]
16788  pub fn add_rows(&mut self, rows: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<RichTextBlock<'b >>>>) {
16789    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(RichTextBlock::VT_ROWS, rows);
16790  }
16791  #[inline]
16792  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> RichTextBlockBuilder<'a, 'b, A> {
16793    let start = _fbb.start_table();
16794    RichTextBlockBuilder {
16795      fbb_: _fbb,
16796      start_: start,
16797    }
16798  }
16799  #[inline]
16800  pub fn finish(self) -> flatbuffers::WIPOffset<RichTextBlock<'a>> {
16801    let o = self.fbb_.end_table(self.start_);
16802    flatbuffers::WIPOffset::new(o.value())
16803  }
16804}
16805
16806impl core::fmt::Debug for RichTextBlock<'_> {
16807  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
16808    let mut ds = f.debug_struct("RichTextBlock");
16809      ds.field("block_type", &self.block_type());
16810      ds.field("level", &self.level());
16811      ds.field("children", &self.children());
16812      ds.field("media_src", &self.media_src());
16813      ds.field("media_alt", &self.media_alt());
16814      ds.field("code_language", &self.code_language());
16815      ds.field("rows", &self.rows());
16816      ds.finish()
16817  }
16818}
16819pub enum RichTextNodeOffset {}
16820#[derive(Copy, Clone, PartialEq)]
16821
16822pub struct RichTextNode<'a> {
16823  pub _tab: flatbuffers::Table<'a>,
16824}
16825
16826impl<'a> flatbuffers::Follow<'a> for RichTextNode<'a> {
16827  type Inner = RichTextNode<'a>;
16828  #[inline]
16829  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
16830    Self { _tab: flatbuffers::Table::new(buf, loc) }
16831  }
16832}
16833
16834impl<'a> RichTextNode<'a> {
16835  pub const VT_NODE_ID: flatbuffers::VOffsetT = 4;
16836  pub const VT_BLOCKS: flatbuffers::VOffsetT = 6;
16837  pub const VT_CONTENT_SLOT: flatbuffers::VOffsetT = 8;
16838
16839  #[inline]
16840  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
16841    RichTextNode { _tab: table }
16842  }
16843  #[allow(unused_mut)]
16844  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
16845    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
16846    args: &'args RichTextNodeArgs<'args>
16847  ) -> flatbuffers::WIPOffset<RichTextNode<'bldr>> {
16848    let mut builder = RichTextNodeBuilder::new(_fbb);
16849    if let Some(x) = args.content_slot { builder.add_content_slot(x); }
16850    if let Some(x) = args.blocks { builder.add_blocks(x); }
16851    if let Some(x) = args.node_id { builder.add_node_id(x); }
16852    builder.finish()
16853  }
16854
16855
16856  #[inline]
16857  pub fn node_id(&self) -> &'a str {
16858    // Safety:
16859    // Created from valid Table for this object
16860    // which contains a valid value in this slot
16861    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(RichTextNode::VT_NODE_ID, None).unwrap()}
16862  }
16863  #[inline]
16864  pub fn blocks(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<RichTextBlock<'a>>> {
16865    // Safety:
16866    // Created from valid Table for this object
16867    // which contains a valid value in this slot
16868    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<RichTextBlock>>>>(RichTextNode::VT_BLOCKS, None).unwrap()}
16869  }
16870  /// Content source (if from CMS).
16871  #[inline]
16872  pub fn content_slot(&self) -> Option<ContentSlot<'a>> {
16873    // Safety:
16874    // Created from valid Table for this object
16875    // which contains a valid value in this slot
16876    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<ContentSlot>>(RichTextNode::VT_CONTENT_SLOT, None)}
16877  }
16878}
16879
16880impl flatbuffers::Verifiable for RichTextNode<'_> {
16881  #[inline]
16882  fn run_verifier(
16883    v: &mut flatbuffers::Verifier, pos: usize
16884  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
16885    use self::flatbuffers::Verifiable;
16886    v.visit_table(pos)?
16887     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("node_id", Self::VT_NODE_ID, true)?
16888     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<RichTextBlock>>>>("blocks", Self::VT_BLOCKS, true)?
16889     .visit_field::<flatbuffers::ForwardsUOffset<ContentSlot>>("content_slot", Self::VT_CONTENT_SLOT, false)?
16890     .finish();
16891    Ok(())
16892  }
16893}
16894pub struct RichTextNodeArgs<'a> {
16895    pub node_id: Option<flatbuffers::WIPOffset<&'a str>>,
16896    pub blocks: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<RichTextBlock<'a>>>>>,
16897    pub content_slot: Option<flatbuffers::WIPOffset<ContentSlot<'a>>>,
16898}
16899impl<'a> Default for RichTextNodeArgs<'a> {
16900  #[inline]
16901  fn default() -> Self {
16902    RichTextNodeArgs {
16903      node_id: None, // required field
16904      blocks: None, // required field
16905      content_slot: None,
16906    }
16907  }
16908}
16909
16910pub struct RichTextNodeBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
16911  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
16912  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
16913}
16914impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RichTextNodeBuilder<'a, 'b, A> {
16915  #[inline]
16916  pub fn add_node_id(&mut self, node_id: flatbuffers::WIPOffset<&'b  str>) {
16917    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(RichTextNode::VT_NODE_ID, node_id);
16918  }
16919  #[inline]
16920  pub fn add_blocks(&mut self, blocks: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<RichTextBlock<'b >>>>) {
16921    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(RichTextNode::VT_BLOCKS, blocks);
16922  }
16923  #[inline]
16924  pub fn add_content_slot(&mut self, content_slot: flatbuffers::WIPOffset<ContentSlot<'b >>) {
16925    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<ContentSlot>>(RichTextNode::VT_CONTENT_SLOT, content_slot);
16926  }
16927  #[inline]
16928  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> RichTextNodeBuilder<'a, 'b, A> {
16929    let start = _fbb.start_table();
16930    RichTextNodeBuilder {
16931      fbb_: _fbb,
16932      start_: start,
16933    }
16934  }
16935  #[inline]
16936  pub fn finish(self) -> flatbuffers::WIPOffset<RichTextNode<'a>> {
16937    let o = self.fbb_.end_table(self.start_);
16938    self.fbb_.required(o, RichTextNode::VT_NODE_ID,"node_id");
16939    self.fbb_.required(o, RichTextNode::VT_BLOCKS,"blocks");
16940    flatbuffers::WIPOffset::new(o.value())
16941  }
16942}
16943
16944impl core::fmt::Debug for RichTextNode<'_> {
16945  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
16946    let mut ds = f.debug_struct("RichTextNode");
16947      ds.field("node_id", &self.node_id());
16948      ds.field("blocks", &self.blocks());
16949      ds.field("content_slot", &self.content_slot());
16950      ds.finish()
16951  }
16952}
16953pub enum FormatOptionsOffset {}
16954#[derive(Copy, Clone, PartialEq)]
16955
16956pub struct FormatOptions<'a> {
16957  pub _tab: flatbuffers::Table<'a>,
16958}
16959
16960impl<'a> flatbuffers::Follow<'a> for FormatOptions<'a> {
16961  type Inner = FormatOptions<'a>;
16962  #[inline]
16963  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
16964    Self { _tab: flatbuffers::Table::new(buf, loc) }
16965  }
16966}
16967
16968impl<'a> FormatOptions<'a> {
16969  pub const VT_NUMBER_STYLE: flatbuffers::VOffsetT = 4;
16970  pub const VT_CURRENCY_CODE: flatbuffers::VOffsetT = 6;
16971  pub const VT_DATE_STYLE: flatbuffers::VOffsetT = 8;
16972  pub const VT_CUSTOM_DATE_PATTERN: flatbuffers::VOffsetT = 10;
16973  pub const VT_MIN_FRACTION_DIGITS: flatbuffers::VOffsetT = 12;
16974  pub const VT_MAX_FRACTION_DIGITS: flatbuffers::VOffsetT = 14;
16975
16976  #[inline]
16977  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
16978    FormatOptions { _tab: table }
16979  }
16980  #[allow(unused_mut)]
16981  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
16982    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
16983    args: &'args FormatOptionsArgs<'args>
16984  ) -> flatbuffers::WIPOffset<FormatOptions<'bldr>> {
16985    let mut builder = FormatOptionsBuilder::new(_fbb);
16986    builder.add_max_fraction_digits(args.max_fraction_digits);
16987    builder.add_min_fraction_digits(args.min_fraction_digits);
16988    if let Some(x) = args.custom_date_pattern { builder.add_custom_date_pattern(x); }
16989    if let Some(x) = args.currency_code { builder.add_currency_code(x); }
16990    builder.add_date_style(args.date_style);
16991    builder.add_number_style(args.number_style);
16992    builder.finish()
16993  }
16994
16995
16996  #[inline]
16997  pub fn number_style(&self) -> NumberStyle {
16998    // Safety:
16999    // Created from valid Table for this object
17000    // which contains a valid value in this slot
17001    unsafe { self._tab.get::<NumberStyle>(FormatOptions::VT_NUMBER_STYLE, Some(NumberStyle::Decimal)).unwrap()}
17002  }
17003  /// Currency code (e.g., "USD", "EUR"). Only for Currency number_style.
17004  #[inline]
17005  pub fn currency_code(&self) -> Option<&'a str> {
17006    // Safety:
17007    // Created from valid Table for this object
17008    // which contains a valid value in this slot
17009    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FormatOptions::VT_CURRENCY_CODE, None)}
17010  }
17011  #[inline]
17012  pub fn date_style(&self) -> DateStyle {
17013    // Safety:
17014    // Created from valid Table for this object
17015    // which contains a valid value in this slot
17016    unsafe { self._tab.get::<DateStyle>(FormatOptions::VT_DATE_STYLE, Some(DateStyle::Medium)).unwrap()}
17017  }
17018  /// ICU date pattern (only for Custom date_style, e.g., "yyyy-MM-dd").
17019  #[inline]
17020  pub fn custom_date_pattern(&self) -> Option<&'a str> {
17021    // Safety:
17022    // Created from valid Table for this object
17023    // which contains a valid value in this slot
17024    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FormatOptions::VT_CUSTOM_DATE_PATTERN, None)}
17025  }
17026  /// Minimum fraction digits for numbers.
17027  #[inline]
17028  pub fn min_fraction_digits(&self) -> i32 {
17029    // Safety:
17030    // Created from valid Table for this object
17031    // which contains a valid value in this slot
17032    unsafe { self._tab.get::<i32>(FormatOptions::VT_MIN_FRACTION_DIGITS, Some(0)).unwrap()}
17033  }
17034  /// Maximum fraction digits for numbers.
17035  #[inline]
17036  pub fn max_fraction_digits(&self) -> i32 {
17037    // Safety:
17038    // Created from valid Table for this object
17039    // which contains a valid value in this slot
17040    unsafe { self._tab.get::<i32>(FormatOptions::VT_MAX_FRACTION_DIGITS, Some(0)).unwrap()}
17041  }
17042}
17043
17044impl flatbuffers::Verifiable for FormatOptions<'_> {
17045  #[inline]
17046  fn run_verifier(
17047    v: &mut flatbuffers::Verifier, pos: usize
17048  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
17049    use self::flatbuffers::Verifiable;
17050    v.visit_table(pos)?
17051     .visit_field::<NumberStyle>("number_style", Self::VT_NUMBER_STYLE, false)?
17052     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("currency_code", Self::VT_CURRENCY_CODE, false)?
17053     .visit_field::<DateStyle>("date_style", Self::VT_DATE_STYLE, false)?
17054     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("custom_date_pattern", Self::VT_CUSTOM_DATE_PATTERN, false)?
17055     .visit_field::<i32>("min_fraction_digits", Self::VT_MIN_FRACTION_DIGITS, false)?
17056     .visit_field::<i32>("max_fraction_digits", Self::VT_MAX_FRACTION_DIGITS, false)?
17057     .finish();
17058    Ok(())
17059  }
17060}
17061pub struct FormatOptionsArgs<'a> {
17062    pub number_style: NumberStyle,
17063    pub currency_code: Option<flatbuffers::WIPOffset<&'a str>>,
17064    pub date_style: DateStyle,
17065    pub custom_date_pattern: Option<flatbuffers::WIPOffset<&'a str>>,
17066    pub min_fraction_digits: i32,
17067    pub max_fraction_digits: i32,
17068}
17069impl<'a> Default for FormatOptionsArgs<'a> {
17070  #[inline]
17071  fn default() -> Self {
17072    FormatOptionsArgs {
17073      number_style: NumberStyle::Decimal,
17074      currency_code: None,
17075      date_style: DateStyle::Medium,
17076      custom_date_pattern: None,
17077      min_fraction_digits: 0,
17078      max_fraction_digits: 0,
17079    }
17080  }
17081}
17082
17083pub struct FormatOptionsBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
17084  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
17085  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
17086}
17087impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> FormatOptionsBuilder<'a, 'b, A> {
17088  #[inline]
17089  pub fn add_number_style(&mut self, number_style: NumberStyle) {
17090    self.fbb_.push_slot::<NumberStyle>(FormatOptions::VT_NUMBER_STYLE, number_style, NumberStyle::Decimal);
17091  }
17092  #[inline]
17093  pub fn add_currency_code(&mut self, currency_code: flatbuffers::WIPOffset<&'b  str>) {
17094    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FormatOptions::VT_CURRENCY_CODE, currency_code);
17095  }
17096  #[inline]
17097  pub fn add_date_style(&mut self, date_style: DateStyle) {
17098    self.fbb_.push_slot::<DateStyle>(FormatOptions::VT_DATE_STYLE, date_style, DateStyle::Medium);
17099  }
17100  #[inline]
17101  pub fn add_custom_date_pattern(&mut self, custom_date_pattern: flatbuffers::WIPOffset<&'b  str>) {
17102    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FormatOptions::VT_CUSTOM_DATE_PATTERN, custom_date_pattern);
17103  }
17104  #[inline]
17105  pub fn add_min_fraction_digits(&mut self, min_fraction_digits: i32) {
17106    self.fbb_.push_slot::<i32>(FormatOptions::VT_MIN_FRACTION_DIGITS, min_fraction_digits, 0);
17107  }
17108  #[inline]
17109  pub fn add_max_fraction_digits(&mut self, max_fraction_digits: i32) {
17110    self.fbb_.push_slot::<i32>(FormatOptions::VT_MAX_FRACTION_DIGITS, max_fraction_digits, 0);
17111  }
17112  #[inline]
17113  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> FormatOptionsBuilder<'a, 'b, A> {
17114    let start = _fbb.start_table();
17115    FormatOptionsBuilder {
17116      fbb_: _fbb,
17117      start_: start,
17118    }
17119  }
17120  #[inline]
17121  pub fn finish(self) -> flatbuffers::WIPOffset<FormatOptions<'a>> {
17122    let o = self.fbb_.end_table(self.start_);
17123    flatbuffers::WIPOffset::new(o.value())
17124  }
17125}
17126
17127impl core::fmt::Debug for FormatOptions<'_> {
17128  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
17129    let mut ds = f.debug_struct("FormatOptions");
17130      ds.field("number_style", &self.number_style());
17131      ds.field("currency_code", &self.currency_code());
17132      ds.field("date_style", &self.date_style());
17133      ds.field("custom_date_pattern", &self.custom_date_pattern());
17134      ds.field("min_fraction_digits", &self.min_fraction_digits());
17135      ds.field("max_fraction_digits", &self.max_fraction_digits());
17136      ds.finish()
17137  }
17138}
17139pub enum MessageParameterOffset {}
17140#[derive(Copy, Clone, PartialEq)]
17141
17142pub struct MessageParameter<'a> {
17143  pub _tab: flatbuffers::Table<'a>,
17144}
17145
17146impl<'a> flatbuffers::Follow<'a> for MessageParameter<'a> {
17147  type Inner = MessageParameter<'a>;
17148  #[inline]
17149  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
17150    Self { _tab: flatbuffers::Table::new(buf, loc) }
17151  }
17152}
17153
17154impl<'a> MessageParameter<'a> {
17155  pub const VT_NAME: flatbuffers::VOffsetT = 4;
17156  pub const VT_PARAM_TYPE: flatbuffers::VOffsetT = 6;
17157  pub const VT_FORMAT_OPTIONS: flatbuffers::VOffsetT = 8;
17158
17159  #[inline]
17160  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
17161    MessageParameter { _tab: table }
17162  }
17163  #[allow(unused_mut)]
17164  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
17165    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
17166    args: &'args MessageParameterArgs<'args>
17167  ) -> flatbuffers::WIPOffset<MessageParameter<'bldr>> {
17168    let mut builder = MessageParameterBuilder::new(_fbb);
17169    if let Some(x) = args.format_options { builder.add_format_options(x); }
17170    if let Some(x) = args.name { builder.add_name(x); }
17171    builder.add_param_type(args.param_type);
17172    builder.finish()
17173  }
17174
17175
17176  /// Parameter name (e.g., "count", "name", "date").
17177  #[inline]
17178  pub fn name(&self) -> &'a str {
17179    // Safety:
17180    // Created from valid Table for this object
17181    // which contains a valid value in this slot
17182    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(MessageParameter::VT_NAME, None).unwrap()}
17183  }
17184  #[inline]
17185  pub fn param_type(&self) -> MessageParamType {
17186    // Safety:
17187    // Created from valid Table for this object
17188    // which contains a valid value in this slot
17189    unsafe { self._tab.get::<MessageParamType>(MessageParameter::VT_PARAM_TYPE, Some(MessageParamType::StringParam)).unwrap()}
17190  }
17191  #[inline]
17192  pub fn format_options(&self) -> Option<FormatOptions<'a>> {
17193    // Safety:
17194    // Created from valid Table for this object
17195    // which contains a valid value in this slot
17196    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<FormatOptions>>(MessageParameter::VT_FORMAT_OPTIONS, None)}
17197  }
17198}
17199
17200impl flatbuffers::Verifiable for MessageParameter<'_> {
17201  #[inline]
17202  fn run_verifier(
17203    v: &mut flatbuffers::Verifier, pos: usize
17204  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
17205    use self::flatbuffers::Verifiable;
17206    v.visit_table(pos)?
17207     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
17208     .visit_field::<MessageParamType>("param_type", Self::VT_PARAM_TYPE, false)?
17209     .visit_field::<flatbuffers::ForwardsUOffset<FormatOptions>>("format_options", Self::VT_FORMAT_OPTIONS, false)?
17210     .finish();
17211    Ok(())
17212  }
17213}
17214pub struct MessageParameterArgs<'a> {
17215    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
17216    pub param_type: MessageParamType,
17217    pub format_options: Option<flatbuffers::WIPOffset<FormatOptions<'a>>>,
17218}
17219impl<'a> Default for MessageParameterArgs<'a> {
17220  #[inline]
17221  fn default() -> Self {
17222    MessageParameterArgs {
17223      name: None, // required field
17224      param_type: MessageParamType::StringParam,
17225      format_options: None,
17226    }
17227  }
17228}
17229
17230pub struct MessageParameterBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
17231  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
17232  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
17233}
17234impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> MessageParameterBuilder<'a, 'b, A> {
17235  #[inline]
17236  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
17237    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(MessageParameter::VT_NAME, name);
17238  }
17239  #[inline]
17240  pub fn add_param_type(&mut self, param_type: MessageParamType) {
17241    self.fbb_.push_slot::<MessageParamType>(MessageParameter::VT_PARAM_TYPE, param_type, MessageParamType::StringParam);
17242  }
17243  #[inline]
17244  pub fn add_format_options(&mut self, format_options: flatbuffers::WIPOffset<FormatOptions<'b >>) {
17245    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<FormatOptions>>(MessageParameter::VT_FORMAT_OPTIONS, format_options);
17246  }
17247  #[inline]
17248  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> MessageParameterBuilder<'a, 'b, A> {
17249    let start = _fbb.start_table();
17250    MessageParameterBuilder {
17251      fbb_: _fbb,
17252      start_: start,
17253    }
17254  }
17255  #[inline]
17256  pub fn finish(self) -> flatbuffers::WIPOffset<MessageParameter<'a>> {
17257    let o = self.fbb_.end_table(self.start_);
17258    self.fbb_.required(o, MessageParameter::VT_NAME,"name");
17259    flatbuffers::WIPOffset::new(o.value())
17260  }
17261}
17262
17263impl core::fmt::Debug for MessageParameter<'_> {
17264  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
17265    let mut ds = f.debug_struct("MessageParameter");
17266      ds.field("name", &self.name());
17267      ds.field("param_type", &self.param_type());
17268      ds.field("format_options", &self.format_options());
17269      ds.finish()
17270  }
17271}
17272pub enum LocalizedStringOffset {}
17273#[derive(Copy, Clone, PartialEq)]
17274
17275pub struct LocalizedString<'a> {
17276  pub _tab: flatbuffers::Table<'a>,
17277}
17278
17279impl<'a> flatbuffers::Follow<'a> for LocalizedString<'a> {
17280  type Inner = LocalizedString<'a>;
17281  #[inline]
17282  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
17283    Self { _tab: flatbuffers::Table::new(buf, loc) }
17284  }
17285}
17286
17287impl<'a> LocalizedString<'a> {
17288  pub const VT_MESSAGE_KEY: flatbuffers::VOffsetT = 4;
17289  pub const VT_DEFAULT_VALUE: flatbuffers::VOffsetT = 6;
17290  pub const VT_PARAMETERS: flatbuffers::VOffsetT = 8;
17291  pub const VT_DESCRIPTION: flatbuffers::VOffsetT = 10;
17292
17293  #[inline]
17294  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
17295    LocalizedString { _tab: table }
17296  }
17297  #[allow(unused_mut)]
17298  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
17299    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
17300    args: &'args LocalizedStringArgs<'args>
17301  ) -> flatbuffers::WIPOffset<LocalizedString<'bldr>> {
17302    let mut builder = LocalizedStringBuilder::new(_fbb);
17303    if let Some(x) = args.description { builder.add_description(x); }
17304    if let Some(x) = args.parameters { builder.add_parameters(x); }
17305    if let Some(x) = args.default_value { builder.add_default_value(x); }
17306    if let Some(x) = args.message_key { builder.add_message_key(x); }
17307    builder.finish()
17308  }
17309
17310
17311  /// Message key (e.g., "hero.title", "form.email.label").
17312  #[inline]
17313  pub fn message_key(&self) -> &'a str {
17314    // Safety:
17315    // Created from valid Table for this object
17316    // which contains a valid value in this slot
17317    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(LocalizedString::VT_MESSAGE_KEY, None).unwrap()}
17318  }
17319  /// Default value (in the primary language). Used as fallback if
17320  /// the translation is missing.
17321  #[inline]
17322  pub fn default_value(&self) -> Option<&'a str> {
17323    // Safety:
17324    // Created from valid Table for this object
17325    // which contains a valid value in this slot
17326    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(LocalizedString::VT_DEFAULT_VALUE, None)}
17327  }
17328  /// Typed parameters for interpolation.
17329  #[inline]
17330  pub fn parameters(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<MessageParameter<'a>>>> {
17331    // Safety:
17332    // Created from valid Table for this object
17333    // which contains a valid value in this slot
17334    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<MessageParameter>>>>(LocalizedString::VT_PARAMETERS, None)}
17335  }
17336  /// Context description for translators (e.g., "Button label for adding item to cart").
17337  #[inline]
17338  pub fn description(&self) -> Option<&'a str> {
17339    // Safety:
17340    // Created from valid Table for this object
17341    // which contains a valid value in this slot
17342    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(LocalizedString::VT_DESCRIPTION, None)}
17343  }
17344}
17345
17346impl flatbuffers::Verifiable for LocalizedString<'_> {
17347  #[inline]
17348  fn run_verifier(
17349    v: &mut flatbuffers::Verifier, pos: usize
17350  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
17351    use self::flatbuffers::Verifiable;
17352    v.visit_table(pos)?
17353     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("message_key", Self::VT_MESSAGE_KEY, true)?
17354     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("default_value", Self::VT_DEFAULT_VALUE, false)?
17355     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<MessageParameter>>>>("parameters", Self::VT_PARAMETERS, false)?
17356     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("description", Self::VT_DESCRIPTION, false)?
17357     .finish();
17358    Ok(())
17359  }
17360}
17361pub struct LocalizedStringArgs<'a> {
17362    pub message_key: Option<flatbuffers::WIPOffset<&'a str>>,
17363    pub default_value: Option<flatbuffers::WIPOffset<&'a str>>,
17364    pub parameters: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<MessageParameter<'a>>>>>,
17365    pub description: Option<flatbuffers::WIPOffset<&'a str>>,
17366}
17367impl<'a> Default for LocalizedStringArgs<'a> {
17368  #[inline]
17369  fn default() -> Self {
17370    LocalizedStringArgs {
17371      message_key: None, // required field
17372      default_value: None,
17373      parameters: None,
17374      description: None,
17375    }
17376  }
17377}
17378
17379pub struct LocalizedStringBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
17380  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
17381  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
17382}
17383impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> LocalizedStringBuilder<'a, 'b, A> {
17384  #[inline]
17385  pub fn add_message_key(&mut self, message_key: flatbuffers::WIPOffset<&'b  str>) {
17386    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(LocalizedString::VT_MESSAGE_KEY, message_key);
17387  }
17388  #[inline]
17389  pub fn add_default_value(&mut self, default_value: flatbuffers::WIPOffset<&'b  str>) {
17390    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(LocalizedString::VT_DEFAULT_VALUE, default_value);
17391  }
17392  #[inline]
17393  pub fn add_parameters(&mut self, parameters: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<MessageParameter<'b >>>>) {
17394    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(LocalizedString::VT_PARAMETERS, parameters);
17395  }
17396  #[inline]
17397  pub fn add_description(&mut self, description: flatbuffers::WIPOffset<&'b  str>) {
17398    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(LocalizedString::VT_DESCRIPTION, description);
17399  }
17400  #[inline]
17401  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> LocalizedStringBuilder<'a, 'b, A> {
17402    let start = _fbb.start_table();
17403    LocalizedStringBuilder {
17404      fbb_: _fbb,
17405      start_: start,
17406    }
17407  }
17408  #[inline]
17409  pub fn finish(self) -> flatbuffers::WIPOffset<LocalizedString<'a>> {
17410    let o = self.fbb_.end_table(self.start_);
17411    self.fbb_.required(o, LocalizedString::VT_MESSAGE_KEY,"message_key");
17412    flatbuffers::WIPOffset::new(o.value())
17413  }
17414}
17415
17416impl core::fmt::Debug for LocalizedString<'_> {
17417  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
17418    let mut ds = f.debug_struct("LocalizedString");
17419      ds.field("message_key", &self.message_key());
17420      ds.field("default_value", &self.default_value());
17421      ds.field("parameters", &self.parameters());
17422      ds.field("description", &self.description());
17423      ds.finish()
17424  }
17425}
17426pub enum MessageOffset {}
17427#[derive(Copy, Clone, PartialEq)]
17428
17429pub struct Message<'a> {
17430  pub _tab: flatbuffers::Table<'a>,
17431}
17432
17433impl<'a> flatbuffers::Follow<'a> for Message<'a> {
17434  type Inner = Message<'a>;
17435  #[inline]
17436  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
17437    Self { _tab: flatbuffers::Table::new(buf, loc) }
17438  }
17439}
17440
17441impl<'a> Message<'a> {
17442  pub const VT_KEY: flatbuffers::VOffsetT = 4;
17443  pub const VT_VALUE: flatbuffers::VOffsetT = 6;
17444
17445  #[inline]
17446  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
17447    Message { _tab: table }
17448  }
17449  #[allow(unused_mut)]
17450  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
17451    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
17452    args: &'args MessageArgs<'args>
17453  ) -> flatbuffers::WIPOffset<Message<'bldr>> {
17454    let mut builder = MessageBuilder::new(_fbb);
17455    if let Some(x) = args.value { builder.add_value(x); }
17456    if let Some(x) = args.key { builder.add_key(x); }
17457    builder.finish()
17458  }
17459
17460
17461  #[inline]
17462  pub fn key(&self) -> &'a str {
17463    // Safety:
17464    // Created from valid Table for this object
17465    // which contains a valid value in this slot
17466    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Message::VT_KEY, None).unwrap()}
17467  }
17468  /// ICU MessageFormat string.
17469  /// Examples:
17470  ///   "Hello {name}"
17471  ///   "{count, plural, one {# item} other {# items}}"
17472  ///   "{gender, select, female {She} male {He} other {They}} commented"
17473  #[inline]
17474  pub fn value(&self) -> &'a str {
17475    // Safety:
17476    // Created from valid Table for this object
17477    // which contains a valid value in this slot
17478    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Message::VT_VALUE, None).unwrap()}
17479  }
17480}
17481
17482impl flatbuffers::Verifiable for Message<'_> {
17483  #[inline]
17484  fn run_verifier(
17485    v: &mut flatbuffers::Verifier, pos: usize
17486  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
17487    use self::flatbuffers::Verifiable;
17488    v.visit_table(pos)?
17489     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("key", Self::VT_KEY, true)?
17490     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("value", Self::VT_VALUE, true)?
17491     .finish();
17492    Ok(())
17493  }
17494}
17495pub struct MessageArgs<'a> {
17496    pub key: Option<flatbuffers::WIPOffset<&'a str>>,
17497    pub value: Option<flatbuffers::WIPOffset<&'a str>>,
17498}
17499impl<'a> Default for MessageArgs<'a> {
17500  #[inline]
17501  fn default() -> Self {
17502    MessageArgs {
17503      key: None, // required field
17504      value: None, // required field
17505    }
17506  }
17507}
17508
17509pub struct MessageBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
17510  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
17511  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
17512}
17513impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> MessageBuilder<'a, 'b, A> {
17514  #[inline]
17515  pub fn add_key(&mut self, key: flatbuffers::WIPOffset<&'b  str>) {
17516    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Message::VT_KEY, key);
17517  }
17518  #[inline]
17519  pub fn add_value(&mut self, value: flatbuffers::WIPOffset<&'b  str>) {
17520    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Message::VT_VALUE, value);
17521  }
17522  #[inline]
17523  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> MessageBuilder<'a, 'b, A> {
17524    let start = _fbb.start_table();
17525    MessageBuilder {
17526      fbb_: _fbb,
17527      start_: start,
17528    }
17529  }
17530  #[inline]
17531  pub fn finish(self) -> flatbuffers::WIPOffset<Message<'a>> {
17532    let o = self.fbb_.end_table(self.start_);
17533    self.fbb_.required(o, Message::VT_KEY,"key");
17534    self.fbb_.required(o, Message::VT_VALUE,"value");
17535    flatbuffers::WIPOffset::new(o.value())
17536  }
17537}
17538
17539impl core::fmt::Debug for Message<'_> {
17540  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
17541    let mut ds = f.debug_struct("Message");
17542      ds.field("key", &self.key());
17543      ds.field("value", &self.value());
17544      ds.finish()
17545  }
17546}
17547pub enum MessageCatalogOffset {}
17548#[derive(Copy, Clone, PartialEq)]
17549
17550pub struct MessageCatalog<'a> {
17551  pub _tab: flatbuffers::Table<'a>,
17552}
17553
17554impl<'a> flatbuffers::Follow<'a> for MessageCatalog<'a> {
17555  type Inner = MessageCatalog<'a>;
17556  #[inline]
17557  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
17558    Self { _tab: flatbuffers::Table::new(buf, loc) }
17559  }
17560}
17561
17562impl<'a> MessageCatalog<'a> {
17563  pub const VT_LOCALE: flatbuffers::VOffsetT = 4;
17564  pub const VT_MESSAGES: flatbuffers::VOffsetT = 6;
17565  pub const VT_FALLBACK_LOCALE: flatbuffers::VOffsetT = 8;
17566
17567  #[inline]
17568  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
17569    MessageCatalog { _tab: table }
17570  }
17571  #[allow(unused_mut)]
17572  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
17573    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
17574    args: &'args MessageCatalogArgs<'args>
17575  ) -> flatbuffers::WIPOffset<MessageCatalog<'bldr>> {
17576    let mut builder = MessageCatalogBuilder::new(_fbb);
17577    if let Some(x) = args.fallback_locale { builder.add_fallback_locale(x); }
17578    if let Some(x) = args.messages { builder.add_messages(x); }
17579    if let Some(x) = args.locale { builder.add_locale(x); }
17580    builder.finish()
17581  }
17582
17583
17584  /// BCP 47 locale tag (e.g., "en-US", "fr-FR", "ar-SA").
17585  #[inline]
17586  pub fn locale(&self) -> &'a str {
17587    // Safety:
17588    // Created from valid Table for this object
17589    // which contains a valid value in this slot
17590    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(MessageCatalog::VT_LOCALE, None).unwrap()}
17591  }
17592  /// All messages for this locale.
17593  #[inline]
17594  pub fn messages(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Message<'a>>> {
17595    // Safety:
17596    // Created from valid Table for this object
17597    // which contains a valid value in this slot
17598    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Message>>>>(MessageCatalog::VT_MESSAGES, None).unwrap()}
17599  }
17600  /// Fallback locale (e.g., "en" as fallback for "en-US").
17601  #[inline]
17602  pub fn fallback_locale(&self) -> Option<&'a str> {
17603    // Safety:
17604    // Created from valid Table for this object
17605    // which contains a valid value in this slot
17606    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(MessageCatalog::VT_FALLBACK_LOCALE, None)}
17607  }
17608}
17609
17610impl flatbuffers::Verifiable for MessageCatalog<'_> {
17611  #[inline]
17612  fn run_verifier(
17613    v: &mut flatbuffers::Verifier, pos: usize
17614  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
17615    use self::flatbuffers::Verifiable;
17616    v.visit_table(pos)?
17617     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("locale", Self::VT_LOCALE, true)?
17618     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Message>>>>("messages", Self::VT_MESSAGES, true)?
17619     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("fallback_locale", Self::VT_FALLBACK_LOCALE, false)?
17620     .finish();
17621    Ok(())
17622  }
17623}
17624pub struct MessageCatalogArgs<'a> {
17625    pub locale: Option<flatbuffers::WIPOffset<&'a str>>,
17626    pub messages: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Message<'a>>>>>,
17627    pub fallback_locale: Option<flatbuffers::WIPOffset<&'a str>>,
17628}
17629impl<'a> Default for MessageCatalogArgs<'a> {
17630  #[inline]
17631  fn default() -> Self {
17632    MessageCatalogArgs {
17633      locale: None, // required field
17634      messages: None, // required field
17635      fallback_locale: None,
17636    }
17637  }
17638}
17639
17640pub struct MessageCatalogBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
17641  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
17642  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
17643}
17644impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> MessageCatalogBuilder<'a, 'b, A> {
17645  #[inline]
17646  pub fn add_locale(&mut self, locale: flatbuffers::WIPOffset<&'b  str>) {
17647    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(MessageCatalog::VT_LOCALE, locale);
17648  }
17649  #[inline]
17650  pub fn add_messages(&mut self, messages: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<Message<'b >>>>) {
17651    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(MessageCatalog::VT_MESSAGES, messages);
17652  }
17653  #[inline]
17654  pub fn add_fallback_locale(&mut self, fallback_locale: flatbuffers::WIPOffset<&'b  str>) {
17655    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(MessageCatalog::VT_FALLBACK_LOCALE, fallback_locale);
17656  }
17657  #[inline]
17658  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> MessageCatalogBuilder<'a, 'b, A> {
17659    let start = _fbb.start_table();
17660    MessageCatalogBuilder {
17661      fbb_: _fbb,
17662      start_: start,
17663    }
17664  }
17665  #[inline]
17666  pub fn finish(self) -> flatbuffers::WIPOffset<MessageCatalog<'a>> {
17667    let o = self.fbb_.end_table(self.start_);
17668    self.fbb_.required(o, MessageCatalog::VT_LOCALE,"locale");
17669    self.fbb_.required(o, MessageCatalog::VT_MESSAGES,"messages");
17670    flatbuffers::WIPOffset::new(o.value())
17671  }
17672}
17673
17674impl core::fmt::Debug for MessageCatalog<'_> {
17675  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
17676    let mut ds = f.debug_struct("MessageCatalog");
17677      ds.field("locale", &self.locale());
17678      ds.field("messages", &self.messages());
17679      ds.field("fallback_locale", &self.fallback_locale());
17680      ds.finish()
17681  }
17682}
17683pub enum I18nConfigOffset {}
17684#[derive(Copy, Clone, PartialEq)]
17685
17686pub struct I18nConfig<'a> {
17687  pub _tab: flatbuffers::Table<'a>,
17688}
17689
17690impl<'a> flatbuffers::Follow<'a> for I18nConfig<'a> {
17691  type Inner = I18nConfig<'a>;
17692  #[inline]
17693  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
17694    Self { _tab: flatbuffers::Table::new(buf, loc) }
17695  }
17696}
17697
17698impl<'a> I18nConfig<'a> {
17699  pub const VT_DEFAULT_LOCALE: flatbuffers::VOffsetT = 4;
17700  pub const VT_SUPPORTED_LOCALES: flatbuffers::VOffsetT = 6;
17701  pub const VT_MODE: flatbuffers::VOffsetT = 8;
17702
17703  #[inline]
17704  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
17705    I18nConfig { _tab: table }
17706  }
17707  #[allow(unused_mut)]
17708  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
17709    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
17710    args: &'args I18nConfigArgs<'args>
17711  ) -> flatbuffers::WIPOffset<I18nConfig<'bldr>> {
17712    let mut builder = I18nConfigBuilder::new(_fbb);
17713    if let Some(x) = args.mode { builder.add_mode(x); }
17714    if let Some(x) = args.supported_locales { builder.add_supported_locales(x); }
17715    if let Some(x) = args.default_locale { builder.add_default_locale(x); }
17716    builder.finish()
17717  }
17718
17719
17720  /// Default/primary locale.
17721  #[inline]
17722  pub fn default_locale(&self) -> &'a str {
17723    // Safety:
17724    // Created from valid Table for this object
17725    // which contains a valid value in this slot
17726    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(I18nConfig::VT_DEFAULT_LOCALE, None).unwrap()}
17727  }
17728  /// All supported locales.
17729  #[inline]
17730  pub fn supported_locales(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>> {
17731    // Safety:
17732    // Created from valid Table for this object
17733    // which contains a valid value in this slot
17734    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>(I18nConfig::VT_SUPPORTED_LOCALES, None).unwrap()}
17735  }
17736  /// Compilation mode.
17737  /// "static" = one output per locale (zero runtime, default).
17738  /// "runtime" = one output with locale switching (~1KB runtime).
17739  #[inline]
17740  pub fn mode(&self) -> Option<&'a str> {
17741    // Safety:
17742    // Created from valid Table for this object
17743    // which contains a valid value in this slot
17744    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(I18nConfig::VT_MODE, None)}
17745  }
17746}
17747
17748impl flatbuffers::Verifiable for I18nConfig<'_> {
17749  #[inline]
17750  fn run_verifier(
17751    v: &mut flatbuffers::Verifier, pos: usize
17752  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
17753    use self::flatbuffers::Verifiable;
17754    v.visit_table(pos)?
17755     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("default_locale", Self::VT_DEFAULT_LOCALE, true)?
17756     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>>>("supported_locales", Self::VT_SUPPORTED_LOCALES, true)?
17757     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("mode", Self::VT_MODE, false)?
17758     .finish();
17759    Ok(())
17760  }
17761}
17762pub struct I18nConfigArgs<'a> {
17763    pub default_locale: Option<flatbuffers::WIPOffset<&'a str>>,
17764    pub supported_locales: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>,
17765    pub mode: Option<flatbuffers::WIPOffset<&'a str>>,
17766}
17767impl<'a> Default for I18nConfigArgs<'a> {
17768  #[inline]
17769  fn default() -> Self {
17770    I18nConfigArgs {
17771      default_locale: None, // required field
17772      supported_locales: None, // required field
17773      mode: None,
17774    }
17775  }
17776}
17777
17778pub struct I18nConfigBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
17779  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
17780  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
17781}
17782impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> I18nConfigBuilder<'a, 'b, A> {
17783  #[inline]
17784  pub fn add_default_locale(&mut self, default_locale: flatbuffers::WIPOffset<&'b  str>) {
17785    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(I18nConfig::VT_DEFAULT_LOCALE, default_locale);
17786  }
17787  #[inline]
17788  pub fn add_supported_locales(&mut self, supported_locales: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<&'b  str>>>) {
17789    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(I18nConfig::VT_SUPPORTED_LOCALES, supported_locales);
17790  }
17791  #[inline]
17792  pub fn add_mode(&mut self, mode: flatbuffers::WIPOffset<&'b  str>) {
17793    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(I18nConfig::VT_MODE, mode);
17794  }
17795  #[inline]
17796  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> I18nConfigBuilder<'a, 'b, A> {
17797    let start = _fbb.start_table();
17798    I18nConfigBuilder {
17799      fbb_: _fbb,
17800      start_: start,
17801    }
17802  }
17803  #[inline]
17804  pub fn finish(self) -> flatbuffers::WIPOffset<I18nConfig<'a>> {
17805    let o = self.fbb_.end_table(self.start_);
17806    self.fbb_.required(o, I18nConfig::VT_DEFAULT_LOCALE,"default_locale");
17807    self.fbb_.required(o, I18nConfig::VT_SUPPORTED_LOCALES,"supported_locales");
17808    flatbuffers::WIPOffset::new(o.value())
17809  }
17810}
17811
17812impl core::fmt::Debug for I18nConfig<'_> {
17813  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
17814    let mut ds = f.debug_struct("I18nConfig");
17815      ds.field("default_locale", &self.default_locale());
17816      ds.field("supported_locales", &self.supported_locales());
17817      ds.field("mode", &self.mode());
17818      ds.finish()
17819  }
17820}
17821pub enum OpenGraphDataOffset {}
17822#[derive(Copy, Clone, PartialEq)]
17823
17824pub struct OpenGraphData<'a> {
17825  pub _tab: flatbuffers::Table<'a>,
17826}
17827
17828impl<'a> flatbuffers::Follow<'a> for OpenGraphData<'a> {
17829  type Inner = OpenGraphData<'a>;
17830  #[inline]
17831  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
17832    Self { _tab: flatbuffers::Table::new(buf, loc) }
17833  }
17834}
17835
17836impl<'a> OpenGraphData<'a> {
17837  pub const VT_TITLE: flatbuffers::VOffsetT = 4;
17838  pub const VT_DESCRIPTION: flatbuffers::VOffsetT = 6;
17839  pub const VT_IMAGE: flatbuffers::VOffsetT = 8;
17840  pub const VT_IMAGE_ALT: flatbuffers::VOffsetT = 10;
17841  pub const VT_IMAGE_WIDTH: flatbuffers::VOffsetT = 12;
17842  pub const VT_IMAGE_HEIGHT: flatbuffers::VOffsetT = 14;
17843  pub const VT_OG_TYPE: flatbuffers::VOffsetT = 16;
17844  pub const VT_URL: flatbuffers::VOffsetT = 18;
17845  pub const VT_SITE_NAME: flatbuffers::VOffsetT = 20;
17846  pub const VT_LOCALE: flatbuffers::VOffsetT = 22;
17847
17848  #[inline]
17849  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
17850    OpenGraphData { _tab: table }
17851  }
17852  #[allow(unused_mut)]
17853  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
17854    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
17855    args: &'args OpenGraphDataArgs<'args>
17856  ) -> flatbuffers::WIPOffset<OpenGraphData<'bldr>> {
17857    let mut builder = OpenGraphDataBuilder::new(_fbb);
17858    if let Some(x) = args.locale { builder.add_locale(x); }
17859    if let Some(x) = args.site_name { builder.add_site_name(x); }
17860    if let Some(x) = args.url { builder.add_url(x); }
17861    builder.add_image_height(args.image_height);
17862    builder.add_image_width(args.image_width);
17863    if let Some(x) = args.image_alt { builder.add_image_alt(x); }
17864    if let Some(x) = args.image { builder.add_image(x); }
17865    if let Some(x) = args.description { builder.add_description(x); }
17866    if let Some(x) = args.title { builder.add_title(x); }
17867    builder.add_og_type(args.og_type);
17868    builder.finish()
17869  }
17870
17871
17872  #[inline]
17873  pub fn title(&self) -> Option<&'a str> {
17874    // Safety:
17875    // Created from valid Table for this object
17876    // which contains a valid value in this slot
17877    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(OpenGraphData::VT_TITLE, None)}
17878  }
17879  #[inline]
17880  pub fn description(&self) -> Option<&'a str> {
17881    // Safety:
17882    // Created from valid Table for this object
17883    // which contains a valid value in this slot
17884    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(OpenGraphData::VT_DESCRIPTION, None)}
17885  }
17886  /// Image URL or MediaNode reference.
17887  #[inline]
17888  pub fn image(&self) -> Option<&'a str> {
17889    // Safety:
17890    // Created from valid Table for this object
17891    // which contains a valid value in this slot
17892    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(OpenGraphData::VT_IMAGE, None)}
17893  }
17894  #[inline]
17895  pub fn image_alt(&self) -> Option<&'a str> {
17896    // Safety:
17897    // Created from valid Table for this object
17898    // which contains a valid value in this slot
17899    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(OpenGraphData::VT_IMAGE_ALT, None)}
17900  }
17901  #[inline]
17902  pub fn image_width(&self) -> i32 {
17903    // Safety:
17904    // Created from valid Table for this object
17905    // which contains a valid value in this slot
17906    unsafe { self._tab.get::<i32>(OpenGraphData::VT_IMAGE_WIDTH, Some(0)).unwrap()}
17907  }
17908  #[inline]
17909  pub fn image_height(&self) -> i32 {
17910    // Safety:
17911    // Created from valid Table for this object
17912    // which contains a valid value in this slot
17913    unsafe { self._tab.get::<i32>(OpenGraphData::VT_IMAGE_HEIGHT, Some(0)).unwrap()}
17914  }
17915  #[inline]
17916  pub fn og_type(&self) -> OGType {
17917    // Safety:
17918    // Created from valid Table for this object
17919    // which contains a valid value in this slot
17920    unsafe { self._tab.get::<OGType>(OpenGraphData::VT_OG_TYPE, Some(OGType::Website)).unwrap()}
17921  }
17922  #[inline]
17923  pub fn url(&self) -> Option<&'a str> {
17924    // Safety:
17925    // Created from valid Table for this object
17926    // which contains a valid value in this slot
17927    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(OpenGraphData::VT_URL, None)}
17928  }
17929  #[inline]
17930  pub fn site_name(&self) -> Option<&'a str> {
17931    // Safety:
17932    // Created from valid Table for this object
17933    // which contains a valid value in this slot
17934    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(OpenGraphData::VT_SITE_NAME, None)}
17935  }
17936  #[inline]
17937  pub fn locale(&self) -> Option<&'a str> {
17938    // Safety:
17939    // Created from valid Table for this object
17940    // which contains a valid value in this slot
17941    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(OpenGraphData::VT_LOCALE, None)}
17942  }
17943}
17944
17945impl flatbuffers::Verifiable for OpenGraphData<'_> {
17946  #[inline]
17947  fn run_verifier(
17948    v: &mut flatbuffers::Verifier, pos: usize
17949  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
17950    use self::flatbuffers::Verifiable;
17951    v.visit_table(pos)?
17952     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("title", Self::VT_TITLE, false)?
17953     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("description", Self::VT_DESCRIPTION, false)?
17954     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("image", Self::VT_IMAGE, false)?
17955     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("image_alt", Self::VT_IMAGE_ALT, false)?
17956     .visit_field::<i32>("image_width", Self::VT_IMAGE_WIDTH, false)?
17957     .visit_field::<i32>("image_height", Self::VT_IMAGE_HEIGHT, false)?
17958     .visit_field::<OGType>("og_type", Self::VT_OG_TYPE, false)?
17959     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("url", Self::VT_URL, false)?
17960     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("site_name", Self::VT_SITE_NAME, false)?
17961     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("locale", Self::VT_LOCALE, false)?
17962     .finish();
17963    Ok(())
17964  }
17965}
17966pub struct OpenGraphDataArgs<'a> {
17967    pub title: Option<flatbuffers::WIPOffset<&'a str>>,
17968    pub description: Option<flatbuffers::WIPOffset<&'a str>>,
17969    pub image: Option<flatbuffers::WIPOffset<&'a str>>,
17970    pub image_alt: Option<flatbuffers::WIPOffset<&'a str>>,
17971    pub image_width: i32,
17972    pub image_height: i32,
17973    pub og_type: OGType,
17974    pub url: Option<flatbuffers::WIPOffset<&'a str>>,
17975    pub site_name: Option<flatbuffers::WIPOffset<&'a str>>,
17976    pub locale: Option<flatbuffers::WIPOffset<&'a str>>,
17977}
17978impl<'a> Default for OpenGraphDataArgs<'a> {
17979  #[inline]
17980  fn default() -> Self {
17981    OpenGraphDataArgs {
17982      title: None,
17983      description: None,
17984      image: None,
17985      image_alt: None,
17986      image_width: 0,
17987      image_height: 0,
17988      og_type: OGType::Website,
17989      url: None,
17990      site_name: None,
17991      locale: None,
17992    }
17993  }
17994}
17995
17996pub struct OpenGraphDataBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
17997  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
17998  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
17999}
18000impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> OpenGraphDataBuilder<'a, 'b, A> {
18001  #[inline]
18002  pub fn add_title(&mut self, title: flatbuffers::WIPOffset<&'b  str>) {
18003    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(OpenGraphData::VT_TITLE, title);
18004  }
18005  #[inline]
18006  pub fn add_description(&mut self, description: flatbuffers::WIPOffset<&'b  str>) {
18007    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(OpenGraphData::VT_DESCRIPTION, description);
18008  }
18009  #[inline]
18010  pub fn add_image(&mut self, image: flatbuffers::WIPOffset<&'b  str>) {
18011    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(OpenGraphData::VT_IMAGE, image);
18012  }
18013  #[inline]
18014  pub fn add_image_alt(&mut self, image_alt: flatbuffers::WIPOffset<&'b  str>) {
18015    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(OpenGraphData::VT_IMAGE_ALT, image_alt);
18016  }
18017  #[inline]
18018  pub fn add_image_width(&mut self, image_width: i32) {
18019    self.fbb_.push_slot::<i32>(OpenGraphData::VT_IMAGE_WIDTH, image_width, 0);
18020  }
18021  #[inline]
18022  pub fn add_image_height(&mut self, image_height: i32) {
18023    self.fbb_.push_slot::<i32>(OpenGraphData::VT_IMAGE_HEIGHT, image_height, 0);
18024  }
18025  #[inline]
18026  pub fn add_og_type(&mut self, og_type: OGType) {
18027    self.fbb_.push_slot::<OGType>(OpenGraphData::VT_OG_TYPE, og_type, OGType::Website);
18028  }
18029  #[inline]
18030  pub fn add_url(&mut self, url: flatbuffers::WIPOffset<&'b  str>) {
18031    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(OpenGraphData::VT_URL, url);
18032  }
18033  #[inline]
18034  pub fn add_site_name(&mut self, site_name: flatbuffers::WIPOffset<&'b  str>) {
18035    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(OpenGraphData::VT_SITE_NAME, site_name);
18036  }
18037  #[inline]
18038  pub fn add_locale(&mut self, locale: flatbuffers::WIPOffset<&'b  str>) {
18039    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(OpenGraphData::VT_LOCALE, locale);
18040  }
18041  #[inline]
18042  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> OpenGraphDataBuilder<'a, 'b, A> {
18043    let start = _fbb.start_table();
18044    OpenGraphDataBuilder {
18045      fbb_: _fbb,
18046      start_: start,
18047    }
18048  }
18049  #[inline]
18050  pub fn finish(self) -> flatbuffers::WIPOffset<OpenGraphData<'a>> {
18051    let o = self.fbb_.end_table(self.start_);
18052    flatbuffers::WIPOffset::new(o.value())
18053  }
18054}
18055
18056impl core::fmt::Debug for OpenGraphData<'_> {
18057  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
18058    let mut ds = f.debug_struct("OpenGraphData");
18059      ds.field("title", &self.title());
18060      ds.field("description", &self.description());
18061      ds.field("image", &self.image());
18062      ds.field("image_alt", &self.image_alt());
18063      ds.field("image_width", &self.image_width());
18064      ds.field("image_height", &self.image_height());
18065      ds.field("og_type", &self.og_type());
18066      ds.field("url", &self.url());
18067      ds.field("site_name", &self.site_name());
18068      ds.field("locale", &self.locale());
18069      ds.finish()
18070  }
18071}
18072pub enum TwitterCardDataOffset {}
18073#[derive(Copy, Clone, PartialEq)]
18074
18075pub struct TwitterCardData<'a> {
18076  pub _tab: flatbuffers::Table<'a>,
18077}
18078
18079impl<'a> flatbuffers::Follow<'a> for TwitterCardData<'a> {
18080  type Inner = TwitterCardData<'a>;
18081  #[inline]
18082  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
18083    Self { _tab: flatbuffers::Table::new(buf, loc) }
18084  }
18085}
18086
18087impl<'a> TwitterCardData<'a> {
18088  pub const VT_CARD_TYPE: flatbuffers::VOffsetT = 4;
18089  pub const VT_TITLE: flatbuffers::VOffsetT = 6;
18090  pub const VT_DESCRIPTION: flatbuffers::VOffsetT = 8;
18091  pub const VT_IMAGE: flatbuffers::VOffsetT = 10;
18092  pub const VT_IMAGE_ALT: flatbuffers::VOffsetT = 12;
18093  pub const VT_SITE: flatbuffers::VOffsetT = 14;
18094  pub const VT_CREATOR: flatbuffers::VOffsetT = 16;
18095
18096  #[inline]
18097  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
18098    TwitterCardData { _tab: table }
18099  }
18100  #[allow(unused_mut)]
18101  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
18102    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
18103    args: &'args TwitterCardDataArgs<'args>
18104  ) -> flatbuffers::WIPOffset<TwitterCardData<'bldr>> {
18105    let mut builder = TwitterCardDataBuilder::new(_fbb);
18106    if let Some(x) = args.creator { builder.add_creator(x); }
18107    if let Some(x) = args.site { builder.add_site(x); }
18108    if let Some(x) = args.image_alt { builder.add_image_alt(x); }
18109    if let Some(x) = args.image { builder.add_image(x); }
18110    if let Some(x) = args.description { builder.add_description(x); }
18111    if let Some(x) = args.title { builder.add_title(x); }
18112    builder.add_card_type(args.card_type);
18113    builder.finish()
18114  }
18115
18116
18117  #[inline]
18118  pub fn card_type(&self) -> TwitterCardType {
18119    // Safety:
18120    // Created from valid Table for this object
18121    // which contains a valid value in this slot
18122    unsafe { self._tab.get::<TwitterCardType>(TwitterCardData::VT_CARD_TYPE, Some(TwitterCardType::SummaryLargeImage)).unwrap()}
18123  }
18124  #[inline]
18125  pub fn title(&self) -> Option<&'a str> {
18126    // Safety:
18127    // Created from valid Table for this object
18128    // which contains a valid value in this slot
18129    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(TwitterCardData::VT_TITLE, None)}
18130  }
18131  #[inline]
18132  pub fn description(&self) -> Option<&'a str> {
18133    // Safety:
18134    // Created from valid Table for this object
18135    // which contains a valid value in this slot
18136    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(TwitterCardData::VT_DESCRIPTION, None)}
18137  }
18138  #[inline]
18139  pub fn image(&self) -> Option<&'a str> {
18140    // Safety:
18141    // Created from valid Table for this object
18142    // which contains a valid value in this slot
18143    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(TwitterCardData::VT_IMAGE, None)}
18144  }
18145  #[inline]
18146  pub fn image_alt(&self) -> Option<&'a str> {
18147    // Safety:
18148    // Created from valid Table for this object
18149    // which contains a valid value in this slot
18150    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(TwitterCardData::VT_IMAGE_ALT, None)}
18151  }
18152  #[inline]
18153  pub fn site(&self) -> Option<&'a str> {
18154    // Safety:
18155    // Created from valid Table for this object
18156    // which contains a valid value in this slot
18157    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(TwitterCardData::VT_SITE, None)}
18158  }
18159  #[inline]
18160  pub fn creator(&self) -> Option<&'a str> {
18161    // Safety:
18162    // Created from valid Table for this object
18163    // which contains a valid value in this slot
18164    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(TwitterCardData::VT_CREATOR, None)}
18165  }
18166}
18167
18168impl flatbuffers::Verifiable for TwitterCardData<'_> {
18169  #[inline]
18170  fn run_verifier(
18171    v: &mut flatbuffers::Verifier, pos: usize
18172  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
18173    use self::flatbuffers::Verifiable;
18174    v.visit_table(pos)?
18175     .visit_field::<TwitterCardType>("card_type", Self::VT_CARD_TYPE, false)?
18176     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("title", Self::VT_TITLE, false)?
18177     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("description", Self::VT_DESCRIPTION, false)?
18178     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("image", Self::VT_IMAGE, false)?
18179     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("image_alt", Self::VT_IMAGE_ALT, false)?
18180     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("site", Self::VT_SITE, false)?
18181     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("creator", Self::VT_CREATOR, false)?
18182     .finish();
18183    Ok(())
18184  }
18185}
18186pub struct TwitterCardDataArgs<'a> {
18187    pub card_type: TwitterCardType,
18188    pub title: Option<flatbuffers::WIPOffset<&'a str>>,
18189    pub description: Option<flatbuffers::WIPOffset<&'a str>>,
18190    pub image: Option<flatbuffers::WIPOffset<&'a str>>,
18191    pub image_alt: Option<flatbuffers::WIPOffset<&'a str>>,
18192    pub site: Option<flatbuffers::WIPOffset<&'a str>>,
18193    pub creator: Option<flatbuffers::WIPOffset<&'a str>>,
18194}
18195impl<'a> Default for TwitterCardDataArgs<'a> {
18196  #[inline]
18197  fn default() -> Self {
18198    TwitterCardDataArgs {
18199      card_type: TwitterCardType::SummaryLargeImage,
18200      title: None,
18201      description: None,
18202      image: None,
18203      image_alt: None,
18204      site: None,
18205      creator: None,
18206    }
18207  }
18208}
18209
18210pub struct TwitterCardDataBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
18211  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
18212  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
18213}
18214impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TwitterCardDataBuilder<'a, 'b, A> {
18215  #[inline]
18216  pub fn add_card_type(&mut self, card_type: TwitterCardType) {
18217    self.fbb_.push_slot::<TwitterCardType>(TwitterCardData::VT_CARD_TYPE, card_type, TwitterCardType::SummaryLargeImage);
18218  }
18219  #[inline]
18220  pub fn add_title(&mut self, title: flatbuffers::WIPOffset<&'b  str>) {
18221    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(TwitterCardData::VT_TITLE, title);
18222  }
18223  #[inline]
18224  pub fn add_description(&mut self, description: flatbuffers::WIPOffset<&'b  str>) {
18225    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(TwitterCardData::VT_DESCRIPTION, description);
18226  }
18227  #[inline]
18228  pub fn add_image(&mut self, image: flatbuffers::WIPOffset<&'b  str>) {
18229    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(TwitterCardData::VT_IMAGE, image);
18230  }
18231  #[inline]
18232  pub fn add_image_alt(&mut self, image_alt: flatbuffers::WIPOffset<&'b  str>) {
18233    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(TwitterCardData::VT_IMAGE_ALT, image_alt);
18234  }
18235  #[inline]
18236  pub fn add_site(&mut self, site: flatbuffers::WIPOffset<&'b  str>) {
18237    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(TwitterCardData::VT_SITE, site);
18238  }
18239  #[inline]
18240  pub fn add_creator(&mut self, creator: flatbuffers::WIPOffset<&'b  str>) {
18241    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(TwitterCardData::VT_CREATOR, creator);
18242  }
18243  #[inline]
18244  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TwitterCardDataBuilder<'a, 'b, A> {
18245    let start = _fbb.start_table();
18246    TwitterCardDataBuilder {
18247      fbb_: _fbb,
18248      start_: start,
18249    }
18250  }
18251  #[inline]
18252  pub fn finish(self) -> flatbuffers::WIPOffset<TwitterCardData<'a>> {
18253    let o = self.fbb_.end_table(self.start_);
18254    flatbuffers::WIPOffset::new(o.value())
18255  }
18256}
18257
18258impl core::fmt::Debug for TwitterCardData<'_> {
18259  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
18260    let mut ds = f.debug_struct("TwitterCardData");
18261      ds.field("card_type", &self.card_type());
18262      ds.field("title", &self.title());
18263      ds.field("description", &self.description());
18264      ds.field("image", &self.image());
18265      ds.field("image_alt", &self.image_alt());
18266      ds.field("site", &self.site());
18267      ds.field("creator", &self.creator());
18268      ds.finish()
18269  }
18270}
18271pub enum RobotsDirectiveOffset {}
18272#[derive(Copy, Clone, PartialEq)]
18273
18274pub struct RobotsDirective<'a> {
18275  pub _tab: flatbuffers::Table<'a>,
18276}
18277
18278impl<'a> flatbuffers::Follow<'a> for RobotsDirective<'a> {
18279  type Inner = RobotsDirective<'a>;
18280  #[inline]
18281  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
18282    Self { _tab: flatbuffers::Table::new(buf, loc) }
18283  }
18284}
18285
18286impl<'a> RobotsDirective<'a> {
18287  pub const VT_INDEX: flatbuffers::VOffsetT = 4;
18288  pub const VT_FOLLOW_: flatbuffers::VOffsetT = 6;
18289  pub const VT_MAX_SNIPPET: flatbuffers::VOffsetT = 8;
18290  pub const VT_MAX_IMAGE_PREVIEW: flatbuffers::VOffsetT = 10;
18291  pub const VT_MAX_VIDEO_PREVIEW: flatbuffers::VOffsetT = 12;
18292  pub const VT_NO_ARCHIVE: flatbuffers::VOffsetT = 14;
18293  pub const VT_NO_TRANSLATE: flatbuffers::VOffsetT = 16;
18294
18295  #[inline]
18296  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
18297    RobotsDirective { _tab: table }
18298  }
18299  #[allow(unused_mut)]
18300  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
18301    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
18302    args: &'args RobotsDirectiveArgs
18303  ) -> flatbuffers::WIPOffset<RobotsDirective<'bldr>> {
18304    let mut builder = RobotsDirectiveBuilder::new(_fbb);
18305    builder.add_max_video_preview(args.max_video_preview);
18306    builder.add_max_snippet(args.max_snippet);
18307    builder.add_no_translate(args.no_translate);
18308    builder.add_no_archive(args.no_archive);
18309    builder.add_max_image_preview(args.max_image_preview);
18310    builder.add_follow_(args.follow_);
18311    builder.add_index(args.index);
18312    builder.finish()
18313  }
18314
18315
18316  #[inline]
18317  pub fn index(&self) -> bool {
18318    // Safety:
18319    // Created from valid Table for this object
18320    // which contains a valid value in this slot
18321    unsafe { self._tab.get::<bool>(RobotsDirective::VT_INDEX, Some(true)).unwrap()}
18322  }
18323  #[inline]
18324  pub fn follow_(&self) -> bool {
18325    // Safety:
18326    // Created from valid Table for this object
18327    // which contains a valid value in this slot
18328    unsafe { self._tab.get::<bool>(RobotsDirective::VT_FOLLOW_, Some(true)).unwrap()}
18329  }
18330  #[inline]
18331  pub fn max_snippet(&self) -> i32 {
18332    // Safety:
18333    // Created from valid Table for this object
18334    // which contains a valid value in this slot
18335    unsafe { self._tab.get::<i32>(RobotsDirective::VT_MAX_SNIPPET, Some(-1)).unwrap()}
18336  }
18337  #[inline]
18338  pub fn max_image_preview(&self) -> ImagePreviewSize {
18339    // Safety:
18340    // Created from valid Table for this object
18341    // which contains a valid value in this slot
18342    unsafe { self._tab.get::<ImagePreviewSize>(RobotsDirective::VT_MAX_IMAGE_PREVIEW, Some(ImagePreviewSize::Large)).unwrap()}
18343  }
18344  #[inline]
18345  pub fn max_video_preview(&self) -> i32 {
18346    // Safety:
18347    // Created from valid Table for this object
18348    // which contains a valid value in this slot
18349    unsafe { self._tab.get::<i32>(RobotsDirective::VT_MAX_VIDEO_PREVIEW, Some(-1)).unwrap()}
18350  }
18351  #[inline]
18352  pub fn no_archive(&self) -> bool {
18353    // Safety:
18354    // Created from valid Table for this object
18355    // which contains a valid value in this slot
18356    unsafe { self._tab.get::<bool>(RobotsDirective::VT_NO_ARCHIVE, Some(false)).unwrap()}
18357  }
18358  #[inline]
18359  pub fn no_translate(&self) -> bool {
18360    // Safety:
18361    // Created from valid Table for this object
18362    // which contains a valid value in this slot
18363    unsafe { self._tab.get::<bool>(RobotsDirective::VT_NO_TRANSLATE, Some(false)).unwrap()}
18364  }
18365}
18366
18367impl flatbuffers::Verifiable for RobotsDirective<'_> {
18368  #[inline]
18369  fn run_verifier(
18370    v: &mut flatbuffers::Verifier, pos: usize
18371  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
18372    use self::flatbuffers::Verifiable;
18373    v.visit_table(pos)?
18374     .visit_field::<bool>("index", Self::VT_INDEX, false)?
18375     .visit_field::<bool>("follow_", Self::VT_FOLLOW_, false)?
18376     .visit_field::<i32>("max_snippet", Self::VT_MAX_SNIPPET, false)?
18377     .visit_field::<ImagePreviewSize>("max_image_preview", Self::VT_MAX_IMAGE_PREVIEW, false)?
18378     .visit_field::<i32>("max_video_preview", Self::VT_MAX_VIDEO_PREVIEW, false)?
18379     .visit_field::<bool>("no_archive", Self::VT_NO_ARCHIVE, false)?
18380     .visit_field::<bool>("no_translate", Self::VT_NO_TRANSLATE, false)?
18381     .finish();
18382    Ok(())
18383  }
18384}
18385pub struct RobotsDirectiveArgs {
18386    pub index: bool,
18387    pub follow_: bool,
18388    pub max_snippet: i32,
18389    pub max_image_preview: ImagePreviewSize,
18390    pub max_video_preview: i32,
18391    pub no_archive: bool,
18392    pub no_translate: bool,
18393}
18394impl<'a> Default for RobotsDirectiveArgs {
18395  #[inline]
18396  fn default() -> Self {
18397    RobotsDirectiveArgs {
18398      index: true,
18399      follow_: true,
18400      max_snippet: -1,
18401      max_image_preview: ImagePreviewSize::Large,
18402      max_video_preview: -1,
18403      no_archive: false,
18404      no_translate: false,
18405    }
18406  }
18407}
18408
18409pub struct RobotsDirectiveBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
18410  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
18411  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
18412}
18413impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RobotsDirectiveBuilder<'a, 'b, A> {
18414  #[inline]
18415  pub fn add_index(&mut self, index: bool) {
18416    self.fbb_.push_slot::<bool>(RobotsDirective::VT_INDEX, index, true);
18417  }
18418  #[inline]
18419  pub fn add_follow_(&mut self, follow_: bool) {
18420    self.fbb_.push_slot::<bool>(RobotsDirective::VT_FOLLOW_, follow_, true);
18421  }
18422  #[inline]
18423  pub fn add_max_snippet(&mut self, max_snippet: i32) {
18424    self.fbb_.push_slot::<i32>(RobotsDirective::VT_MAX_SNIPPET, max_snippet, -1);
18425  }
18426  #[inline]
18427  pub fn add_max_image_preview(&mut self, max_image_preview: ImagePreviewSize) {
18428    self.fbb_.push_slot::<ImagePreviewSize>(RobotsDirective::VT_MAX_IMAGE_PREVIEW, max_image_preview, ImagePreviewSize::Large);
18429  }
18430  #[inline]
18431  pub fn add_max_video_preview(&mut self, max_video_preview: i32) {
18432    self.fbb_.push_slot::<i32>(RobotsDirective::VT_MAX_VIDEO_PREVIEW, max_video_preview, -1);
18433  }
18434  #[inline]
18435  pub fn add_no_archive(&mut self, no_archive: bool) {
18436    self.fbb_.push_slot::<bool>(RobotsDirective::VT_NO_ARCHIVE, no_archive, false);
18437  }
18438  #[inline]
18439  pub fn add_no_translate(&mut self, no_translate: bool) {
18440    self.fbb_.push_slot::<bool>(RobotsDirective::VT_NO_TRANSLATE, no_translate, false);
18441  }
18442  #[inline]
18443  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> RobotsDirectiveBuilder<'a, 'b, A> {
18444    let start = _fbb.start_table();
18445    RobotsDirectiveBuilder {
18446      fbb_: _fbb,
18447      start_: start,
18448    }
18449  }
18450  #[inline]
18451  pub fn finish(self) -> flatbuffers::WIPOffset<RobotsDirective<'a>> {
18452    let o = self.fbb_.end_table(self.start_);
18453    flatbuffers::WIPOffset::new(o.value())
18454  }
18455}
18456
18457impl core::fmt::Debug for RobotsDirective<'_> {
18458  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
18459    let mut ds = f.debug_struct("RobotsDirective");
18460      ds.field("index", &self.index());
18461      ds.field("follow_", &self.follow_());
18462      ds.field("max_snippet", &self.max_snippet());
18463      ds.field("max_image_preview", &self.max_image_preview());
18464      ds.field("max_video_preview", &self.max_video_preview());
18465      ds.field("no_archive", &self.no_archive());
18466      ds.field("no_translate", &self.no_translate());
18467      ds.finish()
18468  }
18469}
18470pub enum StructuredDataOffset {}
18471#[derive(Copy, Clone, PartialEq)]
18472
18473pub struct StructuredData<'a> {
18474  pub _tab: flatbuffers::Table<'a>,
18475}
18476
18477impl<'a> flatbuffers::Follow<'a> for StructuredData<'a> {
18478  type Inner = StructuredData<'a>;
18479  #[inline]
18480  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
18481    Self { _tab: flatbuffers::Table::new(buf, loc) }
18482  }
18483}
18484
18485impl<'a> StructuredData<'a> {
18486  pub const VT_SCHEMA_TYPE: flatbuffers::VOffsetT = 4;
18487  pub const VT_PROPERTIES_JSON: flatbuffers::VOffsetT = 6;
18488
18489  #[inline]
18490  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
18491    StructuredData { _tab: table }
18492  }
18493  #[allow(unused_mut)]
18494  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
18495    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
18496    args: &'args StructuredDataArgs<'args>
18497  ) -> flatbuffers::WIPOffset<StructuredData<'bldr>> {
18498    let mut builder = StructuredDataBuilder::new(_fbb);
18499    if let Some(x) = args.properties_json { builder.add_properties_json(x); }
18500    if let Some(x) = args.schema_type { builder.add_schema_type(x); }
18501    builder.finish()
18502  }
18503
18504
18505  /// Schema.org type (e.g., "Article", "Product", "FAQ", "BreadcrumbList").
18506  #[inline]
18507  pub fn schema_type(&self) -> &'a str {
18508    // Safety:
18509    // Created from valid Table for this object
18510    // which contains a valid value in this slot
18511    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(StructuredData::VT_SCHEMA_TYPE, None).unwrap()}
18512  }
18513  /// JSON-LD properties as a JSON string. The validator checks basic
18514  /// conformance to the declared schema_type.
18515  #[inline]
18516  pub fn properties_json(&self) -> &'a str {
18517    // Safety:
18518    // Created from valid Table for this object
18519    // which contains a valid value in this slot
18520    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(StructuredData::VT_PROPERTIES_JSON, None).unwrap()}
18521  }
18522}
18523
18524impl flatbuffers::Verifiable for StructuredData<'_> {
18525  #[inline]
18526  fn run_verifier(
18527    v: &mut flatbuffers::Verifier, pos: usize
18528  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
18529    use self::flatbuffers::Verifiable;
18530    v.visit_table(pos)?
18531     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("schema_type", Self::VT_SCHEMA_TYPE, true)?
18532     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("properties_json", Self::VT_PROPERTIES_JSON, true)?
18533     .finish();
18534    Ok(())
18535  }
18536}
18537pub struct StructuredDataArgs<'a> {
18538    pub schema_type: Option<flatbuffers::WIPOffset<&'a str>>,
18539    pub properties_json: Option<flatbuffers::WIPOffset<&'a str>>,
18540}
18541impl<'a> Default for StructuredDataArgs<'a> {
18542  #[inline]
18543  fn default() -> Self {
18544    StructuredDataArgs {
18545      schema_type: None, // required field
18546      properties_json: None, // required field
18547    }
18548  }
18549}
18550
18551pub struct StructuredDataBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
18552  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
18553  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
18554}
18555impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> StructuredDataBuilder<'a, 'b, A> {
18556  #[inline]
18557  pub fn add_schema_type(&mut self, schema_type: flatbuffers::WIPOffset<&'b  str>) {
18558    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(StructuredData::VT_SCHEMA_TYPE, schema_type);
18559  }
18560  #[inline]
18561  pub fn add_properties_json(&mut self, properties_json: flatbuffers::WIPOffset<&'b  str>) {
18562    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(StructuredData::VT_PROPERTIES_JSON, properties_json);
18563  }
18564  #[inline]
18565  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> StructuredDataBuilder<'a, 'b, A> {
18566    let start = _fbb.start_table();
18567    StructuredDataBuilder {
18568      fbb_: _fbb,
18569      start_: start,
18570    }
18571  }
18572  #[inline]
18573  pub fn finish(self) -> flatbuffers::WIPOffset<StructuredData<'a>> {
18574    let o = self.fbb_.end_table(self.start_);
18575    self.fbb_.required(o, StructuredData::VT_SCHEMA_TYPE,"schema_type");
18576    self.fbb_.required(o, StructuredData::VT_PROPERTIES_JSON,"properties_json");
18577    flatbuffers::WIPOffset::new(o.value())
18578  }
18579}
18580
18581impl core::fmt::Debug for StructuredData<'_> {
18582  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
18583    let mut ds = f.debug_struct("StructuredData");
18584      ds.field("schema_type", &self.schema_type());
18585      ds.field("properties_json", &self.properties_json());
18586      ds.finish()
18587  }
18588}
18589pub enum AlternateLinkOffset {}
18590#[derive(Copy, Clone, PartialEq)]
18591
18592pub struct AlternateLink<'a> {
18593  pub _tab: flatbuffers::Table<'a>,
18594}
18595
18596impl<'a> flatbuffers::Follow<'a> for AlternateLink<'a> {
18597  type Inner = AlternateLink<'a>;
18598  #[inline]
18599  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
18600    Self { _tab: flatbuffers::Table::new(buf, loc) }
18601  }
18602}
18603
18604impl<'a> AlternateLink<'a> {
18605  pub const VT_HREFLANG: flatbuffers::VOffsetT = 4;
18606  pub const VT_HREF: flatbuffers::VOffsetT = 6;
18607
18608  #[inline]
18609  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
18610    AlternateLink { _tab: table }
18611  }
18612  #[allow(unused_mut)]
18613  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
18614    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
18615    args: &'args AlternateLinkArgs<'args>
18616  ) -> flatbuffers::WIPOffset<AlternateLink<'bldr>> {
18617    let mut builder = AlternateLinkBuilder::new(_fbb);
18618    if let Some(x) = args.href { builder.add_href(x); }
18619    if let Some(x) = args.hreflang { builder.add_hreflang(x); }
18620    builder.finish()
18621  }
18622
18623
18624  /// BCP 47 language tag (e.g., "en-US", "fr-FR", "x-default").
18625  #[inline]
18626  pub fn hreflang(&self) -> &'a str {
18627    // Safety:
18628    // Created from valid Table for this object
18629    // which contains a valid value in this slot
18630    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(AlternateLink::VT_HREFLANG, None).unwrap()}
18631  }
18632  /// URL of the alternate page.
18633  #[inline]
18634  pub fn href(&self) -> &'a str {
18635    // Safety:
18636    // Created from valid Table for this object
18637    // which contains a valid value in this slot
18638    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(AlternateLink::VT_HREF, None).unwrap()}
18639  }
18640}
18641
18642impl flatbuffers::Verifiable for AlternateLink<'_> {
18643  #[inline]
18644  fn run_verifier(
18645    v: &mut flatbuffers::Verifier, pos: usize
18646  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
18647    use self::flatbuffers::Verifiable;
18648    v.visit_table(pos)?
18649     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("hreflang", Self::VT_HREFLANG, true)?
18650     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("href", Self::VT_HREF, true)?
18651     .finish();
18652    Ok(())
18653  }
18654}
18655pub struct AlternateLinkArgs<'a> {
18656    pub hreflang: Option<flatbuffers::WIPOffset<&'a str>>,
18657    pub href: Option<flatbuffers::WIPOffset<&'a str>>,
18658}
18659impl<'a> Default for AlternateLinkArgs<'a> {
18660  #[inline]
18661  fn default() -> Self {
18662    AlternateLinkArgs {
18663      hreflang: None, // required field
18664      href: None, // required field
18665    }
18666  }
18667}
18668
18669pub struct AlternateLinkBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
18670  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
18671  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
18672}
18673impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> AlternateLinkBuilder<'a, 'b, A> {
18674  #[inline]
18675  pub fn add_hreflang(&mut self, hreflang: flatbuffers::WIPOffset<&'b  str>) {
18676    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(AlternateLink::VT_HREFLANG, hreflang);
18677  }
18678  #[inline]
18679  pub fn add_href(&mut self, href: flatbuffers::WIPOffset<&'b  str>) {
18680    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(AlternateLink::VT_HREF, href);
18681  }
18682  #[inline]
18683  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> AlternateLinkBuilder<'a, 'b, A> {
18684    let start = _fbb.start_table();
18685    AlternateLinkBuilder {
18686      fbb_: _fbb,
18687      start_: start,
18688    }
18689  }
18690  #[inline]
18691  pub fn finish(self) -> flatbuffers::WIPOffset<AlternateLink<'a>> {
18692    let o = self.fbb_.end_table(self.start_);
18693    self.fbb_.required(o, AlternateLink::VT_HREFLANG,"hreflang");
18694    self.fbb_.required(o, AlternateLink::VT_HREF,"href");
18695    flatbuffers::WIPOffset::new(o.value())
18696  }
18697}
18698
18699impl core::fmt::Debug for AlternateLink<'_> {
18700  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
18701    let mut ds = f.debug_struct("AlternateLink");
18702      ds.field("hreflang", &self.hreflang());
18703      ds.field("href", &self.href());
18704      ds.finish()
18705  }
18706}
18707pub enum MetaTagOffset {}
18708#[derive(Copy, Clone, PartialEq)]
18709
18710pub struct MetaTag<'a> {
18711  pub _tab: flatbuffers::Table<'a>,
18712}
18713
18714impl<'a> flatbuffers::Follow<'a> for MetaTag<'a> {
18715  type Inner = MetaTag<'a>;
18716  #[inline]
18717  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
18718    Self { _tab: flatbuffers::Table::new(buf, loc) }
18719  }
18720}
18721
18722impl<'a> MetaTag<'a> {
18723  pub const VT_NAME: flatbuffers::VOffsetT = 4;
18724  pub const VT_CONTENT: flatbuffers::VOffsetT = 6;
18725  pub const VT_IS_PROPERTY: flatbuffers::VOffsetT = 8;
18726
18727  #[inline]
18728  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
18729    MetaTag { _tab: table }
18730  }
18731  #[allow(unused_mut)]
18732  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
18733    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
18734    args: &'args MetaTagArgs<'args>
18735  ) -> flatbuffers::WIPOffset<MetaTag<'bldr>> {
18736    let mut builder = MetaTagBuilder::new(_fbb);
18737    if let Some(x) = args.content { builder.add_content(x); }
18738    if let Some(x) = args.name { builder.add_name(x); }
18739    builder.add_is_property(args.is_property);
18740    builder.finish()
18741  }
18742
18743
18744  /// name or property attribute.
18745  #[inline]
18746  pub fn name(&self) -> &'a str {
18747    // Safety:
18748    // Created from valid Table for this object
18749    // which contains a valid value in this slot
18750    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(MetaTag::VT_NAME, None).unwrap()}
18751  }
18752  /// content attribute value.
18753  #[inline]
18754  pub fn content(&self) -> &'a str {
18755    // Safety:
18756    // Created from valid Table for this object
18757    // which contains a valid value in this slot
18758    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(MetaTag::VT_CONTENT, None).unwrap()}
18759  }
18760  /// If true, use property= instead of name= (for OG-like tags).
18761  #[inline]
18762  pub fn is_property(&self) -> bool {
18763    // Safety:
18764    // Created from valid Table for this object
18765    // which contains a valid value in this slot
18766    unsafe { self._tab.get::<bool>(MetaTag::VT_IS_PROPERTY, Some(false)).unwrap()}
18767  }
18768}
18769
18770impl flatbuffers::Verifiable for MetaTag<'_> {
18771  #[inline]
18772  fn run_verifier(
18773    v: &mut flatbuffers::Verifier, pos: usize
18774  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
18775    use self::flatbuffers::Verifiable;
18776    v.visit_table(pos)?
18777     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
18778     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("content", Self::VT_CONTENT, true)?
18779     .visit_field::<bool>("is_property", Self::VT_IS_PROPERTY, false)?
18780     .finish();
18781    Ok(())
18782  }
18783}
18784pub struct MetaTagArgs<'a> {
18785    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
18786    pub content: Option<flatbuffers::WIPOffset<&'a str>>,
18787    pub is_property: bool,
18788}
18789impl<'a> Default for MetaTagArgs<'a> {
18790  #[inline]
18791  fn default() -> Self {
18792    MetaTagArgs {
18793      name: None, // required field
18794      content: None, // required field
18795      is_property: false,
18796    }
18797  }
18798}
18799
18800pub struct MetaTagBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
18801  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
18802  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
18803}
18804impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> MetaTagBuilder<'a, 'b, A> {
18805  #[inline]
18806  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
18807    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(MetaTag::VT_NAME, name);
18808  }
18809  #[inline]
18810  pub fn add_content(&mut self, content: flatbuffers::WIPOffset<&'b  str>) {
18811    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(MetaTag::VT_CONTENT, content);
18812  }
18813  #[inline]
18814  pub fn add_is_property(&mut self, is_property: bool) {
18815    self.fbb_.push_slot::<bool>(MetaTag::VT_IS_PROPERTY, is_property, false);
18816  }
18817  #[inline]
18818  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> MetaTagBuilder<'a, 'b, A> {
18819    let start = _fbb.start_table();
18820    MetaTagBuilder {
18821      fbb_: _fbb,
18822      start_: start,
18823    }
18824  }
18825  #[inline]
18826  pub fn finish(self) -> flatbuffers::WIPOffset<MetaTag<'a>> {
18827    let o = self.fbb_.end_table(self.start_);
18828    self.fbb_.required(o, MetaTag::VT_NAME,"name");
18829    self.fbb_.required(o, MetaTag::VT_CONTENT,"content");
18830    flatbuffers::WIPOffset::new(o.value())
18831  }
18832}
18833
18834impl core::fmt::Debug for MetaTag<'_> {
18835  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
18836    let mut ds = f.debug_struct("MetaTag");
18837      ds.field("name", &self.name());
18838      ds.field("content", &self.content());
18839      ds.field("is_property", &self.is_property());
18840      ds.finish()
18841  }
18842}
18843pub enum PageMetadataOffset {}
18844#[derive(Copy, Clone, PartialEq)]
18845
18846pub struct PageMetadata<'a> {
18847  pub _tab: flatbuffers::Table<'a>,
18848}
18849
18850impl<'a> flatbuffers::Follow<'a> for PageMetadata<'a> {
18851  type Inner = PageMetadata<'a>;
18852  #[inline]
18853  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
18854    Self { _tab: flatbuffers::Table::new(buf, loc) }
18855  }
18856}
18857
18858impl<'a> PageMetadata<'a> {
18859  pub const VT_TITLE: flatbuffers::VOffsetT = 4;
18860  pub const VT_TITLE_TEMPLATE: flatbuffers::VOffsetT = 6;
18861  pub const VT_DESCRIPTION: flatbuffers::VOffsetT = 8;
18862  pub const VT_CANONICAL_URL: flatbuffers::VOffsetT = 10;
18863  pub const VT_ROBOTS: flatbuffers::VOffsetT = 12;
18864  pub const VT_OPEN_GRAPH: flatbuffers::VOffsetT = 14;
18865  pub const VT_TWITTER_CARD: flatbuffers::VOffsetT = 16;
18866  pub const VT_ALTERNATES: flatbuffers::VOffsetT = 18;
18867  pub const VT_STRUCTURED_DATA: flatbuffers::VOffsetT = 20;
18868  pub const VT_CUSTOM_META: flatbuffers::VOffsetT = 22;
18869
18870  #[inline]
18871  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
18872    PageMetadata { _tab: table }
18873  }
18874  #[allow(unused_mut)]
18875  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
18876    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
18877    args: &'args PageMetadataArgs<'args>
18878  ) -> flatbuffers::WIPOffset<PageMetadata<'bldr>> {
18879    let mut builder = PageMetadataBuilder::new(_fbb);
18880    if let Some(x) = args.custom_meta { builder.add_custom_meta(x); }
18881    if let Some(x) = args.structured_data { builder.add_structured_data(x); }
18882    if let Some(x) = args.alternates { builder.add_alternates(x); }
18883    if let Some(x) = args.twitter_card { builder.add_twitter_card(x); }
18884    if let Some(x) = args.open_graph { builder.add_open_graph(x); }
18885    if let Some(x) = args.robots { builder.add_robots(x); }
18886    if let Some(x) = args.canonical_url { builder.add_canonical_url(x); }
18887    if let Some(x) = args.description { builder.add_description(x); }
18888    if let Some(x) = args.title_template { builder.add_title_template(x); }
18889    if let Some(x) = args.title { builder.add_title(x); }
18890    builder.finish()
18891  }
18892
18893
18894  /// Page title. The validator warns if > 60 characters.
18895  #[inline]
18896  pub fn title(&self) -> &'a str {
18897    // Safety:
18898    // Created from valid Table for this object
18899    // which contains a valid value in this slot
18900    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(PageMetadata::VT_TITLE, None).unwrap()}
18901  }
18902  /// Title template (e.g., "%s | My Site"). %s is replaced with title.
18903  #[inline]
18904  pub fn title_template(&self) -> Option<&'a str> {
18905    // Safety:
18906    // Created from valid Table for this object
18907    // which contains a valid value in this slot
18908    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(PageMetadata::VT_TITLE_TEMPLATE, None)}
18909  }
18910  /// Meta description. Validator warns if > 160 characters.
18911  #[inline]
18912  pub fn description(&self) -> Option<&'a str> {
18913    // Safety:
18914    // Created from valid Table for this object
18915    // which contains a valid value in this slot
18916    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(PageMetadata::VT_DESCRIPTION, None)}
18917  }
18918  /// Canonical URL for this page.
18919  #[inline]
18920  pub fn canonical_url(&self) -> Option<&'a str> {
18921    // Safety:
18922    // Created from valid Table for this object
18923    // which contains a valid value in this slot
18924    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(PageMetadata::VT_CANONICAL_URL, None)}
18925  }
18926  #[inline]
18927  pub fn robots(&self) -> Option<RobotsDirective<'a>> {
18928    // Safety:
18929    // Created from valid Table for this object
18930    // which contains a valid value in this slot
18931    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<RobotsDirective>>(PageMetadata::VT_ROBOTS, None)}
18932  }
18933  #[inline]
18934  pub fn open_graph(&self) -> Option<OpenGraphData<'a>> {
18935    // Safety:
18936    // Created from valid Table for this object
18937    // which contains a valid value in this slot
18938    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<OpenGraphData>>(PageMetadata::VT_OPEN_GRAPH, None)}
18939  }
18940  #[inline]
18941  pub fn twitter_card(&self) -> Option<TwitterCardData<'a>> {
18942    // Safety:
18943    // Created from valid Table for this object
18944    // which contains a valid value in this slot
18945    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<TwitterCardData>>(PageMetadata::VT_TWITTER_CARD, None)}
18946  }
18947  /// Hreflang alternate links (for i18n).
18948  #[inline]
18949  pub fn alternates(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<AlternateLink<'a>>>> {
18950    // Safety:
18951    // Created from valid Table for this object
18952    // which contains a valid value in this slot
18953    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<AlternateLink>>>>(PageMetadata::VT_ALTERNATES, None)}
18954  }
18955  /// Structured data blocks (JSON-LD).
18956  #[inline]
18957  pub fn structured_data(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<StructuredData<'a>>>> {
18958    // Safety:
18959    // Created from valid Table for this object
18960    // which contains a valid value in this slot
18961    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<StructuredData>>>>(PageMetadata::VT_STRUCTURED_DATA, None)}
18962  }
18963  /// Custom meta tags (escape hatch).
18964  #[inline]
18965  pub fn custom_meta(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<MetaTag<'a>>>> {
18966    // Safety:
18967    // Created from valid Table for this object
18968    // which contains a valid value in this slot
18969    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<MetaTag>>>>(PageMetadata::VT_CUSTOM_META, None)}
18970  }
18971}
18972
18973impl flatbuffers::Verifiable for PageMetadata<'_> {
18974  #[inline]
18975  fn run_verifier(
18976    v: &mut flatbuffers::Verifier, pos: usize
18977  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
18978    use self::flatbuffers::Verifiable;
18979    v.visit_table(pos)?
18980     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("title", Self::VT_TITLE, true)?
18981     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("title_template", Self::VT_TITLE_TEMPLATE, false)?
18982     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("description", Self::VT_DESCRIPTION, false)?
18983     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("canonical_url", Self::VT_CANONICAL_URL, false)?
18984     .visit_field::<flatbuffers::ForwardsUOffset<RobotsDirective>>("robots", Self::VT_ROBOTS, false)?
18985     .visit_field::<flatbuffers::ForwardsUOffset<OpenGraphData>>("open_graph", Self::VT_OPEN_GRAPH, false)?
18986     .visit_field::<flatbuffers::ForwardsUOffset<TwitterCardData>>("twitter_card", Self::VT_TWITTER_CARD, false)?
18987     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<AlternateLink>>>>("alternates", Self::VT_ALTERNATES, false)?
18988     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<StructuredData>>>>("structured_data", Self::VT_STRUCTURED_DATA, false)?
18989     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<MetaTag>>>>("custom_meta", Self::VT_CUSTOM_META, false)?
18990     .finish();
18991    Ok(())
18992  }
18993}
18994pub struct PageMetadataArgs<'a> {
18995    pub title: Option<flatbuffers::WIPOffset<&'a str>>,
18996    pub title_template: Option<flatbuffers::WIPOffset<&'a str>>,
18997    pub description: Option<flatbuffers::WIPOffset<&'a str>>,
18998    pub canonical_url: Option<flatbuffers::WIPOffset<&'a str>>,
18999    pub robots: Option<flatbuffers::WIPOffset<RobotsDirective<'a>>>,
19000    pub open_graph: Option<flatbuffers::WIPOffset<OpenGraphData<'a>>>,
19001    pub twitter_card: Option<flatbuffers::WIPOffset<TwitterCardData<'a>>>,
19002    pub alternates: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<AlternateLink<'a>>>>>,
19003    pub structured_data: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<StructuredData<'a>>>>>,
19004    pub custom_meta: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<MetaTag<'a>>>>>,
19005}
19006impl<'a> Default for PageMetadataArgs<'a> {
19007  #[inline]
19008  fn default() -> Self {
19009    PageMetadataArgs {
19010      title: None, // required field
19011      title_template: None,
19012      description: None,
19013      canonical_url: None,
19014      robots: None,
19015      open_graph: None,
19016      twitter_card: None,
19017      alternates: None,
19018      structured_data: None,
19019      custom_meta: None,
19020    }
19021  }
19022}
19023
19024pub struct PageMetadataBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
19025  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
19026  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
19027}
19028impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> PageMetadataBuilder<'a, 'b, A> {
19029  #[inline]
19030  pub fn add_title(&mut self, title: flatbuffers::WIPOffset<&'b  str>) {
19031    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PageMetadata::VT_TITLE, title);
19032  }
19033  #[inline]
19034  pub fn add_title_template(&mut self, title_template: flatbuffers::WIPOffset<&'b  str>) {
19035    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PageMetadata::VT_TITLE_TEMPLATE, title_template);
19036  }
19037  #[inline]
19038  pub fn add_description(&mut self, description: flatbuffers::WIPOffset<&'b  str>) {
19039    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PageMetadata::VT_DESCRIPTION, description);
19040  }
19041  #[inline]
19042  pub fn add_canonical_url(&mut self, canonical_url: flatbuffers::WIPOffset<&'b  str>) {
19043    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PageMetadata::VT_CANONICAL_URL, canonical_url);
19044  }
19045  #[inline]
19046  pub fn add_robots(&mut self, robots: flatbuffers::WIPOffset<RobotsDirective<'b >>) {
19047    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<RobotsDirective>>(PageMetadata::VT_ROBOTS, robots);
19048  }
19049  #[inline]
19050  pub fn add_open_graph(&mut self, open_graph: flatbuffers::WIPOffset<OpenGraphData<'b >>) {
19051    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<OpenGraphData>>(PageMetadata::VT_OPEN_GRAPH, open_graph);
19052  }
19053  #[inline]
19054  pub fn add_twitter_card(&mut self, twitter_card: flatbuffers::WIPOffset<TwitterCardData<'b >>) {
19055    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<TwitterCardData>>(PageMetadata::VT_TWITTER_CARD, twitter_card);
19056  }
19057  #[inline]
19058  pub fn add_alternates(&mut self, alternates: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<AlternateLink<'b >>>>) {
19059    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PageMetadata::VT_ALTERNATES, alternates);
19060  }
19061  #[inline]
19062  pub fn add_structured_data(&mut self, structured_data: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<StructuredData<'b >>>>) {
19063    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PageMetadata::VT_STRUCTURED_DATA, structured_data);
19064  }
19065  #[inline]
19066  pub fn add_custom_meta(&mut self, custom_meta: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<MetaTag<'b >>>>) {
19067    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(PageMetadata::VT_CUSTOM_META, custom_meta);
19068  }
19069  #[inline]
19070  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> PageMetadataBuilder<'a, 'b, A> {
19071    let start = _fbb.start_table();
19072    PageMetadataBuilder {
19073      fbb_: _fbb,
19074      start_: start,
19075    }
19076  }
19077  #[inline]
19078  pub fn finish(self) -> flatbuffers::WIPOffset<PageMetadata<'a>> {
19079    let o = self.fbb_.end_table(self.start_);
19080    self.fbb_.required(o, PageMetadata::VT_TITLE,"title");
19081    flatbuffers::WIPOffset::new(o.value())
19082  }
19083}
19084
19085impl core::fmt::Debug for PageMetadata<'_> {
19086  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
19087    let mut ds = f.debug_struct("PageMetadata");
19088      ds.field("title", &self.title());
19089      ds.field("title_template", &self.title_template());
19090      ds.field("description", &self.description());
19091      ds.field("canonical_url", &self.canonical_url());
19092      ds.field("robots", &self.robots());
19093      ds.field("open_graph", &self.open_graph());
19094      ds.field("twitter_card", &self.twitter_card());
19095      ds.field("alternates", &self.alternates());
19096      ds.field("structured_data", &self.structured_data());
19097      ds.field("custom_meta", &self.custom_meta());
19098      ds.finish()
19099  }
19100}
19101pub enum ValidationRuleOffset {}
19102#[derive(Copy, Clone, PartialEq)]
19103
19104pub struct ValidationRule<'a> {
19105  pub _tab: flatbuffers::Table<'a>,
19106}
19107
19108impl<'a> flatbuffers::Follow<'a> for ValidationRule<'a> {
19109  type Inner = ValidationRule<'a>;
19110  #[inline]
19111  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
19112    Self { _tab: flatbuffers::Table::new(buf, loc) }
19113  }
19114}
19115
19116impl<'a> ValidationRule<'a> {
19117  pub const VT_RULE_TYPE: flatbuffers::VOffsetT = 4;
19118  pub const VT_VALUE: flatbuffers::VOffsetT = 6;
19119  pub const VT_MESSAGE: flatbuffers::VOffsetT = 8;
19120
19121  #[inline]
19122  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
19123    ValidationRule { _tab: table }
19124  }
19125  #[allow(unused_mut)]
19126  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
19127    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
19128    args: &'args ValidationRuleArgs<'args>
19129  ) -> flatbuffers::WIPOffset<ValidationRule<'bldr>> {
19130    let mut builder = ValidationRuleBuilder::new(_fbb);
19131    if let Some(x) = args.message { builder.add_message(x); }
19132    if let Some(x) = args.value { builder.add_value(x); }
19133    builder.add_rule_type(args.rule_type);
19134    builder.finish()
19135  }
19136
19137
19138  #[inline]
19139  pub fn rule_type(&self) -> ValidationType {
19140    // Safety:
19141    // Created from valid Table for this object
19142    // which contains a valid value in this slot
19143    unsafe { self._tab.get::<ValidationType>(ValidationRule::VT_RULE_TYPE, Some(ValidationType::Required)).unwrap()}
19144  }
19145  /// Value for the rule (e.g., min_length: "8", pattern: "^[a-z]+$").
19146  #[inline]
19147  pub fn value(&self) -> Option<&'a str> {
19148    // Safety:
19149    // Created from valid Table for this object
19150    // which contains a valid value in this slot
19151    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ValidationRule::VT_VALUE, None)}
19152  }
19153  /// Error message (should be a LocalizedString key in production).
19154  #[inline]
19155  pub fn message(&self) -> &'a str {
19156    // Safety:
19157    // Created from valid Table for this object
19158    // which contains a valid value in this slot
19159    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ValidationRule::VT_MESSAGE, None).unwrap()}
19160  }
19161}
19162
19163impl flatbuffers::Verifiable for ValidationRule<'_> {
19164  #[inline]
19165  fn run_verifier(
19166    v: &mut flatbuffers::Verifier, pos: usize
19167  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
19168    use self::flatbuffers::Verifiable;
19169    v.visit_table(pos)?
19170     .visit_field::<ValidationType>("rule_type", Self::VT_RULE_TYPE, false)?
19171     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("value", Self::VT_VALUE, false)?
19172     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("message", Self::VT_MESSAGE, true)?
19173     .finish();
19174    Ok(())
19175  }
19176}
19177pub struct ValidationRuleArgs<'a> {
19178    pub rule_type: ValidationType,
19179    pub value: Option<flatbuffers::WIPOffset<&'a str>>,
19180    pub message: Option<flatbuffers::WIPOffset<&'a str>>,
19181}
19182impl<'a> Default for ValidationRuleArgs<'a> {
19183  #[inline]
19184  fn default() -> Self {
19185    ValidationRuleArgs {
19186      rule_type: ValidationType::Required,
19187      value: None,
19188      message: None, // required field
19189    }
19190  }
19191}
19192
19193pub struct ValidationRuleBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
19194  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
19195  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
19196}
19197impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ValidationRuleBuilder<'a, 'b, A> {
19198  #[inline]
19199  pub fn add_rule_type(&mut self, rule_type: ValidationType) {
19200    self.fbb_.push_slot::<ValidationType>(ValidationRule::VT_RULE_TYPE, rule_type, ValidationType::Required);
19201  }
19202  #[inline]
19203  pub fn add_value(&mut self, value: flatbuffers::WIPOffset<&'b  str>) {
19204    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ValidationRule::VT_VALUE, value);
19205  }
19206  #[inline]
19207  pub fn add_message(&mut self, message: flatbuffers::WIPOffset<&'b  str>) {
19208    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ValidationRule::VT_MESSAGE, message);
19209  }
19210  #[inline]
19211  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ValidationRuleBuilder<'a, 'b, A> {
19212    let start = _fbb.start_table();
19213    ValidationRuleBuilder {
19214      fbb_: _fbb,
19215      start_: start,
19216    }
19217  }
19218  #[inline]
19219  pub fn finish(self) -> flatbuffers::WIPOffset<ValidationRule<'a>> {
19220    let o = self.fbb_.end_table(self.start_);
19221    self.fbb_.required(o, ValidationRule::VT_MESSAGE,"message");
19222    flatbuffers::WIPOffset::new(o.value())
19223  }
19224}
19225
19226impl core::fmt::Debug for ValidationRule<'_> {
19227  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
19228    let mut ds = f.debug_struct("ValidationRule");
19229      ds.field("rule_type", &self.rule_type());
19230      ds.field("value", &self.value());
19231      ds.field("message", &self.message());
19232      ds.finish()
19233  }
19234}
19235pub enum AsyncValidationOffset {}
19236#[derive(Copy, Clone, PartialEq)]
19237
19238pub struct AsyncValidation<'a> {
19239  pub _tab: flatbuffers::Table<'a>,
19240}
19241
19242impl<'a> flatbuffers::Follow<'a> for AsyncValidation<'a> {
19243  type Inner = AsyncValidation<'a>;
19244  #[inline]
19245  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
19246    Self { _tab: flatbuffers::Table::new(buf, loc) }
19247  }
19248}
19249
19250impl<'a> AsyncValidation<'a> {
19251  pub const VT_ENDPOINT: flatbuffers::VOffsetT = 4;
19252  pub const VT_DEBOUNCE_MS: flatbuffers::VOffsetT = 6;
19253  pub const VT_MESSAGE: flatbuffers::VOffsetT = 8;
19254
19255  #[inline]
19256  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
19257    AsyncValidation { _tab: table }
19258  }
19259  #[allow(unused_mut)]
19260  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
19261    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
19262    args: &'args AsyncValidationArgs<'args>
19263  ) -> flatbuffers::WIPOffset<AsyncValidation<'bldr>> {
19264    let mut builder = AsyncValidationBuilder::new(_fbb);
19265    if let Some(x) = args.message { builder.add_message(x); }
19266    builder.add_debounce_ms(args.debounce_ms);
19267    if let Some(x) = args.endpoint { builder.add_endpoint(x); }
19268    builder.finish()
19269  }
19270
19271
19272  /// Endpoint to check against (e.g., /api/check-email).
19273  #[inline]
19274  pub fn endpoint(&self) -> &'a str {
19275    // Safety:
19276    // Created from valid Table for this object
19277    // which contains a valid value in this slot
19278    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(AsyncValidation::VT_ENDPOINT, None).unwrap()}
19279  }
19280  /// Debounce delay in ms before sending the request.
19281  #[inline]
19282  pub fn debounce_ms(&self) -> u32 {
19283    // Safety:
19284    // Created from valid Table for this object
19285    // which contains a valid value in this slot
19286    unsafe { self._tab.get::<u32>(AsyncValidation::VT_DEBOUNCE_MS, Some(300)).unwrap()}
19287  }
19288  /// Error message if validation fails.
19289  #[inline]
19290  pub fn message(&self) -> &'a str {
19291    // Safety:
19292    // Created from valid Table for this object
19293    // which contains a valid value in this slot
19294    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(AsyncValidation::VT_MESSAGE, None).unwrap()}
19295  }
19296}
19297
19298impl flatbuffers::Verifiable for AsyncValidation<'_> {
19299  #[inline]
19300  fn run_verifier(
19301    v: &mut flatbuffers::Verifier, pos: usize
19302  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
19303    use self::flatbuffers::Verifiable;
19304    v.visit_table(pos)?
19305     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("endpoint", Self::VT_ENDPOINT, true)?
19306     .visit_field::<u32>("debounce_ms", Self::VT_DEBOUNCE_MS, false)?
19307     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("message", Self::VT_MESSAGE, true)?
19308     .finish();
19309    Ok(())
19310  }
19311}
19312pub struct AsyncValidationArgs<'a> {
19313    pub endpoint: Option<flatbuffers::WIPOffset<&'a str>>,
19314    pub debounce_ms: u32,
19315    pub message: Option<flatbuffers::WIPOffset<&'a str>>,
19316}
19317impl<'a> Default for AsyncValidationArgs<'a> {
19318  #[inline]
19319  fn default() -> Self {
19320    AsyncValidationArgs {
19321      endpoint: None, // required field
19322      debounce_ms: 300,
19323      message: None, // required field
19324    }
19325  }
19326}
19327
19328pub struct AsyncValidationBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
19329  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
19330  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
19331}
19332impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> AsyncValidationBuilder<'a, 'b, A> {
19333  #[inline]
19334  pub fn add_endpoint(&mut self, endpoint: flatbuffers::WIPOffset<&'b  str>) {
19335    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(AsyncValidation::VT_ENDPOINT, endpoint);
19336  }
19337  #[inline]
19338  pub fn add_debounce_ms(&mut self, debounce_ms: u32) {
19339    self.fbb_.push_slot::<u32>(AsyncValidation::VT_DEBOUNCE_MS, debounce_ms, 300);
19340  }
19341  #[inline]
19342  pub fn add_message(&mut self, message: flatbuffers::WIPOffset<&'b  str>) {
19343    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(AsyncValidation::VT_MESSAGE, message);
19344  }
19345  #[inline]
19346  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> AsyncValidationBuilder<'a, 'b, A> {
19347    let start = _fbb.start_table();
19348    AsyncValidationBuilder {
19349      fbb_: _fbb,
19350      start_: start,
19351    }
19352  }
19353  #[inline]
19354  pub fn finish(self) -> flatbuffers::WIPOffset<AsyncValidation<'a>> {
19355    let o = self.fbb_.end_table(self.start_);
19356    self.fbb_.required(o, AsyncValidation::VT_ENDPOINT,"endpoint");
19357    self.fbb_.required(o, AsyncValidation::VT_MESSAGE,"message");
19358    flatbuffers::WIPOffset::new(o.value())
19359  }
19360}
19361
19362impl core::fmt::Debug for AsyncValidation<'_> {
19363  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
19364    let mut ds = f.debug_struct("AsyncValidation");
19365      ds.field("endpoint", &self.endpoint());
19366      ds.field("debounce_ms", &self.debounce_ms());
19367      ds.field("message", &self.message());
19368      ds.finish()
19369  }
19370}
19371pub enum CrossFieldValidationOffset {}
19372#[derive(Copy, Clone, PartialEq)]
19373
19374pub struct CrossFieldValidation<'a> {
19375  pub _tab: flatbuffers::Table<'a>,
19376}
19377
19378impl<'a> flatbuffers::Follow<'a> for CrossFieldValidation<'a> {
19379  type Inner = CrossFieldValidation<'a>;
19380  #[inline]
19381  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
19382    Self { _tab: flatbuffers::Table::new(buf, loc) }
19383  }
19384}
19385
19386impl<'a> CrossFieldValidation<'a> {
19387  pub const VT_FIELD_NAMES: flatbuffers::VOffsetT = 4;
19388  pub const VT_EXPRESSION: flatbuffers::VOffsetT = 6;
19389  pub const VT_MESSAGE: flatbuffers::VOffsetT = 8;
19390  pub const VT_TARGET_FIELD: flatbuffers::VOffsetT = 10;
19391
19392  #[inline]
19393  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
19394    CrossFieldValidation { _tab: table }
19395  }
19396  #[allow(unused_mut)]
19397  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
19398    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
19399    args: &'args CrossFieldValidationArgs<'args>
19400  ) -> flatbuffers::WIPOffset<CrossFieldValidation<'bldr>> {
19401    let mut builder = CrossFieldValidationBuilder::new(_fbb);
19402    if let Some(x) = args.target_field { builder.add_target_field(x); }
19403    if let Some(x) = args.message { builder.add_message(x); }
19404    if let Some(x) = args.expression { builder.add_expression(x); }
19405    if let Some(x) = args.field_names { builder.add_field_names(x); }
19406    builder.finish()
19407  }
19408
19409
19410  /// Field names involved in this validation.
19411  #[inline]
19412  pub fn field_names(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>> {
19413    // Safety:
19414    // Created from valid Table for this object
19415    // which contains a valid value in this slot
19416    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>(CrossFieldValidation::VT_FIELD_NAMES, None).unwrap()}
19417  }
19418  /// Expression that must evaluate to true (e.g., "password == confirm_password").
19419  #[inline]
19420  pub fn expression(&self) -> &'a str {
19421    // Safety:
19422    // Created from valid Table for this object
19423    // which contains a valid value in this slot
19424    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(CrossFieldValidation::VT_EXPRESSION, None).unwrap()}
19425  }
19426  /// Error message.
19427  #[inline]
19428  pub fn message(&self) -> &'a str {
19429    // Safety:
19430    // Created from valid Table for this object
19431    // which contains a valid value in this slot
19432    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(CrossFieldValidation::VT_MESSAGE, None).unwrap()}
19433  }
19434  /// Which field shows the error.
19435  #[inline]
19436  pub fn target_field(&self) -> Option<&'a str> {
19437    // Safety:
19438    // Created from valid Table for this object
19439    // which contains a valid value in this slot
19440    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(CrossFieldValidation::VT_TARGET_FIELD, None)}
19441  }
19442}
19443
19444impl flatbuffers::Verifiable for CrossFieldValidation<'_> {
19445  #[inline]
19446  fn run_verifier(
19447    v: &mut flatbuffers::Verifier, pos: usize
19448  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
19449    use self::flatbuffers::Verifiable;
19450    v.visit_table(pos)?
19451     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>>>("field_names", Self::VT_FIELD_NAMES, true)?
19452     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("expression", Self::VT_EXPRESSION, true)?
19453     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("message", Self::VT_MESSAGE, true)?
19454     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("target_field", Self::VT_TARGET_FIELD, false)?
19455     .finish();
19456    Ok(())
19457  }
19458}
19459pub struct CrossFieldValidationArgs<'a> {
19460    pub field_names: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>,
19461    pub expression: Option<flatbuffers::WIPOffset<&'a str>>,
19462    pub message: Option<flatbuffers::WIPOffset<&'a str>>,
19463    pub target_field: Option<flatbuffers::WIPOffset<&'a str>>,
19464}
19465impl<'a> Default for CrossFieldValidationArgs<'a> {
19466  #[inline]
19467  fn default() -> Self {
19468    CrossFieldValidationArgs {
19469      field_names: None, // required field
19470      expression: None, // required field
19471      message: None, // required field
19472      target_field: None,
19473    }
19474  }
19475}
19476
19477pub struct CrossFieldValidationBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
19478  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
19479  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
19480}
19481impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> CrossFieldValidationBuilder<'a, 'b, A> {
19482  #[inline]
19483  pub fn add_field_names(&mut self, field_names: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<&'b  str>>>) {
19484    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(CrossFieldValidation::VT_FIELD_NAMES, field_names);
19485  }
19486  #[inline]
19487  pub fn add_expression(&mut self, expression: flatbuffers::WIPOffset<&'b  str>) {
19488    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(CrossFieldValidation::VT_EXPRESSION, expression);
19489  }
19490  #[inline]
19491  pub fn add_message(&mut self, message: flatbuffers::WIPOffset<&'b  str>) {
19492    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(CrossFieldValidation::VT_MESSAGE, message);
19493  }
19494  #[inline]
19495  pub fn add_target_field(&mut self, target_field: flatbuffers::WIPOffset<&'b  str>) {
19496    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(CrossFieldValidation::VT_TARGET_FIELD, target_field);
19497  }
19498  #[inline]
19499  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> CrossFieldValidationBuilder<'a, 'b, A> {
19500    let start = _fbb.start_table();
19501    CrossFieldValidationBuilder {
19502      fbb_: _fbb,
19503      start_: start,
19504    }
19505  }
19506  #[inline]
19507  pub fn finish(self) -> flatbuffers::WIPOffset<CrossFieldValidation<'a>> {
19508    let o = self.fbb_.end_table(self.start_);
19509    self.fbb_.required(o, CrossFieldValidation::VT_FIELD_NAMES,"field_names");
19510    self.fbb_.required(o, CrossFieldValidation::VT_EXPRESSION,"expression");
19511    self.fbb_.required(o, CrossFieldValidation::VT_MESSAGE,"message");
19512    flatbuffers::WIPOffset::new(o.value())
19513  }
19514}
19515
19516impl core::fmt::Debug for CrossFieldValidation<'_> {
19517  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
19518    let mut ds = f.debug_struct("CrossFieldValidation");
19519      ds.field("field_names", &self.field_names());
19520      ds.field("expression", &self.expression());
19521      ds.field("message", &self.message());
19522      ds.field("target_field", &self.target_field());
19523      ds.finish()
19524  }
19525}
19526pub enum SelectOptionOffset {}
19527#[derive(Copy, Clone, PartialEq)]
19528
19529pub struct SelectOption<'a> {
19530  pub _tab: flatbuffers::Table<'a>,
19531}
19532
19533impl<'a> flatbuffers::Follow<'a> for SelectOption<'a> {
19534  type Inner = SelectOption<'a>;
19535  #[inline]
19536  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
19537    Self { _tab: flatbuffers::Table::new(buf, loc) }
19538  }
19539}
19540
19541impl<'a> SelectOption<'a> {
19542  pub const VT_LABEL: flatbuffers::VOffsetT = 4;
19543  pub const VT_VALUE: flatbuffers::VOffsetT = 6;
19544  pub const VT_DISABLED: flatbuffers::VOffsetT = 8;
19545
19546  #[inline]
19547  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
19548    SelectOption { _tab: table }
19549  }
19550  #[allow(unused_mut)]
19551  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
19552    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
19553    args: &'args SelectOptionArgs<'args>
19554  ) -> flatbuffers::WIPOffset<SelectOption<'bldr>> {
19555    let mut builder = SelectOptionBuilder::new(_fbb);
19556    if let Some(x) = args.value { builder.add_value(x); }
19557    if let Some(x) = args.label { builder.add_label(x); }
19558    builder.add_disabled(args.disabled);
19559    builder.finish()
19560  }
19561
19562
19563  #[inline]
19564  pub fn label(&self) -> &'a str {
19565    // Safety:
19566    // Created from valid Table for this object
19567    // which contains a valid value in this slot
19568    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(SelectOption::VT_LABEL, None).unwrap()}
19569  }
19570  #[inline]
19571  pub fn value(&self) -> &'a str {
19572    // Safety:
19573    // Created from valid Table for this object
19574    // which contains a valid value in this slot
19575    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(SelectOption::VT_VALUE, None).unwrap()}
19576  }
19577  #[inline]
19578  pub fn disabled(&self) -> bool {
19579    // Safety:
19580    // Created from valid Table for this object
19581    // which contains a valid value in this slot
19582    unsafe { self._tab.get::<bool>(SelectOption::VT_DISABLED, Some(false)).unwrap()}
19583  }
19584}
19585
19586impl flatbuffers::Verifiable for SelectOption<'_> {
19587  #[inline]
19588  fn run_verifier(
19589    v: &mut flatbuffers::Verifier, pos: usize
19590  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
19591    use self::flatbuffers::Verifiable;
19592    v.visit_table(pos)?
19593     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("label", Self::VT_LABEL, true)?
19594     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("value", Self::VT_VALUE, true)?
19595     .visit_field::<bool>("disabled", Self::VT_DISABLED, false)?
19596     .finish();
19597    Ok(())
19598  }
19599}
19600pub struct SelectOptionArgs<'a> {
19601    pub label: Option<flatbuffers::WIPOffset<&'a str>>,
19602    pub value: Option<flatbuffers::WIPOffset<&'a str>>,
19603    pub disabled: bool,
19604}
19605impl<'a> Default for SelectOptionArgs<'a> {
19606  #[inline]
19607  fn default() -> Self {
19608    SelectOptionArgs {
19609      label: None, // required field
19610      value: None, // required field
19611      disabled: false,
19612    }
19613  }
19614}
19615
19616pub struct SelectOptionBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
19617  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
19618  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
19619}
19620impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SelectOptionBuilder<'a, 'b, A> {
19621  #[inline]
19622  pub fn add_label(&mut self, label: flatbuffers::WIPOffset<&'b  str>) {
19623    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(SelectOption::VT_LABEL, label);
19624  }
19625  #[inline]
19626  pub fn add_value(&mut self, value: flatbuffers::WIPOffset<&'b  str>) {
19627    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(SelectOption::VT_VALUE, value);
19628  }
19629  #[inline]
19630  pub fn add_disabled(&mut self, disabled: bool) {
19631    self.fbb_.push_slot::<bool>(SelectOption::VT_DISABLED, disabled, false);
19632  }
19633  #[inline]
19634  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> SelectOptionBuilder<'a, 'b, A> {
19635    let start = _fbb.start_table();
19636    SelectOptionBuilder {
19637      fbb_: _fbb,
19638      start_: start,
19639    }
19640  }
19641  #[inline]
19642  pub fn finish(self) -> flatbuffers::WIPOffset<SelectOption<'a>> {
19643    let o = self.fbb_.end_table(self.start_);
19644    self.fbb_.required(o, SelectOption::VT_LABEL,"label");
19645    self.fbb_.required(o, SelectOption::VT_VALUE,"value");
19646    flatbuffers::WIPOffset::new(o.value())
19647  }
19648}
19649
19650impl core::fmt::Debug for SelectOption<'_> {
19651  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
19652    let mut ds = f.debug_struct("SelectOption");
19653      ds.field("label", &self.label());
19654      ds.field("value", &self.value());
19655      ds.field("disabled", &self.disabled());
19656      ds.finish()
19657  }
19658}
19659pub enum FormFieldOffset {}
19660#[derive(Copy, Clone, PartialEq)]
19661
19662pub struct FormField<'a> {
19663  pub _tab: flatbuffers::Table<'a>,
19664}
19665
19666impl<'a> flatbuffers::Follow<'a> for FormField<'a> {
19667  type Inner = FormField<'a>;
19668  #[inline]
19669  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
19670    Self { _tab: flatbuffers::Table::new(buf, loc) }
19671  }
19672}
19673
19674impl<'a> FormField<'a> {
19675  pub const VT_NAME: flatbuffers::VOffsetT = 4;
19676  pub const VT_FIELD_TYPE: flatbuffers::VOffsetT = 6;
19677  pub const VT_LABEL: flatbuffers::VOffsetT = 8;
19678  pub const VT_PLACEHOLDER: flatbuffers::VOffsetT = 10;
19679  pub const VT_DESCRIPTION: flatbuffers::VOffsetT = 12;
19680  pub const VT_INITIAL_VALUE: flatbuffers::VOffsetT = 14;
19681  pub const VT_VALIDATIONS: flatbuffers::VOffsetT = 16;
19682  pub const VT_ASYNC_VALIDATIONS: flatbuffers::VOffsetT = 18;
19683  pub const VT_OPTIONS: flatbuffers::VOffsetT = 20;
19684  pub const VT_VISIBLE_WHEN: flatbuffers::VOffsetT = 22;
19685  pub const VT_DISABLED_WHEN: flatbuffers::VOffsetT = 24;
19686  pub const VT_AUTOCOMPLETE: flatbuffers::VOffsetT = 26;
19687  pub const VT_ACCEPT: flatbuffers::VOffsetT = 28;
19688  pub const VT_MAX_FILE_SIZE: flatbuffers::VOffsetT = 30;
19689  pub const VT_MULTIPLE: flatbuffers::VOffsetT = 32;
19690  pub const VT_STEP: flatbuffers::VOffsetT = 34;
19691  pub const VT_SEMANTIC_NODE_ID: flatbuffers::VOffsetT = 36;
19692
19693  #[inline]
19694  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
19695    FormField { _tab: table }
19696  }
19697  #[allow(unused_mut)]
19698  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
19699    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
19700    args: &'args FormFieldArgs<'args>
19701  ) -> flatbuffers::WIPOffset<FormField<'bldr>> {
19702    let mut builder = FormFieldBuilder::new(_fbb);
19703    if let Some(x) = args.semantic_node_id { builder.add_semantic_node_id(x); }
19704    builder.add_step(args.step);
19705    builder.add_max_file_size(args.max_file_size);
19706    if let Some(x) = args.accept { builder.add_accept(x); }
19707    if let Some(x) = args.disabled_when { builder.add_disabled_when(x); }
19708    if let Some(x) = args.visible_when { builder.add_visible_when(x); }
19709    if let Some(x) = args.options { builder.add_options(x); }
19710    if let Some(x) = args.async_validations { builder.add_async_validations(x); }
19711    if let Some(x) = args.validations { builder.add_validations(x); }
19712    if let Some(x) = args.initial_value { builder.add_initial_value(x); }
19713    if let Some(x) = args.description { builder.add_description(x); }
19714    if let Some(x) = args.placeholder { builder.add_placeholder(x); }
19715    if let Some(x) = args.label { builder.add_label(x); }
19716    if let Some(x) = args.name { builder.add_name(x); }
19717    builder.add_multiple(args.multiple);
19718    builder.add_autocomplete(args.autocomplete);
19719    builder.add_field_type(args.field_type);
19720    builder.finish()
19721  }
19722
19723
19724  /// Field identifier (used as form submission key).
19725  #[inline]
19726  pub fn name(&self) -> &'a str {
19727    // Safety:
19728    // Created from valid Table for this object
19729    // which contains a valid value in this slot
19730    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FormField::VT_NAME, None).unwrap()}
19731  }
19732  #[inline]
19733  pub fn field_type(&self) -> FormFieldType {
19734    // Safety:
19735    // Created from valid Table for this object
19736    // which contains a valid value in this slot
19737    unsafe { self._tab.get::<FormFieldType>(FormField::VT_FIELD_TYPE, Some(FormFieldType::Text)).unwrap()}
19738  }
19739  /// Visible label (required for accessibility).
19740  #[inline]
19741  pub fn label(&self) -> &'a str {
19742    // Safety:
19743    // Created from valid Table for this object
19744    // which contains a valid value in this slot
19745    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FormField::VT_LABEL, None).unwrap()}
19746  }
19747  #[inline]
19748  pub fn placeholder(&self) -> Option<&'a str> {
19749    // Safety:
19750    // Created from valid Table for this object
19751    // which contains a valid value in this slot
19752    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FormField::VT_PLACEHOLDER, None)}
19753  }
19754  /// Help text displayed below the field (aria-describedby).
19755  #[inline]
19756  pub fn description(&self) -> Option<&'a str> {
19757    // Safety:
19758    // Created from valid Table for this object
19759    // which contains a valid value in this slot
19760    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FormField::VT_DESCRIPTION, None)}
19761  }
19762  /// Default value.
19763  #[inline]
19764  pub fn initial_value(&self) -> Option<&'a str> {
19765    // Safety:
19766    // Created from valid Table for this object
19767    // which contains a valid value in this slot
19768    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FormField::VT_INITIAL_VALUE, None)}
19769  }
19770  /// Validation rules (run client-side).
19771  #[inline]
19772  pub fn validations(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ValidationRule<'a>>>> {
19773    // Safety:
19774    // Created from valid Table for this object
19775    // which contains a valid value in this slot
19776    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ValidationRule>>>>(FormField::VT_VALIDATIONS, None)}
19777  }
19778  /// Server-side async validations (e.g., uniqueness check).
19779  #[inline]
19780  pub fn async_validations(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<AsyncValidation<'a>>>> {
19781    // Safety:
19782    // Created from valid Table for this object
19783    // which contains a valid value in this slot
19784    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<AsyncValidation>>>>(FormField::VT_ASYNC_VALIDATIONS, None)}
19785  }
19786  /// For Select/Radio: available options.
19787  #[inline]
19788  pub fn options(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<SelectOption<'a>>>> {
19789    // Safety:
19790    // Created from valid Table for this object
19791    // which contains a valid value in this slot
19792    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<SelectOption>>>>(FormField::VT_OPTIONS, None)}
19793  }
19794  /// Conditional visibility (reference to a ComputeNode or expression).
19795  #[inline]
19796  pub fn visible_when(&self) -> Option<&'a str> {
19797    // Safety:
19798    // Created from valid Table for this object
19799    // which contains a valid value in this slot
19800    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FormField::VT_VISIBLE_WHEN, None)}
19801  }
19802  /// Conditional disable.
19803  #[inline]
19804  pub fn disabled_when(&self) -> Option<&'a str> {
19805    // Safety:
19806    // Created from valid Table for this object
19807    // which contains a valid value in this slot
19808    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FormField::VT_DISABLED_WHEN, None)}
19809  }
19810  /// Browser autocomplete hint.
19811  #[inline]
19812  pub fn autocomplete(&self) -> AutocompleteHint {
19813    // Safety:
19814    // Created from valid Table for this object
19815    // which contains a valid value in this slot
19816    unsafe { self._tab.get::<AutocompleteHint>(FormField::VT_AUTOCOMPLETE, Some(AutocompleteHint::Off)).unwrap()}
19817  }
19818  /// For File: accepted MIME types (e.g., "image/*", ".pdf").
19819  #[inline]
19820  pub fn accept(&self) -> Option<&'a str> {
19821    // Safety:
19822    // Created from valid Table for this object
19823    // which contains a valid value in this slot
19824    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FormField::VT_ACCEPT, None)}
19825  }
19826  /// For File: max file size in bytes.
19827  #[inline]
19828  pub fn max_file_size(&self) -> u32 {
19829    // Safety:
19830    // Created from valid Table for this object
19831    // which contains a valid value in this slot
19832    unsafe { self._tab.get::<u32>(FormField::VT_MAX_FILE_SIZE, Some(0)).unwrap()}
19833  }
19834  /// For File: allow multiple files.
19835  #[inline]
19836  pub fn multiple(&self) -> bool {
19837    // Safety:
19838    // Created from valid Table for this object
19839    // which contains a valid value in this slot
19840    unsafe { self._tab.get::<bool>(FormField::VT_MULTIPLE, Some(false)).unwrap()}
19841  }
19842  /// For Number/Range: step value.
19843  #[inline]
19844  pub fn step(&self) -> f32 {
19845    // Safety:
19846    // Created from valid Table for this object
19847    // which contains a valid value in this slot
19848    unsafe { self._tab.get::<f32>(FormField::VT_STEP, Some(0.0)).unwrap()}
19849  }
19850  /// Accessibility.
19851  #[inline]
19852  pub fn semantic_node_id(&self) -> Option<&'a str> {
19853    // Safety:
19854    // Created from valid Table for this object
19855    // which contains a valid value in this slot
19856    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FormField::VT_SEMANTIC_NODE_ID, None)}
19857  }
19858}
19859
19860impl flatbuffers::Verifiable for FormField<'_> {
19861  #[inline]
19862  fn run_verifier(
19863    v: &mut flatbuffers::Verifier, pos: usize
19864  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
19865    use self::flatbuffers::Verifiable;
19866    v.visit_table(pos)?
19867     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
19868     .visit_field::<FormFieldType>("field_type", Self::VT_FIELD_TYPE, false)?
19869     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("label", Self::VT_LABEL, true)?
19870     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("placeholder", Self::VT_PLACEHOLDER, false)?
19871     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("description", Self::VT_DESCRIPTION, false)?
19872     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("initial_value", Self::VT_INITIAL_VALUE, false)?
19873     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<ValidationRule>>>>("validations", Self::VT_VALIDATIONS, false)?
19874     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<AsyncValidation>>>>("async_validations", Self::VT_ASYNC_VALIDATIONS, false)?
19875     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<SelectOption>>>>("options", Self::VT_OPTIONS, false)?
19876     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("visible_when", Self::VT_VISIBLE_WHEN, false)?
19877     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("disabled_when", Self::VT_DISABLED_WHEN, false)?
19878     .visit_field::<AutocompleteHint>("autocomplete", Self::VT_AUTOCOMPLETE, false)?
19879     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("accept", Self::VT_ACCEPT, false)?
19880     .visit_field::<u32>("max_file_size", Self::VT_MAX_FILE_SIZE, false)?
19881     .visit_field::<bool>("multiple", Self::VT_MULTIPLE, false)?
19882     .visit_field::<f32>("step", Self::VT_STEP, false)?
19883     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("semantic_node_id", Self::VT_SEMANTIC_NODE_ID, false)?
19884     .finish();
19885    Ok(())
19886  }
19887}
19888pub struct FormFieldArgs<'a> {
19889    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
19890    pub field_type: FormFieldType,
19891    pub label: Option<flatbuffers::WIPOffset<&'a str>>,
19892    pub placeholder: Option<flatbuffers::WIPOffset<&'a str>>,
19893    pub description: Option<flatbuffers::WIPOffset<&'a str>>,
19894    pub initial_value: Option<flatbuffers::WIPOffset<&'a str>>,
19895    pub validations: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ValidationRule<'a>>>>>,
19896    pub async_validations: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<AsyncValidation<'a>>>>>,
19897    pub options: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<SelectOption<'a>>>>>,
19898    pub visible_when: Option<flatbuffers::WIPOffset<&'a str>>,
19899    pub disabled_when: Option<flatbuffers::WIPOffset<&'a str>>,
19900    pub autocomplete: AutocompleteHint,
19901    pub accept: Option<flatbuffers::WIPOffset<&'a str>>,
19902    pub max_file_size: u32,
19903    pub multiple: bool,
19904    pub step: f32,
19905    pub semantic_node_id: Option<flatbuffers::WIPOffset<&'a str>>,
19906}
19907impl<'a> Default for FormFieldArgs<'a> {
19908  #[inline]
19909  fn default() -> Self {
19910    FormFieldArgs {
19911      name: None, // required field
19912      field_type: FormFieldType::Text,
19913      label: None, // required field
19914      placeholder: None,
19915      description: None,
19916      initial_value: None,
19917      validations: None,
19918      async_validations: None,
19919      options: None,
19920      visible_when: None,
19921      disabled_when: None,
19922      autocomplete: AutocompleteHint::Off,
19923      accept: None,
19924      max_file_size: 0,
19925      multiple: false,
19926      step: 0.0,
19927      semantic_node_id: None,
19928    }
19929  }
19930}
19931
19932pub struct FormFieldBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
19933  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
19934  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
19935}
19936impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> FormFieldBuilder<'a, 'b, A> {
19937  #[inline]
19938  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
19939    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FormField::VT_NAME, name);
19940  }
19941  #[inline]
19942  pub fn add_field_type(&mut self, field_type: FormFieldType) {
19943    self.fbb_.push_slot::<FormFieldType>(FormField::VT_FIELD_TYPE, field_type, FormFieldType::Text);
19944  }
19945  #[inline]
19946  pub fn add_label(&mut self, label: flatbuffers::WIPOffset<&'b  str>) {
19947    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FormField::VT_LABEL, label);
19948  }
19949  #[inline]
19950  pub fn add_placeholder(&mut self, placeholder: flatbuffers::WIPOffset<&'b  str>) {
19951    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FormField::VT_PLACEHOLDER, placeholder);
19952  }
19953  #[inline]
19954  pub fn add_description(&mut self, description: flatbuffers::WIPOffset<&'b  str>) {
19955    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FormField::VT_DESCRIPTION, description);
19956  }
19957  #[inline]
19958  pub fn add_initial_value(&mut self, initial_value: flatbuffers::WIPOffset<&'b  str>) {
19959    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FormField::VT_INITIAL_VALUE, initial_value);
19960  }
19961  #[inline]
19962  pub fn add_validations(&mut self, validations: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<ValidationRule<'b >>>>) {
19963    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FormField::VT_VALIDATIONS, validations);
19964  }
19965  #[inline]
19966  pub fn add_async_validations(&mut self, async_validations: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<AsyncValidation<'b >>>>) {
19967    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FormField::VT_ASYNC_VALIDATIONS, async_validations);
19968  }
19969  #[inline]
19970  pub fn add_options(&mut self, options: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<SelectOption<'b >>>>) {
19971    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FormField::VT_OPTIONS, options);
19972  }
19973  #[inline]
19974  pub fn add_visible_when(&mut self, visible_when: flatbuffers::WIPOffset<&'b  str>) {
19975    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FormField::VT_VISIBLE_WHEN, visible_when);
19976  }
19977  #[inline]
19978  pub fn add_disabled_when(&mut self, disabled_when: flatbuffers::WIPOffset<&'b  str>) {
19979    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FormField::VT_DISABLED_WHEN, disabled_when);
19980  }
19981  #[inline]
19982  pub fn add_autocomplete(&mut self, autocomplete: AutocompleteHint) {
19983    self.fbb_.push_slot::<AutocompleteHint>(FormField::VT_AUTOCOMPLETE, autocomplete, AutocompleteHint::Off);
19984  }
19985  #[inline]
19986  pub fn add_accept(&mut self, accept: flatbuffers::WIPOffset<&'b  str>) {
19987    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FormField::VT_ACCEPT, accept);
19988  }
19989  #[inline]
19990  pub fn add_max_file_size(&mut self, max_file_size: u32) {
19991    self.fbb_.push_slot::<u32>(FormField::VT_MAX_FILE_SIZE, max_file_size, 0);
19992  }
19993  #[inline]
19994  pub fn add_multiple(&mut self, multiple: bool) {
19995    self.fbb_.push_slot::<bool>(FormField::VT_MULTIPLE, multiple, false);
19996  }
19997  #[inline]
19998  pub fn add_step(&mut self, step: f32) {
19999    self.fbb_.push_slot::<f32>(FormField::VT_STEP, step, 0.0);
20000  }
20001  #[inline]
20002  pub fn add_semantic_node_id(&mut self, semantic_node_id: flatbuffers::WIPOffset<&'b  str>) {
20003    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FormField::VT_SEMANTIC_NODE_ID, semantic_node_id);
20004  }
20005  #[inline]
20006  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> FormFieldBuilder<'a, 'b, A> {
20007    let start = _fbb.start_table();
20008    FormFieldBuilder {
20009      fbb_: _fbb,
20010      start_: start,
20011    }
20012  }
20013  #[inline]
20014  pub fn finish(self) -> flatbuffers::WIPOffset<FormField<'a>> {
20015    let o = self.fbb_.end_table(self.start_);
20016    self.fbb_.required(o, FormField::VT_NAME,"name");
20017    self.fbb_.required(o, FormField::VT_LABEL,"label");
20018    flatbuffers::WIPOffset::new(o.value())
20019  }
20020}
20021
20022impl core::fmt::Debug for FormField<'_> {
20023  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
20024    let mut ds = f.debug_struct("FormField");
20025      ds.field("name", &self.name());
20026      ds.field("field_type", &self.field_type());
20027      ds.field("label", &self.label());
20028      ds.field("placeholder", &self.placeholder());
20029      ds.field("description", &self.description());
20030      ds.field("initial_value", &self.initial_value());
20031      ds.field("validations", &self.validations());
20032      ds.field("async_validations", &self.async_validations());
20033      ds.field("options", &self.options());
20034      ds.field("visible_when", &self.visible_when());
20035      ds.field("disabled_when", &self.disabled_when());
20036      ds.field("autocomplete", &self.autocomplete());
20037      ds.field("accept", &self.accept());
20038      ds.field("max_file_size", &self.max_file_size());
20039      ds.field("multiple", &self.multiple());
20040      ds.field("step", &self.step());
20041      ds.field("semantic_node_id", &self.semantic_node_id());
20042      ds.finish()
20043  }
20044}
20045pub enum FormSubmissionOffset {}
20046#[derive(Copy, Clone, PartialEq)]
20047
20048pub struct FormSubmission<'a> {
20049  pub _tab: flatbuffers::Table<'a>,
20050}
20051
20052impl<'a> flatbuffers::Follow<'a> for FormSubmission<'a> {
20053  type Inner = FormSubmission<'a>;
20054  #[inline]
20055  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
20056    Self { _tab: flatbuffers::Table::new(buf, loc) }
20057  }
20058}
20059
20060impl<'a> FormSubmission<'a> {
20061  pub const VT_ACTION_NODE_ID: flatbuffers::VOffsetT = 4;
20062  pub const VT_ENCODING: flatbuffers::VOffsetT = 6;
20063  pub const VT_PROGRESSIVE: flatbuffers::VOffsetT = 8;
20064  pub const VT_SUCCESS_EVENT: flatbuffers::VOffsetT = 10;
20065  pub const VT_SUCCESS_STATE_MACHINE: flatbuffers::VOffsetT = 12;
20066  pub const VT_SUCCESS_REDIRECT: flatbuffers::VOffsetT = 14;
20067  pub const VT_ERROR_DISPLAY: flatbuffers::VOffsetT = 16;
20068
20069  #[inline]
20070  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
20071    FormSubmission { _tab: table }
20072  }
20073  #[allow(unused_mut)]
20074  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
20075    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
20076    args: &'args FormSubmissionArgs<'args>
20077  ) -> flatbuffers::WIPOffset<FormSubmission<'bldr>> {
20078    let mut builder = FormSubmissionBuilder::new(_fbb);
20079    if let Some(x) = args.error_display { builder.add_error_display(x); }
20080    if let Some(x) = args.success_redirect { builder.add_success_redirect(x); }
20081    if let Some(x) = args.success_state_machine { builder.add_success_state_machine(x); }
20082    if let Some(x) = args.success_event { builder.add_success_event(x); }
20083    if let Some(x) = args.action_node_id { builder.add_action_node_id(x); }
20084    builder.add_progressive(args.progressive);
20085    builder.add_encoding(args.encoding);
20086    builder.finish()
20087  }
20088
20089
20090  /// ActionNode that handles the submission.
20091  #[inline]
20092  pub fn action_node_id(&self) -> &'a str {
20093    // Safety:
20094    // Created from valid Table for this object
20095    // which contains a valid value in this slot
20096    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FormSubmission::VT_ACTION_NODE_ID, None).unwrap()}
20097  }
20098  #[inline]
20099  pub fn encoding(&self) -> FormEncoding {
20100    // Safety:
20101    // Created from valid Table for this object
20102    // which contains a valid value in this slot
20103    unsafe { self._tab.get::<FormEncoding>(FormSubmission::VT_ENCODING, Some(FormEncoding::Json)).unwrap()}
20104  }
20105  /// If true, the form works without JavaScript (native form action).
20106  #[inline]
20107  pub fn progressive(&self) -> bool {
20108    // Safety:
20109    // Created from valid Table for this object
20110    // which contains a valid value in this slot
20111    unsafe { self._tab.get::<bool>(FormSubmission::VT_PROGRESSIVE, Some(true)).unwrap()}
20112  }
20113  /// State machine event to fire on success.
20114  #[inline]
20115  pub fn success_event(&self) -> Option<&'a str> {
20116    // Safety:
20117    // Created from valid Table for this object
20118    // which contains a valid value in this slot
20119    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FormSubmission::VT_SUCCESS_EVENT, None)}
20120  }
20121  #[inline]
20122  pub fn success_state_machine(&self) -> Option<&'a str> {
20123    // Safety:
20124    // Created from valid Table for this object
20125    // which contains a valid value in this slot
20126    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FormSubmission::VT_SUCCESS_STATE_MACHINE, None)}
20127  }
20128  /// Route to navigate to on success.
20129  #[inline]
20130  pub fn success_redirect(&self) -> Option<&'a str> {
20131    // Safety:
20132    // Created from valid Table for this object
20133    // which contains a valid value in this slot
20134    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FormSubmission::VT_SUCCESS_REDIRECT, None)}
20135  }
20136  /// How to display server-side errors.
20137  /// "field" = map errors to individual fields, "summary" = show error list.
20138  #[inline]
20139  pub fn error_display(&self) -> Option<&'a str> {
20140    // Safety:
20141    // Created from valid Table for this object
20142    // which contains a valid value in this slot
20143    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FormSubmission::VT_ERROR_DISPLAY, None)}
20144  }
20145}
20146
20147impl flatbuffers::Verifiable for FormSubmission<'_> {
20148  #[inline]
20149  fn run_verifier(
20150    v: &mut flatbuffers::Verifier, pos: usize
20151  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
20152    use self::flatbuffers::Verifiable;
20153    v.visit_table(pos)?
20154     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("action_node_id", Self::VT_ACTION_NODE_ID, true)?
20155     .visit_field::<FormEncoding>("encoding", Self::VT_ENCODING, false)?
20156     .visit_field::<bool>("progressive", Self::VT_PROGRESSIVE, false)?
20157     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("success_event", Self::VT_SUCCESS_EVENT, false)?
20158     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("success_state_machine", Self::VT_SUCCESS_STATE_MACHINE, false)?
20159     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("success_redirect", Self::VT_SUCCESS_REDIRECT, false)?
20160     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("error_display", Self::VT_ERROR_DISPLAY, false)?
20161     .finish();
20162    Ok(())
20163  }
20164}
20165pub struct FormSubmissionArgs<'a> {
20166    pub action_node_id: Option<flatbuffers::WIPOffset<&'a str>>,
20167    pub encoding: FormEncoding,
20168    pub progressive: bool,
20169    pub success_event: Option<flatbuffers::WIPOffset<&'a str>>,
20170    pub success_state_machine: Option<flatbuffers::WIPOffset<&'a str>>,
20171    pub success_redirect: Option<flatbuffers::WIPOffset<&'a str>>,
20172    pub error_display: Option<flatbuffers::WIPOffset<&'a str>>,
20173}
20174impl<'a> Default for FormSubmissionArgs<'a> {
20175  #[inline]
20176  fn default() -> Self {
20177    FormSubmissionArgs {
20178      action_node_id: None, // required field
20179      encoding: FormEncoding::Json,
20180      progressive: true,
20181      success_event: None,
20182      success_state_machine: None,
20183      success_redirect: None,
20184      error_display: None,
20185    }
20186  }
20187}
20188
20189pub struct FormSubmissionBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
20190  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
20191  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
20192}
20193impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> FormSubmissionBuilder<'a, 'b, A> {
20194  #[inline]
20195  pub fn add_action_node_id(&mut self, action_node_id: flatbuffers::WIPOffset<&'b  str>) {
20196    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FormSubmission::VT_ACTION_NODE_ID, action_node_id);
20197  }
20198  #[inline]
20199  pub fn add_encoding(&mut self, encoding: FormEncoding) {
20200    self.fbb_.push_slot::<FormEncoding>(FormSubmission::VT_ENCODING, encoding, FormEncoding::Json);
20201  }
20202  #[inline]
20203  pub fn add_progressive(&mut self, progressive: bool) {
20204    self.fbb_.push_slot::<bool>(FormSubmission::VT_PROGRESSIVE, progressive, true);
20205  }
20206  #[inline]
20207  pub fn add_success_event(&mut self, success_event: flatbuffers::WIPOffset<&'b  str>) {
20208    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FormSubmission::VT_SUCCESS_EVENT, success_event);
20209  }
20210  #[inline]
20211  pub fn add_success_state_machine(&mut self, success_state_machine: flatbuffers::WIPOffset<&'b  str>) {
20212    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FormSubmission::VT_SUCCESS_STATE_MACHINE, success_state_machine);
20213  }
20214  #[inline]
20215  pub fn add_success_redirect(&mut self, success_redirect: flatbuffers::WIPOffset<&'b  str>) {
20216    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FormSubmission::VT_SUCCESS_REDIRECT, success_redirect);
20217  }
20218  #[inline]
20219  pub fn add_error_display(&mut self, error_display: flatbuffers::WIPOffset<&'b  str>) {
20220    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FormSubmission::VT_ERROR_DISPLAY, error_display);
20221  }
20222  #[inline]
20223  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> FormSubmissionBuilder<'a, 'b, A> {
20224    let start = _fbb.start_table();
20225    FormSubmissionBuilder {
20226      fbb_: _fbb,
20227      start_: start,
20228    }
20229  }
20230  #[inline]
20231  pub fn finish(self) -> flatbuffers::WIPOffset<FormSubmission<'a>> {
20232    let o = self.fbb_.end_table(self.start_);
20233    self.fbb_.required(o, FormSubmission::VT_ACTION_NODE_ID,"action_node_id");
20234    flatbuffers::WIPOffset::new(o.value())
20235  }
20236}
20237
20238impl core::fmt::Debug for FormSubmission<'_> {
20239  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
20240    let mut ds = f.debug_struct("FormSubmission");
20241      ds.field("action_node_id", &self.action_node_id());
20242      ds.field("encoding", &self.encoding());
20243      ds.field("progressive", &self.progressive());
20244      ds.field("success_event", &self.success_event());
20245      ds.field("success_state_machine", &self.success_state_machine());
20246      ds.field("success_redirect", &self.success_redirect());
20247      ds.field("error_display", &self.error_display());
20248      ds.finish()
20249  }
20250}
20251pub enum FormFieldGroupOffset {}
20252#[derive(Copy, Clone, PartialEq)]
20253
20254pub struct FormFieldGroup<'a> {
20255  pub _tab: flatbuffers::Table<'a>,
20256}
20257
20258impl<'a> flatbuffers::Follow<'a> for FormFieldGroup<'a> {
20259  type Inner = FormFieldGroup<'a>;
20260  #[inline]
20261  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
20262    Self { _tab: flatbuffers::Table::new(buf, loc) }
20263  }
20264}
20265
20266impl<'a> FormFieldGroup<'a> {
20267  pub const VT_LABEL: flatbuffers::VOffsetT = 4;
20268  pub const VT_FIELD_NAMES: flatbuffers::VOffsetT = 6;
20269  pub const VT_DESCRIPTION: flatbuffers::VOffsetT = 8;
20270
20271  #[inline]
20272  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
20273    FormFieldGroup { _tab: table }
20274  }
20275  #[allow(unused_mut)]
20276  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
20277    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
20278    args: &'args FormFieldGroupArgs<'args>
20279  ) -> flatbuffers::WIPOffset<FormFieldGroup<'bldr>> {
20280    let mut builder = FormFieldGroupBuilder::new(_fbb);
20281    if let Some(x) = args.description { builder.add_description(x); }
20282    if let Some(x) = args.field_names { builder.add_field_names(x); }
20283    if let Some(x) = args.label { builder.add_label(x); }
20284    builder.finish()
20285  }
20286
20287
20288  /// Group label (rendered as <fieldset><legend>).
20289  #[inline]
20290  pub fn label(&self) -> &'a str {
20291    // Safety:
20292    // Created from valid Table for this object
20293    // which contains a valid value in this slot
20294    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FormFieldGroup::VT_LABEL, None).unwrap()}
20295  }
20296  /// Field names in this group.
20297  #[inline]
20298  pub fn field_names(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>> {
20299    // Safety:
20300    // Created from valid Table for this object
20301    // which contains a valid value in this slot
20302    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>(FormFieldGroup::VT_FIELD_NAMES, None).unwrap()}
20303  }
20304  #[inline]
20305  pub fn description(&self) -> Option<&'a str> {
20306    // Safety:
20307    // Created from valid Table for this object
20308    // which contains a valid value in this slot
20309    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FormFieldGroup::VT_DESCRIPTION, None)}
20310  }
20311}
20312
20313impl flatbuffers::Verifiable for FormFieldGroup<'_> {
20314  #[inline]
20315  fn run_verifier(
20316    v: &mut flatbuffers::Verifier, pos: usize
20317  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
20318    use self::flatbuffers::Verifiable;
20319    v.visit_table(pos)?
20320     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("label", Self::VT_LABEL, true)?
20321     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>>>("field_names", Self::VT_FIELD_NAMES, true)?
20322     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("description", Self::VT_DESCRIPTION, false)?
20323     .finish();
20324    Ok(())
20325  }
20326}
20327pub struct FormFieldGroupArgs<'a> {
20328    pub label: Option<flatbuffers::WIPOffset<&'a str>>,
20329    pub field_names: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>,
20330    pub description: Option<flatbuffers::WIPOffset<&'a str>>,
20331}
20332impl<'a> Default for FormFieldGroupArgs<'a> {
20333  #[inline]
20334  fn default() -> Self {
20335    FormFieldGroupArgs {
20336      label: None, // required field
20337      field_names: None, // required field
20338      description: None,
20339    }
20340  }
20341}
20342
20343pub struct FormFieldGroupBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
20344  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
20345  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
20346}
20347impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> FormFieldGroupBuilder<'a, 'b, A> {
20348  #[inline]
20349  pub fn add_label(&mut self, label: flatbuffers::WIPOffset<&'b  str>) {
20350    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FormFieldGroup::VT_LABEL, label);
20351  }
20352  #[inline]
20353  pub fn add_field_names(&mut self, field_names: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<&'b  str>>>) {
20354    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FormFieldGroup::VT_FIELD_NAMES, field_names);
20355  }
20356  #[inline]
20357  pub fn add_description(&mut self, description: flatbuffers::WIPOffset<&'b  str>) {
20358    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FormFieldGroup::VT_DESCRIPTION, description);
20359  }
20360  #[inline]
20361  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> FormFieldGroupBuilder<'a, 'b, A> {
20362    let start = _fbb.start_table();
20363    FormFieldGroupBuilder {
20364      fbb_: _fbb,
20365      start_: start,
20366    }
20367  }
20368  #[inline]
20369  pub fn finish(self) -> flatbuffers::WIPOffset<FormFieldGroup<'a>> {
20370    let o = self.fbb_.end_table(self.start_);
20371    self.fbb_.required(o, FormFieldGroup::VT_LABEL,"label");
20372    self.fbb_.required(o, FormFieldGroup::VT_FIELD_NAMES,"field_names");
20373    flatbuffers::WIPOffset::new(o.value())
20374  }
20375}
20376
20377impl core::fmt::Debug for FormFieldGroup<'_> {
20378  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
20379    let mut ds = f.debug_struct("FormFieldGroup");
20380      ds.field("label", &self.label());
20381      ds.field("field_names", &self.field_names());
20382      ds.field("description", &self.description());
20383      ds.finish()
20384  }
20385}
20386pub enum AutosaveConfigOffset {}
20387#[derive(Copy, Clone, PartialEq)]
20388
20389pub struct AutosaveConfig<'a> {
20390  pub _tab: flatbuffers::Table<'a>,
20391}
20392
20393impl<'a> flatbuffers::Follow<'a> for AutosaveConfig<'a> {
20394  type Inner = AutosaveConfig<'a>;
20395  #[inline]
20396  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
20397    Self { _tab: flatbuffers::Table::new(buf, loc) }
20398  }
20399}
20400
20401impl<'a> AutosaveConfig<'a> {
20402  pub const VT_INTERVAL_MS: flatbuffers::VOffsetT = 4;
20403  pub const VT_STORAGE_KEY: flatbuffers::VOffsetT = 6;
20404
20405  #[inline]
20406  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
20407    AutosaveConfig { _tab: table }
20408  }
20409  #[allow(unused_mut)]
20410  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
20411    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
20412    args: &'args AutosaveConfigArgs<'args>
20413  ) -> flatbuffers::WIPOffset<AutosaveConfig<'bldr>> {
20414    let mut builder = AutosaveConfigBuilder::new(_fbb);
20415    if let Some(x) = args.storage_key { builder.add_storage_key(x); }
20416    builder.add_interval_ms(args.interval_ms);
20417    builder.finish()
20418  }
20419
20420
20421  /// Save interval in ms (0 = save on every change).
20422  #[inline]
20423  pub fn interval_ms(&self) -> u32 {
20424    // Safety:
20425    // Created from valid Table for this object
20426    // which contains a valid value in this slot
20427    unsafe { self._tab.get::<u32>(AutosaveConfig::VT_INTERVAL_MS, Some(5000)).unwrap()}
20428  }
20429  /// Storage key for draft persistence.
20430  #[inline]
20431  pub fn storage_key(&self) -> Option<&'a str> {
20432    // Safety:
20433    // Created from valid Table for this object
20434    // which contains a valid value in this slot
20435    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(AutosaveConfig::VT_STORAGE_KEY, None)}
20436  }
20437}
20438
20439impl flatbuffers::Verifiable for AutosaveConfig<'_> {
20440  #[inline]
20441  fn run_verifier(
20442    v: &mut flatbuffers::Verifier, pos: usize
20443  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
20444    use self::flatbuffers::Verifiable;
20445    v.visit_table(pos)?
20446     .visit_field::<u32>("interval_ms", Self::VT_INTERVAL_MS, false)?
20447     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("storage_key", Self::VT_STORAGE_KEY, false)?
20448     .finish();
20449    Ok(())
20450  }
20451}
20452pub struct AutosaveConfigArgs<'a> {
20453    pub interval_ms: u32,
20454    pub storage_key: Option<flatbuffers::WIPOffset<&'a str>>,
20455}
20456impl<'a> Default for AutosaveConfigArgs<'a> {
20457  #[inline]
20458  fn default() -> Self {
20459    AutosaveConfigArgs {
20460      interval_ms: 5000,
20461      storage_key: None,
20462    }
20463  }
20464}
20465
20466pub struct AutosaveConfigBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
20467  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
20468  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
20469}
20470impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> AutosaveConfigBuilder<'a, 'b, A> {
20471  #[inline]
20472  pub fn add_interval_ms(&mut self, interval_ms: u32) {
20473    self.fbb_.push_slot::<u32>(AutosaveConfig::VT_INTERVAL_MS, interval_ms, 5000);
20474  }
20475  #[inline]
20476  pub fn add_storage_key(&mut self, storage_key: flatbuffers::WIPOffset<&'b  str>) {
20477    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(AutosaveConfig::VT_STORAGE_KEY, storage_key);
20478  }
20479  #[inline]
20480  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> AutosaveConfigBuilder<'a, 'b, A> {
20481    let start = _fbb.start_table();
20482    AutosaveConfigBuilder {
20483      fbb_: _fbb,
20484      start_: start,
20485    }
20486  }
20487  #[inline]
20488  pub fn finish(self) -> flatbuffers::WIPOffset<AutosaveConfig<'a>> {
20489    let o = self.fbb_.end_table(self.start_);
20490    flatbuffers::WIPOffset::new(o.value())
20491  }
20492}
20493
20494impl core::fmt::Debug for AutosaveConfig<'_> {
20495  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
20496    let mut ds = f.debug_struct("AutosaveConfig");
20497      ds.field("interval_ms", &self.interval_ms());
20498      ds.field("storage_key", &self.storage_key());
20499      ds.finish()
20500  }
20501}
20502pub enum FormNodeOffset {}
20503#[derive(Copy, Clone, PartialEq)]
20504
20505pub struct FormNode<'a> {
20506  pub _tab: flatbuffers::Table<'a>,
20507}
20508
20509impl<'a> flatbuffers::Follow<'a> for FormNode<'a> {
20510  type Inner = FormNode<'a>;
20511  #[inline]
20512  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
20513    Self { _tab: flatbuffers::Table::new(buf, loc) }
20514  }
20515}
20516
20517impl<'a> FormNode<'a> {
20518  pub const VT_NODE_ID: flatbuffers::VOffsetT = 4;
20519  pub const VT_NAME: flatbuffers::VOffsetT = 6;
20520  pub const VT_FIELDS: flatbuffers::VOffsetT = 8;
20521  pub const VT_FIELD_GROUPS: flatbuffers::VOffsetT = 10;
20522  pub const VT_CROSS_VALIDATIONS: flatbuffers::VOffsetT = 12;
20523  pub const VT_VALIDATION_MODE: flatbuffers::VOffsetT = 14;
20524  pub const VT_SUBMISSION: flatbuffers::VOffsetT = 16;
20525  pub const VT_INITIAL_VALUES_NODE_ID: flatbuffers::VOffsetT = 18;
20526  pub const VT_AUTOSAVE: flatbuffers::VOffsetT = 20;
20527  pub const VT_SEMANTIC_NODE_ID: flatbuffers::VOffsetT = 22;
20528
20529  #[inline]
20530  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
20531    FormNode { _tab: table }
20532  }
20533  #[allow(unused_mut)]
20534  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
20535    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
20536    args: &'args FormNodeArgs<'args>
20537  ) -> flatbuffers::WIPOffset<FormNode<'bldr>> {
20538    let mut builder = FormNodeBuilder::new(_fbb);
20539    if let Some(x) = args.semantic_node_id { builder.add_semantic_node_id(x); }
20540    if let Some(x) = args.autosave { builder.add_autosave(x); }
20541    if let Some(x) = args.initial_values_node_id { builder.add_initial_values_node_id(x); }
20542    if let Some(x) = args.submission { builder.add_submission(x); }
20543    if let Some(x) = args.cross_validations { builder.add_cross_validations(x); }
20544    if let Some(x) = args.field_groups { builder.add_field_groups(x); }
20545    if let Some(x) = args.fields { builder.add_fields(x); }
20546    if let Some(x) = args.name { builder.add_name(x); }
20547    if let Some(x) = args.node_id { builder.add_node_id(x); }
20548    builder.add_validation_mode(args.validation_mode);
20549    builder.finish()
20550  }
20551
20552
20553  #[inline]
20554  pub fn node_id(&self) -> &'a str {
20555    // Safety:
20556    // Created from valid Table for this object
20557    // which contains a valid value in this slot
20558    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FormNode::VT_NODE_ID, None).unwrap()}
20559  }
20560  #[inline]
20561  pub fn name(&self) -> Option<&'a str> {
20562    // Safety:
20563    // Created from valid Table for this object
20564    // which contains a valid value in this slot
20565    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FormNode::VT_NAME, None)}
20566  }
20567  #[inline]
20568  pub fn fields(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<FormField<'a>>> {
20569    // Safety:
20570    // Created from valid Table for this object
20571    // which contains a valid value in this slot
20572    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<FormField>>>>(FormNode::VT_FIELDS, None).unwrap()}
20573  }
20574  #[inline]
20575  pub fn field_groups(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<FormFieldGroup<'a>>>> {
20576    // Safety:
20577    // Created from valid Table for this object
20578    // which contains a valid value in this slot
20579    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<FormFieldGroup>>>>(FormNode::VT_FIELD_GROUPS, None)}
20580  }
20581  #[inline]
20582  pub fn cross_validations(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<CrossFieldValidation<'a>>>> {
20583    // Safety:
20584    // Created from valid Table for this object
20585    // which contains a valid value in this slot
20586    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<CrossFieldValidation>>>>(FormNode::VT_CROSS_VALIDATIONS, None)}
20587  }
20588  #[inline]
20589  pub fn validation_mode(&self) -> ValidationMode {
20590    // Safety:
20591    // Created from valid Table for this object
20592    // which contains a valid value in this slot
20593    unsafe { self._tab.get::<ValidationMode>(FormNode::VT_VALIDATION_MODE, Some(ValidationMode::OnBlurThenChange)).unwrap()}
20594  }
20595  #[inline]
20596  pub fn submission(&self) -> FormSubmission<'a> {
20597    // Safety:
20598    // Created from valid Table for this object
20599    // which contains a valid value in this slot
20600    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<FormSubmission>>(FormNode::VT_SUBMISSION, None).unwrap()}
20601  }
20602  /// Initial values loaded from a DataNode (for edit forms).
20603  #[inline]
20604  pub fn initial_values_node_id(&self) -> Option<&'a str> {
20605    // Safety:
20606    // Created from valid Table for this object
20607    // which contains a valid value in this slot
20608    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FormNode::VT_INITIAL_VALUES_NODE_ID, None)}
20609  }
20610  /// Draft persistence configuration.
20611  #[inline]
20612  pub fn autosave(&self) -> Option<AutosaveConfig<'a>> {
20613    // Safety:
20614    // Created from valid Table for this object
20615    // which contains a valid value in this slot
20616    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<AutosaveConfig>>(FormNode::VT_AUTOSAVE, None)}
20617  }
20618  /// Accessibility.
20619  #[inline]
20620  pub fn semantic_node_id(&self) -> Option<&'a str> {
20621    // Safety:
20622    // Created from valid Table for this object
20623    // which contains a valid value in this slot
20624    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(FormNode::VT_SEMANTIC_NODE_ID, None)}
20625  }
20626}
20627
20628impl flatbuffers::Verifiable for FormNode<'_> {
20629  #[inline]
20630  fn run_verifier(
20631    v: &mut flatbuffers::Verifier, pos: usize
20632  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
20633    use self::flatbuffers::Verifiable;
20634    v.visit_table(pos)?
20635     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("node_id", Self::VT_NODE_ID, true)?
20636     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
20637     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<FormField>>>>("fields", Self::VT_FIELDS, true)?
20638     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<FormFieldGroup>>>>("field_groups", Self::VT_FIELD_GROUPS, false)?
20639     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<CrossFieldValidation>>>>("cross_validations", Self::VT_CROSS_VALIDATIONS, false)?
20640     .visit_field::<ValidationMode>("validation_mode", Self::VT_VALIDATION_MODE, false)?
20641     .visit_field::<flatbuffers::ForwardsUOffset<FormSubmission>>("submission", Self::VT_SUBMISSION, true)?
20642     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("initial_values_node_id", Self::VT_INITIAL_VALUES_NODE_ID, false)?
20643     .visit_field::<flatbuffers::ForwardsUOffset<AutosaveConfig>>("autosave", Self::VT_AUTOSAVE, false)?
20644     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("semantic_node_id", Self::VT_SEMANTIC_NODE_ID, false)?
20645     .finish();
20646    Ok(())
20647  }
20648}
20649pub struct FormNodeArgs<'a> {
20650    pub node_id: Option<flatbuffers::WIPOffset<&'a str>>,
20651    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
20652    pub fields: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<FormField<'a>>>>>,
20653    pub field_groups: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<FormFieldGroup<'a>>>>>,
20654    pub cross_validations: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<CrossFieldValidation<'a>>>>>,
20655    pub validation_mode: ValidationMode,
20656    pub submission: Option<flatbuffers::WIPOffset<FormSubmission<'a>>>,
20657    pub initial_values_node_id: Option<flatbuffers::WIPOffset<&'a str>>,
20658    pub autosave: Option<flatbuffers::WIPOffset<AutosaveConfig<'a>>>,
20659    pub semantic_node_id: Option<flatbuffers::WIPOffset<&'a str>>,
20660}
20661impl<'a> Default for FormNodeArgs<'a> {
20662  #[inline]
20663  fn default() -> Self {
20664    FormNodeArgs {
20665      node_id: None, // required field
20666      name: None,
20667      fields: None, // required field
20668      field_groups: None,
20669      cross_validations: None,
20670      validation_mode: ValidationMode::OnBlurThenChange,
20671      submission: None, // required field
20672      initial_values_node_id: None,
20673      autosave: None,
20674      semantic_node_id: None,
20675    }
20676  }
20677}
20678
20679pub struct FormNodeBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
20680  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
20681  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
20682}
20683impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> FormNodeBuilder<'a, 'b, A> {
20684  #[inline]
20685  pub fn add_node_id(&mut self, node_id: flatbuffers::WIPOffset<&'b  str>) {
20686    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FormNode::VT_NODE_ID, node_id);
20687  }
20688  #[inline]
20689  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
20690    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FormNode::VT_NAME, name);
20691  }
20692  #[inline]
20693  pub fn add_fields(&mut self, fields: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<FormField<'b >>>>) {
20694    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FormNode::VT_FIELDS, fields);
20695  }
20696  #[inline]
20697  pub fn add_field_groups(&mut self, field_groups: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<FormFieldGroup<'b >>>>) {
20698    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FormNode::VT_FIELD_GROUPS, field_groups);
20699  }
20700  #[inline]
20701  pub fn add_cross_validations(&mut self, cross_validations: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<CrossFieldValidation<'b >>>>) {
20702    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FormNode::VT_CROSS_VALIDATIONS, cross_validations);
20703  }
20704  #[inline]
20705  pub fn add_validation_mode(&mut self, validation_mode: ValidationMode) {
20706    self.fbb_.push_slot::<ValidationMode>(FormNode::VT_VALIDATION_MODE, validation_mode, ValidationMode::OnBlurThenChange);
20707  }
20708  #[inline]
20709  pub fn add_submission(&mut self, submission: flatbuffers::WIPOffset<FormSubmission<'b >>) {
20710    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<FormSubmission>>(FormNode::VT_SUBMISSION, submission);
20711  }
20712  #[inline]
20713  pub fn add_initial_values_node_id(&mut self, initial_values_node_id: flatbuffers::WIPOffset<&'b  str>) {
20714    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FormNode::VT_INITIAL_VALUES_NODE_ID, initial_values_node_id);
20715  }
20716  #[inline]
20717  pub fn add_autosave(&mut self, autosave: flatbuffers::WIPOffset<AutosaveConfig<'b >>) {
20718    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<AutosaveConfig>>(FormNode::VT_AUTOSAVE, autosave);
20719  }
20720  #[inline]
20721  pub fn add_semantic_node_id(&mut self, semantic_node_id: flatbuffers::WIPOffset<&'b  str>) {
20722    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(FormNode::VT_SEMANTIC_NODE_ID, semantic_node_id);
20723  }
20724  #[inline]
20725  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> FormNodeBuilder<'a, 'b, A> {
20726    let start = _fbb.start_table();
20727    FormNodeBuilder {
20728      fbb_: _fbb,
20729      start_: start,
20730    }
20731  }
20732  #[inline]
20733  pub fn finish(self) -> flatbuffers::WIPOffset<FormNode<'a>> {
20734    let o = self.fbb_.end_table(self.start_);
20735    self.fbb_.required(o, FormNode::VT_NODE_ID,"node_id");
20736    self.fbb_.required(o, FormNode::VT_FIELDS,"fields");
20737    self.fbb_.required(o, FormNode::VT_SUBMISSION,"submission");
20738    flatbuffers::WIPOffset::new(o.value())
20739  }
20740}
20741
20742impl core::fmt::Debug for FormNode<'_> {
20743  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
20744    let mut ds = f.debug_struct("FormNode");
20745      ds.field("node_id", &self.node_id());
20746      ds.field("name", &self.name());
20747      ds.field("fields", &self.fields());
20748      ds.field("field_groups", &self.field_groups());
20749      ds.field("cross_validations", &self.cross_validations());
20750      ds.field("validation_mode", &self.validation_mode());
20751      ds.field("submission", &self.submission());
20752      ds.field("initial_values_node_id", &self.initial_values_node_id());
20753      ds.field("autosave", &self.autosave());
20754      ds.field("semantic_node_id", &self.semantic_node_id());
20755      ds.finish()
20756  }
20757}
20758pub enum ViewRootOffset {}
20759#[derive(Copy, Clone, PartialEq)]
20760
20761pub struct ViewRoot<'a> {
20762  pub _tab: flatbuffers::Table<'a>,
20763}
20764
20765impl<'a> flatbuffers::Follow<'a> for ViewRoot<'a> {
20766  type Inner = ViewRoot<'a>;
20767  #[inline]
20768  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
20769    Self { _tab: flatbuffers::Table::new(buf, loc) }
20770  }
20771}
20772
20773impl<'a> ViewRoot<'a> {
20774  pub const VT_NODE_ID: flatbuffers::VOffsetT = 4;
20775  pub const VT_CHILDREN: flatbuffers::VOffsetT = 6;
20776  pub const VT_WIDTH: flatbuffers::VOffsetT = 8;
20777  pub const VT_HEIGHT: flatbuffers::VOffsetT = 10;
20778  pub const VT_BACKGROUND: flatbuffers::VOffsetT = 12;
20779  pub const VT_DOCUMENT_LANGUAGE: flatbuffers::VOffsetT = 14;
20780  pub const VT_TEXT_DIRECTION: flatbuffers::VOffsetT = 16;
20781  pub const VT_SEMANTIC_NODES: flatbuffers::VOffsetT = 18;
20782  pub const VT_METADATA: flatbuffers::VOffsetT = 20;
20783
20784  #[inline]
20785  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
20786    ViewRoot { _tab: table }
20787  }
20788  #[allow(unused_mut)]
20789  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
20790    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
20791    args: &'args ViewRootArgs<'args>
20792  ) -> flatbuffers::WIPOffset<ViewRoot<'bldr>> {
20793    let mut builder = ViewRootBuilder::new(_fbb);
20794    if let Some(x) = args.metadata { builder.add_metadata(x); }
20795    if let Some(x) = args.semantic_nodes { builder.add_semantic_nodes(x); }
20796    if let Some(x) = args.document_language { builder.add_document_language(x); }
20797    if let Some(x) = args.background { builder.add_background(x); }
20798    if let Some(x) = args.height { builder.add_height(x); }
20799    if let Some(x) = args.width { builder.add_width(x); }
20800    if let Some(x) = args.children { builder.add_children(x); }
20801    if let Some(x) = args.node_id { builder.add_node_id(x); }
20802    builder.add_text_direction(args.text_direction);
20803    builder.finish()
20804  }
20805
20806
20807  #[inline]
20808  pub fn node_id(&self) -> &'a str {
20809    // Safety:
20810    // Created from valid Table for this object
20811    // which contains a valid value in this slot
20812    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ViewRoot::VT_NODE_ID, None).unwrap()}
20813  }
20814  #[inline]
20815  pub fn children(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ChildNode<'a>>>> {
20816    // Safety:
20817    // Created from valid Table for this object
20818    // which contains a valid value in this slot
20819    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ChildNode>>>>(ViewRoot::VT_CHILDREN, None)}
20820  }
20821  #[inline]
20822  pub fn width(&self) -> Option<Length<'a>> {
20823    // Safety:
20824    // Created from valid Table for this object
20825    // which contains a valid value in this slot
20826    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(ViewRoot::VT_WIDTH, None)}
20827  }
20828  #[inline]
20829  pub fn height(&self) -> Option<Length<'a>> {
20830    // Safety:
20831    // Created from valid Table for this object
20832    // which contains a valid value in this slot
20833    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(ViewRoot::VT_HEIGHT, None)}
20834  }
20835  #[inline]
20836  pub fn background(&self) -> Option<&'a Color> {
20837    // Safety:
20838    // Created from valid Table for this object
20839    // which contains a valid value in this slot
20840    unsafe { self._tab.get::<Color>(ViewRoot::VT_BACKGROUND, None)}
20841  }
20842  #[inline]
20843  pub fn document_language(&self) -> Option<&'a str> {
20844    // Safety:
20845    // Created from valid Table for this object
20846    // which contains a valid value in this slot
20847    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ViewRoot::VT_DOCUMENT_LANGUAGE, None)}
20848  }
20849  #[inline]
20850  pub fn text_direction(&self) -> TextDirection {
20851    // Safety:
20852    // Created from valid Table for this object
20853    // which contains a valid value in this slot
20854    unsafe { self._tab.get::<TextDirection>(ViewRoot::VT_TEXT_DIRECTION, Some(TextDirection::Ltr)).unwrap()}
20855  }
20856  #[inline]
20857  pub fn semantic_nodes(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<SemanticNode<'a>>>> {
20858    // Safety:
20859    // Created from valid Table for this object
20860    // which contains a valid value in this slot
20861    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<SemanticNode>>>>(ViewRoot::VT_SEMANTIC_NODES, None)}
20862  }
20863  #[inline]
20864  pub fn metadata(&self) -> Option<PageMetadata<'a>> {
20865    // Safety:
20866    // Created from valid Table for this object
20867    // which contains a valid value in this slot
20868    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<PageMetadata>>(ViewRoot::VT_METADATA, None)}
20869  }
20870}
20871
20872impl flatbuffers::Verifiable for ViewRoot<'_> {
20873  #[inline]
20874  fn run_verifier(
20875    v: &mut flatbuffers::Verifier, pos: usize
20876  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
20877    use self::flatbuffers::Verifiable;
20878    v.visit_table(pos)?
20879     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("node_id", Self::VT_NODE_ID, true)?
20880     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<ChildNode>>>>("children", Self::VT_CHILDREN, false)?
20881     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("width", Self::VT_WIDTH, false)?
20882     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("height", Self::VT_HEIGHT, false)?
20883     .visit_field::<Color>("background", Self::VT_BACKGROUND, false)?
20884     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("document_language", Self::VT_DOCUMENT_LANGUAGE, false)?
20885     .visit_field::<TextDirection>("text_direction", Self::VT_TEXT_DIRECTION, false)?
20886     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<SemanticNode>>>>("semantic_nodes", Self::VT_SEMANTIC_NODES, false)?
20887     .visit_field::<flatbuffers::ForwardsUOffset<PageMetadata>>("metadata", Self::VT_METADATA, false)?
20888     .finish();
20889    Ok(())
20890  }
20891}
20892pub struct ViewRootArgs<'a> {
20893    pub node_id: Option<flatbuffers::WIPOffset<&'a str>>,
20894    pub children: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ChildNode<'a>>>>>,
20895    pub width: Option<flatbuffers::WIPOffset<Length<'a>>>,
20896    pub height: Option<flatbuffers::WIPOffset<Length<'a>>>,
20897    pub background: Option<&'a Color>,
20898    pub document_language: Option<flatbuffers::WIPOffset<&'a str>>,
20899    pub text_direction: TextDirection,
20900    pub semantic_nodes: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<SemanticNode<'a>>>>>,
20901    pub metadata: Option<flatbuffers::WIPOffset<PageMetadata<'a>>>,
20902}
20903impl<'a> Default for ViewRootArgs<'a> {
20904  #[inline]
20905  fn default() -> Self {
20906    ViewRootArgs {
20907      node_id: None, // required field
20908      children: None,
20909      width: None,
20910      height: None,
20911      background: None,
20912      document_language: None,
20913      text_direction: TextDirection::Ltr,
20914      semantic_nodes: None,
20915      metadata: None,
20916    }
20917  }
20918}
20919
20920pub struct ViewRootBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
20921  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
20922  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
20923}
20924impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ViewRootBuilder<'a, 'b, A> {
20925  #[inline]
20926  pub fn add_node_id(&mut self, node_id: flatbuffers::WIPOffset<&'b  str>) {
20927    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ViewRoot::VT_NODE_ID, node_id);
20928  }
20929  #[inline]
20930  pub fn add_children(&mut self, children: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<ChildNode<'b >>>>) {
20931    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ViewRoot::VT_CHILDREN, children);
20932  }
20933  #[inline]
20934  pub fn add_width(&mut self, width: flatbuffers::WIPOffset<Length<'b >>) {
20935    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(ViewRoot::VT_WIDTH, width);
20936  }
20937  #[inline]
20938  pub fn add_height(&mut self, height: flatbuffers::WIPOffset<Length<'b >>) {
20939    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(ViewRoot::VT_HEIGHT, height);
20940  }
20941  #[inline]
20942  pub fn add_background(&mut self, background: &Color) {
20943    self.fbb_.push_slot_always::<&Color>(ViewRoot::VT_BACKGROUND, background);
20944  }
20945  #[inline]
20946  pub fn add_document_language(&mut self, document_language: flatbuffers::WIPOffset<&'b  str>) {
20947    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ViewRoot::VT_DOCUMENT_LANGUAGE, document_language);
20948  }
20949  #[inline]
20950  pub fn add_text_direction(&mut self, text_direction: TextDirection) {
20951    self.fbb_.push_slot::<TextDirection>(ViewRoot::VT_TEXT_DIRECTION, text_direction, TextDirection::Ltr);
20952  }
20953  #[inline]
20954  pub fn add_semantic_nodes(&mut self, semantic_nodes: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<SemanticNode<'b >>>>) {
20955    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ViewRoot::VT_SEMANTIC_NODES, semantic_nodes);
20956  }
20957  #[inline]
20958  pub fn add_metadata(&mut self, metadata: flatbuffers::WIPOffset<PageMetadata<'b >>) {
20959    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<PageMetadata>>(ViewRoot::VT_METADATA, metadata);
20960  }
20961  #[inline]
20962  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ViewRootBuilder<'a, 'b, A> {
20963    let start = _fbb.start_table();
20964    ViewRootBuilder {
20965      fbb_: _fbb,
20966      start_: start,
20967    }
20968  }
20969  #[inline]
20970  pub fn finish(self) -> flatbuffers::WIPOffset<ViewRoot<'a>> {
20971    let o = self.fbb_.end_table(self.start_);
20972    self.fbb_.required(o, ViewRoot::VT_NODE_ID,"node_id");
20973    flatbuffers::WIPOffset::new(o.value())
20974  }
20975}
20976
20977impl core::fmt::Debug for ViewRoot<'_> {
20978  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
20979    let mut ds = f.debug_struct("ViewRoot");
20980      ds.field("node_id", &self.node_id());
20981      ds.field("children", &self.children());
20982      ds.field("width", &self.width());
20983      ds.field("height", &self.height());
20984      ds.field("background", &self.background());
20985      ds.field("document_language", &self.document_language());
20986      ds.field("text_direction", &self.text_direction());
20987      ds.field("semantic_nodes", &self.semantic_nodes());
20988      ds.field("metadata", &self.metadata());
20989      ds.finish()
20990  }
20991}
20992pub enum ContainerOffset {}
20993#[derive(Copy, Clone, PartialEq)]
20994
20995pub struct Container<'a> {
20996  pub _tab: flatbuffers::Table<'a>,
20997}
20998
20999impl<'a> flatbuffers::Follow<'a> for Container<'a> {
21000  type Inner = Container<'a>;
21001  #[inline]
21002  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
21003    Self { _tab: flatbuffers::Table::new(buf, loc) }
21004  }
21005}
21006
21007impl<'a> Container<'a> {
21008  pub const VT_NODE_ID: flatbuffers::VOffsetT = 4;
21009  pub const VT_CHILDREN: flatbuffers::VOffsetT = 6;
21010  pub const VT_LAYOUT: flatbuffers::VOffsetT = 8;
21011  pub const VT_DIRECTION: flatbuffers::VOffsetT = 10;
21012  pub const VT_MAIN_ALIGN: flatbuffers::VOffsetT = 12;
21013  pub const VT_CROSS_ALIGN: flatbuffers::VOffsetT = 14;
21014  pub const VT_GAP: flatbuffers::VOffsetT = 16;
21015  pub const VT_PADDING: flatbuffers::VOffsetT = 18;
21016  pub const VT_WRAP: flatbuffers::VOffsetT = 20;
21017  pub const VT_GRID_COLUMNS: flatbuffers::VOffsetT = 22;
21018  pub const VT_GRID_ROWS: flatbuffers::VOffsetT = 24;
21019  pub const VT_WIDTH: flatbuffers::VOffsetT = 26;
21020  pub const VT_HEIGHT: flatbuffers::VOffsetT = 28;
21021  pub const VT_MIN_WIDTH: flatbuffers::VOffsetT = 30;
21022  pub const VT_MAX_WIDTH: flatbuffers::VOffsetT = 32;
21023  pub const VT_MIN_HEIGHT: flatbuffers::VOffsetT = 34;
21024  pub const VT_MAX_HEIGHT: flatbuffers::VOffsetT = 36;
21025  pub const VT_OVERFLOW_X: flatbuffers::VOffsetT = 38;
21026  pub const VT_OVERFLOW_Y: flatbuffers::VOffsetT = 40;
21027  pub const VT_CLIP: flatbuffers::VOffsetT = 42;
21028  pub const VT_POSITION: flatbuffers::VOffsetT = 44;
21029  pub const VT_TOP: flatbuffers::VOffsetT = 46;
21030  pub const VT_RIGHT: flatbuffers::VOffsetT = 48;
21031  pub const VT_BOTTOM: flatbuffers::VOffsetT = 50;
21032  pub const VT_LEFT: flatbuffers::VOffsetT = 52;
21033  pub const VT_Z_INDEX: flatbuffers::VOffsetT = 54;
21034  pub const VT_OPACITY: flatbuffers::VOffsetT = 56;
21035  pub const VT_BACKGROUND: flatbuffers::VOffsetT = 58;
21036  pub const VT_BORDER: flatbuffers::VOffsetT = 60;
21037  pub const VT_CORNER_RADIUS: flatbuffers::VOffsetT = 62;
21038  pub const VT_SHADOW: flatbuffers::VOffsetT = 64;
21039  pub const VT_SEMANTIC_NODE_ID: flatbuffers::VOffsetT = 66;
21040
21041  #[inline]
21042  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
21043    Container { _tab: table }
21044  }
21045  #[allow(unused_mut)]
21046  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
21047    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
21048    args: &'args ContainerArgs<'args>
21049  ) -> flatbuffers::WIPOffset<Container<'bldr>> {
21050    let mut builder = ContainerBuilder::new(_fbb);
21051    if let Some(x) = args.semantic_node_id { builder.add_semantic_node_id(x); }
21052    if let Some(x) = args.shadow { builder.add_shadow(x); }
21053    if let Some(x) = args.corner_radius { builder.add_corner_radius(x); }
21054    if let Some(x) = args.border { builder.add_border(x); }
21055    if let Some(x) = args.background { builder.add_background(x); }
21056    builder.add_opacity(args.opacity);
21057    builder.add_z_index(args.z_index);
21058    if let Some(x) = args.left { builder.add_left(x); }
21059    if let Some(x) = args.bottom { builder.add_bottom(x); }
21060    if let Some(x) = args.right { builder.add_right(x); }
21061    if let Some(x) = args.top { builder.add_top(x); }
21062    if let Some(x) = args.max_height { builder.add_max_height(x); }
21063    if let Some(x) = args.min_height { builder.add_min_height(x); }
21064    if let Some(x) = args.max_width { builder.add_max_width(x); }
21065    if let Some(x) = args.min_width { builder.add_min_width(x); }
21066    if let Some(x) = args.height { builder.add_height(x); }
21067    if let Some(x) = args.width { builder.add_width(x); }
21068    if let Some(x) = args.grid_rows { builder.add_grid_rows(x); }
21069    if let Some(x) = args.grid_columns { builder.add_grid_columns(x); }
21070    if let Some(x) = args.padding { builder.add_padding(x); }
21071    if let Some(x) = args.gap { builder.add_gap(x); }
21072    if let Some(x) = args.children { builder.add_children(x); }
21073    if let Some(x) = args.node_id { builder.add_node_id(x); }
21074    builder.add_position(args.position);
21075    builder.add_clip(args.clip);
21076    builder.add_overflow_y(args.overflow_y);
21077    builder.add_overflow_x(args.overflow_x);
21078    builder.add_wrap(args.wrap);
21079    builder.add_cross_align(args.cross_align);
21080    builder.add_main_align(args.main_align);
21081    builder.add_direction(args.direction);
21082    builder.add_layout(args.layout);
21083    builder.finish()
21084  }
21085
21086
21087  #[inline]
21088  pub fn node_id(&self) -> &'a str {
21089    // Safety:
21090    // Created from valid Table for this object
21091    // which contains a valid value in this slot
21092    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Container::VT_NODE_ID, None).unwrap()}
21093  }
21094  #[inline]
21095  pub fn children(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ChildNode<'a>>>> {
21096    // Safety:
21097    // Created from valid Table for this object
21098    // which contains a valid value in this slot
21099    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ChildNode>>>>(Container::VT_CHILDREN, None)}
21100  }
21101  #[inline]
21102  pub fn layout(&self) -> ContainerLayout {
21103    // Safety:
21104    // Created from valid Table for this object
21105    // which contains a valid value in this slot
21106    unsafe { self._tab.get::<ContainerLayout>(Container::VT_LAYOUT, Some(ContainerLayout::Stack)).unwrap()}
21107  }
21108  #[inline]
21109  pub fn direction(&self) -> LayoutDirection {
21110    // Safety:
21111    // Created from valid Table for this object
21112    // which contains a valid value in this slot
21113    unsafe { self._tab.get::<LayoutDirection>(Container::VT_DIRECTION, Some(LayoutDirection::Column)).unwrap()}
21114  }
21115  #[inline]
21116  pub fn main_align(&self) -> Alignment {
21117    // Safety:
21118    // Created from valid Table for this object
21119    // which contains a valid value in this slot
21120    unsafe { self._tab.get::<Alignment>(Container::VT_MAIN_ALIGN, Some(Alignment::Start)).unwrap()}
21121  }
21122  #[inline]
21123  pub fn cross_align(&self) -> Alignment {
21124    // Safety:
21125    // Created from valid Table for this object
21126    // which contains a valid value in this slot
21127    unsafe { self._tab.get::<Alignment>(Container::VT_CROSS_ALIGN, Some(Alignment::Start)).unwrap()}
21128  }
21129  #[inline]
21130  pub fn gap(&self) -> Option<Length<'a>> {
21131    // Safety:
21132    // Created from valid Table for this object
21133    // which contains a valid value in this slot
21134    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(Container::VT_GAP, None)}
21135  }
21136  #[inline]
21137  pub fn padding(&self) -> Option<EdgeInsets<'a>> {
21138    // Safety:
21139    // Created from valid Table for this object
21140    // which contains a valid value in this slot
21141    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<EdgeInsets>>(Container::VT_PADDING, None)}
21142  }
21143  #[inline]
21144  pub fn wrap(&self) -> bool {
21145    // Safety:
21146    // Created from valid Table for this object
21147    // which contains a valid value in this slot
21148    unsafe { self._tab.get::<bool>(Container::VT_WRAP, Some(false)).unwrap()}
21149  }
21150  #[inline]
21151  pub fn grid_columns(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Length<'a>>>> {
21152    // Safety:
21153    // Created from valid Table for this object
21154    // which contains a valid value in this slot
21155    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Length>>>>(Container::VT_GRID_COLUMNS, None)}
21156  }
21157  #[inline]
21158  pub fn grid_rows(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Length<'a>>>> {
21159    // Safety:
21160    // Created from valid Table for this object
21161    // which contains a valid value in this slot
21162    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Length>>>>(Container::VT_GRID_ROWS, None)}
21163  }
21164  #[inline]
21165  pub fn width(&self) -> Option<Length<'a>> {
21166    // Safety:
21167    // Created from valid Table for this object
21168    // which contains a valid value in this slot
21169    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(Container::VT_WIDTH, None)}
21170  }
21171  #[inline]
21172  pub fn height(&self) -> Option<Length<'a>> {
21173    // Safety:
21174    // Created from valid Table for this object
21175    // which contains a valid value in this slot
21176    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(Container::VT_HEIGHT, None)}
21177  }
21178  #[inline]
21179  pub fn min_width(&self) -> Option<Length<'a>> {
21180    // Safety:
21181    // Created from valid Table for this object
21182    // which contains a valid value in this slot
21183    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(Container::VT_MIN_WIDTH, None)}
21184  }
21185  #[inline]
21186  pub fn max_width(&self) -> Option<Length<'a>> {
21187    // Safety:
21188    // Created from valid Table for this object
21189    // which contains a valid value in this slot
21190    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(Container::VT_MAX_WIDTH, None)}
21191  }
21192  #[inline]
21193  pub fn min_height(&self) -> Option<Length<'a>> {
21194    // Safety:
21195    // Created from valid Table for this object
21196    // which contains a valid value in this slot
21197    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(Container::VT_MIN_HEIGHT, None)}
21198  }
21199  #[inline]
21200  pub fn max_height(&self) -> Option<Length<'a>> {
21201    // Safety:
21202    // Created from valid Table for this object
21203    // which contains a valid value in this slot
21204    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(Container::VT_MAX_HEIGHT, None)}
21205  }
21206  #[inline]
21207  pub fn overflow_x(&self) -> Overflow {
21208    // Safety:
21209    // Created from valid Table for this object
21210    // which contains a valid value in this slot
21211    unsafe { self._tab.get::<Overflow>(Container::VT_OVERFLOW_X, Some(Overflow::Visible)).unwrap()}
21212  }
21213  #[inline]
21214  pub fn overflow_y(&self) -> Overflow {
21215    // Safety:
21216    // Created from valid Table for this object
21217    // which contains a valid value in this slot
21218    unsafe { self._tab.get::<Overflow>(Container::VT_OVERFLOW_Y, Some(Overflow::Visible)).unwrap()}
21219  }
21220  #[inline]
21221  pub fn clip(&self) -> bool {
21222    // Safety:
21223    // Created from valid Table for this object
21224    // which contains a valid value in this slot
21225    unsafe { self._tab.get::<bool>(Container::VT_CLIP, Some(false)).unwrap()}
21226  }
21227  #[inline]
21228  pub fn position(&self) -> Position {
21229    // Safety:
21230    // Created from valid Table for this object
21231    // which contains a valid value in this slot
21232    unsafe { self._tab.get::<Position>(Container::VT_POSITION, Some(Position::Relative)).unwrap()}
21233  }
21234  #[inline]
21235  pub fn top(&self) -> Option<Length<'a>> {
21236    // Safety:
21237    // Created from valid Table for this object
21238    // which contains a valid value in this slot
21239    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(Container::VT_TOP, None)}
21240  }
21241  #[inline]
21242  pub fn right(&self) -> Option<Length<'a>> {
21243    // Safety:
21244    // Created from valid Table for this object
21245    // which contains a valid value in this slot
21246    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(Container::VT_RIGHT, None)}
21247  }
21248  #[inline]
21249  pub fn bottom(&self) -> Option<Length<'a>> {
21250    // Safety:
21251    // Created from valid Table for this object
21252    // which contains a valid value in this slot
21253    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(Container::VT_BOTTOM, None)}
21254  }
21255  #[inline]
21256  pub fn left(&self) -> Option<Length<'a>> {
21257    // Safety:
21258    // Created from valid Table for this object
21259    // which contains a valid value in this slot
21260    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(Container::VT_LEFT, None)}
21261  }
21262  #[inline]
21263  pub fn z_index(&self) -> i32 {
21264    // Safety:
21265    // Created from valid Table for this object
21266    // which contains a valid value in this slot
21267    unsafe { self._tab.get::<i32>(Container::VT_Z_INDEX, Some(0)).unwrap()}
21268  }
21269  #[inline]
21270  pub fn opacity(&self) -> f32 {
21271    // Safety:
21272    // Created from valid Table for this object
21273    // which contains a valid value in this slot
21274    unsafe { self._tab.get::<f32>(Container::VT_OPACITY, Some(1.0)).unwrap()}
21275  }
21276  #[inline]
21277  pub fn background(&self) -> Option<&'a Color> {
21278    // Safety:
21279    // Created from valid Table for this object
21280    // which contains a valid value in this slot
21281    unsafe { self._tab.get::<Color>(Container::VT_BACKGROUND, None)}
21282  }
21283  #[inline]
21284  pub fn border(&self) -> Option<BorderSides<'a>> {
21285    // Safety:
21286    // Created from valid Table for this object
21287    // which contains a valid value in this slot
21288    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<BorderSides>>(Container::VT_BORDER, None)}
21289  }
21290  #[inline]
21291  pub fn corner_radius(&self) -> Option<CornerRadii<'a>> {
21292    // Safety:
21293    // Created from valid Table for this object
21294    // which contains a valid value in this slot
21295    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<CornerRadii>>(Container::VT_CORNER_RADIUS, None)}
21296  }
21297  #[inline]
21298  pub fn shadow(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Shadow<'a>>>> {
21299    // Safety:
21300    // Created from valid Table for this object
21301    // which contains a valid value in this slot
21302    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Shadow>>>>(Container::VT_SHADOW, None)}
21303  }
21304  #[inline]
21305  pub fn semantic_node_id(&self) -> Option<&'a str> {
21306    // Safety:
21307    // Created from valid Table for this object
21308    // which contains a valid value in this slot
21309    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Container::VT_SEMANTIC_NODE_ID, None)}
21310  }
21311}
21312
21313impl flatbuffers::Verifiable for Container<'_> {
21314  #[inline]
21315  fn run_verifier(
21316    v: &mut flatbuffers::Verifier, pos: usize
21317  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
21318    use self::flatbuffers::Verifiable;
21319    v.visit_table(pos)?
21320     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("node_id", Self::VT_NODE_ID, true)?
21321     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<ChildNode>>>>("children", Self::VT_CHILDREN, false)?
21322     .visit_field::<ContainerLayout>("layout", Self::VT_LAYOUT, false)?
21323     .visit_field::<LayoutDirection>("direction", Self::VT_DIRECTION, false)?
21324     .visit_field::<Alignment>("main_align", Self::VT_MAIN_ALIGN, false)?
21325     .visit_field::<Alignment>("cross_align", Self::VT_CROSS_ALIGN, false)?
21326     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("gap", Self::VT_GAP, false)?
21327     .visit_field::<flatbuffers::ForwardsUOffset<EdgeInsets>>("padding", Self::VT_PADDING, false)?
21328     .visit_field::<bool>("wrap", Self::VT_WRAP, false)?
21329     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Length>>>>("grid_columns", Self::VT_GRID_COLUMNS, false)?
21330     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Length>>>>("grid_rows", Self::VT_GRID_ROWS, false)?
21331     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("width", Self::VT_WIDTH, false)?
21332     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("height", Self::VT_HEIGHT, false)?
21333     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("min_width", Self::VT_MIN_WIDTH, false)?
21334     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("max_width", Self::VT_MAX_WIDTH, false)?
21335     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("min_height", Self::VT_MIN_HEIGHT, false)?
21336     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("max_height", Self::VT_MAX_HEIGHT, false)?
21337     .visit_field::<Overflow>("overflow_x", Self::VT_OVERFLOW_X, false)?
21338     .visit_field::<Overflow>("overflow_y", Self::VT_OVERFLOW_Y, false)?
21339     .visit_field::<bool>("clip", Self::VT_CLIP, false)?
21340     .visit_field::<Position>("position", Self::VT_POSITION, false)?
21341     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("top", Self::VT_TOP, false)?
21342     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("right", Self::VT_RIGHT, false)?
21343     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("bottom", Self::VT_BOTTOM, false)?
21344     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("left", Self::VT_LEFT, false)?
21345     .visit_field::<i32>("z_index", Self::VT_Z_INDEX, false)?
21346     .visit_field::<f32>("opacity", Self::VT_OPACITY, false)?
21347     .visit_field::<Color>("background", Self::VT_BACKGROUND, false)?
21348     .visit_field::<flatbuffers::ForwardsUOffset<BorderSides>>("border", Self::VT_BORDER, false)?
21349     .visit_field::<flatbuffers::ForwardsUOffset<CornerRadii>>("corner_radius", Self::VT_CORNER_RADIUS, false)?
21350     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Shadow>>>>("shadow", Self::VT_SHADOW, false)?
21351     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("semantic_node_id", Self::VT_SEMANTIC_NODE_ID, false)?
21352     .finish();
21353    Ok(())
21354  }
21355}
21356pub struct ContainerArgs<'a> {
21357    pub node_id: Option<flatbuffers::WIPOffset<&'a str>>,
21358    pub children: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ChildNode<'a>>>>>,
21359    pub layout: ContainerLayout,
21360    pub direction: LayoutDirection,
21361    pub main_align: Alignment,
21362    pub cross_align: Alignment,
21363    pub gap: Option<flatbuffers::WIPOffset<Length<'a>>>,
21364    pub padding: Option<flatbuffers::WIPOffset<EdgeInsets<'a>>>,
21365    pub wrap: bool,
21366    pub grid_columns: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Length<'a>>>>>,
21367    pub grid_rows: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Length<'a>>>>>,
21368    pub width: Option<flatbuffers::WIPOffset<Length<'a>>>,
21369    pub height: Option<flatbuffers::WIPOffset<Length<'a>>>,
21370    pub min_width: Option<flatbuffers::WIPOffset<Length<'a>>>,
21371    pub max_width: Option<flatbuffers::WIPOffset<Length<'a>>>,
21372    pub min_height: Option<flatbuffers::WIPOffset<Length<'a>>>,
21373    pub max_height: Option<flatbuffers::WIPOffset<Length<'a>>>,
21374    pub overflow_x: Overflow,
21375    pub overflow_y: Overflow,
21376    pub clip: bool,
21377    pub position: Position,
21378    pub top: Option<flatbuffers::WIPOffset<Length<'a>>>,
21379    pub right: Option<flatbuffers::WIPOffset<Length<'a>>>,
21380    pub bottom: Option<flatbuffers::WIPOffset<Length<'a>>>,
21381    pub left: Option<flatbuffers::WIPOffset<Length<'a>>>,
21382    pub z_index: i32,
21383    pub opacity: f32,
21384    pub background: Option<&'a Color>,
21385    pub border: Option<flatbuffers::WIPOffset<BorderSides<'a>>>,
21386    pub corner_radius: Option<flatbuffers::WIPOffset<CornerRadii<'a>>>,
21387    pub shadow: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Shadow<'a>>>>>,
21388    pub semantic_node_id: Option<flatbuffers::WIPOffset<&'a str>>,
21389}
21390impl<'a> Default for ContainerArgs<'a> {
21391  #[inline]
21392  fn default() -> Self {
21393    ContainerArgs {
21394      node_id: None, // required field
21395      children: None,
21396      layout: ContainerLayout::Stack,
21397      direction: LayoutDirection::Column,
21398      main_align: Alignment::Start,
21399      cross_align: Alignment::Start,
21400      gap: None,
21401      padding: None,
21402      wrap: false,
21403      grid_columns: None,
21404      grid_rows: None,
21405      width: None,
21406      height: None,
21407      min_width: None,
21408      max_width: None,
21409      min_height: None,
21410      max_height: None,
21411      overflow_x: Overflow::Visible,
21412      overflow_y: Overflow::Visible,
21413      clip: false,
21414      position: Position::Relative,
21415      top: None,
21416      right: None,
21417      bottom: None,
21418      left: None,
21419      z_index: 0,
21420      opacity: 1.0,
21421      background: None,
21422      border: None,
21423      corner_radius: None,
21424      shadow: None,
21425      semantic_node_id: None,
21426    }
21427  }
21428}
21429
21430pub struct ContainerBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
21431  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
21432  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
21433}
21434impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ContainerBuilder<'a, 'b, A> {
21435  #[inline]
21436  pub fn add_node_id(&mut self, node_id: flatbuffers::WIPOffset<&'b  str>) {
21437    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Container::VT_NODE_ID, node_id);
21438  }
21439  #[inline]
21440  pub fn add_children(&mut self, children: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<ChildNode<'b >>>>) {
21441    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Container::VT_CHILDREN, children);
21442  }
21443  #[inline]
21444  pub fn add_layout(&mut self, layout: ContainerLayout) {
21445    self.fbb_.push_slot::<ContainerLayout>(Container::VT_LAYOUT, layout, ContainerLayout::Stack);
21446  }
21447  #[inline]
21448  pub fn add_direction(&mut self, direction: LayoutDirection) {
21449    self.fbb_.push_slot::<LayoutDirection>(Container::VT_DIRECTION, direction, LayoutDirection::Column);
21450  }
21451  #[inline]
21452  pub fn add_main_align(&mut self, main_align: Alignment) {
21453    self.fbb_.push_slot::<Alignment>(Container::VT_MAIN_ALIGN, main_align, Alignment::Start);
21454  }
21455  #[inline]
21456  pub fn add_cross_align(&mut self, cross_align: Alignment) {
21457    self.fbb_.push_slot::<Alignment>(Container::VT_CROSS_ALIGN, cross_align, Alignment::Start);
21458  }
21459  #[inline]
21460  pub fn add_gap(&mut self, gap: flatbuffers::WIPOffset<Length<'b >>) {
21461    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(Container::VT_GAP, gap);
21462  }
21463  #[inline]
21464  pub fn add_padding(&mut self, padding: flatbuffers::WIPOffset<EdgeInsets<'b >>) {
21465    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<EdgeInsets>>(Container::VT_PADDING, padding);
21466  }
21467  #[inline]
21468  pub fn add_wrap(&mut self, wrap: bool) {
21469    self.fbb_.push_slot::<bool>(Container::VT_WRAP, wrap, false);
21470  }
21471  #[inline]
21472  pub fn add_grid_columns(&mut self, grid_columns: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<Length<'b >>>>) {
21473    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Container::VT_GRID_COLUMNS, grid_columns);
21474  }
21475  #[inline]
21476  pub fn add_grid_rows(&mut self, grid_rows: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<Length<'b >>>>) {
21477    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Container::VT_GRID_ROWS, grid_rows);
21478  }
21479  #[inline]
21480  pub fn add_width(&mut self, width: flatbuffers::WIPOffset<Length<'b >>) {
21481    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(Container::VT_WIDTH, width);
21482  }
21483  #[inline]
21484  pub fn add_height(&mut self, height: flatbuffers::WIPOffset<Length<'b >>) {
21485    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(Container::VT_HEIGHT, height);
21486  }
21487  #[inline]
21488  pub fn add_min_width(&mut self, min_width: flatbuffers::WIPOffset<Length<'b >>) {
21489    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(Container::VT_MIN_WIDTH, min_width);
21490  }
21491  #[inline]
21492  pub fn add_max_width(&mut self, max_width: flatbuffers::WIPOffset<Length<'b >>) {
21493    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(Container::VT_MAX_WIDTH, max_width);
21494  }
21495  #[inline]
21496  pub fn add_min_height(&mut self, min_height: flatbuffers::WIPOffset<Length<'b >>) {
21497    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(Container::VT_MIN_HEIGHT, min_height);
21498  }
21499  #[inline]
21500  pub fn add_max_height(&mut self, max_height: flatbuffers::WIPOffset<Length<'b >>) {
21501    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(Container::VT_MAX_HEIGHT, max_height);
21502  }
21503  #[inline]
21504  pub fn add_overflow_x(&mut self, overflow_x: Overflow) {
21505    self.fbb_.push_slot::<Overflow>(Container::VT_OVERFLOW_X, overflow_x, Overflow::Visible);
21506  }
21507  #[inline]
21508  pub fn add_overflow_y(&mut self, overflow_y: Overflow) {
21509    self.fbb_.push_slot::<Overflow>(Container::VT_OVERFLOW_Y, overflow_y, Overflow::Visible);
21510  }
21511  #[inline]
21512  pub fn add_clip(&mut self, clip: bool) {
21513    self.fbb_.push_slot::<bool>(Container::VT_CLIP, clip, false);
21514  }
21515  #[inline]
21516  pub fn add_position(&mut self, position: Position) {
21517    self.fbb_.push_slot::<Position>(Container::VT_POSITION, position, Position::Relative);
21518  }
21519  #[inline]
21520  pub fn add_top(&mut self, top: flatbuffers::WIPOffset<Length<'b >>) {
21521    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(Container::VT_TOP, top);
21522  }
21523  #[inline]
21524  pub fn add_right(&mut self, right: flatbuffers::WIPOffset<Length<'b >>) {
21525    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(Container::VT_RIGHT, right);
21526  }
21527  #[inline]
21528  pub fn add_bottom(&mut self, bottom: flatbuffers::WIPOffset<Length<'b >>) {
21529    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(Container::VT_BOTTOM, bottom);
21530  }
21531  #[inline]
21532  pub fn add_left(&mut self, left: flatbuffers::WIPOffset<Length<'b >>) {
21533    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(Container::VT_LEFT, left);
21534  }
21535  #[inline]
21536  pub fn add_z_index(&mut self, z_index: i32) {
21537    self.fbb_.push_slot::<i32>(Container::VT_Z_INDEX, z_index, 0);
21538  }
21539  #[inline]
21540  pub fn add_opacity(&mut self, opacity: f32) {
21541    self.fbb_.push_slot::<f32>(Container::VT_OPACITY, opacity, 1.0);
21542  }
21543  #[inline]
21544  pub fn add_background(&mut self, background: &Color) {
21545    self.fbb_.push_slot_always::<&Color>(Container::VT_BACKGROUND, background);
21546  }
21547  #[inline]
21548  pub fn add_border(&mut self, border: flatbuffers::WIPOffset<BorderSides<'b >>) {
21549    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<BorderSides>>(Container::VT_BORDER, border);
21550  }
21551  #[inline]
21552  pub fn add_corner_radius(&mut self, corner_radius: flatbuffers::WIPOffset<CornerRadii<'b >>) {
21553    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<CornerRadii>>(Container::VT_CORNER_RADIUS, corner_radius);
21554  }
21555  #[inline]
21556  pub fn add_shadow(&mut self, shadow: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<Shadow<'b >>>>) {
21557    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Container::VT_SHADOW, shadow);
21558  }
21559  #[inline]
21560  pub fn add_semantic_node_id(&mut self, semantic_node_id: flatbuffers::WIPOffset<&'b  str>) {
21561    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Container::VT_SEMANTIC_NODE_ID, semantic_node_id);
21562  }
21563  #[inline]
21564  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ContainerBuilder<'a, 'b, A> {
21565    let start = _fbb.start_table();
21566    ContainerBuilder {
21567      fbb_: _fbb,
21568      start_: start,
21569    }
21570  }
21571  #[inline]
21572  pub fn finish(self) -> flatbuffers::WIPOffset<Container<'a>> {
21573    let o = self.fbb_.end_table(self.start_);
21574    self.fbb_.required(o, Container::VT_NODE_ID,"node_id");
21575    flatbuffers::WIPOffset::new(o.value())
21576  }
21577}
21578
21579impl core::fmt::Debug for Container<'_> {
21580  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
21581    let mut ds = f.debug_struct("Container");
21582      ds.field("node_id", &self.node_id());
21583      ds.field("children", &self.children());
21584      ds.field("layout", &self.layout());
21585      ds.field("direction", &self.direction());
21586      ds.field("main_align", &self.main_align());
21587      ds.field("cross_align", &self.cross_align());
21588      ds.field("gap", &self.gap());
21589      ds.field("padding", &self.padding());
21590      ds.field("wrap", &self.wrap());
21591      ds.field("grid_columns", &self.grid_columns());
21592      ds.field("grid_rows", &self.grid_rows());
21593      ds.field("width", &self.width());
21594      ds.field("height", &self.height());
21595      ds.field("min_width", &self.min_width());
21596      ds.field("max_width", &self.max_width());
21597      ds.field("min_height", &self.min_height());
21598      ds.field("max_height", &self.max_height());
21599      ds.field("overflow_x", &self.overflow_x());
21600      ds.field("overflow_y", &self.overflow_y());
21601      ds.field("clip", &self.clip());
21602      ds.field("position", &self.position());
21603      ds.field("top", &self.top());
21604      ds.field("right", &self.right());
21605      ds.field("bottom", &self.bottom());
21606      ds.field("left", &self.left());
21607      ds.field("z_index", &self.z_index());
21608      ds.field("opacity", &self.opacity());
21609      ds.field("background", &self.background());
21610      ds.field("border", &self.border());
21611      ds.field("corner_radius", &self.corner_radius());
21612      ds.field("shadow", &self.shadow());
21613      ds.field("semantic_node_id", &self.semantic_node_id());
21614      ds.finish()
21615  }
21616}
21617pub enum SurfaceOffset {}
21618#[derive(Copy, Clone, PartialEq)]
21619
21620pub struct Surface<'a> {
21621  pub _tab: flatbuffers::Table<'a>,
21622}
21623
21624impl<'a> flatbuffers::Follow<'a> for Surface<'a> {
21625  type Inner = Surface<'a>;
21626  #[inline]
21627  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
21628    Self { _tab: flatbuffers::Table::new(buf, loc) }
21629  }
21630}
21631
21632impl<'a> Surface<'a> {
21633  pub const VT_NODE_ID: flatbuffers::VOffsetT = 4;
21634  pub const VT_CHILDREN: flatbuffers::VOffsetT = 6;
21635  pub const VT_FILL: flatbuffers::VOffsetT = 8;
21636  pub const VT_STROKE: flatbuffers::VOffsetT = 10;
21637  pub const VT_STROKE_WIDTH: flatbuffers::VOffsetT = 12;
21638  pub const VT_CORNER_RADIUS: flatbuffers::VOffsetT = 14;
21639  pub const VT_SHADOW: flatbuffers::VOffsetT = 16;
21640  pub const VT_OPACITY: flatbuffers::VOffsetT = 18;
21641  pub const VT_BORDER: flatbuffers::VOffsetT = 20;
21642  pub const VT_WIDTH: flatbuffers::VOffsetT = 22;
21643  pub const VT_HEIGHT: flatbuffers::VOffsetT = 24;
21644  pub const VT_MIN_WIDTH: flatbuffers::VOffsetT = 26;
21645  pub const VT_MAX_WIDTH: flatbuffers::VOffsetT = 28;
21646  pub const VT_MIN_HEIGHT: flatbuffers::VOffsetT = 30;
21647  pub const VT_MAX_HEIGHT: flatbuffers::VOffsetT = 32;
21648  pub const VT_PADDING: flatbuffers::VOffsetT = 34;
21649  pub const VT_DECORATIVE: flatbuffers::VOffsetT = 36;
21650  pub const VT_SEMANTIC_NODE_ID: flatbuffers::VOffsetT = 38;
21651
21652  #[inline]
21653  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
21654    Surface { _tab: table }
21655  }
21656  #[allow(unused_mut)]
21657  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
21658    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
21659    args: &'args SurfaceArgs<'args>
21660  ) -> flatbuffers::WIPOffset<Surface<'bldr>> {
21661    let mut builder = SurfaceBuilder::new(_fbb);
21662    if let Some(x) = args.semantic_node_id { builder.add_semantic_node_id(x); }
21663    if let Some(x) = args.padding { builder.add_padding(x); }
21664    if let Some(x) = args.max_height { builder.add_max_height(x); }
21665    if let Some(x) = args.min_height { builder.add_min_height(x); }
21666    if let Some(x) = args.max_width { builder.add_max_width(x); }
21667    if let Some(x) = args.min_width { builder.add_min_width(x); }
21668    if let Some(x) = args.height { builder.add_height(x); }
21669    if let Some(x) = args.width { builder.add_width(x); }
21670    if let Some(x) = args.border { builder.add_border(x); }
21671    builder.add_opacity(args.opacity);
21672    if let Some(x) = args.shadow { builder.add_shadow(x); }
21673    if let Some(x) = args.corner_radius { builder.add_corner_radius(x); }
21674    if let Some(x) = args.stroke_width { builder.add_stroke_width(x); }
21675    if let Some(x) = args.stroke { builder.add_stroke(x); }
21676    if let Some(x) = args.fill { builder.add_fill(x); }
21677    if let Some(x) = args.children { builder.add_children(x); }
21678    if let Some(x) = args.node_id { builder.add_node_id(x); }
21679    builder.add_decorative(args.decorative);
21680    builder.finish()
21681  }
21682
21683
21684  #[inline]
21685  pub fn node_id(&self) -> &'a str {
21686    // Safety:
21687    // Created from valid Table for this object
21688    // which contains a valid value in this slot
21689    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Surface::VT_NODE_ID, None).unwrap()}
21690  }
21691  #[inline]
21692  pub fn children(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ChildNode<'a>>>> {
21693    // Safety:
21694    // Created from valid Table for this object
21695    // which contains a valid value in this slot
21696    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ChildNode>>>>(Surface::VT_CHILDREN, None)}
21697  }
21698  #[inline]
21699  pub fn fill(&self) -> Option<&'a Color> {
21700    // Safety:
21701    // Created from valid Table for this object
21702    // which contains a valid value in this slot
21703    unsafe { self._tab.get::<Color>(Surface::VT_FILL, None)}
21704  }
21705  #[inline]
21706  pub fn stroke(&self) -> Option<&'a Color> {
21707    // Safety:
21708    // Created from valid Table for this object
21709    // which contains a valid value in this slot
21710    unsafe { self._tab.get::<Color>(Surface::VT_STROKE, None)}
21711  }
21712  #[inline]
21713  pub fn stroke_width(&self) -> Option<Length<'a>> {
21714    // Safety:
21715    // Created from valid Table for this object
21716    // which contains a valid value in this slot
21717    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(Surface::VT_STROKE_WIDTH, None)}
21718  }
21719  #[inline]
21720  pub fn corner_radius(&self) -> Option<CornerRadii<'a>> {
21721    // Safety:
21722    // Created from valid Table for this object
21723    // which contains a valid value in this slot
21724    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<CornerRadii>>(Surface::VT_CORNER_RADIUS, None)}
21725  }
21726  #[inline]
21727  pub fn shadow(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Shadow<'a>>>> {
21728    // Safety:
21729    // Created from valid Table for this object
21730    // which contains a valid value in this slot
21731    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Shadow>>>>(Surface::VT_SHADOW, None)}
21732  }
21733  #[inline]
21734  pub fn opacity(&self) -> f32 {
21735    // Safety:
21736    // Created from valid Table for this object
21737    // which contains a valid value in this slot
21738    unsafe { self._tab.get::<f32>(Surface::VT_OPACITY, Some(1.0)).unwrap()}
21739  }
21740  #[inline]
21741  pub fn border(&self) -> Option<BorderSides<'a>> {
21742    // Safety:
21743    // Created from valid Table for this object
21744    // which contains a valid value in this slot
21745    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<BorderSides>>(Surface::VT_BORDER, None)}
21746  }
21747  #[inline]
21748  pub fn width(&self) -> Option<Length<'a>> {
21749    // Safety:
21750    // Created from valid Table for this object
21751    // which contains a valid value in this slot
21752    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(Surface::VT_WIDTH, None)}
21753  }
21754  #[inline]
21755  pub fn height(&self) -> Option<Length<'a>> {
21756    // Safety:
21757    // Created from valid Table for this object
21758    // which contains a valid value in this slot
21759    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(Surface::VT_HEIGHT, None)}
21760  }
21761  #[inline]
21762  pub fn min_width(&self) -> Option<Length<'a>> {
21763    // Safety:
21764    // Created from valid Table for this object
21765    // which contains a valid value in this slot
21766    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(Surface::VT_MIN_WIDTH, None)}
21767  }
21768  #[inline]
21769  pub fn max_width(&self) -> Option<Length<'a>> {
21770    // Safety:
21771    // Created from valid Table for this object
21772    // which contains a valid value in this slot
21773    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(Surface::VT_MAX_WIDTH, None)}
21774  }
21775  #[inline]
21776  pub fn min_height(&self) -> Option<Length<'a>> {
21777    // Safety:
21778    // Created from valid Table for this object
21779    // which contains a valid value in this slot
21780    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(Surface::VT_MIN_HEIGHT, None)}
21781  }
21782  #[inline]
21783  pub fn max_height(&self) -> Option<Length<'a>> {
21784    // Safety:
21785    // Created from valid Table for this object
21786    // which contains a valid value in this slot
21787    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(Surface::VT_MAX_HEIGHT, None)}
21788  }
21789  #[inline]
21790  pub fn padding(&self) -> Option<EdgeInsets<'a>> {
21791    // Safety:
21792    // Created from valid Table for this object
21793    // which contains a valid value in this slot
21794    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<EdgeInsets>>(Surface::VT_PADDING, None)}
21795  }
21796  #[inline]
21797  pub fn decorative(&self) -> bool {
21798    // Safety:
21799    // Created from valid Table for this object
21800    // which contains a valid value in this slot
21801    unsafe { self._tab.get::<bool>(Surface::VT_DECORATIVE, Some(false)).unwrap()}
21802  }
21803  #[inline]
21804  pub fn semantic_node_id(&self) -> Option<&'a str> {
21805    // Safety:
21806    // Created from valid Table for this object
21807    // which contains a valid value in this slot
21808    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Surface::VT_SEMANTIC_NODE_ID, None)}
21809  }
21810}
21811
21812impl flatbuffers::Verifiable for Surface<'_> {
21813  #[inline]
21814  fn run_verifier(
21815    v: &mut flatbuffers::Verifier, pos: usize
21816  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
21817    use self::flatbuffers::Verifiable;
21818    v.visit_table(pos)?
21819     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("node_id", Self::VT_NODE_ID, true)?
21820     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<ChildNode>>>>("children", Self::VT_CHILDREN, false)?
21821     .visit_field::<Color>("fill", Self::VT_FILL, false)?
21822     .visit_field::<Color>("stroke", Self::VT_STROKE, false)?
21823     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("stroke_width", Self::VT_STROKE_WIDTH, false)?
21824     .visit_field::<flatbuffers::ForwardsUOffset<CornerRadii>>("corner_radius", Self::VT_CORNER_RADIUS, false)?
21825     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Shadow>>>>("shadow", Self::VT_SHADOW, false)?
21826     .visit_field::<f32>("opacity", Self::VT_OPACITY, false)?
21827     .visit_field::<flatbuffers::ForwardsUOffset<BorderSides>>("border", Self::VT_BORDER, false)?
21828     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("width", Self::VT_WIDTH, false)?
21829     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("height", Self::VT_HEIGHT, false)?
21830     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("min_width", Self::VT_MIN_WIDTH, false)?
21831     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("max_width", Self::VT_MAX_WIDTH, false)?
21832     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("min_height", Self::VT_MIN_HEIGHT, false)?
21833     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("max_height", Self::VT_MAX_HEIGHT, false)?
21834     .visit_field::<flatbuffers::ForwardsUOffset<EdgeInsets>>("padding", Self::VT_PADDING, false)?
21835     .visit_field::<bool>("decorative", Self::VT_DECORATIVE, false)?
21836     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("semantic_node_id", Self::VT_SEMANTIC_NODE_ID, false)?
21837     .finish();
21838    Ok(())
21839  }
21840}
21841pub struct SurfaceArgs<'a> {
21842    pub node_id: Option<flatbuffers::WIPOffset<&'a str>>,
21843    pub children: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ChildNode<'a>>>>>,
21844    pub fill: Option<&'a Color>,
21845    pub stroke: Option<&'a Color>,
21846    pub stroke_width: Option<flatbuffers::WIPOffset<Length<'a>>>,
21847    pub corner_radius: Option<flatbuffers::WIPOffset<CornerRadii<'a>>>,
21848    pub shadow: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Shadow<'a>>>>>,
21849    pub opacity: f32,
21850    pub border: Option<flatbuffers::WIPOffset<BorderSides<'a>>>,
21851    pub width: Option<flatbuffers::WIPOffset<Length<'a>>>,
21852    pub height: Option<flatbuffers::WIPOffset<Length<'a>>>,
21853    pub min_width: Option<flatbuffers::WIPOffset<Length<'a>>>,
21854    pub max_width: Option<flatbuffers::WIPOffset<Length<'a>>>,
21855    pub min_height: Option<flatbuffers::WIPOffset<Length<'a>>>,
21856    pub max_height: Option<flatbuffers::WIPOffset<Length<'a>>>,
21857    pub padding: Option<flatbuffers::WIPOffset<EdgeInsets<'a>>>,
21858    pub decorative: bool,
21859    pub semantic_node_id: Option<flatbuffers::WIPOffset<&'a str>>,
21860}
21861impl<'a> Default for SurfaceArgs<'a> {
21862  #[inline]
21863  fn default() -> Self {
21864    SurfaceArgs {
21865      node_id: None, // required field
21866      children: None,
21867      fill: None,
21868      stroke: None,
21869      stroke_width: None,
21870      corner_radius: None,
21871      shadow: None,
21872      opacity: 1.0,
21873      border: None,
21874      width: None,
21875      height: None,
21876      min_width: None,
21877      max_width: None,
21878      min_height: None,
21879      max_height: None,
21880      padding: None,
21881      decorative: false,
21882      semantic_node_id: None,
21883    }
21884  }
21885}
21886
21887pub struct SurfaceBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
21888  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
21889  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
21890}
21891impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SurfaceBuilder<'a, 'b, A> {
21892  #[inline]
21893  pub fn add_node_id(&mut self, node_id: flatbuffers::WIPOffset<&'b  str>) {
21894    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Surface::VT_NODE_ID, node_id);
21895  }
21896  #[inline]
21897  pub fn add_children(&mut self, children: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<ChildNode<'b >>>>) {
21898    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Surface::VT_CHILDREN, children);
21899  }
21900  #[inline]
21901  pub fn add_fill(&mut self, fill: &Color) {
21902    self.fbb_.push_slot_always::<&Color>(Surface::VT_FILL, fill);
21903  }
21904  #[inline]
21905  pub fn add_stroke(&mut self, stroke: &Color) {
21906    self.fbb_.push_slot_always::<&Color>(Surface::VT_STROKE, stroke);
21907  }
21908  #[inline]
21909  pub fn add_stroke_width(&mut self, stroke_width: flatbuffers::WIPOffset<Length<'b >>) {
21910    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(Surface::VT_STROKE_WIDTH, stroke_width);
21911  }
21912  #[inline]
21913  pub fn add_corner_radius(&mut self, corner_radius: flatbuffers::WIPOffset<CornerRadii<'b >>) {
21914    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<CornerRadii>>(Surface::VT_CORNER_RADIUS, corner_radius);
21915  }
21916  #[inline]
21917  pub fn add_shadow(&mut self, shadow: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<Shadow<'b >>>>) {
21918    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Surface::VT_SHADOW, shadow);
21919  }
21920  #[inline]
21921  pub fn add_opacity(&mut self, opacity: f32) {
21922    self.fbb_.push_slot::<f32>(Surface::VT_OPACITY, opacity, 1.0);
21923  }
21924  #[inline]
21925  pub fn add_border(&mut self, border: flatbuffers::WIPOffset<BorderSides<'b >>) {
21926    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<BorderSides>>(Surface::VT_BORDER, border);
21927  }
21928  #[inline]
21929  pub fn add_width(&mut self, width: flatbuffers::WIPOffset<Length<'b >>) {
21930    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(Surface::VT_WIDTH, width);
21931  }
21932  #[inline]
21933  pub fn add_height(&mut self, height: flatbuffers::WIPOffset<Length<'b >>) {
21934    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(Surface::VT_HEIGHT, height);
21935  }
21936  #[inline]
21937  pub fn add_min_width(&mut self, min_width: flatbuffers::WIPOffset<Length<'b >>) {
21938    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(Surface::VT_MIN_WIDTH, min_width);
21939  }
21940  #[inline]
21941  pub fn add_max_width(&mut self, max_width: flatbuffers::WIPOffset<Length<'b >>) {
21942    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(Surface::VT_MAX_WIDTH, max_width);
21943  }
21944  #[inline]
21945  pub fn add_min_height(&mut self, min_height: flatbuffers::WIPOffset<Length<'b >>) {
21946    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(Surface::VT_MIN_HEIGHT, min_height);
21947  }
21948  #[inline]
21949  pub fn add_max_height(&mut self, max_height: flatbuffers::WIPOffset<Length<'b >>) {
21950    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(Surface::VT_MAX_HEIGHT, max_height);
21951  }
21952  #[inline]
21953  pub fn add_padding(&mut self, padding: flatbuffers::WIPOffset<EdgeInsets<'b >>) {
21954    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<EdgeInsets>>(Surface::VT_PADDING, padding);
21955  }
21956  #[inline]
21957  pub fn add_decorative(&mut self, decorative: bool) {
21958    self.fbb_.push_slot::<bool>(Surface::VT_DECORATIVE, decorative, false);
21959  }
21960  #[inline]
21961  pub fn add_semantic_node_id(&mut self, semantic_node_id: flatbuffers::WIPOffset<&'b  str>) {
21962    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Surface::VT_SEMANTIC_NODE_ID, semantic_node_id);
21963  }
21964  #[inline]
21965  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> SurfaceBuilder<'a, 'b, A> {
21966    let start = _fbb.start_table();
21967    SurfaceBuilder {
21968      fbb_: _fbb,
21969      start_: start,
21970    }
21971  }
21972  #[inline]
21973  pub fn finish(self) -> flatbuffers::WIPOffset<Surface<'a>> {
21974    let o = self.fbb_.end_table(self.start_);
21975    self.fbb_.required(o, Surface::VT_NODE_ID,"node_id");
21976    flatbuffers::WIPOffset::new(o.value())
21977  }
21978}
21979
21980impl core::fmt::Debug for Surface<'_> {
21981  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
21982    let mut ds = f.debug_struct("Surface");
21983      ds.field("node_id", &self.node_id());
21984      ds.field("children", &self.children());
21985      ds.field("fill", &self.fill());
21986      ds.field("stroke", &self.stroke());
21987      ds.field("stroke_width", &self.stroke_width());
21988      ds.field("corner_radius", &self.corner_radius());
21989      ds.field("shadow", &self.shadow());
21990      ds.field("opacity", &self.opacity());
21991      ds.field("border", &self.border());
21992      ds.field("width", &self.width());
21993      ds.field("height", &self.height());
21994      ds.field("min_width", &self.min_width());
21995      ds.field("max_width", &self.max_width());
21996      ds.field("min_height", &self.min_height());
21997      ds.field("max_height", &self.max_height());
21998      ds.field("padding", &self.padding());
21999      ds.field("decorative", &self.decorative());
22000      ds.field("semantic_node_id", &self.semantic_node_id());
22001      ds.finish()
22002  }
22003}
22004pub enum TextNodeOffset {}
22005#[derive(Copy, Clone, PartialEq)]
22006
22007pub struct TextNode<'a> {
22008  pub _tab: flatbuffers::Table<'a>,
22009}
22010
22011impl<'a> flatbuffers::Follow<'a> for TextNode<'a> {
22012  type Inner = TextNode<'a>;
22013  #[inline]
22014  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
22015    Self { _tab: flatbuffers::Table::new(buf, loc) }
22016  }
22017}
22018
22019impl<'a> TextNode<'a> {
22020  pub const VT_NODE_ID: flatbuffers::VOffsetT = 4;
22021  pub const VT_CONTENT: flatbuffers::VOffsetT = 6;
22022  pub const VT_CONTENT_BINDING: flatbuffers::VOffsetT = 8;
22023  pub const VT_LOCALIZED_CONTENT: flatbuffers::VOffsetT = 10;
22024  pub const VT_FONT_FAMILY: flatbuffers::VOffsetT = 12;
22025  pub const VT_FONT_SIZE: flatbuffers::VOffsetT = 14;
22026  pub const VT_FONT_WEIGHT: flatbuffers::VOffsetT = 16;
22027  pub const VT_LINE_HEIGHT: flatbuffers::VOffsetT = 18;
22028  pub const VT_LETTER_SPACING: flatbuffers::VOffsetT = 20;
22029  pub const VT_TEXT_ALIGN: flatbuffers::VOffsetT = 22;
22030  pub const VT_TEXT_OVERFLOW: flatbuffers::VOffsetT = 24;
22031  pub const VT_TEXT_DECORATION: flatbuffers::VOffsetT = 26;
22032  pub const VT_MAX_LINES: flatbuffers::VOffsetT = 28;
22033  pub const VT_COLOR: flatbuffers::VOffsetT = 30;
22034  pub const VT_OPACITY: flatbuffers::VOffsetT = 32;
22035  pub const VT_HEADING_LEVEL: flatbuffers::VOffsetT = 34;
22036  pub const VT_SEMANTIC_NODE_ID: flatbuffers::VOffsetT = 36;
22037
22038  #[inline]
22039  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
22040    TextNode { _tab: table }
22041  }
22042  #[allow(unused_mut)]
22043  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
22044    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
22045    args: &'args TextNodeArgs<'args>
22046  ) -> flatbuffers::WIPOffset<TextNode<'bldr>> {
22047    let mut builder = TextNodeBuilder::new(_fbb);
22048    if let Some(x) = args.semantic_node_id { builder.add_semantic_node_id(x); }
22049    builder.add_opacity(args.opacity);
22050    if let Some(x) = args.color { builder.add_color(x); }
22051    builder.add_max_lines(args.max_lines);
22052    if let Some(x) = args.letter_spacing { builder.add_letter_spacing(x); }
22053    builder.add_line_height(args.line_height);
22054    if let Some(x) = args.font_size { builder.add_font_size(x); }
22055    if let Some(x) = args.font_family { builder.add_font_family(x); }
22056    if let Some(x) = args.localized_content { builder.add_localized_content(x); }
22057    if let Some(x) = args.content_binding { builder.add_content_binding(x); }
22058    if let Some(x) = args.content { builder.add_content(x); }
22059    if let Some(x) = args.node_id { builder.add_node_id(x); }
22060    builder.add_font_weight(args.font_weight);
22061    builder.add_heading_level(args.heading_level);
22062    builder.add_text_decoration(args.text_decoration);
22063    builder.add_text_overflow(args.text_overflow);
22064    builder.add_text_align(args.text_align);
22065    builder.finish()
22066  }
22067
22068
22069  #[inline]
22070  pub fn node_id(&self) -> &'a str {
22071    // Safety:
22072    // Created from valid Table for this object
22073    // which contains a valid value in this slot
22074    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(TextNode::VT_NODE_ID, None).unwrap()}
22075  }
22076  #[inline]
22077  pub fn content(&self) -> Option<&'a str> {
22078    // Safety:
22079    // Created from valid Table for this object
22080    // which contains a valid value in this slot
22081    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(TextNode::VT_CONTENT, None)}
22082  }
22083  #[inline]
22084  pub fn content_binding(&self) -> Option<DataBinding<'a>> {
22085    // Safety:
22086    // Created from valid Table for this object
22087    // which contains a valid value in this slot
22088    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<DataBinding>>(TextNode::VT_CONTENT_BINDING, None)}
22089  }
22090  #[inline]
22091  pub fn localized_content(&self) -> Option<LocalizedString<'a>> {
22092    // Safety:
22093    // Created from valid Table for this object
22094    // which contains a valid value in this slot
22095    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<LocalizedString>>(TextNode::VT_LOCALIZED_CONTENT, None)}
22096  }
22097  #[inline]
22098  pub fn font_family(&self) -> Option<&'a str> {
22099    // Safety:
22100    // Created from valid Table for this object
22101    // which contains a valid value in this slot
22102    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(TextNode::VT_FONT_FAMILY, None)}
22103  }
22104  #[inline]
22105  pub fn font_size(&self) -> Option<Length<'a>> {
22106    // Safety:
22107    // Created from valid Table for this object
22108    // which contains a valid value in this slot
22109    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(TextNode::VT_FONT_SIZE, None)}
22110  }
22111  #[inline]
22112  pub fn font_weight(&self) -> FontWeight {
22113    // Safety:
22114    // Created from valid Table for this object
22115    // which contains a valid value in this slot
22116    unsafe { self._tab.get::<FontWeight>(TextNode::VT_FONT_WEIGHT, Some(FontWeight::Regular)).unwrap()}
22117  }
22118  #[inline]
22119  pub fn line_height(&self) -> f32 {
22120    // Safety:
22121    // Created from valid Table for this object
22122    // which contains a valid value in this slot
22123    unsafe { self._tab.get::<f32>(TextNode::VT_LINE_HEIGHT, Some(1.5)).unwrap()}
22124  }
22125  #[inline]
22126  pub fn letter_spacing(&self) -> Option<Length<'a>> {
22127    // Safety:
22128    // Created from valid Table for this object
22129    // which contains a valid value in this slot
22130    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(TextNode::VT_LETTER_SPACING, None)}
22131  }
22132  #[inline]
22133  pub fn text_align(&self) -> TextAlign {
22134    // Safety:
22135    // Created from valid Table for this object
22136    // which contains a valid value in this slot
22137    unsafe { self._tab.get::<TextAlign>(TextNode::VT_TEXT_ALIGN, Some(TextAlign::Start)).unwrap()}
22138  }
22139  #[inline]
22140  pub fn text_overflow(&self) -> TextOverflow {
22141    // Safety:
22142    // Created from valid Table for this object
22143    // which contains a valid value in this slot
22144    unsafe { self._tab.get::<TextOverflow>(TextNode::VT_TEXT_OVERFLOW, Some(TextOverflow::Clip)).unwrap()}
22145  }
22146  #[inline]
22147  pub fn text_decoration(&self) -> TextDecoration {
22148    // Safety:
22149    // Created from valid Table for this object
22150    // which contains a valid value in this slot
22151    unsafe { self._tab.get::<TextDecoration>(TextNode::VT_TEXT_DECORATION, Some(TextDecoration::None)).unwrap()}
22152  }
22153  #[inline]
22154  pub fn max_lines(&self) -> i32 {
22155    // Safety:
22156    // Created from valid Table for this object
22157    // which contains a valid value in this slot
22158    unsafe { self._tab.get::<i32>(TextNode::VT_MAX_LINES, Some(0)).unwrap()}
22159  }
22160  #[inline]
22161  pub fn color(&self) -> Option<&'a Color> {
22162    // Safety:
22163    // Created from valid Table for this object
22164    // which contains a valid value in this slot
22165    unsafe { self._tab.get::<Color>(TextNode::VT_COLOR, None)}
22166  }
22167  #[inline]
22168  pub fn opacity(&self) -> f32 {
22169    // Safety:
22170    // Created from valid Table for this object
22171    // which contains a valid value in this slot
22172    unsafe { self._tab.get::<f32>(TextNode::VT_OPACITY, Some(1.0)).unwrap()}
22173  }
22174  #[inline]
22175  pub fn heading_level(&self) -> i8 {
22176    // Safety:
22177    // Created from valid Table for this object
22178    // which contains a valid value in this slot
22179    unsafe { self._tab.get::<i8>(TextNode::VT_HEADING_LEVEL, Some(0)).unwrap()}
22180  }
22181  #[inline]
22182  pub fn semantic_node_id(&self) -> Option<&'a str> {
22183    // Safety:
22184    // Created from valid Table for this object
22185    // which contains a valid value in this slot
22186    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(TextNode::VT_SEMANTIC_NODE_ID, None)}
22187  }
22188}
22189
22190impl flatbuffers::Verifiable for TextNode<'_> {
22191  #[inline]
22192  fn run_verifier(
22193    v: &mut flatbuffers::Verifier, pos: usize
22194  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
22195    use self::flatbuffers::Verifiable;
22196    v.visit_table(pos)?
22197     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("node_id", Self::VT_NODE_ID, true)?
22198     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("content", Self::VT_CONTENT, false)?
22199     .visit_field::<flatbuffers::ForwardsUOffset<DataBinding>>("content_binding", Self::VT_CONTENT_BINDING, false)?
22200     .visit_field::<flatbuffers::ForwardsUOffset<LocalizedString>>("localized_content", Self::VT_LOCALIZED_CONTENT, false)?
22201     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("font_family", Self::VT_FONT_FAMILY, false)?
22202     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("font_size", Self::VT_FONT_SIZE, false)?
22203     .visit_field::<FontWeight>("font_weight", Self::VT_FONT_WEIGHT, false)?
22204     .visit_field::<f32>("line_height", Self::VT_LINE_HEIGHT, false)?
22205     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("letter_spacing", Self::VT_LETTER_SPACING, false)?
22206     .visit_field::<TextAlign>("text_align", Self::VT_TEXT_ALIGN, false)?
22207     .visit_field::<TextOverflow>("text_overflow", Self::VT_TEXT_OVERFLOW, false)?
22208     .visit_field::<TextDecoration>("text_decoration", Self::VT_TEXT_DECORATION, false)?
22209     .visit_field::<i32>("max_lines", Self::VT_MAX_LINES, false)?
22210     .visit_field::<Color>("color", Self::VT_COLOR, false)?
22211     .visit_field::<f32>("opacity", Self::VT_OPACITY, false)?
22212     .visit_field::<i8>("heading_level", Self::VT_HEADING_LEVEL, false)?
22213     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("semantic_node_id", Self::VT_SEMANTIC_NODE_ID, false)?
22214     .finish();
22215    Ok(())
22216  }
22217}
22218pub struct TextNodeArgs<'a> {
22219    pub node_id: Option<flatbuffers::WIPOffset<&'a str>>,
22220    pub content: Option<flatbuffers::WIPOffset<&'a str>>,
22221    pub content_binding: Option<flatbuffers::WIPOffset<DataBinding<'a>>>,
22222    pub localized_content: Option<flatbuffers::WIPOffset<LocalizedString<'a>>>,
22223    pub font_family: Option<flatbuffers::WIPOffset<&'a str>>,
22224    pub font_size: Option<flatbuffers::WIPOffset<Length<'a>>>,
22225    pub font_weight: FontWeight,
22226    pub line_height: f32,
22227    pub letter_spacing: Option<flatbuffers::WIPOffset<Length<'a>>>,
22228    pub text_align: TextAlign,
22229    pub text_overflow: TextOverflow,
22230    pub text_decoration: TextDecoration,
22231    pub max_lines: i32,
22232    pub color: Option<&'a Color>,
22233    pub opacity: f32,
22234    pub heading_level: i8,
22235    pub semantic_node_id: Option<flatbuffers::WIPOffset<&'a str>>,
22236}
22237impl<'a> Default for TextNodeArgs<'a> {
22238  #[inline]
22239  fn default() -> Self {
22240    TextNodeArgs {
22241      node_id: None, // required field
22242      content: None,
22243      content_binding: None,
22244      localized_content: None,
22245      font_family: None,
22246      font_size: None,
22247      font_weight: FontWeight::Regular,
22248      line_height: 1.5,
22249      letter_spacing: None,
22250      text_align: TextAlign::Start,
22251      text_overflow: TextOverflow::Clip,
22252      text_decoration: TextDecoration::None,
22253      max_lines: 0,
22254      color: None,
22255      opacity: 1.0,
22256      heading_level: 0,
22257      semantic_node_id: None,
22258    }
22259  }
22260}
22261
22262pub struct TextNodeBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
22263  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
22264  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
22265}
22266impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TextNodeBuilder<'a, 'b, A> {
22267  #[inline]
22268  pub fn add_node_id(&mut self, node_id: flatbuffers::WIPOffset<&'b  str>) {
22269    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(TextNode::VT_NODE_ID, node_id);
22270  }
22271  #[inline]
22272  pub fn add_content(&mut self, content: flatbuffers::WIPOffset<&'b  str>) {
22273    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(TextNode::VT_CONTENT, content);
22274  }
22275  #[inline]
22276  pub fn add_content_binding(&mut self, content_binding: flatbuffers::WIPOffset<DataBinding<'b >>) {
22277    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<DataBinding>>(TextNode::VT_CONTENT_BINDING, content_binding);
22278  }
22279  #[inline]
22280  pub fn add_localized_content(&mut self, localized_content: flatbuffers::WIPOffset<LocalizedString<'b >>) {
22281    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<LocalizedString>>(TextNode::VT_LOCALIZED_CONTENT, localized_content);
22282  }
22283  #[inline]
22284  pub fn add_font_family(&mut self, font_family: flatbuffers::WIPOffset<&'b  str>) {
22285    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(TextNode::VT_FONT_FAMILY, font_family);
22286  }
22287  #[inline]
22288  pub fn add_font_size(&mut self, font_size: flatbuffers::WIPOffset<Length<'b >>) {
22289    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(TextNode::VT_FONT_SIZE, font_size);
22290  }
22291  #[inline]
22292  pub fn add_font_weight(&mut self, font_weight: FontWeight) {
22293    self.fbb_.push_slot::<FontWeight>(TextNode::VT_FONT_WEIGHT, font_weight, FontWeight::Regular);
22294  }
22295  #[inline]
22296  pub fn add_line_height(&mut self, line_height: f32) {
22297    self.fbb_.push_slot::<f32>(TextNode::VT_LINE_HEIGHT, line_height, 1.5);
22298  }
22299  #[inline]
22300  pub fn add_letter_spacing(&mut self, letter_spacing: flatbuffers::WIPOffset<Length<'b >>) {
22301    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(TextNode::VT_LETTER_SPACING, letter_spacing);
22302  }
22303  #[inline]
22304  pub fn add_text_align(&mut self, text_align: TextAlign) {
22305    self.fbb_.push_slot::<TextAlign>(TextNode::VT_TEXT_ALIGN, text_align, TextAlign::Start);
22306  }
22307  #[inline]
22308  pub fn add_text_overflow(&mut self, text_overflow: TextOverflow) {
22309    self.fbb_.push_slot::<TextOverflow>(TextNode::VT_TEXT_OVERFLOW, text_overflow, TextOverflow::Clip);
22310  }
22311  #[inline]
22312  pub fn add_text_decoration(&mut self, text_decoration: TextDecoration) {
22313    self.fbb_.push_slot::<TextDecoration>(TextNode::VT_TEXT_DECORATION, text_decoration, TextDecoration::None);
22314  }
22315  #[inline]
22316  pub fn add_max_lines(&mut self, max_lines: i32) {
22317    self.fbb_.push_slot::<i32>(TextNode::VT_MAX_LINES, max_lines, 0);
22318  }
22319  #[inline]
22320  pub fn add_color(&mut self, color: &Color) {
22321    self.fbb_.push_slot_always::<&Color>(TextNode::VT_COLOR, color);
22322  }
22323  #[inline]
22324  pub fn add_opacity(&mut self, opacity: f32) {
22325    self.fbb_.push_slot::<f32>(TextNode::VT_OPACITY, opacity, 1.0);
22326  }
22327  #[inline]
22328  pub fn add_heading_level(&mut self, heading_level: i8) {
22329    self.fbb_.push_slot::<i8>(TextNode::VT_HEADING_LEVEL, heading_level, 0);
22330  }
22331  #[inline]
22332  pub fn add_semantic_node_id(&mut self, semantic_node_id: flatbuffers::WIPOffset<&'b  str>) {
22333    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(TextNode::VT_SEMANTIC_NODE_ID, semantic_node_id);
22334  }
22335  #[inline]
22336  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TextNodeBuilder<'a, 'b, A> {
22337    let start = _fbb.start_table();
22338    TextNodeBuilder {
22339      fbb_: _fbb,
22340      start_: start,
22341    }
22342  }
22343  #[inline]
22344  pub fn finish(self) -> flatbuffers::WIPOffset<TextNode<'a>> {
22345    let o = self.fbb_.end_table(self.start_);
22346    self.fbb_.required(o, TextNode::VT_NODE_ID,"node_id");
22347    flatbuffers::WIPOffset::new(o.value())
22348  }
22349}
22350
22351impl core::fmt::Debug for TextNode<'_> {
22352  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
22353    let mut ds = f.debug_struct("TextNode");
22354      ds.field("node_id", &self.node_id());
22355      ds.field("content", &self.content());
22356      ds.field("content_binding", &self.content_binding());
22357      ds.field("localized_content", &self.localized_content());
22358      ds.field("font_family", &self.font_family());
22359      ds.field("font_size", &self.font_size());
22360      ds.field("font_weight", &self.font_weight());
22361      ds.field("line_height", &self.line_height());
22362      ds.field("letter_spacing", &self.letter_spacing());
22363      ds.field("text_align", &self.text_align());
22364      ds.field("text_overflow", &self.text_overflow());
22365      ds.field("text_decoration", &self.text_decoration());
22366      ds.field("max_lines", &self.max_lines());
22367      ds.field("color", &self.color());
22368      ds.field("opacity", &self.opacity());
22369      ds.field("heading_level", &self.heading_level());
22370      ds.field("semantic_node_id", &self.semantic_node_id());
22371      ds.finish()
22372  }
22373}
22374pub enum MediaNodeOffset {}
22375#[derive(Copy, Clone, PartialEq)]
22376
22377pub struct MediaNode<'a> {
22378  pub _tab: flatbuffers::Table<'a>,
22379}
22380
22381impl<'a> flatbuffers::Follow<'a> for MediaNode<'a> {
22382  type Inner = MediaNode<'a>;
22383  #[inline]
22384  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
22385    Self { _tab: flatbuffers::Table::new(buf, loc) }
22386  }
22387}
22388
22389impl<'a> MediaNode<'a> {
22390  pub const VT_NODE_ID: flatbuffers::VOffsetT = 4;
22391  pub const VT_MEDIA_TYPE: flatbuffers::VOffsetT = 6;
22392  pub const VT_SRC: flatbuffers::VOffsetT = 8;
22393  pub const VT_ALT: flatbuffers::VOffsetT = 10;
22394  pub const VT_WIDTH: flatbuffers::VOffsetT = 12;
22395  pub const VT_HEIGHT: flatbuffers::VOffsetT = 14;
22396  pub const VT_ASPECT_RATIO: flatbuffers::VOffsetT = 16;
22397  pub const VT_OBJECT_FIT: flatbuffers::VOffsetT = 18;
22398  pub const VT_LOADING: flatbuffers::VOffsetT = 20;
22399  pub const VT_CORNER_RADIUS: flatbuffers::VOffsetT = 22;
22400  pub const VT_OPACITY: flatbuffers::VOffsetT = 24;
22401  pub const VT_SRCSET_WIDTHS: flatbuffers::VOffsetT = 26;
22402  pub const VT_SIZES: flatbuffers::VOffsetT = 28;
22403  pub const VT_DECORATIVE: flatbuffers::VOffsetT = 30;
22404  pub const VT_ABOVE_FOLD: flatbuffers::VOffsetT = 32;
22405  pub const VT_SEMANTIC_NODE_ID: flatbuffers::VOffsetT = 34;
22406
22407  #[inline]
22408  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
22409    MediaNode { _tab: table }
22410  }
22411  #[allow(unused_mut)]
22412  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
22413    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
22414    args: &'args MediaNodeArgs<'args>
22415  ) -> flatbuffers::WIPOffset<MediaNode<'bldr>> {
22416    let mut builder = MediaNodeBuilder::new(_fbb);
22417    if let Some(x) = args.semantic_node_id { builder.add_semantic_node_id(x); }
22418    if let Some(x) = args.sizes { builder.add_sizes(x); }
22419    if let Some(x) = args.srcset_widths { builder.add_srcset_widths(x); }
22420    builder.add_opacity(args.opacity);
22421    if let Some(x) = args.corner_radius { builder.add_corner_radius(x); }
22422    builder.add_aspect_ratio(args.aspect_ratio);
22423    if let Some(x) = args.height { builder.add_height(x); }
22424    if let Some(x) = args.width { builder.add_width(x); }
22425    if let Some(x) = args.alt { builder.add_alt(x); }
22426    if let Some(x) = args.src { builder.add_src(x); }
22427    if let Some(x) = args.node_id { builder.add_node_id(x); }
22428    builder.add_above_fold(args.above_fold);
22429    builder.add_decorative(args.decorative);
22430    builder.add_loading(args.loading);
22431    builder.add_object_fit(args.object_fit);
22432    builder.add_media_type(args.media_type);
22433    builder.finish()
22434  }
22435
22436
22437  #[inline]
22438  pub fn node_id(&self) -> &'a str {
22439    // Safety:
22440    // Created from valid Table for this object
22441    // which contains a valid value in this slot
22442    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(MediaNode::VT_NODE_ID, None).unwrap()}
22443  }
22444  #[inline]
22445  pub fn media_type(&self) -> MediaType {
22446    // Safety:
22447    // Created from valid Table for this object
22448    // which contains a valid value in this slot
22449    unsafe { self._tab.get::<MediaType>(MediaNode::VT_MEDIA_TYPE, Some(MediaType::Image)).unwrap()}
22450  }
22451  #[inline]
22452  pub fn src(&self) -> &'a str {
22453    // Safety:
22454    // Created from valid Table for this object
22455    // which contains a valid value in this slot
22456    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(MediaNode::VT_SRC, None).unwrap()}
22457  }
22458  #[inline]
22459  pub fn alt(&self) -> Option<&'a str> {
22460    // Safety:
22461    // Created from valid Table for this object
22462    // which contains a valid value in this slot
22463    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(MediaNode::VT_ALT, None)}
22464  }
22465  #[inline]
22466  pub fn width(&self) -> Option<Length<'a>> {
22467    // Safety:
22468    // Created from valid Table for this object
22469    // which contains a valid value in this slot
22470    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(MediaNode::VT_WIDTH, None)}
22471  }
22472  #[inline]
22473  pub fn height(&self) -> Option<Length<'a>> {
22474    // Safety:
22475    // Created from valid Table for this object
22476    // which contains a valid value in this slot
22477    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Length>>(MediaNode::VT_HEIGHT, None)}
22478  }
22479  #[inline]
22480  pub fn aspect_ratio(&self) -> f32 {
22481    // Safety:
22482    // Created from valid Table for this object
22483    // which contains a valid value in this slot
22484    unsafe { self._tab.get::<f32>(MediaNode::VT_ASPECT_RATIO, Some(0.0)).unwrap()}
22485  }
22486  #[inline]
22487  pub fn object_fit(&self) -> ObjectFit {
22488    // Safety:
22489    // Created from valid Table for this object
22490    // which contains a valid value in this slot
22491    unsafe { self._tab.get::<ObjectFit>(MediaNode::VT_OBJECT_FIT, Some(ObjectFit::Cover)).unwrap()}
22492  }
22493  #[inline]
22494  pub fn loading(&self) -> LoadingStrategy {
22495    // Safety:
22496    // Created from valid Table for this object
22497    // which contains a valid value in this slot
22498    unsafe { self._tab.get::<LoadingStrategy>(MediaNode::VT_LOADING, Some(LoadingStrategy::Lazy)).unwrap()}
22499  }
22500  #[inline]
22501  pub fn corner_radius(&self) -> Option<CornerRadii<'a>> {
22502    // Safety:
22503    // Created from valid Table for this object
22504    // which contains a valid value in this slot
22505    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<CornerRadii>>(MediaNode::VT_CORNER_RADIUS, None)}
22506  }
22507  #[inline]
22508  pub fn opacity(&self) -> f32 {
22509    // Safety:
22510    // Created from valid Table for this object
22511    // which contains a valid value in this slot
22512    unsafe { self._tab.get::<f32>(MediaNode::VT_OPACITY, Some(1.0)).unwrap()}
22513  }
22514  #[inline]
22515  pub fn srcset_widths(&self) -> Option<flatbuffers::Vector<'a, i32>> {
22516    // Safety:
22517    // Created from valid Table for this object
22518    // which contains a valid value in this slot
22519    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, i32>>>(MediaNode::VT_SRCSET_WIDTHS, None)}
22520  }
22521  #[inline]
22522  pub fn sizes(&self) -> Option<&'a str> {
22523    // Safety:
22524    // Created from valid Table for this object
22525    // which contains a valid value in this slot
22526    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(MediaNode::VT_SIZES, None)}
22527  }
22528  #[inline]
22529  pub fn decorative(&self) -> bool {
22530    // Safety:
22531    // Created from valid Table for this object
22532    // which contains a valid value in this slot
22533    unsafe { self._tab.get::<bool>(MediaNode::VT_DECORATIVE, Some(false)).unwrap()}
22534  }
22535  #[inline]
22536  pub fn above_fold(&self) -> bool {
22537    // Safety:
22538    // Created from valid Table for this object
22539    // which contains a valid value in this slot
22540    unsafe { self._tab.get::<bool>(MediaNode::VT_ABOVE_FOLD, Some(false)).unwrap()}
22541  }
22542  #[inline]
22543  pub fn semantic_node_id(&self) -> Option<&'a str> {
22544    // Safety:
22545    // Created from valid Table for this object
22546    // which contains a valid value in this slot
22547    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(MediaNode::VT_SEMANTIC_NODE_ID, None)}
22548  }
22549}
22550
22551impl flatbuffers::Verifiable for MediaNode<'_> {
22552  #[inline]
22553  fn run_verifier(
22554    v: &mut flatbuffers::Verifier, pos: usize
22555  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
22556    use self::flatbuffers::Verifiable;
22557    v.visit_table(pos)?
22558     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("node_id", Self::VT_NODE_ID, true)?
22559     .visit_field::<MediaType>("media_type", Self::VT_MEDIA_TYPE, false)?
22560     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("src", Self::VT_SRC, true)?
22561     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("alt", Self::VT_ALT, false)?
22562     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("width", Self::VT_WIDTH, false)?
22563     .visit_field::<flatbuffers::ForwardsUOffset<Length>>("height", Self::VT_HEIGHT, false)?
22564     .visit_field::<f32>("aspect_ratio", Self::VT_ASPECT_RATIO, false)?
22565     .visit_field::<ObjectFit>("object_fit", Self::VT_OBJECT_FIT, false)?
22566     .visit_field::<LoadingStrategy>("loading", Self::VT_LOADING, false)?
22567     .visit_field::<flatbuffers::ForwardsUOffset<CornerRadii>>("corner_radius", Self::VT_CORNER_RADIUS, false)?
22568     .visit_field::<f32>("opacity", Self::VT_OPACITY, false)?
22569     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, i32>>>("srcset_widths", Self::VT_SRCSET_WIDTHS, false)?
22570     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("sizes", Self::VT_SIZES, false)?
22571     .visit_field::<bool>("decorative", Self::VT_DECORATIVE, false)?
22572     .visit_field::<bool>("above_fold", Self::VT_ABOVE_FOLD, false)?
22573     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("semantic_node_id", Self::VT_SEMANTIC_NODE_ID, false)?
22574     .finish();
22575    Ok(())
22576  }
22577}
22578pub struct MediaNodeArgs<'a> {
22579    pub node_id: Option<flatbuffers::WIPOffset<&'a str>>,
22580    pub media_type: MediaType,
22581    pub src: Option<flatbuffers::WIPOffset<&'a str>>,
22582    pub alt: Option<flatbuffers::WIPOffset<&'a str>>,
22583    pub width: Option<flatbuffers::WIPOffset<Length<'a>>>,
22584    pub height: Option<flatbuffers::WIPOffset<Length<'a>>>,
22585    pub aspect_ratio: f32,
22586    pub object_fit: ObjectFit,
22587    pub loading: LoadingStrategy,
22588    pub corner_radius: Option<flatbuffers::WIPOffset<CornerRadii<'a>>>,
22589    pub opacity: f32,
22590    pub srcset_widths: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, i32>>>,
22591    pub sizes: Option<flatbuffers::WIPOffset<&'a str>>,
22592    pub decorative: bool,
22593    pub above_fold: bool,
22594    pub semantic_node_id: Option<flatbuffers::WIPOffset<&'a str>>,
22595}
22596impl<'a> Default for MediaNodeArgs<'a> {
22597  #[inline]
22598  fn default() -> Self {
22599    MediaNodeArgs {
22600      node_id: None, // required field
22601      media_type: MediaType::Image,
22602      src: None, // required field
22603      alt: None,
22604      width: None,
22605      height: None,
22606      aspect_ratio: 0.0,
22607      object_fit: ObjectFit::Cover,
22608      loading: LoadingStrategy::Lazy,
22609      corner_radius: None,
22610      opacity: 1.0,
22611      srcset_widths: None,
22612      sizes: None,
22613      decorative: false,
22614      above_fold: false,
22615      semantic_node_id: None,
22616    }
22617  }
22618}
22619
22620pub struct MediaNodeBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
22621  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
22622  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
22623}
22624impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> MediaNodeBuilder<'a, 'b, A> {
22625  #[inline]
22626  pub fn add_node_id(&mut self, node_id: flatbuffers::WIPOffset<&'b  str>) {
22627    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(MediaNode::VT_NODE_ID, node_id);
22628  }
22629  #[inline]
22630  pub fn add_media_type(&mut self, media_type: MediaType) {
22631    self.fbb_.push_slot::<MediaType>(MediaNode::VT_MEDIA_TYPE, media_type, MediaType::Image);
22632  }
22633  #[inline]
22634  pub fn add_src(&mut self, src: flatbuffers::WIPOffset<&'b  str>) {
22635    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(MediaNode::VT_SRC, src);
22636  }
22637  #[inline]
22638  pub fn add_alt(&mut self, alt: flatbuffers::WIPOffset<&'b  str>) {
22639    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(MediaNode::VT_ALT, alt);
22640  }
22641  #[inline]
22642  pub fn add_width(&mut self, width: flatbuffers::WIPOffset<Length<'b >>) {
22643    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(MediaNode::VT_WIDTH, width);
22644  }
22645  #[inline]
22646  pub fn add_height(&mut self, height: flatbuffers::WIPOffset<Length<'b >>) {
22647    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Length>>(MediaNode::VT_HEIGHT, height);
22648  }
22649  #[inline]
22650  pub fn add_aspect_ratio(&mut self, aspect_ratio: f32) {
22651    self.fbb_.push_slot::<f32>(MediaNode::VT_ASPECT_RATIO, aspect_ratio, 0.0);
22652  }
22653  #[inline]
22654  pub fn add_object_fit(&mut self, object_fit: ObjectFit) {
22655    self.fbb_.push_slot::<ObjectFit>(MediaNode::VT_OBJECT_FIT, object_fit, ObjectFit::Cover);
22656  }
22657  #[inline]
22658  pub fn add_loading(&mut self, loading: LoadingStrategy) {
22659    self.fbb_.push_slot::<LoadingStrategy>(MediaNode::VT_LOADING, loading, LoadingStrategy::Lazy);
22660  }
22661  #[inline]
22662  pub fn add_corner_radius(&mut self, corner_radius: flatbuffers::WIPOffset<CornerRadii<'b >>) {
22663    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<CornerRadii>>(MediaNode::VT_CORNER_RADIUS, corner_radius);
22664  }
22665  #[inline]
22666  pub fn add_opacity(&mut self, opacity: f32) {
22667    self.fbb_.push_slot::<f32>(MediaNode::VT_OPACITY, opacity, 1.0);
22668  }
22669  #[inline]
22670  pub fn add_srcset_widths(&mut self, srcset_widths: flatbuffers::WIPOffset<flatbuffers::Vector<'b , i32>>) {
22671    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(MediaNode::VT_SRCSET_WIDTHS, srcset_widths);
22672  }
22673  #[inline]
22674  pub fn add_sizes(&mut self, sizes: flatbuffers::WIPOffset<&'b  str>) {
22675    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(MediaNode::VT_SIZES, sizes);
22676  }
22677  #[inline]
22678  pub fn add_decorative(&mut self, decorative: bool) {
22679    self.fbb_.push_slot::<bool>(MediaNode::VT_DECORATIVE, decorative, false);
22680  }
22681  #[inline]
22682  pub fn add_above_fold(&mut self, above_fold: bool) {
22683    self.fbb_.push_slot::<bool>(MediaNode::VT_ABOVE_FOLD, above_fold, false);
22684  }
22685  #[inline]
22686  pub fn add_semantic_node_id(&mut self, semantic_node_id: flatbuffers::WIPOffset<&'b  str>) {
22687    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(MediaNode::VT_SEMANTIC_NODE_ID, semantic_node_id);
22688  }
22689  #[inline]
22690  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> MediaNodeBuilder<'a, 'b, A> {
22691    let start = _fbb.start_table();
22692    MediaNodeBuilder {
22693      fbb_: _fbb,
22694      start_: start,
22695    }
22696  }
22697  #[inline]
22698  pub fn finish(self) -> flatbuffers::WIPOffset<MediaNode<'a>> {
22699    let o = self.fbb_.end_table(self.start_);
22700    self.fbb_.required(o, MediaNode::VT_NODE_ID,"node_id");
22701    self.fbb_.required(o, MediaNode::VT_SRC,"src");
22702    flatbuffers::WIPOffset::new(o.value())
22703  }
22704}
22705
22706impl core::fmt::Debug for MediaNode<'_> {
22707  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
22708    let mut ds = f.debug_struct("MediaNode");
22709      ds.field("node_id", &self.node_id());
22710      ds.field("media_type", &self.media_type());
22711      ds.field("src", &self.src());
22712      ds.field("alt", &self.alt());
22713      ds.field("width", &self.width());
22714      ds.field("height", &self.height());
22715      ds.field("aspect_ratio", &self.aspect_ratio());
22716      ds.field("object_fit", &self.object_fit());
22717      ds.field("loading", &self.loading());
22718      ds.field("corner_radius", &self.corner_radius());
22719      ds.field("opacity", &self.opacity());
22720      ds.field("srcset_widths", &self.srcset_widths());
22721      ds.field("sizes", &self.sizes());
22722      ds.field("decorative", &self.decorative());
22723      ds.field("above_fold", &self.above_fold());
22724      ds.field("semantic_node_id", &self.semantic_node_id());
22725      ds.finish()
22726  }
22727}
22728pub enum ChildNodeOffset {}
22729#[derive(Copy, Clone, PartialEq)]
22730
22731pub struct ChildNode<'a> {
22732  pub _tab: flatbuffers::Table<'a>,
22733}
22734
22735impl<'a> flatbuffers::Follow<'a> for ChildNode<'a> {
22736  type Inner = ChildNode<'a>;
22737  #[inline]
22738  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
22739    Self { _tab: flatbuffers::Table::new(buf, loc) }
22740  }
22741}
22742
22743impl<'a> ChildNode<'a> {
22744  pub const VT_VALUE_TYPE: flatbuffers::VOffsetT = 4;
22745  pub const VT_VALUE: flatbuffers::VOffsetT = 6;
22746
22747  #[inline]
22748  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
22749    ChildNode { _tab: table }
22750  }
22751  #[allow(unused_mut)]
22752  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
22753    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
22754    args: &'args ChildNodeArgs
22755  ) -> flatbuffers::WIPOffset<ChildNode<'bldr>> {
22756    let mut builder = ChildNodeBuilder::new(_fbb);
22757    if let Some(x) = args.value { builder.add_value(x); }
22758    builder.add_value_type(args.value_type);
22759    builder.finish()
22760  }
22761
22762
22763  #[inline]
22764  pub fn value_type(&self) -> ChildUnion {
22765    // Safety:
22766    // Created from valid Table for this object
22767    // which contains a valid value in this slot
22768    unsafe { self._tab.get::<ChildUnion>(ChildNode::VT_VALUE_TYPE, Some(ChildUnion::NONE)).unwrap()}
22769  }
22770  #[inline]
22771  pub fn value(&self) -> Option<flatbuffers::Table<'a>> {
22772    // Safety:
22773    // Created from valid Table for this object
22774    // which contains a valid value in this slot
22775    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Table<'a>>>(ChildNode::VT_VALUE, None)}
22776  }
22777  #[inline]
22778  #[allow(non_snake_case)]
22779  pub fn value_as_container(&self) -> Option<Container<'a>> {
22780    if self.value_type() == ChildUnion::Container {
22781      self.value().map(|t| {
22782       // Safety:
22783       // Created from a valid Table for this object
22784       // Which contains a valid union in this slot
22785       unsafe { Container::init_from_table(t) }
22786     })
22787    } else {
22788      None
22789    }
22790  }
22791
22792  #[inline]
22793  #[allow(non_snake_case)]
22794  pub fn value_as_surface(&self) -> Option<Surface<'a>> {
22795    if self.value_type() == ChildUnion::Surface {
22796      self.value().map(|t| {
22797       // Safety:
22798       // Created from a valid Table for this object
22799       // Which contains a valid union in this slot
22800       unsafe { Surface::init_from_table(t) }
22801     })
22802    } else {
22803      None
22804    }
22805  }
22806
22807  #[inline]
22808  #[allow(non_snake_case)]
22809  pub fn value_as_text_node(&self) -> Option<TextNode<'a>> {
22810    if self.value_type() == ChildUnion::TextNode {
22811      self.value().map(|t| {
22812       // Safety:
22813       // Created from a valid Table for this object
22814       // Which contains a valid union in this slot
22815       unsafe { TextNode::init_from_table(t) }
22816     })
22817    } else {
22818      None
22819    }
22820  }
22821
22822  #[inline]
22823  #[allow(non_snake_case)]
22824  pub fn value_as_media_node(&self) -> Option<MediaNode<'a>> {
22825    if self.value_type() == ChildUnion::MediaNode {
22826      self.value().map(|t| {
22827       // Safety:
22828       // Created from a valid Table for this object
22829       // Which contains a valid union in this slot
22830       unsafe { MediaNode::init_from_table(t) }
22831     })
22832    } else {
22833      None
22834    }
22835  }
22836
22837  #[inline]
22838  #[allow(non_snake_case)]
22839  pub fn value_as_state_machine(&self) -> Option<StateMachine<'a>> {
22840    if self.value_type() == ChildUnion::StateMachine {
22841      self.value().map(|t| {
22842       // Safety:
22843       // Created from a valid Table for this object
22844       // Which contains a valid union in this slot
22845       unsafe { StateMachine::init_from_table(t) }
22846     })
22847    } else {
22848      None
22849    }
22850  }
22851
22852  #[inline]
22853  #[allow(non_snake_case)]
22854  pub fn value_as_data_node(&self) -> Option<DataNode<'a>> {
22855    if self.value_type() == ChildUnion::DataNode {
22856      self.value().map(|t| {
22857       // Safety:
22858       // Created from a valid Table for this object
22859       // Which contains a valid union in this slot
22860       unsafe { DataNode::init_from_table(t) }
22861     })
22862    } else {
22863      None
22864    }
22865  }
22866
22867  #[inline]
22868  #[allow(non_snake_case)]
22869  pub fn value_as_compute_node(&self) -> Option<ComputeNode<'a>> {
22870    if self.value_type() == ChildUnion::ComputeNode {
22871      self.value().map(|t| {
22872       // Safety:
22873       // Created from a valid Table for this object
22874       // Which contains a valid union in this slot
22875       unsafe { ComputeNode::init_from_table(t) }
22876     })
22877    } else {
22878      None
22879    }
22880  }
22881
22882  #[inline]
22883  #[allow(non_snake_case)]
22884  pub fn value_as_effect_node(&self) -> Option<EffectNode<'a>> {
22885    if self.value_type() == ChildUnion::EffectNode {
22886      self.value().map(|t| {
22887       // Safety:
22888       // Created from a valid Table for this object
22889       // Which contains a valid union in this slot
22890       unsafe { EffectNode::init_from_table(t) }
22891     })
22892    } else {
22893      None
22894    }
22895  }
22896
22897  #[inline]
22898  #[allow(non_snake_case)]
22899  pub fn value_as_context_node(&self) -> Option<ContextNode<'a>> {
22900    if self.value_type() == ChildUnion::ContextNode {
22901      self.value().map(|t| {
22902       // Safety:
22903       // Created from a valid Table for this object
22904       // Which contains a valid union in this slot
22905       unsafe { ContextNode::init_from_table(t) }
22906     })
22907    } else {
22908      None
22909    }
22910  }
22911
22912  #[inline]
22913  #[allow(non_snake_case)]
22914  pub fn value_as_animation_transition(&self) -> Option<AnimationTransition<'a>> {
22915    if self.value_type() == ChildUnion::AnimationTransition {
22916      self.value().map(|t| {
22917       // Safety:
22918       // Created from a valid Table for this object
22919       // Which contains a valid union in this slot
22920       unsafe { AnimationTransition::init_from_table(t) }
22921     })
22922    } else {
22923      None
22924    }
22925  }
22926
22927  #[inline]
22928  #[allow(non_snake_case)]
22929  pub fn value_as_sequence(&self) -> Option<Sequence<'a>> {
22930    if self.value_type() == ChildUnion::Sequence {
22931      self.value().map(|t| {
22932       // Safety:
22933       // Created from a valid Table for this object
22934       // Which contains a valid union in this slot
22935       unsafe { Sequence::init_from_table(t) }
22936     })
22937    } else {
22938      None
22939    }
22940  }
22941
22942  #[inline]
22943  #[allow(non_snake_case)]
22944  pub fn value_as_gesture_handler(&self) -> Option<GestureHandler<'a>> {
22945    if self.value_type() == ChildUnion::GestureHandler {
22946      self.value().map(|t| {
22947       // Safety:
22948       // Created from a valid Table for this object
22949       // Which contains a valid union in this slot
22950       unsafe { GestureHandler::init_from_table(t) }
22951     })
22952    } else {
22953      None
22954    }
22955  }
22956
22957  #[inline]
22958  #[allow(non_snake_case)]
22959  pub fn value_as_scroll_binding(&self) -> Option<ScrollBinding<'a>> {
22960    if self.value_type() == ChildUnion::ScrollBinding {
22961      self.value().map(|t| {
22962       // Safety:
22963       // Created from a valid Table for this object
22964       // Which contains a valid union in this slot
22965       unsafe { ScrollBinding::init_from_table(t) }
22966     })
22967    } else {
22968      None
22969    }
22970  }
22971
22972  #[inline]
22973  #[allow(non_snake_case)]
22974  pub fn value_as_physics_body(&self) -> Option<PhysicsBody<'a>> {
22975    if self.value_type() == ChildUnion::PhysicsBody {
22976      self.value().map(|t| {
22977       // Safety:
22978       // Created from a valid Table for this object
22979       // Which contains a valid union in this slot
22980       unsafe { PhysicsBody::init_from_table(t) }
22981     })
22982    } else {
22983      None
22984    }
22985  }
22986
22987  #[inline]
22988  #[allow(non_snake_case)]
22989  pub fn value_as_route_map(&self) -> Option<RouteMap<'a>> {
22990    if self.value_type() == ChildUnion::RouteMap {
22991      self.value().map(|t| {
22992       // Safety:
22993       // Created from a valid Table for this object
22994       // Which contains a valid union in this slot
22995       unsafe { RouteMap::init_from_table(t) }
22996     })
22997    } else {
22998      None
22999    }
23000  }
23001
23002  #[inline]
23003  #[allow(non_snake_case)]
23004  pub fn value_as_semantic_node(&self) -> Option<SemanticNode<'a>> {
23005    if self.value_type() == ChildUnion::SemanticNode {
23006      self.value().map(|t| {
23007       // Safety:
23008       // Created from a valid Table for this object
23009       // Which contains a valid union in this slot
23010       unsafe { SemanticNode::init_from_table(t) }
23011     })
23012    } else {
23013      None
23014    }
23015  }
23016
23017  #[inline]
23018  #[allow(non_snake_case)]
23019  pub fn value_as_live_region(&self) -> Option<LiveRegion<'a>> {
23020    if self.value_type() == ChildUnion::LiveRegion {
23021      self.value().map(|t| {
23022       // Safety:
23023       // Created from a valid Table for this object
23024       // Which contains a valid union in this slot
23025       unsafe { LiveRegion::init_from_table(t) }
23026     })
23027    } else {
23028      None
23029    }
23030  }
23031
23032  #[inline]
23033  #[allow(non_snake_case)]
23034  pub fn value_as_focus_trap(&self) -> Option<FocusTrap<'a>> {
23035    if self.value_type() == ChildUnion::FocusTrap {
23036      self.value().map(|t| {
23037       // Safety:
23038       // Created from a valid Table for this object
23039       // Which contains a valid union in this slot
23040       unsafe { FocusTrap::init_from_table(t) }
23041     })
23042    } else {
23043      None
23044    }
23045  }
23046
23047  #[inline]
23048  #[allow(non_snake_case)]
23049  pub fn value_as_theme_node(&self) -> Option<ThemeNode<'a>> {
23050    if self.value_type() == ChildUnion::ThemeNode {
23051      self.value().map(|t| {
23052       // Safety:
23053       // Created from a valid Table for this object
23054       // Which contains a valid union in this slot
23055       unsafe { ThemeNode::init_from_table(t) }
23056     })
23057    } else {
23058      None
23059    }
23060  }
23061
23062  #[inline]
23063  #[allow(non_snake_case)]
23064  pub fn value_as_personalization_slot(&self) -> Option<PersonalizationSlot<'a>> {
23065    if self.value_type() == ChildUnion::PersonalizationSlot {
23066      self.value().map(|t| {
23067       // Safety:
23068       // Created from a valid Table for this object
23069       // Which contains a valid union in this slot
23070       unsafe { PersonalizationSlot::init_from_table(t) }
23071     })
23072    } else {
23073      None
23074    }
23075  }
23076
23077  #[inline]
23078  #[allow(non_snake_case)]
23079  pub fn value_as_responsive_rule(&self) -> Option<ResponsiveRule<'a>> {
23080    if self.value_type() == ChildUnion::ResponsiveRule {
23081      self.value().map(|t| {
23082       // Safety:
23083       // Created from a valid Table for this object
23084       // Which contains a valid union in this slot
23085       unsafe { ResponsiveRule::init_from_table(t) }
23086     })
23087    } else {
23088      None
23089    }
23090  }
23091
23092  #[inline]
23093  #[allow(non_snake_case)]
23094  pub fn value_as_action_node(&self) -> Option<ActionNode<'a>> {
23095    if self.value_type() == ChildUnion::ActionNode {
23096      self.value().map(|t| {
23097       // Safety:
23098       // Created from a valid Table for this object
23099       // Which contains a valid union in this slot
23100       unsafe { ActionNode::init_from_table(t) }
23101     })
23102    } else {
23103      None
23104    }
23105  }
23106
23107  #[inline]
23108  #[allow(non_snake_case)]
23109  pub fn value_as_subscription_node(&self) -> Option<SubscriptionNode<'a>> {
23110    if self.value_type() == ChildUnion::SubscriptionNode {
23111      self.value().map(|t| {
23112       // Safety:
23113       // Created from a valid Table for this object
23114       // Which contains a valid union in this slot
23115       unsafe { SubscriptionNode::init_from_table(t) }
23116     })
23117    } else {
23118      None
23119    }
23120  }
23121
23122  #[inline]
23123  #[allow(non_snake_case)]
23124  pub fn value_as_auth_context_node(&self) -> Option<AuthContextNode<'a>> {
23125    if self.value_type() == ChildUnion::AuthContextNode {
23126      self.value().map(|t| {
23127       // Safety:
23128       // Created from a valid Table for this object
23129       // Which contains a valid union in this slot
23130       unsafe { AuthContextNode::init_from_table(t) }
23131     })
23132    } else {
23133      None
23134    }
23135  }
23136
23137  #[inline]
23138  #[allow(non_snake_case)]
23139  pub fn value_as_content_slot(&self) -> Option<ContentSlot<'a>> {
23140    if self.value_type() == ChildUnion::ContentSlot {
23141      self.value().map(|t| {
23142       // Safety:
23143       // Created from a valid Table for this object
23144       // Which contains a valid union in this slot
23145       unsafe { ContentSlot::init_from_table(t) }
23146     })
23147    } else {
23148      None
23149    }
23150  }
23151
23152  #[inline]
23153  #[allow(non_snake_case)]
23154  pub fn value_as_rich_text_node(&self) -> Option<RichTextNode<'a>> {
23155    if self.value_type() == ChildUnion::RichTextNode {
23156      self.value().map(|t| {
23157       // Safety:
23158       // Created from a valid Table for this object
23159       // Which contains a valid union in this slot
23160       unsafe { RichTextNode::init_from_table(t) }
23161     })
23162    } else {
23163      None
23164    }
23165  }
23166
23167  #[inline]
23168  #[allow(non_snake_case)]
23169  pub fn value_as_form_node(&self) -> Option<FormNode<'a>> {
23170    if self.value_type() == ChildUnion::FormNode {
23171      self.value().map(|t| {
23172       // Safety:
23173       // Created from a valid Table for this object
23174       // Which contains a valid union in this slot
23175       unsafe { FormNode::init_from_table(t) }
23176     })
23177    } else {
23178      None
23179    }
23180  }
23181
23182}
23183
23184impl flatbuffers::Verifiable for ChildNode<'_> {
23185  #[inline]
23186  fn run_verifier(
23187    v: &mut flatbuffers::Verifier, pos: usize
23188  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
23189    use self::flatbuffers::Verifiable;
23190    v.visit_table(pos)?
23191     .visit_union::<ChildUnion, _>("value_type", Self::VT_VALUE_TYPE, "value", Self::VT_VALUE, false, |key, v, pos| {
23192        match key {
23193          ChildUnion::Container => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Container>>("ChildUnion::Container", pos),
23194          ChildUnion::Surface => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Surface>>("ChildUnion::Surface", pos),
23195          ChildUnion::TextNode => v.verify_union_variant::<flatbuffers::ForwardsUOffset<TextNode>>("ChildUnion::TextNode", pos),
23196          ChildUnion::MediaNode => v.verify_union_variant::<flatbuffers::ForwardsUOffset<MediaNode>>("ChildUnion::MediaNode", pos),
23197          ChildUnion::StateMachine => v.verify_union_variant::<flatbuffers::ForwardsUOffset<StateMachine>>("ChildUnion::StateMachine", pos),
23198          ChildUnion::DataNode => v.verify_union_variant::<flatbuffers::ForwardsUOffset<DataNode>>("ChildUnion::DataNode", pos),
23199          ChildUnion::ComputeNode => v.verify_union_variant::<flatbuffers::ForwardsUOffset<ComputeNode>>("ChildUnion::ComputeNode", pos),
23200          ChildUnion::EffectNode => v.verify_union_variant::<flatbuffers::ForwardsUOffset<EffectNode>>("ChildUnion::EffectNode", pos),
23201          ChildUnion::ContextNode => v.verify_union_variant::<flatbuffers::ForwardsUOffset<ContextNode>>("ChildUnion::ContextNode", pos),
23202          ChildUnion::AnimationTransition => v.verify_union_variant::<flatbuffers::ForwardsUOffset<AnimationTransition>>("ChildUnion::AnimationTransition", pos),
23203          ChildUnion::Sequence => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Sequence>>("ChildUnion::Sequence", pos),
23204          ChildUnion::GestureHandler => v.verify_union_variant::<flatbuffers::ForwardsUOffset<GestureHandler>>("ChildUnion::GestureHandler", pos),
23205          ChildUnion::ScrollBinding => v.verify_union_variant::<flatbuffers::ForwardsUOffset<ScrollBinding>>("ChildUnion::ScrollBinding", pos),
23206          ChildUnion::PhysicsBody => v.verify_union_variant::<flatbuffers::ForwardsUOffset<PhysicsBody>>("ChildUnion::PhysicsBody", pos),
23207          ChildUnion::RouteMap => v.verify_union_variant::<flatbuffers::ForwardsUOffset<RouteMap>>("ChildUnion::RouteMap", pos),
23208          ChildUnion::SemanticNode => v.verify_union_variant::<flatbuffers::ForwardsUOffset<SemanticNode>>("ChildUnion::SemanticNode", pos),
23209          ChildUnion::LiveRegion => v.verify_union_variant::<flatbuffers::ForwardsUOffset<LiveRegion>>("ChildUnion::LiveRegion", pos),
23210          ChildUnion::FocusTrap => v.verify_union_variant::<flatbuffers::ForwardsUOffset<FocusTrap>>("ChildUnion::FocusTrap", pos),
23211          ChildUnion::ThemeNode => v.verify_union_variant::<flatbuffers::ForwardsUOffset<ThemeNode>>("ChildUnion::ThemeNode", pos),
23212          ChildUnion::PersonalizationSlot => v.verify_union_variant::<flatbuffers::ForwardsUOffset<PersonalizationSlot>>("ChildUnion::PersonalizationSlot", pos),
23213          ChildUnion::ResponsiveRule => v.verify_union_variant::<flatbuffers::ForwardsUOffset<ResponsiveRule>>("ChildUnion::ResponsiveRule", pos),
23214          ChildUnion::ActionNode => v.verify_union_variant::<flatbuffers::ForwardsUOffset<ActionNode>>("ChildUnion::ActionNode", pos),
23215          ChildUnion::SubscriptionNode => v.verify_union_variant::<flatbuffers::ForwardsUOffset<SubscriptionNode>>("ChildUnion::SubscriptionNode", pos),
23216          ChildUnion::AuthContextNode => v.verify_union_variant::<flatbuffers::ForwardsUOffset<AuthContextNode>>("ChildUnion::AuthContextNode", pos),
23217          ChildUnion::ContentSlot => v.verify_union_variant::<flatbuffers::ForwardsUOffset<ContentSlot>>("ChildUnion::ContentSlot", pos),
23218          ChildUnion::RichTextNode => v.verify_union_variant::<flatbuffers::ForwardsUOffset<RichTextNode>>("ChildUnion::RichTextNode", pos),
23219          ChildUnion::FormNode => v.verify_union_variant::<flatbuffers::ForwardsUOffset<FormNode>>("ChildUnion::FormNode", pos),
23220          _ => Ok(()),
23221        }
23222     })?
23223     .finish();
23224    Ok(())
23225  }
23226}
23227pub struct ChildNodeArgs {
23228    pub value_type: ChildUnion,
23229    pub value: Option<flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>>,
23230}
23231impl<'a> Default for ChildNodeArgs {
23232  #[inline]
23233  fn default() -> Self {
23234    ChildNodeArgs {
23235      value_type: ChildUnion::NONE,
23236      value: None,
23237    }
23238  }
23239}
23240
23241pub struct ChildNodeBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
23242  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
23243  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
23244}
23245impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ChildNodeBuilder<'a, 'b, A> {
23246  #[inline]
23247  pub fn add_value_type(&mut self, value_type: ChildUnion) {
23248    self.fbb_.push_slot::<ChildUnion>(ChildNode::VT_VALUE_TYPE, value_type, ChildUnion::NONE);
23249  }
23250  #[inline]
23251  pub fn add_value(&mut self, value: flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>) {
23252    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ChildNode::VT_VALUE, value);
23253  }
23254  #[inline]
23255  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ChildNodeBuilder<'a, 'b, A> {
23256    let start = _fbb.start_table();
23257    ChildNodeBuilder {
23258      fbb_: _fbb,
23259      start_: start,
23260    }
23261  }
23262  #[inline]
23263  pub fn finish(self) -> flatbuffers::WIPOffset<ChildNode<'a>> {
23264    let o = self.fbb_.end_table(self.start_);
23265    flatbuffers::WIPOffset::new(o.value())
23266  }
23267}
23268
23269impl core::fmt::Debug for ChildNode<'_> {
23270  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
23271    let mut ds = f.debug_struct("ChildNode");
23272      ds.field("value_type", &self.value_type());
23273      match self.value_type() {
23274        ChildUnion::Container => {
23275          if let Some(x) = self.value_as_container() {
23276            ds.field("value", &x)
23277          } else {
23278            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
23279          }
23280        },
23281        ChildUnion::Surface => {
23282          if let Some(x) = self.value_as_surface() {
23283            ds.field("value", &x)
23284          } else {
23285            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
23286          }
23287        },
23288        ChildUnion::TextNode => {
23289          if let Some(x) = self.value_as_text_node() {
23290            ds.field("value", &x)
23291          } else {
23292            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
23293          }
23294        },
23295        ChildUnion::MediaNode => {
23296          if let Some(x) = self.value_as_media_node() {
23297            ds.field("value", &x)
23298          } else {
23299            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
23300          }
23301        },
23302        ChildUnion::StateMachine => {
23303          if let Some(x) = self.value_as_state_machine() {
23304            ds.field("value", &x)
23305          } else {
23306            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
23307          }
23308        },
23309        ChildUnion::DataNode => {
23310          if let Some(x) = self.value_as_data_node() {
23311            ds.field("value", &x)
23312          } else {
23313            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
23314          }
23315        },
23316        ChildUnion::ComputeNode => {
23317          if let Some(x) = self.value_as_compute_node() {
23318            ds.field("value", &x)
23319          } else {
23320            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
23321          }
23322        },
23323        ChildUnion::EffectNode => {
23324          if let Some(x) = self.value_as_effect_node() {
23325            ds.field("value", &x)
23326          } else {
23327            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
23328          }
23329        },
23330        ChildUnion::ContextNode => {
23331          if let Some(x) = self.value_as_context_node() {
23332            ds.field("value", &x)
23333          } else {
23334            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
23335          }
23336        },
23337        ChildUnion::AnimationTransition => {
23338          if let Some(x) = self.value_as_animation_transition() {
23339            ds.field("value", &x)
23340          } else {
23341            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
23342          }
23343        },
23344        ChildUnion::Sequence => {
23345          if let Some(x) = self.value_as_sequence() {
23346            ds.field("value", &x)
23347          } else {
23348            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
23349          }
23350        },
23351        ChildUnion::GestureHandler => {
23352          if let Some(x) = self.value_as_gesture_handler() {
23353            ds.field("value", &x)
23354          } else {
23355            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
23356          }
23357        },
23358        ChildUnion::ScrollBinding => {
23359          if let Some(x) = self.value_as_scroll_binding() {
23360            ds.field("value", &x)
23361          } else {
23362            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
23363          }
23364        },
23365        ChildUnion::PhysicsBody => {
23366          if let Some(x) = self.value_as_physics_body() {
23367            ds.field("value", &x)
23368          } else {
23369            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
23370          }
23371        },
23372        ChildUnion::RouteMap => {
23373          if let Some(x) = self.value_as_route_map() {
23374            ds.field("value", &x)
23375          } else {
23376            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
23377          }
23378        },
23379        ChildUnion::SemanticNode => {
23380          if let Some(x) = self.value_as_semantic_node() {
23381            ds.field("value", &x)
23382          } else {
23383            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
23384          }
23385        },
23386        ChildUnion::LiveRegion => {
23387          if let Some(x) = self.value_as_live_region() {
23388            ds.field("value", &x)
23389          } else {
23390            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
23391          }
23392        },
23393        ChildUnion::FocusTrap => {
23394          if let Some(x) = self.value_as_focus_trap() {
23395            ds.field("value", &x)
23396          } else {
23397            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
23398          }
23399        },
23400        ChildUnion::ThemeNode => {
23401          if let Some(x) = self.value_as_theme_node() {
23402            ds.field("value", &x)
23403          } else {
23404            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
23405          }
23406        },
23407        ChildUnion::PersonalizationSlot => {
23408          if let Some(x) = self.value_as_personalization_slot() {
23409            ds.field("value", &x)
23410          } else {
23411            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
23412          }
23413        },
23414        ChildUnion::ResponsiveRule => {
23415          if let Some(x) = self.value_as_responsive_rule() {
23416            ds.field("value", &x)
23417          } else {
23418            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
23419          }
23420        },
23421        ChildUnion::ActionNode => {
23422          if let Some(x) = self.value_as_action_node() {
23423            ds.field("value", &x)
23424          } else {
23425            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
23426          }
23427        },
23428        ChildUnion::SubscriptionNode => {
23429          if let Some(x) = self.value_as_subscription_node() {
23430            ds.field("value", &x)
23431          } else {
23432            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
23433          }
23434        },
23435        ChildUnion::AuthContextNode => {
23436          if let Some(x) = self.value_as_auth_context_node() {
23437            ds.field("value", &x)
23438          } else {
23439            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
23440          }
23441        },
23442        ChildUnion::ContentSlot => {
23443          if let Some(x) = self.value_as_content_slot() {
23444            ds.field("value", &x)
23445          } else {
23446            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
23447          }
23448        },
23449        ChildUnion::RichTextNode => {
23450          if let Some(x) = self.value_as_rich_text_node() {
23451            ds.field("value", &x)
23452          } else {
23453            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
23454          }
23455        },
23456        ChildUnion::FormNode => {
23457          if let Some(x) = self.value_as_form_node() {
23458            ds.field("value", &x)
23459          } else {
23460            ds.field("value", &"InvalidFlatbuffer: Union discriminant does not match value.")
23461          }
23462        },
23463        _ => {
23464          let x: Option<()> = None;
23465          ds.field("value", &x)
23466        },
23467      };
23468      ds.finish()
23469  }
23470}
23471pub enum VoceDocumentOffset {}
23472#[derive(Copy, Clone, PartialEq)]
23473
23474pub struct VoceDocument<'a> {
23475  pub _tab: flatbuffers::Table<'a>,
23476}
23477
23478impl<'a> flatbuffers::Follow<'a> for VoceDocument<'a> {
23479  type Inner = VoceDocument<'a>;
23480  #[inline]
23481  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
23482    Self { _tab: flatbuffers::Table::new(buf, loc) }
23483  }
23484}
23485
23486impl<'a> VoceDocument<'a> {
23487  pub const VT_SCHEMA_VERSION_MAJOR: flatbuffers::VOffsetT = 4;
23488  pub const VT_SCHEMA_VERSION_MINOR: flatbuffers::VOffsetT = 6;
23489  pub const VT_ROOT: flatbuffers::VOffsetT = 8;
23490  pub const VT_ROUTES: flatbuffers::VOffsetT = 10;
23491  pub const VT_THEME: flatbuffers::VOffsetT = 12;
23492  pub const VT_ALTERNATE_THEMES: flatbuffers::VOffsetT = 14;
23493  pub const VT_AUTH: flatbuffers::VOffsetT = 16;
23494  pub const VT_I18N: flatbuffers::VOffsetT = 18;
23495
23496  #[inline]
23497  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
23498    VoceDocument { _tab: table }
23499  }
23500  #[allow(unused_mut)]
23501  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
23502    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
23503    args: &'args VoceDocumentArgs<'args>
23504  ) -> flatbuffers::WIPOffset<VoceDocument<'bldr>> {
23505    let mut builder = VoceDocumentBuilder::new(_fbb);
23506    if let Some(x) = args.i18n { builder.add_i18n(x); }
23507    if let Some(x) = args.auth { builder.add_auth(x); }
23508    if let Some(x) = args.alternate_themes { builder.add_alternate_themes(x); }
23509    if let Some(x) = args.theme { builder.add_theme(x); }
23510    if let Some(x) = args.routes { builder.add_routes(x); }
23511    if let Some(x) = args.root { builder.add_root(x); }
23512    builder.add_schema_version_minor(args.schema_version_minor);
23513    builder.add_schema_version_major(args.schema_version_major);
23514    builder.finish()
23515  }
23516
23517
23518  #[inline]
23519  pub fn schema_version_major(&self) -> i32 {
23520    // Safety:
23521    // Created from valid Table for this object
23522    // which contains a valid value in this slot
23523    unsafe { self._tab.get::<i32>(VoceDocument::VT_SCHEMA_VERSION_MAJOR, Some(0)).unwrap()}
23524  }
23525  #[inline]
23526  pub fn schema_version_minor(&self) -> i32 {
23527    // Safety:
23528    // Created from valid Table for this object
23529    // which contains a valid value in this slot
23530    unsafe { self._tab.get::<i32>(VoceDocument::VT_SCHEMA_VERSION_MINOR, Some(1)).unwrap()}
23531  }
23532  #[inline]
23533  pub fn root(&self) -> ViewRoot<'a> {
23534    // Safety:
23535    // Created from valid Table for this object
23536    // which contains a valid value in this slot
23537    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<ViewRoot>>(VoceDocument::VT_ROOT, None).unwrap()}
23538  }
23539  /// Application-level route map (for multi-route apps).
23540  #[inline]
23541  pub fn routes(&self) -> Option<RouteMap<'a>> {
23542    // Safety:
23543    // Created from valid Table for this object
23544    // which contains a valid value in this slot
23545    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<RouteMap>>(VoceDocument::VT_ROUTES, None)}
23546  }
23547  /// Theming.
23548  #[inline]
23549  pub fn theme(&self) -> Option<ThemeNode<'a>> {
23550    // Safety:
23551    // Created from valid Table for this object
23552    // which contains a valid value in this slot
23553    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<ThemeNode>>(VoceDocument::VT_THEME, None)}
23554  }
23555  #[inline]
23556  pub fn alternate_themes(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ThemeNode<'a>>>> {
23557    // Safety:
23558    // Created from valid Table for this object
23559    // which contains a valid value in this slot
23560    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ThemeNode>>>>(VoceDocument::VT_ALTERNATE_THEMES, None)}
23561  }
23562  /// Auth configuration.
23563  #[inline]
23564  pub fn auth(&self) -> Option<AuthContextNode<'a>> {
23565    // Safety:
23566    // Created from valid Table for this object
23567    // which contains a valid value in this slot
23568    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<AuthContextNode>>(VoceDocument::VT_AUTH, None)}
23569  }
23570  /// Internationalization configuration.
23571  #[inline]
23572  pub fn i18n(&self) -> Option<I18nConfig<'a>> {
23573    // Safety:
23574    // Created from valid Table for this object
23575    // which contains a valid value in this slot
23576    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<I18nConfig>>(VoceDocument::VT_I18N, None)}
23577  }
23578}
23579
23580impl flatbuffers::Verifiable for VoceDocument<'_> {
23581  #[inline]
23582  fn run_verifier(
23583    v: &mut flatbuffers::Verifier, pos: usize
23584  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
23585    use self::flatbuffers::Verifiable;
23586    v.visit_table(pos)?
23587     .visit_field::<i32>("schema_version_major", Self::VT_SCHEMA_VERSION_MAJOR, false)?
23588     .visit_field::<i32>("schema_version_minor", Self::VT_SCHEMA_VERSION_MINOR, false)?
23589     .visit_field::<flatbuffers::ForwardsUOffset<ViewRoot>>("root", Self::VT_ROOT, true)?
23590     .visit_field::<flatbuffers::ForwardsUOffset<RouteMap>>("routes", Self::VT_ROUTES, false)?
23591     .visit_field::<flatbuffers::ForwardsUOffset<ThemeNode>>("theme", Self::VT_THEME, false)?
23592     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<ThemeNode>>>>("alternate_themes", Self::VT_ALTERNATE_THEMES, false)?
23593     .visit_field::<flatbuffers::ForwardsUOffset<AuthContextNode>>("auth", Self::VT_AUTH, false)?
23594     .visit_field::<flatbuffers::ForwardsUOffset<I18nConfig>>("i18n", Self::VT_I18N, false)?
23595     .finish();
23596    Ok(())
23597  }
23598}
23599pub struct VoceDocumentArgs<'a> {
23600    pub schema_version_major: i32,
23601    pub schema_version_minor: i32,
23602    pub root: Option<flatbuffers::WIPOffset<ViewRoot<'a>>>,
23603    pub routes: Option<flatbuffers::WIPOffset<RouteMap<'a>>>,
23604    pub theme: Option<flatbuffers::WIPOffset<ThemeNode<'a>>>,
23605    pub alternate_themes: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ThemeNode<'a>>>>>,
23606    pub auth: Option<flatbuffers::WIPOffset<AuthContextNode<'a>>>,
23607    pub i18n: Option<flatbuffers::WIPOffset<I18nConfig<'a>>>,
23608}
23609impl<'a> Default for VoceDocumentArgs<'a> {
23610  #[inline]
23611  fn default() -> Self {
23612    VoceDocumentArgs {
23613      schema_version_major: 0,
23614      schema_version_minor: 1,
23615      root: None, // required field
23616      routes: None,
23617      theme: None,
23618      alternate_themes: None,
23619      auth: None,
23620      i18n: None,
23621    }
23622  }
23623}
23624
23625pub struct VoceDocumentBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
23626  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
23627  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
23628}
23629impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> VoceDocumentBuilder<'a, 'b, A> {
23630  #[inline]
23631  pub fn add_schema_version_major(&mut self, schema_version_major: i32) {
23632    self.fbb_.push_slot::<i32>(VoceDocument::VT_SCHEMA_VERSION_MAJOR, schema_version_major, 0);
23633  }
23634  #[inline]
23635  pub fn add_schema_version_minor(&mut self, schema_version_minor: i32) {
23636    self.fbb_.push_slot::<i32>(VoceDocument::VT_SCHEMA_VERSION_MINOR, schema_version_minor, 1);
23637  }
23638  #[inline]
23639  pub fn add_root(&mut self, root: flatbuffers::WIPOffset<ViewRoot<'b >>) {
23640    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<ViewRoot>>(VoceDocument::VT_ROOT, root);
23641  }
23642  #[inline]
23643  pub fn add_routes(&mut self, routes: flatbuffers::WIPOffset<RouteMap<'b >>) {
23644    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<RouteMap>>(VoceDocument::VT_ROUTES, routes);
23645  }
23646  #[inline]
23647  pub fn add_theme(&mut self, theme: flatbuffers::WIPOffset<ThemeNode<'b >>) {
23648    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<ThemeNode>>(VoceDocument::VT_THEME, theme);
23649  }
23650  #[inline]
23651  pub fn add_alternate_themes(&mut self, alternate_themes: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<ThemeNode<'b >>>>) {
23652    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(VoceDocument::VT_ALTERNATE_THEMES, alternate_themes);
23653  }
23654  #[inline]
23655  pub fn add_auth(&mut self, auth: flatbuffers::WIPOffset<AuthContextNode<'b >>) {
23656    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<AuthContextNode>>(VoceDocument::VT_AUTH, auth);
23657  }
23658  #[inline]
23659  pub fn add_i18n(&mut self, i18n: flatbuffers::WIPOffset<I18nConfig<'b >>) {
23660    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<I18nConfig>>(VoceDocument::VT_I18N, i18n);
23661  }
23662  #[inline]
23663  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> VoceDocumentBuilder<'a, 'b, A> {
23664    let start = _fbb.start_table();
23665    VoceDocumentBuilder {
23666      fbb_: _fbb,
23667      start_: start,
23668    }
23669  }
23670  #[inline]
23671  pub fn finish(self) -> flatbuffers::WIPOffset<VoceDocument<'a>> {
23672    let o = self.fbb_.end_table(self.start_);
23673    self.fbb_.required(o, VoceDocument::VT_ROOT,"root");
23674    flatbuffers::WIPOffset::new(o.value())
23675  }
23676}
23677
23678impl core::fmt::Debug for VoceDocument<'_> {
23679  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
23680    let mut ds = f.debug_struct("VoceDocument");
23681      ds.field("schema_version_major", &self.schema_version_major());
23682      ds.field("schema_version_minor", &self.schema_version_minor());
23683      ds.field("root", &self.root());
23684      ds.field("routes", &self.routes());
23685      ds.field("theme", &self.theme());
23686      ds.field("alternate_themes", &self.alternate_themes());
23687      ds.field("auth", &self.auth());
23688      ds.field("i18n", &self.i18n());
23689      ds.finish()
23690  }
23691}
23692#[inline]
23693/// Verifies that a buffer of bytes contains a `VoceDocument`
23694/// and returns it.
23695/// Note that verification is still experimental and may not
23696/// catch every error, or be maximally performant. For the
23697/// previous, unchecked, behavior use
23698/// `root_as_voce_document_unchecked`.
23699pub fn root_as_voce_document(buf: &[u8]) -> Result<VoceDocument, flatbuffers::InvalidFlatbuffer> {
23700  flatbuffers::root::<VoceDocument>(buf)
23701}
23702#[inline]
23703/// Verifies that a buffer of bytes contains a size prefixed
23704/// `VoceDocument` and returns it.
23705/// Note that verification is still experimental and may not
23706/// catch every error, or be maximally performant. For the
23707/// previous, unchecked, behavior use
23708/// `size_prefixed_root_as_voce_document_unchecked`.
23709pub fn size_prefixed_root_as_voce_document(buf: &[u8]) -> Result<VoceDocument, flatbuffers::InvalidFlatbuffer> {
23710  flatbuffers::size_prefixed_root::<VoceDocument>(buf)
23711}
23712#[inline]
23713/// Verifies, with the given options, that a buffer of bytes
23714/// contains a `VoceDocument` and returns it.
23715/// Note that verification is still experimental and may not
23716/// catch every error, or be maximally performant. For the
23717/// previous, unchecked, behavior use
23718/// `root_as_voce_document_unchecked`.
23719pub fn root_as_voce_document_with_opts<'b, 'o>(
23720  opts: &'o flatbuffers::VerifierOptions,
23721  buf: &'b [u8],
23722) -> Result<VoceDocument<'b>, flatbuffers::InvalidFlatbuffer> {
23723  flatbuffers::root_with_opts::<VoceDocument<'b>>(opts, buf)
23724}
23725#[inline]
23726/// Verifies, with the given verifier options, that a buffer of
23727/// bytes contains a size prefixed `VoceDocument` and returns
23728/// it. Note that verification is still experimental and may not
23729/// catch every error, or be maximally performant. For the
23730/// previous, unchecked, behavior use
23731/// `root_as_voce_document_unchecked`.
23732pub fn size_prefixed_root_as_voce_document_with_opts<'b, 'o>(
23733  opts: &'o flatbuffers::VerifierOptions,
23734  buf: &'b [u8],
23735) -> Result<VoceDocument<'b>, flatbuffers::InvalidFlatbuffer> {
23736  flatbuffers::size_prefixed_root_with_opts::<VoceDocument<'b>>(opts, buf)
23737}
23738#[inline]
23739/// Assumes, without verification, that a buffer of bytes contains a VoceDocument and returns it.
23740/// # Safety
23741/// Callers must trust the given bytes do indeed contain a valid `VoceDocument`.
23742pub unsafe fn root_as_voce_document_unchecked(buf: &[u8]) -> VoceDocument {
23743  flatbuffers::root_unchecked::<VoceDocument>(buf)
23744}
23745#[inline]
23746/// Assumes, without verification, that a buffer of bytes contains a size prefixed VoceDocument and returns it.
23747/// # Safety
23748/// Callers must trust the given bytes do indeed contain a valid size prefixed `VoceDocument`.
23749pub unsafe fn size_prefixed_root_as_voce_document_unchecked(buf: &[u8]) -> VoceDocument {
23750  flatbuffers::size_prefixed_root_unchecked::<VoceDocument>(buf)
23751}
23752pub const VOCE_DOCUMENT_IDENTIFIER: &str = "VOCE";
23753
23754#[inline]
23755pub fn voce_document_buffer_has_identifier(buf: &[u8]) -> bool {
23756  flatbuffers::buffer_has_identifier(buf, VOCE_DOCUMENT_IDENTIFIER, false)
23757}
23758
23759#[inline]
23760pub fn voce_document_size_prefixed_buffer_has_identifier(buf: &[u8]) -> bool {
23761  flatbuffers::buffer_has_identifier(buf, VOCE_DOCUMENT_IDENTIFIER, true)
23762}
23763
23764#[inline]
23765pub fn finish_voce_document_buffer<'a, 'b, A: flatbuffers::Allocator + 'a>(
23766    fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
23767    root: flatbuffers::WIPOffset<VoceDocument<'a>>) {
23768  fbb.finish(root, Some(VOCE_DOCUMENT_IDENTIFIER));
23769}
23770
23771#[inline]
23772pub fn finish_size_prefixed_voce_document_buffer<'a, 'b, A: flatbuffers::Allocator + 'a>(fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, root: flatbuffers::WIPOffset<VoceDocument<'a>>) {
23773  fbb.finish_size_prefixed(root, Some(VOCE_DOCUMENT_IDENTIFIER));
23774}
23775}  // pub mod voce
23776