track_rails/
message_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 protocol {
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_VALUE: u8 = 0;
23#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
24pub const ENUM_MAX_VALUE: u8 = 8;
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_VALUE: [Value; 9] = [
28  Value::NONE,
29  Value::Null,
30  Value::Text,
31  Value::Bool,
32  Value::Integer,
33  Value::Float,
34  Value::List,
35  Value::Document,
36  Value::Time,
37];
38
39#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
40#[repr(transparent)]
41pub struct Value(pub u8);
42#[allow(non_upper_case_globals)]
43impl Value {
44  pub const NONE: Self = Self(0);
45  pub const Null: Self = Self(1);
46  pub const Text: Self = Self(2);
47  pub const Bool: Self = Self(3);
48  pub const Integer: Self = Self(4);
49  pub const Float: Self = Self(5);
50  pub const List: Self = Self(6);
51  pub const Document: Self = Self(7);
52  pub const Time: Self = Self(8);
53
54  pub const ENUM_MIN: u8 = 0;
55  pub const ENUM_MAX: u8 = 8;
56  pub const ENUM_VALUES: &'static [Self] = &[
57    Self::NONE,
58    Self::Null,
59    Self::Text,
60    Self::Bool,
61    Self::Integer,
62    Self::Float,
63    Self::List,
64    Self::Document,
65    Self::Time,
66  ];
67  /// Returns the variant's name or "" if unknown.
68  pub fn variant_name(self) -> Option<&'static str> {
69    match self {
70      Self::NONE => Some("NONE"),
71      Self::Null => Some("Null"),
72      Self::Text => Some("Text"),
73      Self::Bool => Some("Bool"),
74      Self::Integer => Some("Integer"),
75      Self::Float => Some("Float"),
76      Self::List => Some("List"),
77      Self::Document => Some("Document"),
78      Self::Time => Some("Time"),
79      _ => None,
80    }
81  }
82}
83impl core::fmt::Debug for Value {
84  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
85    if let Some(name) = self.variant_name() {
86      f.write_str(name)
87    } else {
88      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
89    }
90  }
91}
92impl<'a> flatbuffers::Follow<'a> for Value {
93  type Inner = Self;
94  #[inline]
95  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
96    let b = flatbuffers::read_scalar_at::<u8>(buf, loc);
97    Self(b)
98  }
99}
100
101impl flatbuffers::Push for Value {
102    type Output = Value;
103    #[inline]
104    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
105        flatbuffers::emplace_scalar::<u8>(dst, self.0);
106    }
107}
108
109impl flatbuffers::EndianScalar for Value {
110  type Scalar = u8;
111  #[inline]
112  fn to_little_endian(self) -> u8 {
113    self.0.to_le()
114  }
115  #[inline]
116  #[allow(clippy::wrong_self_convention)]
117  fn from_little_endian(v: u8) -> Self {
118    let b = u8::from_le(v);
119    Self(b)
120  }
121}
122
123impl<'a> flatbuffers::Verifiable for Value {
124  #[inline]
125  fn run_verifier(
126    v: &mut flatbuffers::Verifier, pos: usize
127  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
128    use self::flatbuffers::Verifiable;
129    u8::run_verifier(v, pos)
130  }
131}
132
133impl flatbuffers::SimpleToVerifyInSlice for Value {}
134pub struct ValueUnionTableOffset {}
135
136#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
137pub const ENUM_MIN_TRANSFORM_TYPE: u8 = 0;
138#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
139pub const ENUM_MAX_TRANSFORM_TYPE: u8 = 1;
140#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
141#[allow(non_camel_case_types)]
142pub const ENUM_VALUES_TRANSFORM_TYPE: [TransformType; 2] = [
143  TransformType::NONE,
144  TransformType::LanguageTransform,
145];
146
147#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
148#[repr(transparent)]
149pub struct TransformType(pub u8);
150#[allow(non_upper_case_globals)]
151impl TransformType {
152  pub const NONE: Self = Self(0);
153  pub const LanguageTransform: Self = Self(1);
154
155  pub const ENUM_MIN: u8 = 0;
156  pub const ENUM_MAX: u8 = 1;
157  pub const ENUM_VALUES: &'static [Self] = &[
158    Self::NONE,
159    Self::LanguageTransform,
160  ];
161  /// Returns the variant's name or "" if unknown.
162  pub fn variant_name(self) -> Option<&'static str> {
163    match self {
164      Self::NONE => Some("NONE"),
165      Self::LanguageTransform => Some("LanguageTransform"),
166      _ => None,
167    }
168  }
169}
170impl core::fmt::Debug for TransformType {
171  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
172    if let Some(name) = self.variant_name() {
173      f.write_str(name)
174    } else {
175      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
176    }
177  }
178}
179impl<'a> flatbuffers::Follow<'a> for TransformType {
180  type Inner = Self;
181  #[inline]
182  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
183    let b = flatbuffers::read_scalar_at::<u8>(buf, loc);
184    Self(b)
185  }
186}
187
188impl flatbuffers::Push for TransformType {
189    type Output = TransformType;
190    #[inline]
191    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
192        flatbuffers::emplace_scalar::<u8>(dst, self.0);
193    }
194}
195
196impl flatbuffers::EndianScalar for TransformType {
197  type Scalar = u8;
198  #[inline]
199  fn to_little_endian(self) -> u8 {
200    self.0.to_le()
201  }
202  #[inline]
203  #[allow(clippy::wrong_self_convention)]
204  fn from_little_endian(v: u8) -> Self {
205    let b = u8::from_le(v);
206    Self(b)
207  }
208}
209
210impl<'a> flatbuffers::Verifiable for TransformType {
211  #[inline]
212  fn run_verifier(
213    v: &mut flatbuffers::Verifier, pos: usize
214  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
215    use self::flatbuffers::Verifiable;
216    u8::run_verifier(v, pos)
217  }
218}
219
220impl flatbuffers::SimpleToVerifyInSlice for TransformType {}
221pub struct TransformTypeUnionTableOffset {}
222
223#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
224pub const ENUM_MIN_PLAN_STATUS: i8 = 0;
225#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
226pub const ENUM_MAX_PLAN_STATUS: i8 = 2;
227#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
228#[allow(non_camel_case_types)]
229pub const ENUM_VALUES_PLAN_STATUS: [PlanStatus; 3] = [
230  PlanStatus::Running,
231  PlanStatus::Stopped,
232  PlanStatus::Error,
233];
234
235#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
236#[repr(transparent)]
237pub struct PlanStatus(pub i8);
238#[allow(non_upper_case_globals)]
239impl PlanStatus {
240  pub const Running: Self = Self(0);
241  pub const Stopped: Self = Self(1);
242  pub const Error: Self = Self(2);
243
244  pub const ENUM_MIN: i8 = 0;
245  pub const ENUM_MAX: i8 = 2;
246  pub const ENUM_VALUES: &'static [Self] = &[
247    Self::Running,
248    Self::Stopped,
249    Self::Error,
250  ];
251  /// Returns the variant's name or "" if unknown.
252  pub fn variant_name(self) -> Option<&'static str> {
253    match self {
254      Self::Running => Some("Running"),
255      Self::Stopped => Some("Stopped"),
256      Self::Error => Some("Error"),
257      _ => None,
258    }
259  }
260}
261impl core::fmt::Debug for PlanStatus {
262  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
263    if let Some(name) = self.variant_name() {
264      f.write_str(name)
265    } else {
266      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
267    }
268  }
269}
270impl<'a> flatbuffers::Follow<'a> for PlanStatus {
271  type Inner = Self;
272  #[inline]
273  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
274    let b = flatbuffers::read_scalar_at::<i8>(buf, loc);
275    Self(b)
276  }
277}
278
279impl flatbuffers::Push for PlanStatus {
280    type Output = PlanStatus;
281    #[inline]
282    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
283        flatbuffers::emplace_scalar::<i8>(dst, self.0);
284    }
285}
286
287impl flatbuffers::EndianScalar for PlanStatus {
288  type Scalar = i8;
289  #[inline]
290  fn to_little_endian(self) -> i8 {
291    self.0.to_le()
292  }
293  #[inline]
294  #[allow(clippy::wrong_self_convention)]
295  fn from_little_endian(v: i8) -> Self {
296    let b = i8::from_le(v);
297    Self(b)
298  }
299}
300
301impl<'a> flatbuffers::Verifiable for PlanStatus {
302  #[inline]
303  fn run_verifier(
304    v: &mut flatbuffers::Verifier, pos: usize
305  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
306    use self::flatbuffers::Verifiable;
307    i8::run_verifier(v, pos)
308  }
309}
310
311impl flatbuffers::SimpleToVerifyInSlice for PlanStatus {}
312#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
313pub const ENUM_MIN_FILTER_TYPE: u8 = 0;
314#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
315pub const ENUM_MAX_FILTER_TYPE: u8 = 1;
316#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
317#[allow(non_camel_case_types)]
318pub const ENUM_VALUES_FILTER_TYPE: [FilterType; 2] = [
319  FilterType::NONE,
320  FilterType::ByName,
321];
322
323#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
324#[repr(transparent)]
325pub struct FilterType(pub u8);
326#[allow(non_upper_case_globals)]
327impl FilterType {
328  pub const NONE: Self = Self(0);
329  pub const ByName: Self = Self(1);
330
331  pub const ENUM_MIN: u8 = 0;
332  pub const ENUM_MAX: u8 = 1;
333  pub const ENUM_VALUES: &'static [Self] = &[
334    Self::NONE,
335    Self::ByName,
336  ];
337  /// Returns the variant's name or "" if unknown.
338  pub fn variant_name(self) -> Option<&'static str> {
339    match self {
340      Self::NONE => Some("NONE"),
341      Self::ByName => Some("ByName"),
342      _ => None,
343    }
344  }
345}
346impl core::fmt::Debug for FilterType {
347  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
348    if let Some(name) = self.variant_name() {
349      f.write_str(name)
350    } else {
351      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
352    }
353  }
354}
355impl<'a> flatbuffers::Follow<'a> for FilterType {
356  type Inner = Self;
357  #[inline]
358  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
359    let b = flatbuffers::read_scalar_at::<u8>(buf, loc);
360    Self(b)
361  }
362}
363
364impl flatbuffers::Push for FilterType {
365    type Output = FilterType;
366    #[inline]
367    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
368        flatbuffers::emplace_scalar::<u8>(dst, self.0);
369    }
370}
371
372impl flatbuffers::EndianScalar for FilterType {
373  type Scalar = u8;
374  #[inline]
375  fn to_little_endian(self) -> u8 {
376    self.0.to_le()
377  }
378  #[inline]
379  #[allow(clippy::wrong_self_convention)]
380  fn from_little_endian(v: u8) -> Self {
381    let b = u8::from_le(v);
382    Self(b)
383  }
384}
385
386impl<'a> flatbuffers::Verifiable for FilterType {
387  #[inline]
388  fn run_verifier(
389    v: &mut flatbuffers::Verifier, pos: usize
390  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
391    use self::flatbuffers::Verifiable;
392    u8::run_verifier(v, pos)
393  }
394}
395
396impl flatbuffers::SimpleToVerifyInSlice for FilterType {}
397pub struct FilterTypeUnionTableOffset {}
398
399#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
400pub const ENUM_MIN_STATUS: u8 = 0;
401#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
402pub const ENUM_MAX_STATUS: u8 = 2;
403#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
404#[allow(non_camel_case_types)]
405pub const ENUM_VALUES_STATUS: [Status; 3] = [
406  Status::NONE,
407  Status::OkStatus,
408  Status::ErrorStatus,
409];
410
411#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
412#[repr(transparent)]
413pub struct Status(pub u8);
414#[allow(non_upper_case_globals)]
415impl Status {
416  pub const NONE: Self = Self(0);
417  pub const OkStatus: Self = Self(1);
418  pub const ErrorStatus: Self = Self(2);
419
420  pub const ENUM_MIN: u8 = 0;
421  pub const ENUM_MAX: u8 = 2;
422  pub const ENUM_VALUES: &'static [Self] = &[
423    Self::NONE,
424    Self::OkStatus,
425    Self::ErrorStatus,
426  ];
427  /// Returns the variant's name or "" if unknown.
428  pub fn variant_name(self) -> Option<&'static str> {
429    match self {
430      Self::NONE => Some("NONE"),
431      Self::OkStatus => Some("OkStatus"),
432      Self::ErrorStatus => Some("ErrorStatus"),
433      _ => None,
434    }
435  }
436}
437impl core::fmt::Debug for Status {
438  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
439    if let Some(name) = self.variant_name() {
440      f.write_str(name)
441    } else {
442      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
443    }
444  }
445}
446impl<'a> flatbuffers::Follow<'a> for Status {
447  type Inner = Self;
448  #[inline]
449  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
450    let b = flatbuffers::read_scalar_at::<u8>(buf, loc);
451    Self(b)
452  }
453}
454
455impl flatbuffers::Push for Status {
456    type Output = Status;
457    #[inline]
458    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
459        flatbuffers::emplace_scalar::<u8>(dst, self.0);
460    }
461}
462
463impl flatbuffers::EndianScalar for Status {
464  type Scalar = u8;
465  #[inline]
466  fn to_little_endian(self) -> u8 {
467    self.0.to_le()
468  }
469  #[inline]
470  #[allow(clippy::wrong_self_convention)]
471  fn from_little_endian(v: u8) -> Self {
472    let b = u8::from_le(v);
473    Self(b)
474  }
475}
476
477impl<'a> flatbuffers::Verifiable for Status {
478  #[inline]
479  fn run_verifier(
480    v: &mut flatbuffers::Verifier, pos: usize
481  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
482    use self::flatbuffers::Verifiable;
483    u8::run_verifier(v, pos)
484  }
485}
486
487impl flatbuffers::SimpleToVerifyInSlice for Status {}
488pub struct StatusUnionTableOffset {}
489
490#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
491pub const ENUM_MIN_PAYLOAD: u8 = 0;
492#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
493pub const ENUM_MAX_PAYLOAD: u8 = 13;
494#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
495#[allow(non_camel_case_types)]
496pub const ENUM_VALUES_PAYLOAD: [Payload; 14] = [
497  Payload::NONE,
498  Payload::CreatePlanRequest,
499  Payload::CreatePlanResponse,
500  Payload::GetPlanRequest,
501  Payload::GetPlansRequest,
502  Payload::Train,
503  Payload::Catalog,
504  Payload::RegisterRequest,
505  Payload::RegisterResponse,
506  Payload::BindRequest,
507  Payload::BindResponse,
508  Payload::UnbindRequest,
509  Payload::UnbindResponse,
510  Payload::Disconnect,
511];
512
513#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
514#[repr(transparent)]
515pub struct Payload(pub u8);
516#[allow(non_upper_case_globals)]
517impl Payload {
518  pub const NONE: Self = Self(0);
519  pub const CreatePlanRequest: Self = Self(1);
520  pub const CreatePlanResponse: Self = Self(2);
521  pub const GetPlanRequest: Self = Self(3);
522  pub const GetPlansRequest: Self = Self(4);
523  pub const Train: Self = Self(5);
524  pub const Catalog: Self = Self(6);
525  pub const RegisterRequest: Self = Self(7);
526  pub const RegisterResponse: Self = Self(8);
527  pub const BindRequest: Self = Self(9);
528  pub const BindResponse: Self = Self(10);
529  pub const UnbindRequest: Self = Self(11);
530  pub const UnbindResponse: Self = Self(12);
531  pub const Disconnect: Self = Self(13);
532
533  pub const ENUM_MIN: u8 = 0;
534  pub const ENUM_MAX: u8 = 13;
535  pub const ENUM_VALUES: &'static [Self] = &[
536    Self::NONE,
537    Self::CreatePlanRequest,
538    Self::CreatePlanResponse,
539    Self::GetPlanRequest,
540    Self::GetPlansRequest,
541    Self::Train,
542    Self::Catalog,
543    Self::RegisterRequest,
544    Self::RegisterResponse,
545    Self::BindRequest,
546    Self::BindResponse,
547    Self::UnbindRequest,
548    Self::UnbindResponse,
549    Self::Disconnect,
550  ];
551  /// Returns the variant's name or "" if unknown.
552  pub fn variant_name(self) -> Option<&'static str> {
553    match self {
554      Self::NONE => Some("NONE"),
555      Self::CreatePlanRequest => Some("CreatePlanRequest"),
556      Self::CreatePlanResponse => Some("CreatePlanResponse"),
557      Self::GetPlanRequest => Some("GetPlanRequest"),
558      Self::GetPlansRequest => Some("GetPlansRequest"),
559      Self::Train => Some("Train"),
560      Self::Catalog => Some("Catalog"),
561      Self::RegisterRequest => Some("RegisterRequest"),
562      Self::RegisterResponse => Some("RegisterResponse"),
563      Self::BindRequest => Some("BindRequest"),
564      Self::BindResponse => Some("BindResponse"),
565      Self::UnbindRequest => Some("UnbindRequest"),
566      Self::UnbindResponse => Some("UnbindResponse"),
567      Self::Disconnect => Some("Disconnect"),
568      _ => None,
569    }
570  }
571}
572impl core::fmt::Debug for Payload {
573  fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
574    if let Some(name) = self.variant_name() {
575      f.write_str(name)
576    } else {
577      f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
578    }
579  }
580}
581impl<'a> flatbuffers::Follow<'a> for Payload {
582  type Inner = Self;
583  #[inline]
584  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
585    let b = flatbuffers::read_scalar_at::<u8>(buf, loc);
586    Self(b)
587  }
588}
589
590impl flatbuffers::Push for Payload {
591    type Output = Payload;
592    #[inline]
593    unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
594        flatbuffers::emplace_scalar::<u8>(dst, self.0);
595    }
596}
597
598impl flatbuffers::EndianScalar for Payload {
599  type Scalar = u8;
600  #[inline]
601  fn to_little_endian(self) -> u8 {
602    self.0.to_le()
603  }
604  #[inline]
605  #[allow(clippy::wrong_self_convention)]
606  fn from_little_endian(v: u8) -> Self {
607    let b = u8::from_le(v);
608    Self(b)
609  }
610}
611
612impl<'a> flatbuffers::Verifiable for Payload {
613  #[inline]
614  fn run_verifier(
615    v: &mut flatbuffers::Verifier, pos: usize
616  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
617    use self::flatbuffers::Verifiable;
618    u8::run_verifier(v, pos)
619  }
620}
621
622impl flatbuffers::SimpleToVerifyInSlice for Payload {}
623pub struct PayloadUnionTableOffset {}
624
625pub enum NullOffset {}
626#[derive(Copy, Clone, PartialEq)]
627
628pub struct Null<'a> {
629  pub _tab: flatbuffers::Table<'a>,
630}
631
632impl<'a> flatbuffers::Follow<'a> for Null<'a> {
633  type Inner = Null<'a>;
634  #[inline]
635  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
636    Self { _tab: flatbuffers::Table::new(buf, loc) }
637  }
638}
639
640impl<'a> Null<'a> {
641
642  #[inline]
643  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
644    Null { _tab: table }
645  }
646  #[allow(unused_mut)]
647  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
648    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
649    _args: &'args NullArgs
650  ) -> flatbuffers::WIPOffset<Null<'bldr>> {
651    let mut builder = NullBuilder::new(_fbb);
652    builder.finish()
653  }
654
655}
656
657impl flatbuffers::Verifiable for Null<'_> {
658  #[inline]
659  fn run_verifier(
660    v: &mut flatbuffers::Verifier, pos: usize
661  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
662    use self::flatbuffers::Verifiable;
663    v.visit_table(pos)?
664     .finish();
665    Ok(())
666  }
667}
668pub struct NullArgs {
669}
670impl<'a> Default for NullArgs {
671  #[inline]
672  fn default() -> Self {
673    NullArgs {
674    }
675  }
676}
677
678pub struct NullBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
679  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
680  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
681}
682impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> NullBuilder<'a, 'b, A> {
683  #[inline]
684  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> NullBuilder<'a, 'b, A> {
685    let start = _fbb.start_table();
686    NullBuilder {
687      fbb_: _fbb,
688      start_: start,
689    }
690  }
691  #[inline]
692  pub fn finish(self) -> flatbuffers::WIPOffset<Null<'a>> {
693    let o = self.fbb_.end_table(self.start_);
694    flatbuffers::WIPOffset::new(o.value())
695  }
696}
697
698impl core::fmt::Debug for Null<'_> {
699  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
700    let mut ds = f.debug_struct("Null");
701      ds.finish()
702  }
703}
704pub enum TimeOffset {}
705#[derive(Copy, Clone, PartialEq)]
706
707pub struct Time<'a> {
708  pub _tab: flatbuffers::Table<'a>,
709}
710
711impl<'a> flatbuffers::Follow<'a> for Time<'a> {
712  type Inner = Time<'a>;
713  #[inline]
714  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
715    Self { _tab: flatbuffers::Table::new(buf, loc) }
716  }
717}
718
719impl<'a> Time<'a> {
720  pub const VT_DATA: flatbuffers::VOffsetT = 4;
721
722  #[inline]
723  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
724    Time { _tab: table }
725  }
726  #[allow(unused_mut)]
727  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
728    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
729    args: &'args TimeArgs
730  ) -> flatbuffers::WIPOffset<Time<'bldr>> {
731    let mut builder = TimeBuilder::new(_fbb);
732    builder.add_data(args.data);
733    builder.finish()
734  }
735
736
737  #[inline]
738  pub fn data(&self) -> i64 {
739    // Safety:
740    // Created from valid Table for this object
741    // which contains a valid value in this slot
742    unsafe { self._tab.get::<i64>(Time::VT_DATA, Some(0)).unwrap()}
743  }
744}
745
746impl flatbuffers::Verifiable for Time<'_> {
747  #[inline]
748  fn run_verifier(
749    v: &mut flatbuffers::Verifier, pos: usize
750  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
751    use self::flatbuffers::Verifiable;
752    v.visit_table(pos)?
753     .visit_field::<i64>("data", Self::VT_DATA, false)?
754     .finish();
755    Ok(())
756  }
757}
758pub struct TimeArgs {
759    pub data: i64,
760}
761impl<'a> Default for TimeArgs {
762  #[inline]
763  fn default() -> Self {
764    TimeArgs {
765      data: 0,
766    }
767  }
768}
769
770pub struct TimeBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
771  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
772  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
773}
774impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TimeBuilder<'a, 'b, A> {
775  #[inline]
776  pub fn add_data(&mut self, data: i64) {
777    self.fbb_.push_slot::<i64>(Time::VT_DATA, data, 0);
778  }
779  #[inline]
780  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TimeBuilder<'a, 'b, A> {
781    let start = _fbb.start_table();
782    TimeBuilder {
783      fbb_: _fbb,
784      start_: start,
785    }
786  }
787  #[inline]
788  pub fn finish(self) -> flatbuffers::WIPOffset<Time<'a>> {
789    let o = self.fbb_.end_table(self.start_);
790    flatbuffers::WIPOffset::new(o.value())
791  }
792}
793
794impl core::fmt::Debug for Time<'_> {
795  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
796    let mut ds = f.debug_struct("Time");
797      ds.field("data", &self.data());
798      ds.finish()
799  }
800}
801pub enum BoolOffset {}
802#[derive(Copy, Clone, PartialEq)]
803
804pub struct Bool<'a> {
805  pub _tab: flatbuffers::Table<'a>,
806}
807
808impl<'a> flatbuffers::Follow<'a> for Bool<'a> {
809  type Inner = Bool<'a>;
810  #[inline]
811  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
812    Self { _tab: flatbuffers::Table::new(buf, loc) }
813  }
814}
815
816impl<'a> Bool<'a> {
817  pub const VT_DATA: flatbuffers::VOffsetT = 4;
818
819  #[inline]
820  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
821    Bool { _tab: table }
822  }
823  #[allow(unused_mut)]
824  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
825    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
826    args: &'args BoolArgs
827  ) -> flatbuffers::WIPOffset<Bool<'bldr>> {
828    let mut builder = BoolBuilder::new(_fbb);
829    builder.add_data(args.data);
830    builder.finish()
831  }
832
833
834  #[inline]
835  pub fn data(&self) -> bool {
836    // Safety:
837    // Created from valid Table for this object
838    // which contains a valid value in this slot
839    unsafe { self._tab.get::<bool>(Bool::VT_DATA, Some(false)).unwrap()}
840  }
841}
842
843impl flatbuffers::Verifiable for Bool<'_> {
844  #[inline]
845  fn run_verifier(
846    v: &mut flatbuffers::Verifier, pos: usize
847  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
848    use self::flatbuffers::Verifiable;
849    v.visit_table(pos)?
850     .visit_field::<bool>("data", Self::VT_DATA, false)?
851     .finish();
852    Ok(())
853  }
854}
855pub struct BoolArgs {
856    pub data: bool,
857}
858impl<'a> Default for BoolArgs {
859  #[inline]
860  fn default() -> Self {
861    BoolArgs {
862      data: false,
863    }
864  }
865}
866
867pub struct BoolBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
868  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
869  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
870}
871impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> BoolBuilder<'a, 'b, A> {
872  #[inline]
873  pub fn add_data(&mut self, data: bool) {
874    self.fbb_.push_slot::<bool>(Bool::VT_DATA, data, false);
875  }
876  #[inline]
877  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> BoolBuilder<'a, 'b, A> {
878    let start = _fbb.start_table();
879    BoolBuilder {
880      fbb_: _fbb,
881      start_: start,
882    }
883  }
884  #[inline]
885  pub fn finish(self) -> flatbuffers::WIPOffset<Bool<'a>> {
886    let o = self.fbb_.end_table(self.start_);
887    flatbuffers::WIPOffset::new(o.value())
888  }
889}
890
891impl core::fmt::Debug for Bool<'_> {
892  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
893    let mut ds = f.debug_struct("Bool");
894      ds.field("data", &self.data());
895      ds.finish()
896  }
897}
898pub enum TextOffset {}
899#[derive(Copy, Clone, PartialEq)]
900
901pub struct Text<'a> {
902  pub _tab: flatbuffers::Table<'a>,
903}
904
905impl<'a> flatbuffers::Follow<'a> for Text<'a> {
906  type Inner = Text<'a>;
907  #[inline]
908  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
909    Self { _tab: flatbuffers::Table::new(buf, loc) }
910  }
911}
912
913impl<'a> Text<'a> {
914  pub const VT_DATA: flatbuffers::VOffsetT = 4;
915
916  #[inline]
917  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
918    Text { _tab: table }
919  }
920  #[allow(unused_mut)]
921  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
922    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
923    args: &'args TextArgs<'args>
924  ) -> flatbuffers::WIPOffset<Text<'bldr>> {
925    let mut builder = TextBuilder::new(_fbb);
926    if let Some(x) = args.data { builder.add_data(x); }
927    builder.finish()
928  }
929
930
931  #[inline]
932  pub fn data(&self) -> &'a str {
933    // Safety:
934    // Created from valid Table for this object
935    // which contains a valid value in this slot
936    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Text::VT_DATA, None).unwrap()}
937  }
938}
939
940impl flatbuffers::Verifiable for Text<'_> {
941  #[inline]
942  fn run_verifier(
943    v: &mut flatbuffers::Verifier, pos: usize
944  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
945    use self::flatbuffers::Verifiable;
946    v.visit_table(pos)?
947     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("data", Self::VT_DATA, true)?
948     .finish();
949    Ok(())
950  }
951}
952pub struct TextArgs<'a> {
953    pub data: Option<flatbuffers::WIPOffset<&'a str>>,
954}
955impl<'a> Default for TextArgs<'a> {
956  #[inline]
957  fn default() -> Self {
958    TextArgs {
959      data: None, // required field
960    }
961  }
962}
963
964pub struct TextBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
965  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
966  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
967}
968impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TextBuilder<'a, 'b, A> {
969  #[inline]
970  pub fn add_data(&mut self, data: flatbuffers::WIPOffset<&'b  str>) {
971    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Text::VT_DATA, data);
972  }
973  #[inline]
974  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TextBuilder<'a, 'b, A> {
975    let start = _fbb.start_table();
976    TextBuilder {
977      fbb_: _fbb,
978      start_: start,
979    }
980  }
981  #[inline]
982  pub fn finish(self) -> flatbuffers::WIPOffset<Text<'a>> {
983    let o = self.fbb_.end_table(self.start_);
984    self.fbb_.required(o, Text::VT_DATA,"data");
985    flatbuffers::WIPOffset::new(o.value())
986  }
987}
988
989impl core::fmt::Debug for Text<'_> {
990  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
991    let mut ds = f.debug_struct("Text");
992      ds.field("data", &self.data());
993      ds.finish()
994  }
995}
996pub enum IntegerOffset {}
997#[derive(Copy, Clone, PartialEq)]
998
999pub struct Integer<'a> {
1000  pub _tab: flatbuffers::Table<'a>,
1001}
1002
1003impl<'a> flatbuffers::Follow<'a> for Integer<'a> {
1004  type Inner = Integer<'a>;
1005  #[inline]
1006  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1007    Self { _tab: flatbuffers::Table::new(buf, loc) }
1008  }
1009}
1010
1011impl<'a> Integer<'a> {
1012  pub const VT_DATA: flatbuffers::VOffsetT = 4;
1013
1014  #[inline]
1015  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
1016    Integer { _tab: table }
1017  }
1018  #[allow(unused_mut)]
1019  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
1020    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
1021    args: &'args IntegerArgs
1022  ) -> flatbuffers::WIPOffset<Integer<'bldr>> {
1023    let mut builder = IntegerBuilder::new(_fbb);
1024    builder.add_data(args.data);
1025    builder.finish()
1026  }
1027
1028
1029  #[inline]
1030  pub fn data(&self) -> i64 {
1031    // Safety:
1032    // Created from valid Table for this object
1033    // which contains a valid value in this slot
1034    unsafe { self._tab.get::<i64>(Integer::VT_DATA, Some(0)).unwrap()}
1035  }
1036}
1037
1038impl flatbuffers::Verifiable for Integer<'_> {
1039  #[inline]
1040  fn run_verifier(
1041    v: &mut flatbuffers::Verifier, pos: usize
1042  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1043    use self::flatbuffers::Verifiable;
1044    v.visit_table(pos)?
1045     .visit_field::<i64>("data", Self::VT_DATA, false)?
1046     .finish();
1047    Ok(())
1048  }
1049}
1050pub struct IntegerArgs {
1051    pub data: i64,
1052}
1053impl<'a> Default for IntegerArgs {
1054  #[inline]
1055  fn default() -> Self {
1056    IntegerArgs {
1057      data: 0,
1058    }
1059  }
1060}
1061
1062pub struct IntegerBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
1063  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1064  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
1065}
1066impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> IntegerBuilder<'a, 'b, A> {
1067  #[inline]
1068  pub fn add_data(&mut self, data: i64) {
1069    self.fbb_.push_slot::<i64>(Integer::VT_DATA, data, 0);
1070  }
1071  #[inline]
1072  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> IntegerBuilder<'a, 'b, A> {
1073    let start = _fbb.start_table();
1074    IntegerBuilder {
1075      fbb_: _fbb,
1076      start_: start,
1077    }
1078  }
1079  #[inline]
1080  pub fn finish(self) -> flatbuffers::WIPOffset<Integer<'a>> {
1081    let o = self.fbb_.end_table(self.start_);
1082    flatbuffers::WIPOffset::new(o.value())
1083  }
1084}
1085
1086impl core::fmt::Debug for Integer<'_> {
1087  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1088    let mut ds = f.debug_struct("Integer");
1089      ds.field("data", &self.data());
1090      ds.finish()
1091  }
1092}
1093pub enum FloatOffset {}
1094#[derive(Copy, Clone, PartialEq)]
1095
1096pub struct Float<'a> {
1097  pub _tab: flatbuffers::Table<'a>,
1098}
1099
1100impl<'a> flatbuffers::Follow<'a> for Float<'a> {
1101  type Inner = Float<'a>;
1102  #[inline]
1103  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1104    Self { _tab: flatbuffers::Table::new(buf, loc) }
1105  }
1106}
1107
1108impl<'a> Float<'a> {
1109  pub const VT_DATA: flatbuffers::VOffsetT = 4;
1110
1111  #[inline]
1112  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
1113    Float { _tab: table }
1114  }
1115  #[allow(unused_mut)]
1116  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
1117    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
1118    args: &'args FloatArgs
1119  ) -> flatbuffers::WIPOffset<Float<'bldr>> {
1120    let mut builder = FloatBuilder::new(_fbb);
1121    builder.add_data(args.data);
1122    builder.finish()
1123  }
1124
1125
1126  #[inline]
1127  pub fn data(&self) -> f32 {
1128    // Safety:
1129    // Created from valid Table for this object
1130    // which contains a valid value in this slot
1131    unsafe { self._tab.get::<f32>(Float::VT_DATA, Some(0.0)).unwrap()}
1132  }
1133}
1134
1135impl flatbuffers::Verifiable for Float<'_> {
1136  #[inline]
1137  fn run_verifier(
1138    v: &mut flatbuffers::Verifier, pos: usize
1139  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1140    use self::flatbuffers::Verifiable;
1141    v.visit_table(pos)?
1142     .visit_field::<f32>("data", Self::VT_DATA, false)?
1143     .finish();
1144    Ok(())
1145  }
1146}
1147pub struct FloatArgs {
1148    pub data: f32,
1149}
1150impl<'a> Default for FloatArgs {
1151  #[inline]
1152  fn default() -> Self {
1153    FloatArgs {
1154      data: 0.0,
1155    }
1156  }
1157}
1158
1159pub struct FloatBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
1160  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1161  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
1162}
1163impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> FloatBuilder<'a, 'b, A> {
1164  #[inline]
1165  pub fn add_data(&mut self, data: f32) {
1166    self.fbb_.push_slot::<f32>(Float::VT_DATA, data, 0.0);
1167  }
1168  #[inline]
1169  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> FloatBuilder<'a, 'b, A> {
1170    let start = _fbb.start_table();
1171    FloatBuilder {
1172      fbb_: _fbb,
1173      start_: start,
1174    }
1175  }
1176  #[inline]
1177  pub fn finish(self) -> flatbuffers::WIPOffset<Float<'a>> {
1178    let o = self.fbb_.end_table(self.start_);
1179    flatbuffers::WIPOffset::new(o.value())
1180  }
1181}
1182
1183impl core::fmt::Debug for Float<'_> {
1184  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1185    let mut ds = f.debug_struct("Float");
1186      ds.field("data", &self.data());
1187      ds.finish()
1188  }
1189}
1190pub enum ValueWrapperOffset {}
1191#[derive(Copy, Clone, PartialEq)]
1192
1193pub struct ValueWrapper<'a> {
1194  pub _tab: flatbuffers::Table<'a>,
1195}
1196
1197impl<'a> flatbuffers::Follow<'a> for ValueWrapper<'a> {
1198  type Inner = ValueWrapper<'a>;
1199  #[inline]
1200  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1201    Self { _tab: flatbuffers::Table::new(buf, loc) }
1202  }
1203}
1204
1205impl<'a> ValueWrapper<'a> {
1206  pub const VT_DATA_TYPE: flatbuffers::VOffsetT = 4;
1207  pub const VT_DATA: flatbuffers::VOffsetT = 6;
1208
1209  #[inline]
1210  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
1211    ValueWrapper { _tab: table }
1212  }
1213  #[allow(unused_mut)]
1214  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
1215    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
1216    args: &'args ValueWrapperArgs
1217  ) -> flatbuffers::WIPOffset<ValueWrapper<'bldr>> {
1218    let mut builder = ValueWrapperBuilder::new(_fbb);
1219    if let Some(x) = args.data { builder.add_data(x); }
1220    builder.add_data_type(args.data_type);
1221    builder.finish()
1222  }
1223
1224
1225  #[inline]
1226  pub fn data_type(&self) -> Value {
1227    // Safety:
1228    // Created from valid Table for this object
1229    // which contains a valid value in this slot
1230    unsafe { self._tab.get::<Value>(ValueWrapper::VT_DATA_TYPE, Some(Value::NONE)).unwrap()}
1231  }
1232  #[inline]
1233  pub fn data(&self) -> flatbuffers::Table<'a> {
1234    // Safety:
1235    // Created from valid Table for this object
1236    // which contains a valid value in this slot
1237    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Table<'a>>>(ValueWrapper::VT_DATA, None).unwrap()}
1238  }
1239  #[inline]
1240  #[allow(non_snake_case)]
1241  pub fn data_as_null(&self) -> Option<Null<'a>> {
1242    if self.data_type() == Value::Null {
1243      let u = self.data();
1244      // Safety:
1245      // Created from a valid Table for this object
1246      // Which contains a valid union in this slot
1247      Some(unsafe { Null::init_from_table(u) })
1248    } else {
1249      None
1250    }
1251  }
1252
1253  #[inline]
1254  #[allow(non_snake_case)]
1255  pub fn data_as_text(&self) -> Option<Text<'a>> {
1256    if self.data_type() == Value::Text {
1257      let u = self.data();
1258      // Safety:
1259      // Created from a valid Table for this object
1260      // Which contains a valid union in this slot
1261      Some(unsafe { Text::init_from_table(u) })
1262    } else {
1263      None
1264    }
1265  }
1266
1267  #[inline]
1268  #[allow(non_snake_case)]
1269  pub fn data_as_bool(&self) -> Option<Bool<'a>> {
1270    if self.data_type() == Value::Bool {
1271      let u = self.data();
1272      // Safety:
1273      // Created from a valid Table for this object
1274      // Which contains a valid union in this slot
1275      Some(unsafe { Bool::init_from_table(u) })
1276    } else {
1277      None
1278    }
1279  }
1280
1281  #[inline]
1282  #[allow(non_snake_case)]
1283  pub fn data_as_integer(&self) -> Option<Integer<'a>> {
1284    if self.data_type() == Value::Integer {
1285      let u = self.data();
1286      // Safety:
1287      // Created from a valid Table for this object
1288      // Which contains a valid union in this slot
1289      Some(unsafe { Integer::init_from_table(u) })
1290    } else {
1291      None
1292    }
1293  }
1294
1295  #[inline]
1296  #[allow(non_snake_case)]
1297  pub fn data_as_float(&self) -> Option<Float<'a>> {
1298    if self.data_type() == Value::Float {
1299      let u = self.data();
1300      // Safety:
1301      // Created from a valid Table for this object
1302      // Which contains a valid union in this slot
1303      Some(unsafe { Float::init_from_table(u) })
1304    } else {
1305      None
1306    }
1307  }
1308
1309  #[inline]
1310  #[allow(non_snake_case)]
1311  pub fn data_as_list(&self) -> Option<List<'a>> {
1312    if self.data_type() == Value::List {
1313      let u = self.data();
1314      // Safety:
1315      // Created from a valid Table for this object
1316      // Which contains a valid union in this slot
1317      Some(unsafe { List::init_from_table(u) })
1318    } else {
1319      None
1320    }
1321  }
1322
1323  #[inline]
1324  #[allow(non_snake_case)]
1325  pub fn data_as_document(&self) -> Option<Document<'a>> {
1326    if self.data_type() == Value::Document {
1327      let u = self.data();
1328      // Safety:
1329      // Created from a valid Table for this object
1330      // Which contains a valid union in this slot
1331      Some(unsafe { Document::init_from_table(u) })
1332    } else {
1333      None
1334    }
1335  }
1336
1337  #[inline]
1338  #[allow(non_snake_case)]
1339  pub fn data_as_time(&self) -> Option<Time<'a>> {
1340    if self.data_type() == Value::Time {
1341      let u = self.data();
1342      // Safety:
1343      // Created from a valid Table for this object
1344      // Which contains a valid union in this slot
1345      Some(unsafe { Time::init_from_table(u) })
1346    } else {
1347      None
1348    }
1349  }
1350
1351}
1352
1353impl flatbuffers::Verifiable for ValueWrapper<'_> {
1354  #[inline]
1355  fn run_verifier(
1356    v: &mut flatbuffers::Verifier, pos: usize
1357  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1358    use self::flatbuffers::Verifiable;
1359    v.visit_table(pos)?
1360     .visit_union::<Value, _>("data_type", Self::VT_DATA_TYPE, "data", Self::VT_DATA, true, |key, v, pos| {
1361        match key {
1362          Value::Null => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Null>>("Value::Null", pos),
1363          Value::Text => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Text>>("Value::Text", pos),
1364          Value::Bool => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Bool>>("Value::Bool", pos),
1365          Value::Integer => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Integer>>("Value::Integer", pos),
1366          Value::Float => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Float>>("Value::Float", pos),
1367          Value::List => v.verify_union_variant::<flatbuffers::ForwardsUOffset<List>>("Value::List", pos),
1368          Value::Document => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Document>>("Value::Document", pos),
1369          Value::Time => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Time>>("Value::Time", pos),
1370          _ => Ok(()),
1371        }
1372     })?
1373     .finish();
1374    Ok(())
1375  }
1376}
1377pub struct ValueWrapperArgs {
1378    pub data_type: Value,
1379    pub data: Option<flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>>,
1380}
1381impl<'a> Default for ValueWrapperArgs {
1382  #[inline]
1383  fn default() -> Self {
1384    ValueWrapperArgs {
1385      data_type: Value::NONE,
1386      data: None, // required field
1387    }
1388  }
1389}
1390
1391pub struct ValueWrapperBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
1392  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1393  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
1394}
1395impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ValueWrapperBuilder<'a, 'b, A> {
1396  #[inline]
1397  pub fn add_data_type(&mut self, data_type: Value) {
1398    self.fbb_.push_slot::<Value>(ValueWrapper::VT_DATA_TYPE, data_type, Value::NONE);
1399  }
1400  #[inline]
1401  pub fn add_data(&mut self, data: flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>) {
1402    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ValueWrapper::VT_DATA, data);
1403  }
1404  #[inline]
1405  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ValueWrapperBuilder<'a, 'b, A> {
1406    let start = _fbb.start_table();
1407    ValueWrapperBuilder {
1408      fbb_: _fbb,
1409      start_: start,
1410    }
1411  }
1412  #[inline]
1413  pub fn finish(self) -> flatbuffers::WIPOffset<ValueWrapper<'a>> {
1414    let o = self.fbb_.end_table(self.start_);
1415    self.fbb_.required(o, ValueWrapper::VT_DATA,"data");
1416    flatbuffers::WIPOffset::new(o.value())
1417  }
1418}
1419
1420impl core::fmt::Debug for ValueWrapper<'_> {
1421  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1422    let mut ds = f.debug_struct("ValueWrapper");
1423      ds.field("data_type", &self.data_type());
1424      match self.data_type() {
1425        Value::Null => {
1426          if let Some(x) = self.data_as_null() {
1427            ds.field("data", &x)
1428          } else {
1429            ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
1430          }
1431        },
1432        Value::Text => {
1433          if let Some(x) = self.data_as_text() {
1434            ds.field("data", &x)
1435          } else {
1436            ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
1437          }
1438        },
1439        Value::Bool => {
1440          if let Some(x) = self.data_as_bool() {
1441            ds.field("data", &x)
1442          } else {
1443            ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
1444          }
1445        },
1446        Value::Integer => {
1447          if let Some(x) = self.data_as_integer() {
1448            ds.field("data", &x)
1449          } else {
1450            ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
1451          }
1452        },
1453        Value::Float => {
1454          if let Some(x) = self.data_as_float() {
1455            ds.field("data", &x)
1456          } else {
1457            ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
1458          }
1459        },
1460        Value::List => {
1461          if let Some(x) = self.data_as_list() {
1462            ds.field("data", &x)
1463          } else {
1464            ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
1465          }
1466        },
1467        Value::Document => {
1468          if let Some(x) = self.data_as_document() {
1469            ds.field("data", &x)
1470          } else {
1471            ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
1472          }
1473        },
1474        Value::Time => {
1475          if let Some(x) = self.data_as_time() {
1476            ds.field("data", &x)
1477          } else {
1478            ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
1479          }
1480        },
1481        _ => {
1482          let x: Option<()> = None;
1483          ds.field("data", &x)
1484        },
1485      };
1486      ds.finish()
1487  }
1488}
1489pub enum ListOffset {}
1490#[derive(Copy, Clone, PartialEq)]
1491
1492pub struct List<'a> {
1493  pub _tab: flatbuffers::Table<'a>,
1494}
1495
1496impl<'a> flatbuffers::Follow<'a> for List<'a> {
1497  type Inner = List<'a>;
1498  #[inline]
1499  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1500    Self { _tab: flatbuffers::Table::new(buf, loc) }
1501  }
1502}
1503
1504impl<'a> List<'a> {
1505  pub const VT_DATA: flatbuffers::VOffsetT = 4;
1506
1507  #[inline]
1508  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
1509    List { _tab: table }
1510  }
1511  #[allow(unused_mut)]
1512  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
1513    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
1514    args: &'args ListArgs<'args>
1515  ) -> flatbuffers::WIPOffset<List<'bldr>> {
1516    let mut builder = ListBuilder::new(_fbb);
1517    if let Some(x) = args.data { builder.add_data(x); }
1518    builder.finish()
1519  }
1520
1521
1522  #[inline]
1523  pub fn data(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ValueWrapper<'a>>> {
1524    // Safety:
1525    // Created from valid Table for this object
1526    // which contains a valid value in this slot
1527    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ValueWrapper>>>>(List::VT_DATA, None).unwrap()}
1528  }
1529}
1530
1531impl flatbuffers::Verifiable for List<'_> {
1532  #[inline]
1533  fn run_verifier(
1534    v: &mut flatbuffers::Verifier, pos: usize
1535  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1536    use self::flatbuffers::Verifiable;
1537    v.visit_table(pos)?
1538     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<ValueWrapper>>>>("data", Self::VT_DATA, true)?
1539     .finish();
1540    Ok(())
1541  }
1542}
1543pub struct ListArgs<'a> {
1544    pub data: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ValueWrapper<'a>>>>>,
1545}
1546impl<'a> Default for ListArgs<'a> {
1547  #[inline]
1548  fn default() -> Self {
1549    ListArgs {
1550      data: None, // required field
1551    }
1552  }
1553}
1554
1555pub struct ListBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
1556  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1557  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
1558}
1559impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ListBuilder<'a, 'b, A> {
1560  #[inline]
1561  pub fn add_data(&mut self, data: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<ValueWrapper<'b >>>>) {
1562    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(List::VT_DATA, data);
1563  }
1564  #[inline]
1565  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ListBuilder<'a, 'b, A> {
1566    let start = _fbb.start_table();
1567    ListBuilder {
1568      fbb_: _fbb,
1569      start_: start,
1570    }
1571  }
1572  #[inline]
1573  pub fn finish(self) -> flatbuffers::WIPOffset<List<'a>> {
1574    let o = self.fbb_.end_table(self.start_);
1575    self.fbb_.required(o, List::VT_DATA,"data");
1576    flatbuffers::WIPOffset::new(o.value())
1577  }
1578}
1579
1580impl core::fmt::Debug for List<'_> {
1581  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1582    let mut ds = f.debug_struct("List");
1583      ds.field("data", &self.data());
1584      ds.finish()
1585  }
1586}
1587pub enum KeyValueOffset {}
1588#[derive(Copy, Clone, PartialEq)]
1589
1590pub struct KeyValue<'a> {
1591  pub _tab: flatbuffers::Table<'a>,
1592}
1593
1594impl<'a> flatbuffers::Follow<'a> for KeyValue<'a> {
1595  type Inner = KeyValue<'a>;
1596  #[inline]
1597  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1598    Self { _tab: flatbuffers::Table::new(buf, loc) }
1599  }
1600}
1601
1602impl<'a> KeyValue<'a> {
1603  pub const VT_KEY_TYPE: flatbuffers::VOffsetT = 4;
1604  pub const VT_KEY: flatbuffers::VOffsetT = 6;
1605  pub const VT_VALUES_TYPE: flatbuffers::VOffsetT = 8;
1606  pub const VT_VALUES: flatbuffers::VOffsetT = 10;
1607
1608  #[inline]
1609  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
1610    KeyValue { _tab: table }
1611  }
1612  #[allow(unused_mut)]
1613  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
1614    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
1615    args: &'args KeyValueArgs
1616  ) -> flatbuffers::WIPOffset<KeyValue<'bldr>> {
1617    let mut builder = KeyValueBuilder::new(_fbb);
1618    if let Some(x) = args.values { builder.add_values(x); }
1619    if let Some(x) = args.key { builder.add_key(x); }
1620    builder.add_values_type(args.values_type);
1621    builder.add_key_type(args.key_type);
1622    builder.finish()
1623  }
1624
1625
1626  #[inline]
1627  pub fn key_type(&self) -> Value {
1628    // Safety:
1629    // Created from valid Table for this object
1630    // which contains a valid value in this slot
1631    unsafe { self._tab.get::<Value>(KeyValue::VT_KEY_TYPE, Some(Value::NONE)).unwrap()}
1632  }
1633  #[inline]
1634  pub fn key(&self) -> flatbuffers::Table<'a> {
1635    // Safety:
1636    // Created from valid Table for this object
1637    // which contains a valid value in this slot
1638    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Table<'a>>>(KeyValue::VT_KEY, None).unwrap()}
1639  }
1640  #[inline]
1641  pub fn values_type(&self) -> Value {
1642    // Safety:
1643    // Created from valid Table for this object
1644    // which contains a valid value in this slot
1645    unsafe { self._tab.get::<Value>(KeyValue::VT_VALUES_TYPE, Some(Value::NONE)).unwrap()}
1646  }
1647  #[inline]
1648  pub fn values(&self) -> flatbuffers::Table<'a> {
1649    // Safety:
1650    // Created from valid Table for this object
1651    // which contains a valid value in this slot
1652    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Table<'a>>>(KeyValue::VT_VALUES, None).unwrap()}
1653  }
1654  #[inline]
1655  #[allow(non_snake_case)]
1656  pub fn key_as_null(&self) -> Option<Null<'a>> {
1657    if self.key_type() == Value::Null {
1658      let u = self.key();
1659      // Safety:
1660      // Created from a valid Table for this object
1661      // Which contains a valid union in this slot
1662      Some(unsafe { Null::init_from_table(u) })
1663    } else {
1664      None
1665    }
1666  }
1667
1668  #[inline]
1669  #[allow(non_snake_case)]
1670  pub fn key_as_text(&self) -> Option<Text<'a>> {
1671    if self.key_type() == Value::Text {
1672      let u = self.key();
1673      // Safety:
1674      // Created from a valid Table for this object
1675      // Which contains a valid union in this slot
1676      Some(unsafe { Text::init_from_table(u) })
1677    } else {
1678      None
1679    }
1680  }
1681
1682  #[inline]
1683  #[allow(non_snake_case)]
1684  pub fn key_as_bool(&self) -> Option<Bool<'a>> {
1685    if self.key_type() == Value::Bool {
1686      let u = self.key();
1687      // Safety:
1688      // Created from a valid Table for this object
1689      // Which contains a valid union in this slot
1690      Some(unsafe { Bool::init_from_table(u) })
1691    } else {
1692      None
1693    }
1694  }
1695
1696  #[inline]
1697  #[allow(non_snake_case)]
1698  pub fn key_as_integer(&self) -> Option<Integer<'a>> {
1699    if self.key_type() == Value::Integer {
1700      let u = self.key();
1701      // Safety:
1702      // Created from a valid Table for this object
1703      // Which contains a valid union in this slot
1704      Some(unsafe { Integer::init_from_table(u) })
1705    } else {
1706      None
1707    }
1708  }
1709
1710  #[inline]
1711  #[allow(non_snake_case)]
1712  pub fn key_as_float(&self) -> Option<Float<'a>> {
1713    if self.key_type() == Value::Float {
1714      let u = self.key();
1715      // Safety:
1716      // Created from a valid Table for this object
1717      // Which contains a valid union in this slot
1718      Some(unsafe { Float::init_from_table(u) })
1719    } else {
1720      None
1721    }
1722  }
1723
1724  #[inline]
1725  #[allow(non_snake_case)]
1726  pub fn key_as_list(&self) -> Option<List<'a>> {
1727    if self.key_type() == Value::List {
1728      let u = self.key();
1729      // Safety:
1730      // Created from a valid Table for this object
1731      // Which contains a valid union in this slot
1732      Some(unsafe { List::init_from_table(u) })
1733    } else {
1734      None
1735    }
1736  }
1737
1738  #[inline]
1739  #[allow(non_snake_case)]
1740  pub fn key_as_document(&self) -> Option<Document<'a>> {
1741    if self.key_type() == Value::Document {
1742      let u = self.key();
1743      // Safety:
1744      // Created from a valid Table for this object
1745      // Which contains a valid union in this slot
1746      Some(unsafe { Document::init_from_table(u) })
1747    } else {
1748      None
1749    }
1750  }
1751
1752  #[inline]
1753  #[allow(non_snake_case)]
1754  pub fn key_as_time(&self) -> Option<Time<'a>> {
1755    if self.key_type() == Value::Time {
1756      let u = self.key();
1757      // Safety:
1758      // Created from a valid Table for this object
1759      // Which contains a valid union in this slot
1760      Some(unsafe { Time::init_from_table(u) })
1761    } else {
1762      None
1763    }
1764  }
1765
1766  #[inline]
1767  #[allow(non_snake_case)]
1768  pub fn values_as_null(&self) -> Option<Null<'a>> {
1769    if self.values_type() == Value::Null {
1770      let u = self.values();
1771      // Safety:
1772      // Created from a valid Table for this object
1773      // Which contains a valid union in this slot
1774      Some(unsafe { Null::init_from_table(u) })
1775    } else {
1776      None
1777    }
1778  }
1779
1780  #[inline]
1781  #[allow(non_snake_case)]
1782  pub fn values_as_text(&self) -> Option<Text<'a>> {
1783    if self.values_type() == Value::Text {
1784      let u = self.values();
1785      // Safety:
1786      // Created from a valid Table for this object
1787      // Which contains a valid union in this slot
1788      Some(unsafe { Text::init_from_table(u) })
1789    } else {
1790      None
1791    }
1792  }
1793
1794  #[inline]
1795  #[allow(non_snake_case)]
1796  pub fn values_as_bool(&self) -> Option<Bool<'a>> {
1797    if self.values_type() == Value::Bool {
1798      let u = self.values();
1799      // Safety:
1800      // Created from a valid Table for this object
1801      // Which contains a valid union in this slot
1802      Some(unsafe { Bool::init_from_table(u) })
1803    } else {
1804      None
1805    }
1806  }
1807
1808  #[inline]
1809  #[allow(non_snake_case)]
1810  pub fn values_as_integer(&self) -> Option<Integer<'a>> {
1811    if self.values_type() == Value::Integer {
1812      let u = self.values();
1813      // Safety:
1814      // Created from a valid Table for this object
1815      // Which contains a valid union in this slot
1816      Some(unsafe { Integer::init_from_table(u) })
1817    } else {
1818      None
1819    }
1820  }
1821
1822  #[inline]
1823  #[allow(non_snake_case)]
1824  pub fn values_as_float(&self) -> Option<Float<'a>> {
1825    if self.values_type() == Value::Float {
1826      let u = self.values();
1827      // Safety:
1828      // Created from a valid Table for this object
1829      // Which contains a valid union in this slot
1830      Some(unsafe { Float::init_from_table(u) })
1831    } else {
1832      None
1833    }
1834  }
1835
1836  #[inline]
1837  #[allow(non_snake_case)]
1838  pub fn values_as_list(&self) -> Option<List<'a>> {
1839    if self.values_type() == Value::List {
1840      let u = self.values();
1841      // Safety:
1842      // Created from a valid Table for this object
1843      // Which contains a valid union in this slot
1844      Some(unsafe { List::init_from_table(u) })
1845    } else {
1846      None
1847    }
1848  }
1849
1850  #[inline]
1851  #[allow(non_snake_case)]
1852  pub fn values_as_document(&self) -> Option<Document<'a>> {
1853    if self.values_type() == Value::Document {
1854      let u = self.values();
1855      // Safety:
1856      // Created from a valid Table for this object
1857      // Which contains a valid union in this slot
1858      Some(unsafe { Document::init_from_table(u) })
1859    } else {
1860      None
1861    }
1862  }
1863
1864  #[inline]
1865  #[allow(non_snake_case)]
1866  pub fn values_as_time(&self) -> Option<Time<'a>> {
1867    if self.values_type() == Value::Time {
1868      let u = self.values();
1869      // Safety:
1870      // Created from a valid Table for this object
1871      // Which contains a valid union in this slot
1872      Some(unsafe { Time::init_from_table(u) })
1873    } else {
1874      None
1875    }
1876  }
1877
1878}
1879
1880impl flatbuffers::Verifiable for KeyValue<'_> {
1881  #[inline]
1882  fn run_verifier(
1883    v: &mut flatbuffers::Verifier, pos: usize
1884  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1885    use self::flatbuffers::Verifiable;
1886    v.visit_table(pos)?
1887     .visit_union::<Value, _>("key_type", Self::VT_KEY_TYPE, "key", Self::VT_KEY, true, |key, v, pos| {
1888        match key {
1889          Value::Null => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Null>>("Value::Null", pos),
1890          Value::Text => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Text>>("Value::Text", pos),
1891          Value::Bool => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Bool>>("Value::Bool", pos),
1892          Value::Integer => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Integer>>("Value::Integer", pos),
1893          Value::Float => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Float>>("Value::Float", pos),
1894          Value::List => v.verify_union_variant::<flatbuffers::ForwardsUOffset<List>>("Value::List", pos),
1895          Value::Document => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Document>>("Value::Document", pos),
1896          Value::Time => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Time>>("Value::Time", pos),
1897          _ => Ok(()),
1898        }
1899     })?
1900     .visit_union::<Value, _>("values_type", Self::VT_VALUES_TYPE, "values", Self::VT_VALUES, true, |key, v, pos| {
1901        match key {
1902          Value::Null => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Null>>("Value::Null", pos),
1903          Value::Text => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Text>>("Value::Text", pos),
1904          Value::Bool => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Bool>>("Value::Bool", pos),
1905          Value::Integer => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Integer>>("Value::Integer", pos),
1906          Value::Float => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Float>>("Value::Float", pos),
1907          Value::List => v.verify_union_variant::<flatbuffers::ForwardsUOffset<List>>("Value::List", pos),
1908          Value::Document => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Document>>("Value::Document", pos),
1909          Value::Time => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Time>>("Value::Time", pos),
1910          _ => Ok(()),
1911        }
1912     })?
1913     .finish();
1914    Ok(())
1915  }
1916}
1917pub struct KeyValueArgs {
1918    pub key_type: Value,
1919    pub key: Option<flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>>,
1920    pub values_type: Value,
1921    pub values: Option<flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>>,
1922}
1923impl<'a> Default for KeyValueArgs {
1924  #[inline]
1925  fn default() -> Self {
1926    KeyValueArgs {
1927      key_type: Value::NONE,
1928      key: None, // required field
1929      values_type: Value::NONE,
1930      values: None, // required field
1931    }
1932  }
1933}
1934
1935pub struct KeyValueBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
1936  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1937  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
1938}
1939impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> KeyValueBuilder<'a, 'b, A> {
1940  #[inline]
1941  pub fn add_key_type(&mut self, key_type: Value) {
1942    self.fbb_.push_slot::<Value>(KeyValue::VT_KEY_TYPE, key_type, Value::NONE);
1943  }
1944  #[inline]
1945  pub fn add_key(&mut self, key: flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>) {
1946    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(KeyValue::VT_KEY, key);
1947  }
1948  #[inline]
1949  pub fn add_values_type(&mut self, values_type: Value) {
1950    self.fbb_.push_slot::<Value>(KeyValue::VT_VALUES_TYPE, values_type, Value::NONE);
1951  }
1952  #[inline]
1953  pub fn add_values(&mut self, values: flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>) {
1954    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(KeyValue::VT_VALUES, values);
1955  }
1956  #[inline]
1957  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> KeyValueBuilder<'a, 'b, A> {
1958    let start = _fbb.start_table();
1959    KeyValueBuilder {
1960      fbb_: _fbb,
1961      start_: start,
1962    }
1963  }
1964  #[inline]
1965  pub fn finish(self) -> flatbuffers::WIPOffset<KeyValue<'a>> {
1966    let o = self.fbb_.end_table(self.start_);
1967    self.fbb_.required(o, KeyValue::VT_KEY,"key");
1968    self.fbb_.required(o, KeyValue::VT_VALUES,"values");
1969    flatbuffers::WIPOffset::new(o.value())
1970  }
1971}
1972
1973impl core::fmt::Debug for KeyValue<'_> {
1974  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1975    let mut ds = f.debug_struct("KeyValue");
1976      ds.field("key_type", &self.key_type());
1977      match self.key_type() {
1978        Value::Null => {
1979          if let Some(x) = self.key_as_null() {
1980            ds.field("key", &x)
1981          } else {
1982            ds.field("key", &"InvalidFlatbuffer: Union discriminant does not match value.")
1983          }
1984        },
1985        Value::Text => {
1986          if let Some(x) = self.key_as_text() {
1987            ds.field("key", &x)
1988          } else {
1989            ds.field("key", &"InvalidFlatbuffer: Union discriminant does not match value.")
1990          }
1991        },
1992        Value::Bool => {
1993          if let Some(x) = self.key_as_bool() {
1994            ds.field("key", &x)
1995          } else {
1996            ds.field("key", &"InvalidFlatbuffer: Union discriminant does not match value.")
1997          }
1998        },
1999        Value::Integer => {
2000          if let Some(x) = self.key_as_integer() {
2001            ds.field("key", &x)
2002          } else {
2003            ds.field("key", &"InvalidFlatbuffer: Union discriminant does not match value.")
2004          }
2005        },
2006        Value::Float => {
2007          if let Some(x) = self.key_as_float() {
2008            ds.field("key", &x)
2009          } else {
2010            ds.field("key", &"InvalidFlatbuffer: Union discriminant does not match value.")
2011          }
2012        },
2013        Value::List => {
2014          if let Some(x) = self.key_as_list() {
2015            ds.field("key", &x)
2016          } else {
2017            ds.field("key", &"InvalidFlatbuffer: Union discriminant does not match value.")
2018          }
2019        },
2020        Value::Document => {
2021          if let Some(x) = self.key_as_document() {
2022            ds.field("key", &x)
2023          } else {
2024            ds.field("key", &"InvalidFlatbuffer: Union discriminant does not match value.")
2025          }
2026        },
2027        Value::Time => {
2028          if let Some(x) = self.key_as_time() {
2029            ds.field("key", &x)
2030          } else {
2031            ds.field("key", &"InvalidFlatbuffer: Union discriminant does not match value.")
2032          }
2033        },
2034        _ => {
2035          let x: Option<()> = None;
2036          ds.field("key", &x)
2037        },
2038      };
2039      ds.field("values_type", &self.values_type());
2040      match self.values_type() {
2041        Value::Null => {
2042          if let Some(x) = self.values_as_null() {
2043            ds.field("values", &x)
2044          } else {
2045            ds.field("values", &"InvalidFlatbuffer: Union discriminant does not match value.")
2046          }
2047        },
2048        Value::Text => {
2049          if let Some(x) = self.values_as_text() {
2050            ds.field("values", &x)
2051          } else {
2052            ds.field("values", &"InvalidFlatbuffer: Union discriminant does not match value.")
2053          }
2054        },
2055        Value::Bool => {
2056          if let Some(x) = self.values_as_bool() {
2057            ds.field("values", &x)
2058          } else {
2059            ds.field("values", &"InvalidFlatbuffer: Union discriminant does not match value.")
2060          }
2061        },
2062        Value::Integer => {
2063          if let Some(x) = self.values_as_integer() {
2064            ds.field("values", &x)
2065          } else {
2066            ds.field("values", &"InvalidFlatbuffer: Union discriminant does not match value.")
2067          }
2068        },
2069        Value::Float => {
2070          if let Some(x) = self.values_as_float() {
2071            ds.field("values", &x)
2072          } else {
2073            ds.field("values", &"InvalidFlatbuffer: Union discriminant does not match value.")
2074          }
2075        },
2076        Value::List => {
2077          if let Some(x) = self.values_as_list() {
2078            ds.field("values", &x)
2079          } else {
2080            ds.field("values", &"InvalidFlatbuffer: Union discriminant does not match value.")
2081          }
2082        },
2083        Value::Document => {
2084          if let Some(x) = self.values_as_document() {
2085            ds.field("values", &x)
2086          } else {
2087            ds.field("values", &"InvalidFlatbuffer: Union discriminant does not match value.")
2088          }
2089        },
2090        Value::Time => {
2091          if let Some(x) = self.values_as_time() {
2092            ds.field("values", &x)
2093          } else {
2094            ds.field("values", &"InvalidFlatbuffer: Union discriminant does not match value.")
2095          }
2096        },
2097        _ => {
2098          let x: Option<()> = None;
2099          ds.field("values", &x)
2100        },
2101      };
2102      ds.finish()
2103  }
2104}
2105pub enum DocumentOffset {}
2106#[derive(Copy, Clone, PartialEq)]
2107
2108pub struct Document<'a> {
2109  pub _tab: flatbuffers::Table<'a>,
2110}
2111
2112impl<'a> flatbuffers::Follow<'a> for Document<'a> {
2113  type Inner = Document<'a>;
2114  #[inline]
2115  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2116    Self { _tab: flatbuffers::Table::new(buf, loc) }
2117  }
2118}
2119
2120impl<'a> Document<'a> {
2121  pub const VT_DATA: flatbuffers::VOffsetT = 4;
2122
2123  #[inline]
2124  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2125    Document { _tab: table }
2126  }
2127  #[allow(unused_mut)]
2128  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
2129    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
2130    args: &'args DocumentArgs<'args>
2131  ) -> flatbuffers::WIPOffset<Document<'bldr>> {
2132    let mut builder = DocumentBuilder::new(_fbb);
2133    if let Some(x) = args.data { builder.add_data(x); }
2134    builder.finish()
2135  }
2136
2137
2138  #[inline]
2139  pub fn data(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>> {
2140    // Safety:
2141    // Created from valid Table for this object
2142    // which contains a valid value in this slot
2143    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue>>>>(Document::VT_DATA, None).unwrap()}
2144  }
2145}
2146
2147impl flatbuffers::Verifiable for Document<'_> {
2148  #[inline]
2149  fn run_verifier(
2150    v: &mut flatbuffers::Verifier, pos: usize
2151  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2152    use self::flatbuffers::Verifiable;
2153    v.visit_table(pos)?
2154     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValue>>>>("data", Self::VT_DATA, true)?
2155     .finish();
2156    Ok(())
2157  }
2158}
2159pub struct DocumentArgs<'a> {
2160    pub data: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValue<'a>>>>>,
2161}
2162impl<'a> Default for DocumentArgs<'a> {
2163  #[inline]
2164  fn default() -> Self {
2165    DocumentArgs {
2166      data: None, // required field
2167    }
2168  }
2169}
2170
2171pub struct DocumentBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
2172  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2173  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2174}
2175impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> DocumentBuilder<'a, 'b, A> {
2176  #[inline]
2177  pub fn add_data(&mut self, data: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<KeyValue<'b >>>>) {
2178    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Document::VT_DATA, data);
2179  }
2180  #[inline]
2181  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> DocumentBuilder<'a, 'b, A> {
2182    let start = _fbb.start_table();
2183    DocumentBuilder {
2184      fbb_: _fbb,
2185      start_: start,
2186    }
2187  }
2188  #[inline]
2189  pub fn finish(self) -> flatbuffers::WIPOffset<Document<'a>> {
2190    let o = self.fbb_.end_table(self.start_);
2191    self.fbb_.required(o, Document::VT_DATA,"data");
2192    flatbuffers::WIPOffset::new(o.value())
2193  }
2194}
2195
2196impl core::fmt::Debug for Document<'_> {
2197  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2198    let mut ds = f.debug_struct("Document");
2199      ds.field("data", &self.data());
2200      ds.finish()
2201  }
2202}
2203pub enum TrainOffset {}
2204#[derive(Copy, Clone, PartialEq)]
2205
2206pub struct Train<'a> {
2207  pub _tab: flatbuffers::Table<'a>,
2208}
2209
2210impl<'a> flatbuffers::Follow<'a> for Train<'a> {
2211  type Inner = Train<'a>;
2212  #[inline]
2213  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2214    Self { _tab: flatbuffers::Table::new(buf, loc) }
2215  }
2216}
2217
2218impl<'a> Train<'a> {
2219  pub const VT_VALUES: flatbuffers::VOffsetT = 4;
2220  pub const VT_TOPIC: flatbuffers::VOffsetT = 6;
2221  pub const VT_EVENT_TIME: flatbuffers::VOffsetT = 8;
2222
2223  #[inline]
2224  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2225    Train { _tab: table }
2226  }
2227  #[allow(unused_mut)]
2228  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
2229    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
2230    args: &'args TrainArgs<'args>
2231  ) -> flatbuffers::WIPOffset<Train<'bldr>> {
2232    let mut builder = TrainBuilder::new(_fbb);
2233    if let Some(x) = args.event_time { builder.add_event_time(x); }
2234    if let Some(x) = args.topic { builder.add_topic(x); }
2235    if let Some(x) = args.values { builder.add_values(x); }
2236    builder.finish()
2237  }
2238
2239
2240  #[inline]
2241  pub fn values(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ValueWrapper<'a>>> {
2242    // Safety:
2243    // Created from valid Table for this object
2244    // which contains a valid value in this slot
2245    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ValueWrapper>>>>(Train::VT_VALUES, None).unwrap()}
2246  }
2247  #[inline]
2248  pub fn topic(&self) -> Option<&'a str> {
2249    // Safety:
2250    // Created from valid Table for this object
2251    // which contains a valid value in this slot
2252    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Train::VT_TOPIC, None)}
2253  }
2254  #[inline]
2255  pub fn event_time(&self) -> Option<Time<'a>> {
2256    // Safety:
2257    // Created from valid Table for this object
2258    // which contains a valid value in this slot
2259    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Time>>(Train::VT_EVENT_TIME, None)}
2260  }
2261}
2262
2263impl flatbuffers::Verifiable for Train<'_> {
2264  #[inline]
2265  fn run_verifier(
2266    v: &mut flatbuffers::Verifier, pos: usize
2267  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2268    use self::flatbuffers::Verifiable;
2269    v.visit_table(pos)?
2270     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<ValueWrapper>>>>("values", Self::VT_VALUES, true)?
2271     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("topic", Self::VT_TOPIC, false)?
2272     .visit_field::<flatbuffers::ForwardsUOffset<Time>>("event_time", Self::VT_EVENT_TIME, false)?
2273     .finish();
2274    Ok(())
2275  }
2276}
2277pub struct TrainArgs<'a> {
2278    pub values: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ValueWrapper<'a>>>>>,
2279    pub topic: Option<flatbuffers::WIPOffset<&'a str>>,
2280    pub event_time: Option<flatbuffers::WIPOffset<Time<'a>>>,
2281}
2282impl<'a> Default for TrainArgs<'a> {
2283  #[inline]
2284  fn default() -> Self {
2285    TrainArgs {
2286      values: None, // required field
2287      topic: None,
2288      event_time: None,
2289    }
2290  }
2291}
2292
2293pub struct TrainBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
2294  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2295  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2296}
2297impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TrainBuilder<'a, 'b, A> {
2298  #[inline]
2299  pub fn add_values(&mut self, values: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<ValueWrapper<'b >>>>) {
2300    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Train::VT_VALUES, values);
2301  }
2302  #[inline]
2303  pub fn add_topic(&mut self, topic: flatbuffers::WIPOffset<&'b  str>) {
2304    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Train::VT_TOPIC, topic);
2305  }
2306  #[inline]
2307  pub fn add_event_time(&mut self, event_time: flatbuffers::WIPOffset<Time<'b >>) {
2308    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Time>>(Train::VT_EVENT_TIME, event_time);
2309  }
2310  #[inline]
2311  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TrainBuilder<'a, 'b, A> {
2312    let start = _fbb.start_table();
2313    TrainBuilder {
2314      fbb_: _fbb,
2315      start_: start,
2316    }
2317  }
2318  #[inline]
2319  pub fn finish(self) -> flatbuffers::WIPOffset<Train<'a>> {
2320    let o = self.fbb_.end_table(self.start_);
2321    self.fbb_.required(o, Train::VT_VALUES,"values");
2322    flatbuffers::WIPOffset::new(o.value())
2323  }
2324}
2325
2326impl core::fmt::Debug for Train<'_> {
2327  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2328    let mut ds = f.debug_struct("Train");
2329      ds.field("values", &self.values());
2330      ds.field("topic", &self.topic());
2331      ds.field("event_time", &self.event_time());
2332      ds.finish()
2333  }
2334}
2335pub enum CatalogOffset {}
2336#[derive(Copy, Clone, PartialEq)]
2337
2338pub struct Catalog<'a> {
2339  pub _tab: flatbuffers::Table<'a>,
2340}
2341
2342impl<'a> flatbuffers::Follow<'a> for Catalog<'a> {
2343  type Inner = Catalog<'a>;
2344  #[inline]
2345  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2346    Self { _tab: flatbuffers::Table::new(buf, loc) }
2347  }
2348}
2349
2350impl<'a> Catalog<'a> {
2351  pub const VT_PLANS: flatbuffers::VOffsetT = 4;
2352
2353  #[inline]
2354  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2355    Catalog { _tab: table }
2356  }
2357  #[allow(unused_mut)]
2358  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
2359    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
2360    args: &'args CatalogArgs<'args>
2361  ) -> flatbuffers::WIPOffset<Catalog<'bldr>> {
2362    let mut builder = CatalogBuilder::new(_fbb);
2363    if let Some(x) = args.plans { builder.add_plans(x); }
2364    builder.finish()
2365  }
2366
2367
2368  #[inline]
2369  pub fn plans(&self) -> Option<Plans<'a>> {
2370    // Safety:
2371    // Created from valid Table for this object
2372    // which contains a valid value in this slot
2373    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Plans>>(Catalog::VT_PLANS, None)}
2374  }
2375}
2376
2377impl flatbuffers::Verifiable for Catalog<'_> {
2378  #[inline]
2379  fn run_verifier(
2380    v: &mut flatbuffers::Verifier, pos: usize
2381  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2382    use self::flatbuffers::Verifiable;
2383    v.visit_table(pos)?
2384     .visit_field::<flatbuffers::ForwardsUOffset<Plans>>("plans", Self::VT_PLANS, false)?
2385     .finish();
2386    Ok(())
2387  }
2388}
2389pub struct CatalogArgs<'a> {
2390    pub plans: Option<flatbuffers::WIPOffset<Plans<'a>>>,
2391}
2392impl<'a> Default for CatalogArgs<'a> {
2393  #[inline]
2394  fn default() -> Self {
2395    CatalogArgs {
2396      plans: None,
2397    }
2398  }
2399}
2400
2401pub struct CatalogBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
2402  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2403  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2404}
2405impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> CatalogBuilder<'a, 'b, A> {
2406  #[inline]
2407  pub fn add_plans(&mut self, plans: flatbuffers::WIPOffset<Plans<'b >>) {
2408    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Plans>>(Catalog::VT_PLANS, plans);
2409  }
2410  #[inline]
2411  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> CatalogBuilder<'a, 'b, A> {
2412    let start = _fbb.start_table();
2413    CatalogBuilder {
2414      fbb_: _fbb,
2415      start_: start,
2416    }
2417  }
2418  #[inline]
2419  pub fn finish(self) -> flatbuffers::WIPOffset<Catalog<'a>> {
2420    let o = self.fbb_.end_table(self.start_);
2421    flatbuffers::WIPOffset::new(o.value())
2422  }
2423}
2424
2425impl core::fmt::Debug for Catalog<'_> {
2426  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2427    let mut ds = f.debug_struct("Catalog");
2428      ds.field("plans", &self.plans());
2429      ds.finish()
2430  }
2431}
2432pub enum StationOffset {}
2433#[derive(Copy, Clone, PartialEq)]
2434
2435pub struct Station<'a> {
2436  pub _tab: flatbuffers::Table<'a>,
2437}
2438
2439impl<'a> flatbuffers::Follow<'a> for Station<'a> {
2440  type Inner = Station<'a>;
2441  #[inline]
2442  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2443    Self { _tab: flatbuffers::Table::new(buf, loc) }
2444  }
2445}
2446
2447impl<'a> Station<'a> {
2448  pub const VT_ID: flatbuffers::VOffsetT = 4;
2449  pub const VT_STOP: flatbuffers::VOffsetT = 6;
2450  pub const VT_TRANSFORM: flatbuffers::VOffsetT = 8;
2451  pub const VT_BLOCK: flatbuffers::VOffsetT = 10;
2452  pub const VT_INPUTS: flatbuffers::VOffsetT = 12;
2453
2454  #[inline]
2455  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2456    Station { _tab: table }
2457  }
2458  #[allow(unused_mut)]
2459  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
2460    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
2461    args: &'args StationArgs<'args>
2462  ) -> flatbuffers::WIPOffset<Station<'bldr>> {
2463    let mut builder = StationBuilder::new(_fbb);
2464    builder.add_stop(args.stop);
2465    builder.add_id(args.id);
2466    if let Some(x) = args.inputs { builder.add_inputs(x); }
2467    if let Some(x) = args.block { builder.add_block(x); }
2468    if let Some(x) = args.transform { builder.add_transform(x); }
2469    builder.finish()
2470  }
2471
2472
2473  #[inline]
2474  pub fn id(&self) -> u64 {
2475    // Safety:
2476    // Created from valid Table for this object
2477    // which contains a valid value in this slot
2478    unsafe { self._tab.get::<u64>(Station::VT_ID, Some(0)).unwrap()}
2479  }
2480  #[inline]
2481  pub fn stop(&self) -> u64 {
2482    // Safety:
2483    // Created from valid Table for this object
2484    // which contains a valid value in this slot
2485    unsafe { self._tab.get::<u64>(Station::VT_STOP, Some(0)).unwrap()}
2486  }
2487  #[inline]
2488  pub fn transform(&self) -> Option<Transform<'a>> {
2489    // Safety:
2490    // Created from valid Table for this object
2491    // which contains a valid value in this slot
2492    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Transform>>(Station::VT_TRANSFORM, None)}
2493  }
2494  #[inline]
2495  pub fn block(&self) -> Option<flatbuffers::Vector<'a, u64>> {
2496    // Safety:
2497    // Created from valid Table for this object
2498    // which contains a valid value in this slot
2499    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u64>>>(Station::VT_BLOCK, None)}
2500  }
2501  #[inline]
2502  pub fn inputs(&self) -> Option<flatbuffers::Vector<'a, u64>> {
2503    // Safety:
2504    // Created from valid Table for this object
2505    // which contains a valid value in this slot
2506    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u64>>>(Station::VT_INPUTS, None)}
2507  }
2508}
2509
2510impl flatbuffers::Verifiable for Station<'_> {
2511  #[inline]
2512  fn run_verifier(
2513    v: &mut flatbuffers::Verifier, pos: usize
2514  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2515    use self::flatbuffers::Verifiable;
2516    v.visit_table(pos)?
2517     .visit_field::<u64>("id", Self::VT_ID, false)?
2518     .visit_field::<u64>("stop", Self::VT_STOP, false)?
2519     .visit_field::<flatbuffers::ForwardsUOffset<Transform>>("transform", Self::VT_TRANSFORM, false)?
2520     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u64>>>("block", Self::VT_BLOCK, false)?
2521     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u64>>>("inputs", Self::VT_INPUTS, false)?
2522     .finish();
2523    Ok(())
2524  }
2525}
2526pub struct StationArgs<'a> {
2527    pub id: u64,
2528    pub stop: u64,
2529    pub transform: Option<flatbuffers::WIPOffset<Transform<'a>>>,
2530    pub block: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u64>>>,
2531    pub inputs: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u64>>>,
2532}
2533impl<'a> Default for StationArgs<'a> {
2534  #[inline]
2535  fn default() -> Self {
2536    StationArgs {
2537      id: 0,
2538      stop: 0,
2539      transform: None,
2540      block: None,
2541      inputs: None,
2542    }
2543  }
2544}
2545
2546pub struct StationBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
2547  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2548  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2549}
2550impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> StationBuilder<'a, 'b, A> {
2551  #[inline]
2552  pub fn add_id(&mut self, id: u64) {
2553    self.fbb_.push_slot::<u64>(Station::VT_ID, id, 0);
2554  }
2555  #[inline]
2556  pub fn add_stop(&mut self, stop: u64) {
2557    self.fbb_.push_slot::<u64>(Station::VT_STOP, stop, 0);
2558  }
2559  #[inline]
2560  pub fn add_transform(&mut self, transform: flatbuffers::WIPOffset<Transform<'b >>) {
2561    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Transform>>(Station::VT_TRANSFORM, transform);
2562  }
2563  #[inline]
2564  pub fn add_block(&mut self, block: flatbuffers::WIPOffset<flatbuffers::Vector<'b , u64>>) {
2565    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Station::VT_BLOCK, block);
2566  }
2567  #[inline]
2568  pub fn add_inputs(&mut self, inputs: flatbuffers::WIPOffset<flatbuffers::Vector<'b , u64>>) {
2569    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Station::VT_INPUTS, inputs);
2570  }
2571  #[inline]
2572  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> StationBuilder<'a, 'b, A> {
2573    let start = _fbb.start_table();
2574    StationBuilder {
2575      fbb_: _fbb,
2576      start_: start,
2577    }
2578  }
2579  #[inline]
2580  pub fn finish(self) -> flatbuffers::WIPOffset<Station<'a>> {
2581    let o = self.fbb_.end_table(self.start_);
2582    flatbuffers::WIPOffset::new(o.value())
2583  }
2584}
2585
2586impl core::fmt::Debug for Station<'_> {
2587  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2588    let mut ds = f.debug_struct("Station");
2589      ds.field("id", &self.id());
2590      ds.field("stop", &self.stop());
2591      ds.field("transform", &self.transform());
2592      ds.field("block", &self.block());
2593      ds.field("inputs", &self.inputs());
2594      ds.finish()
2595  }
2596}
2597pub enum LanguageTransformOffset {}
2598#[derive(Copy, Clone, PartialEq)]
2599
2600pub struct LanguageTransform<'a> {
2601  pub _tab: flatbuffers::Table<'a>,
2602}
2603
2604impl<'a> flatbuffers::Follow<'a> for LanguageTransform<'a> {
2605  type Inner = LanguageTransform<'a>;
2606  #[inline]
2607  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2608    Self { _tab: flatbuffers::Table::new(buf, loc) }
2609  }
2610}
2611
2612impl<'a> LanguageTransform<'a> {
2613  pub const VT_LANGUAGE: flatbuffers::VOffsetT = 4;
2614  pub const VT_QUERY: flatbuffers::VOffsetT = 6;
2615
2616  #[inline]
2617  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2618    LanguageTransform { _tab: table }
2619  }
2620  #[allow(unused_mut)]
2621  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
2622    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
2623    args: &'args LanguageTransformArgs<'args>
2624  ) -> flatbuffers::WIPOffset<LanguageTransform<'bldr>> {
2625    let mut builder = LanguageTransformBuilder::new(_fbb);
2626    if let Some(x) = args.query { builder.add_query(x); }
2627    if let Some(x) = args.language { builder.add_language(x); }
2628    builder.finish()
2629  }
2630
2631
2632  #[inline]
2633  pub fn language(&self) -> Option<&'a str> {
2634    // Safety:
2635    // Created from valid Table for this object
2636    // which contains a valid value in this slot
2637    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(LanguageTransform::VT_LANGUAGE, None)}
2638  }
2639  #[inline]
2640  pub fn query(&self) -> Option<&'a str> {
2641    // Safety:
2642    // Created from valid Table for this object
2643    // which contains a valid value in this slot
2644    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(LanguageTransform::VT_QUERY, None)}
2645  }
2646}
2647
2648impl flatbuffers::Verifiable for LanguageTransform<'_> {
2649  #[inline]
2650  fn run_verifier(
2651    v: &mut flatbuffers::Verifier, pos: usize
2652  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2653    use self::flatbuffers::Verifiable;
2654    v.visit_table(pos)?
2655     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("language", Self::VT_LANGUAGE, false)?
2656     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("query", Self::VT_QUERY, false)?
2657     .finish();
2658    Ok(())
2659  }
2660}
2661pub struct LanguageTransformArgs<'a> {
2662    pub language: Option<flatbuffers::WIPOffset<&'a str>>,
2663    pub query: Option<flatbuffers::WIPOffset<&'a str>>,
2664}
2665impl<'a> Default for LanguageTransformArgs<'a> {
2666  #[inline]
2667  fn default() -> Self {
2668    LanguageTransformArgs {
2669      language: None,
2670      query: None,
2671    }
2672  }
2673}
2674
2675pub struct LanguageTransformBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
2676  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2677  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2678}
2679impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> LanguageTransformBuilder<'a, 'b, A> {
2680  #[inline]
2681  pub fn add_language(&mut self, language: flatbuffers::WIPOffset<&'b  str>) {
2682    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(LanguageTransform::VT_LANGUAGE, language);
2683  }
2684  #[inline]
2685  pub fn add_query(&mut self, query: flatbuffers::WIPOffset<&'b  str>) {
2686    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(LanguageTransform::VT_QUERY, query);
2687  }
2688  #[inline]
2689  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> LanguageTransformBuilder<'a, 'b, A> {
2690    let start = _fbb.start_table();
2691    LanguageTransformBuilder {
2692      fbb_: _fbb,
2693      start_: start,
2694    }
2695  }
2696  #[inline]
2697  pub fn finish(self) -> flatbuffers::WIPOffset<LanguageTransform<'a>> {
2698    let o = self.fbb_.end_table(self.start_);
2699    flatbuffers::WIPOffset::new(o.value())
2700  }
2701}
2702
2703impl core::fmt::Debug for LanguageTransform<'_> {
2704  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2705    let mut ds = f.debug_struct("LanguageTransform");
2706      ds.field("language", &self.language());
2707      ds.field("query", &self.query());
2708      ds.finish()
2709  }
2710}
2711pub enum TransformOffset {}
2712#[derive(Copy, Clone, PartialEq)]
2713
2714pub struct Transform<'a> {
2715  pub _tab: flatbuffers::Table<'a>,
2716}
2717
2718impl<'a> flatbuffers::Follow<'a> for Transform<'a> {
2719  type Inner = Transform<'a>;
2720  #[inline]
2721  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2722    Self { _tab: flatbuffers::Table::new(buf, loc) }
2723  }
2724}
2725
2726impl<'a> Transform<'a> {
2727  pub const VT_NAME: flatbuffers::VOffsetT = 4;
2728  pub const VT_TYPE_TYPE: flatbuffers::VOffsetT = 6;
2729  pub const VT_TYPE_: flatbuffers::VOffsetT = 8;
2730
2731  #[inline]
2732  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2733    Transform { _tab: table }
2734  }
2735  #[allow(unused_mut)]
2736  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
2737    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
2738    args: &'args TransformArgs<'args>
2739  ) -> flatbuffers::WIPOffset<Transform<'bldr>> {
2740    let mut builder = TransformBuilder::new(_fbb);
2741    if let Some(x) = args.type_ { builder.add_type_(x); }
2742    if let Some(x) = args.name { builder.add_name(x); }
2743    builder.add_type_type(args.type_type);
2744    builder.finish()
2745  }
2746
2747
2748  #[inline]
2749  pub fn name(&self) -> Option<&'a str> {
2750    // Safety:
2751    // Created from valid Table for this object
2752    // which contains a valid value in this slot
2753    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Transform::VT_NAME, None)}
2754  }
2755  #[inline]
2756  pub fn type_type(&self) -> TransformType {
2757    // Safety:
2758    // Created from valid Table for this object
2759    // which contains a valid value in this slot
2760    unsafe { self._tab.get::<TransformType>(Transform::VT_TYPE_TYPE, Some(TransformType::NONE)).unwrap()}
2761  }
2762  #[inline]
2763  pub fn type_(&self) -> Option<flatbuffers::Table<'a>> {
2764    // Safety:
2765    // Created from valid Table for this object
2766    // which contains a valid value in this slot
2767    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Table<'a>>>(Transform::VT_TYPE_, None)}
2768  }
2769  #[inline]
2770  #[allow(non_snake_case)]
2771  pub fn type__as_language_transform(&self) -> Option<LanguageTransform<'a>> {
2772    if self.type_type() == TransformType::LanguageTransform {
2773      self.type_().map(|t| {
2774       // Safety:
2775       // Created from a valid Table for this object
2776       // Which contains a valid union in this slot
2777       unsafe { LanguageTransform::init_from_table(t) }
2778     })
2779    } else {
2780      None
2781    }
2782  }
2783
2784}
2785
2786impl flatbuffers::Verifiable for Transform<'_> {
2787  #[inline]
2788  fn run_verifier(
2789    v: &mut flatbuffers::Verifier, pos: usize
2790  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2791    use self::flatbuffers::Verifiable;
2792    v.visit_table(pos)?
2793     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
2794     .visit_union::<TransformType, _>("type_type", Self::VT_TYPE_TYPE, "type_", Self::VT_TYPE_, false, |key, v, pos| {
2795        match key {
2796          TransformType::LanguageTransform => v.verify_union_variant::<flatbuffers::ForwardsUOffset<LanguageTransform>>("TransformType::LanguageTransform", pos),
2797          _ => Ok(()),
2798        }
2799     })?
2800     .finish();
2801    Ok(())
2802  }
2803}
2804pub struct TransformArgs<'a> {
2805    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
2806    pub type_type: TransformType,
2807    pub type_: Option<flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>>,
2808}
2809impl<'a> Default for TransformArgs<'a> {
2810  #[inline]
2811  fn default() -> Self {
2812    TransformArgs {
2813      name: None,
2814      type_type: TransformType::NONE,
2815      type_: None,
2816    }
2817  }
2818}
2819
2820pub struct TransformBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
2821  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2822  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2823}
2824impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TransformBuilder<'a, 'b, A> {
2825  #[inline]
2826  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
2827    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Transform::VT_NAME, name);
2828  }
2829  #[inline]
2830  pub fn add_type_type(&mut self, type_type: TransformType) {
2831    self.fbb_.push_slot::<TransformType>(Transform::VT_TYPE_TYPE, type_type, TransformType::NONE);
2832  }
2833  #[inline]
2834  pub fn add_type_(&mut self, type_: flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>) {
2835    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Transform::VT_TYPE_, type_);
2836  }
2837  #[inline]
2838  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> TransformBuilder<'a, 'b, A> {
2839    let start = _fbb.start_table();
2840    TransformBuilder {
2841      fbb_: _fbb,
2842      start_: start,
2843    }
2844  }
2845  #[inline]
2846  pub fn finish(self) -> flatbuffers::WIPOffset<Transform<'a>> {
2847    let o = self.fbb_.end_table(self.start_);
2848    flatbuffers::WIPOffset::new(o.value())
2849  }
2850}
2851
2852impl core::fmt::Debug for Transform<'_> {
2853  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2854    let mut ds = f.debug_struct("Transform");
2855      ds.field("name", &self.name());
2856      ds.field("type_type", &self.type_type());
2857      match self.type_type() {
2858        TransformType::LanguageTransform => {
2859          if let Some(x) = self.type__as_language_transform() {
2860            ds.field("type_", &x)
2861          } else {
2862            ds.field("type_", &"InvalidFlatbuffer: Union discriminant does not match value.")
2863          }
2864        },
2865        _ => {
2866          let x: Option<()> = None;
2867          ds.field("type_", &x)
2868        },
2869      };
2870      ds.finish()
2871  }
2872}
2873pub enum KeyValueU64VecU64Offset {}
2874#[derive(Copy, Clone, PartialEq)]
2875
2876pub struct KeyValueU64VecU64<'a> {
2877  pub _tab: flatbuffers::Table<'a>,
2878}
2879
2880impl<'a> flatbuffers::Follow<'a> for KeyValueU64VecU64<'a> {
2881  type Inner = KeyValueU64VecU64<'a>;
2882  #[inline]
2883  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2884    Self { _tab: flatbuffers::Table::new(buf, loc) }
2885  }
2886}
2887
2888impl<'a> KeyValueU64VecU64<'a> {
2889  pub const VT_KEY: flatbuffers::VOffsetT = 4;
2890  pub const VT_VALUE: flatbuffers::VOffsetT = 6;
2891
2892  #[inline]
2893  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2894    KeyValueU64VecU64 { _tab: table }
2895  }
2896  #[allow(unused_mut)]
2897  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
2898    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
2899    args: &'args KeyValueU64VecU64Args<'args>
2900  ) -> flatbuffers::WIPOffset<KeyValueU64VecU64<'bldr>> {
2901    let mut builder = KeyValueU64VecU64Builder::new(_fbb);
2902    builder.add_key(args.key);
2903    if let Some(x) = args.value { builder.add_value(x); }
2904    builder.finish()
2905  }
2906
2907
2908  #[inline]
2909  pub fn key(&self) -> u64 {
2910    // Safety:
2911    // Created from valid Table for this object
2912    // which contains a valid value in this slot
2913    unsafe { self._tab.get::<u64>(KeyValueU64VecU64::VT_KEY, Some(0)).unwrap()}
2914  }
2915  #[inline]
2916  pub fn value(&self) -> Option<flatbuffers::Vector<'a, u64>> {
2917    // Safety:
2918    // Created from valid Table for this object
2919    // which contains a valid value in this slot
2920    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u64>>>(KeyValueU64VecU64::VT_VALUE, None)}
2921  }
2922}
2923
2924impl flatbuffers::Verifiable for KeyValueU64VecU64<'_> {
2925  #[inline]
2926  fn run_verifier(
2927    v: &mut flatbuffers::Verifier, pos: usize
2928  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2929    use self::flatbuffers::Verifiable;
2930    v.visit_table(pos)?
2931     .visit_field::<u64>("key", Self::VT_KEY, false)?
2932     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u64>>>("value", Self::VT_VALUE, false)?
2933     .finish();
2934    Ok(())
2935  }
2936}
2937pub struct KeyValueU64VecU64Args<'a> {
2938    pub key: u64,
2939    pub value: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u64>>>,
2940}
2941impl<'a> Default for KeyValueU64VecU64Args<'a> {
2942  #[inline]
2943  fn default() -> Self {
2944    KeyValueU64VecU64Args {
2945      key: 0,
2946      value: None,
2947    }
2948  }
2949}
2950
2951pub struct KeyValueU64VecU64Builder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
2952  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2953  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2954}
2955impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> KeyValueU64VecU64Builder<'a, 'b, A> {
2956  #[inline]
2957  pub fn add_key(&mut self, key: u64) {
2958    self.fbb_.push_slot::<u64>(KeyValueU64VecU64::VT_KEY, key, 0);
2959  }
2960  #[inline]
2961  pub fn add_value(&mut self, value: flatbuffers::WIPOffset<flatbuffers::Vector<'b , u64>>) {
2962    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(KeyValueU64VecU64::VT_VALUE, value);
2963  }
2964  #[inline]
2965  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> KeyValueU64VecU64Builder<'a, 'b, A> {
2966    let start = _fbb.start_table();
2967    KeyValueU64VecU64Builder {
2968      fbb_: _fbb,
2969      start_: start,
2970    }
2971  }
2972  #[inline]
2973  pub fn finish(self) -> flatbuffers::WIPOffset<KeyValueU64VecU64<'a>> {
2974    let o = self.fbb_.end_table(self.start_);
2975    flatbuffers::WIPOffset::new(o.value())
2976  }
2977}
2978
2979impl core::fmt::Debug for KeyValueU64VecU64<'_> {
2980  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2981    let mut ds = f.debug_struct("KeyValueU64VecU64");
2982      ds.field("key", &self.key());
2983      ds.field("value", &self.value());
2984      ds.finish()
2985  }
2986}
2987pub enum KeyValueU64StationOffset {}
2988#[derive(Copy, Clone, PartialEq)]
2989
2990pub struct KeyValueU64Station<'a> {
2991  pub _tab: flatbuffers::Table<'a>,
2992}
2993
2994impl<'a> flatbuffers::Follow<'a> for KeyValueU64Station<'a> {
2995  type Inner = KeyValueU64Station<'a>;
2996  #[inline]
2997  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2998    Self { _tab: flatbuffers::Table::new(buf, loc) }
2999  }
3000}
3001
3002impl<'a> KeyValueU64Station<'a> {
3003  pub const VT_KEY: flatbuffers::VOffsetT = 4;
3004  pub const VT_VALUE: flatbuffers::VOffsetT = 6;
3005
3006  #[inline]
3007  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
3008    KeyValueU64Station { _tab: table }
3009  }
3010  #[allow(unused_mut)]
3011  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
3012    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
3013    args: &'args KeyValueU64StationArgs<'args>
3014  ) -> flatbuffers::WIPOffset<KeyValueU64Station<'bldr>> {
3015    let mut builder = KeyValueU64StationBuilder::new(_fbb);
3016    builder.add_key(args.key);
3017    if let Some(x) = args.value { builder.add_value(x); }
3018    builder.finish()
3019  }
3020
3021
3022  #[inline]
3023  pub fn key(&self) -> u64 {
3024    // Safety:
3025    // Created from valid Table for this object
3026    // which contains a valid value in this slot
3027    unsafe { self._tab.get::<u64>(KeyValueU64Station::VT_KEY, Some(0)).unwrap()}
3028  }
3029  #[inline]
3030  pub fn value(&self) -> Option<Station<'a>> {
3031    // Safety:
3032    // Created from valid Table for this object
3033    // which contains a valid value in this slot
3034    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Station>>(KeyValueU64Station::VT_VALUE, None)}
3035  }
3036}
3037
3038impl flatbuffers::Verifiable for KeyValueU64Station<'_> {
3039  #[inline]
3040  fn run_verifier(
3041    v: &mut flatbuffers::Verifier, pos: usize
3042  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
3043    use self::flatbuffers::Verifiable;
3044    v.visit_table(pos)?
3045     .visit_field::<u64>("key", Self::VT_KEY, false)?
3046     .visit_field::<flatbuffers::ForwardsUOffset<Station>>("value", Self::VT_VALUE, false)?
3047     .finish();
3048    Ok(())
3049  }
3050}
3051pub struct KeyValueU64StationArgs<'a> {
3052    pub key: u64,
3053    pub value: Option<flatbuffers::WIPOffset<Station<'a>>>,
3054}
3055impl<'a> Default for KeyValueU64StationArgs<'a> {
3056  #[inline]
3057  fn default() -> Self {
3058    KeyValueU64StationArgs {
3059      key: 0,
3060      value: None,
3061    }
3062  }
3063}
3064
3065pub struct KeyValueU64StationBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
3066  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
3067  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
3068}
3069impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> KeyValueU64StationBuilder<'a, 'b, A> {
3070  #[inline]
3071  pub fn add_key(&mut self, key: u64) {
3072    self.fbb_.push_slot::<u64>(KeyValueU64Station::VT_KEY, key, 0);
3073  }
3074  #[inline]
3075  pub fn add_value(&mut self, value: flatbuffers::WIPOffset<Station<'b >>) {
3076    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Station>>(KeyValueU64Station::VT_VALUE, value);
3077  }
3078  #[inline]
3079  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> KeyValueU64StationBuilder<'a, 'b, A> {
3080    let start = _fbb.start_table();
3081    KeyValueU64StationBuilder {
3082      fbb_: _fbb,
3083      start_: start,
3084    }
3085  }
3086  #[inline]
3087  pub fn finish(self) -> flatbuffers::WIPOffset<KeyValueU64Station<'a>> {
3088    let o = self.fbb_.end_table(self.start_);
3089    flatbuffers::WIPOffset::new(o.value())
3090  }
3091}
3092
3093impl core::fmt::Debug for KeyValueU64Station<'_> {
3094  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3095    let mut ds = f.debug_struct("KeyValueU64Station");
3096      ds.field("key", &self.key());
3097      ds.field("value", &self.value());
3098      ds.finish()
3099  }
3100}
3101pub enum KeyValueStringTransformOffset {}
3102#[derive(Copy, Clone, PartialEq)]
3103
3104pub struct KeyValueStringTransform<'a> {
3105  pub _tab: flatbuffers::Table<'a>,
3106}
3107
3108impl<'a> flatbuffers::Follow<'a> for KeyValueStringTransform<'a> {
3109  type Inner = KeyValueStringTransform<'a>;
3110  #[inline]
3111  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3112    Self { _tab: flatbuffers::Table::new(buf, loc) }
3113  }
3114}
3115
3116impl<'a> KeyValueStringTransform<'a> {
3117  pub const VT_KEY: flatbuffers::VOffsetT = 4;
3118  pub const VT_VALUE: flatbuffers::VOffsetT = 6;
3119
3120  #[inline]
3121  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
3122    KeyValueStringTransform { _tab: table }
3123  }
3124  #[allow(unused_mut)]
3125  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
3126    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
3127    args: &'args KeyValueStringTransformArgs<'args>
3128  ) -> flatbuffers::WIPOffset<KeyValueStringTransform<'bldr>> {
3129    let mut builder = KeyValueStringTransformBuilder::new(_fbb);
3130    if let Some(x) = args.value { builder.add_value(x); }
3131    if let Some(x) = args.key { builder.add_key(x); }
3132    builder.finish()
3133  }
3134
3135
3136  #[inline]
3137  pub fn key(&self) -> &'a str {
3138    // Safety:
3139    // Created from valid Table for this object
3140    // which contains a valid value in this slot
3141    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(KeyValueStringTransform::VT_KEY, None).unwrap()}
3142  }
3143  #[inline]
3144  pub fn value(&self) -> Transform<'a> {
3145    // Safety:
3146    // Created from valid Table for this object
3147    // which contains a valid value in this slot
3148    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Transform>>(KeyValueStringTransform::VT_VALUE, None).unwrap()}
3149  }
3150}
3151
3152impl flatbuffers::Verifiable for KeyValueStringTransform<'_> {
3153  #[inline]
3154  fn run_verifier(
3155    v: &mut flatbuffers::Verifier, pos: usize
3156  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
3157    use self::flatbuffers::Verifiable;
3158    v.visit_table(pos)?
3159     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("key", Self::VT_KEY, true)?
3160     .visit_field::<flatbuffers::ForwardsUOffset<Transform>>("value", Self::VT_VALUE, true)?
3161     .finish();
3162    Ok(())
3163  }
3164}
3165pub struct KeyValueStringTransformArgs<'a> {
3166    pub key: Option<flatbuffers::WIPOffset<&'a str>>,
3167    pub value: Option<flatbuffers::WIPOffset<Transform<'a>>>,
3168}
3169impl<'a> Default for KeyValueStringTransformArgs<'a> {
3170  #[inline]
3171  fn default() -> Self {
3172    KeyValueStringTransformArgs {
3173      key: None, // required field
3174      value: None, // required field
3175    }
3176  }
3177}
3178
3179pub struct KeyValueStringTransformBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
3180  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
3181  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
3182}
3183impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> KeyValueStringTransformBuilder<'a, 'b, A> {
3184  #[inline]
3185  pub fn add_key(&mut self, key: flatbuffers::WIPOffset<&'b  str>) {
3186    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(KeyValueStringTransform::VT_KEY, key);
3187  }
3188  #[inline]
3189  pub fn add_value(&mut self, value: flatbuffers::WIPOffset<Transform<'b >>) {
3190    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Transform>>(KeyValueStringTransform::VT_VALUE, value);
3191  }
3192  #[inline]
3193  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> KeyValueStringTransformBuilder<'a, 'b, A> {
3194    let start = _fbb.start_table();
3195    KeyValueStringTransformBuilder {
3196      fbb_: _fbb,
3197      start_: start,
3198    }
3199  }
3200  #[inline]
3201  pub fn finish(self) -> flatbuffers::WIPOffset<KeyValueStringTransform<'a>> {
3202    let o = self.fbb_.end_table(self.start_);
3203    self.fbb_.required(o, KeyValueStringTransform::VT_KEY,"key");
3204    self.fbb_.required(o, KeyValueStringTransform::VT_VALUE,"value");
3205    flatbuffers::WIPOffset::new(o.value())
3206  }
3207}
3208
3209impl core::fmt::Debug for KeyValueStringTransform<'_> {
3210  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3211    let mut ds = f.debug_struct("KeyValueStringTransform");
3212      ds.field("key", &self.key());
3213      ds.field("value", &self.value());
3214      ds.finish()
3215  }
3216}
3217pub enum SourceOffset {}
3218#[derive(Copy, Clone, PartialEq)]
3219
3220pub struct Source<'a> {
3221  pub _tab: flatbuffers::Table<'a>,
3222}
3223
3224impl<'a> flatbuffers::Follow<'a> for Source<'a> {
3225  type Inner = Source<'a>;
3226  #[inline]
3227  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3228    Self { _tab: flatbuffers::Table::new(buf, loc) }
3229  }
3230}
3231
3232impl<'a> Source<'a> {
3233  pub const VT_ID: flatbuffers::VOffsetT = 4;
3234  pub const VT_NAME: flatbuffers::VOffsetT = 6;
3235  pub const VT_TYPE_: flatbuffers::VOffsetT = 8;
3236
3237  #[inline]
3238  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
3239    Source { _tab: table }
3240  }
3241  #[allow(unused_mut)]
3242  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
3243    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
3244    args: &'args SourceArgs<'args>
3245  ) -> flatbuffers::WIPOffset<Source<'bldr>> {
3246    let mut builder = SourceBuilder::new(_fbb);
3247    builder.add_id(args.id);
3248    if let Some(x) = args.type_ { builder.add_type_(x); }
3249    if let Some(x) = args.name { builder.add_name(x); }
3250    builder.finish()
3251  }
3252
3253
3254  #[inline]
3255  pub fn id(&self) -> u64 {
3256    // Safety:
3257    // Created from valid Table for this object
3258    // which contains a valid value in this slot
3259    unsafe { self._tab.get::<u64>(Source::VT_ID, Some(0)).unwrap()}
3260  }
3261  #[inline]
3262  pub fn name(&self) -> &'a str {
3263    // Safety:
3264    // Created from valid Table for this object
3265    // which contains a valid value in this slot
3266    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Source::VT_NAME, None).unwrap()}
3267  }
3268  #[inline]
3269  pub fn type_(&self) -> &'a str {
3270    // Safety:
3271    // Created from valid Table for this object
3272    // which contains a valid value in this slot
3273    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Source::VT_TYPE_, None).unwrap()}
3274  }
3275}
3276
3277impl flatbuffers::Verifiable for Source<'_> {
3278  #[inline]
3279  fn run_verifier(
3280    v: &mut flatbuffers::Verifier, pos: usize
3281  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
3282    use self::flatbuffers::Verifiable;
3283    v.visit_table(pos)?
3284     .visit_field::<u64>("id", Self::VT_ID, false)?
3285     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
3286     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("type_", Self::VT_TYPE_, true)?
3287     .finish();
3288    Ok(())
3289  }
3290}
3291pub struct SourceArgs<'a> {
3292    pub id: u64,
3293    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
3294    pub type_: Option<flatbuffers::WIPOffset<&'a str>>,
3295}
3296impl<'a> Default for SourceArgs<'a> {
3297  #[inline]
3298  fn default() -> Self {
3299    SourceArgs {
3300      id: 0,
3301      name: None, // required field
3302      type_: None, // required field
3303    }
3304  }
3305}
3306
3307pub struct SourceBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
3308  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
3309  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
3310}
3311impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SourceBuilder<'a, 'b, A> {
3312  #[inline]
3313  pub fn add_id(&mut self, id: u64) {
3314    self.fbb_.push_slot::<u64>(Source::VT_ID, id, 0);
3315  }
3316  #[inline]
3317  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
3318    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Source::VT_NAME, name);
3319  }
3320  #[inline]
3321  pub fn add_type_(&mut self, type_: flatbuffers::WIPOffset<&'b  str>) {
3322    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Source::VT_TYPE_, type_);
3323  }
3324  #[inline]
3325  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> SourceBuilder<'a, 'b, A> {
3326    let start = _fbb.start_table();
3327    SourceBuilder {
3328      fbb_: _fbb,
3329      start_: start,
3330    }
3331  }
3332  #[inline]
3333  pub fn finish(self) -> flatbuffers::WIPOffset<Source<'a>> {
3334    let o = self.fbb_.end_table(self.start_);
3335    self.fbb_.required(o, Source::VT_NAME,"name");
3336    self.fbb_.required(o, Source::VT_TYPE_,"type_");
3337    flatbuffers::WIPOffset::new(o.value())
3338  }
3339}
3340
3341impl core::fmt::Debug for Source<'_> {
3342  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3343    let mut ds = f.debug_struct("Source");
3344      ds.field("id", &self.id());
3345      ds.field("name", &self.name());
3346      ds.field("type_", &self.type_());
3347      ds.finish()
3348  }
3349}
3350pub enum DestinationOffset {}
3351#[derive(Copy, Clone, PartialEq)]
3352
3353pub struct Destination<'a> {
3354  pub _tab: flatbuffers::Table<'a>,
3355}
3356
3357impl<'a> flatbuffers::Follow<'a> for Destination<'a> {
3358  type Inner = Destination<'a>;
3359  #[inline]
3360  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3361    Self { _tab: flatbuffers::Table::new(buf, loc) }
3362  }
3363}
3364
3365impl<'a> Destination<'a> {
3366  pub const VT_ID: flatbuffers::VOffsetT = 4;
3367  pub const VT_NAME: flatbuffers::VOffsetT = 6;
3368  pub const VT_TYPE_: flatbuffers::VOffsetT = 8;
3369
3370  #[inline]
3371  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
3372    Destination { _tab: table }
3373  }
3374  #[allow(unused_mut)]
3375  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
3376    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
3377    args: &'args DestinationArgs<'args>
3378  ) -> flatbuffers::WIPOffset<Destination<'bldr>> {
3379    let mut builder = DestinationBuilder::new(_fbb);
3380    builder.add_id(args.id);
3381    if let Some(x) = args.type_ { builder.add_type_(x); }
3382    if let Some(x) = args.name { builder.add_name(x); }
3383    builder.finish()
3384  }
3385
3386
3387  #[inline]
3388  pub fn id(&self) -> u64 {
3389    // Safety:
3390    // Created from valid Table for this object
3391    // which contains a valid value in this slot
3392    unsafe { self._tab.get::<u64>(Destination::VT_ID, Some(0)).unwrap()}
3393  }
3394  #[inline]
3395  pub fn name(&self) -> &'a str {
3396    // Safety:
3397    // Created from valid Table for this object
3398    // which contains a valid value in this slot
3399    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Destination::VT_NAME, None).unwrap()}
3400  }
3401  #[inline]
3402  pub fn type_(&self) -> &'a str {
3403    // Safety:
3404    // Created from valid Table for this object
3405    // which contains a valid value in this slot
3406    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Destination::VT_TYPE_, None).unwrap()}
3407  }
3408}
3409
3410impl flatbuffers::Verifiable for Destination<'_> {
3411  #[inline]
3412  fn run_verifier(
3413    v: &mut flatbuffers::Verifier, pos: usize
3414  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
3415    use self::flatbuffers::Verifiable;
3416    v.visit_table(pos)?
3417     .visit_field::<u64>("id", Self::VT_ID, false)?
3418     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, true)?
3419     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("type_", Self::VT_TYPE_, true)?
3420     .finish();
3421    Ok(())
3422  }
3423}
3424pub struct DestinationArgs<'a> {
3425    pub id: u64,
3426    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
3427    pub type_: Option<flatbuffers::WIPOffset<&'a str>>,
3428}
3429impl<'a> Default for DestinationArgs<'a> {
3430  #[inline]
3431  fn default() -> Self {
3432    DestinationArgs {
3433      id: 0,
3434      name: None, // required field
3435      type_: None, // required field
3436    }
3437  }
3438}
3439
3440pub struct DestinationBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
3441  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
3442  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
3443}
3444impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> DestinationBuilder<'a, 'b, A> {
3445  #[inline]
3446  pub fn add_id(&mut self, id: u64) {
3447    self.fbb_.push_slot::<u64>(Destination::VT_ID, id, 0);
3448  }
3449  #[inline]
3450  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
3451    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Destination::VT_NAME, name);
3452  }
3453  #[inline]
3454  pub fn add_type_(&mut self, type_: flatbuffers::WIPOffset<&'b  str>) {
3455    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Destination::VT_TYPE_, type_);
3456  }
3457  #[inline]
3458  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> DestinationBuilder<'a, 'b, A> {
3459    let start = _fbb.start_table();
3460    DestinationBuilder {
3461      fbb_: _fbb,
3462      start_: start,
3463    }
3464  }
3465  #[inline]
3466  pub fn finish(self) -> flatbuffers::WIPOffset<Destination<'a>> {
3467    let o = self.fbb_.end_table(self.start_);
3468    self.fbb_.required(o, Destination::VT_NAME,"name");
3469    self.fbb_.required(o, Destination::VT_TYPE_,"type_");
3470    flatbuffers::WIPOffset::new(o.value())
3471  }
3472}
3473
3474impl core::fmt::Debug for Destination<'_> {
3475  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3476    let mut ds = f.debug_struct("Destination");
3477      ds.field("id", &self.id());
3478      ds.field("name", &self.name());
3479      ds.field("type_", &self.type_());
3480      ds.finish()
3481  }
3482}
3483pub enum KeyValueU64SourceOffset {}
3484#[derive(Copy, Clone, PartialEq)]
3485
3486pub struct KeyValueU64Source<'a> {
3487  pub _tab: flatbuffers::Table<'a>,
3488}
3489
3490impl<'a> flatbuffers::Follow<'a> for KeyValueU64Source<'a> {
3491  type Inner = KeyValueU64Source<'a>;
3492  #[inline]
3493  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3494    Self { _tab: flatbuffers::Table::new(buf, loc) }
3495  }
3496}
3497
3498impl<'a> KeyValueU64Source<'a> {
3499  pub const VT_KEY: flatbuffers::VOffsetT = 4;
3500  pub const VT_VALUE: flatbuffers::VOffsetT = 6;
3501
3502  #[inline]
3503  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
3504    KeyValueU64Source { _tab: table }
3505  }
3506  #[allow(unused_mut)]
3507  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
3508    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
3509    args: &'args KeyValueU64SourceArgs<'args>
3510  ) -> flatbuffers::WIPOffset<KeyValueU64Source<'bldr>> {
3511    let mut builder = KeyValueU64SourceBuilder::new(_fbb);
3512    builder.add_key(args.key);
3513    if let Some(x) = args.value { builder.add_value(x); }
3514    builder.finish()
3515  }
3516
3517
3518  #[inline]
3519  pub fn key(&self) -> u64 {
3520    // Safety:
3521    // Created from valid Table for this object
3522    // which contains a valid value in this slot
3523    unsafe { self._tab.get::<u64>(KeyValueU64Source::VT_KEY, Some(0)).unwrap()}
3524  }
3525  #[inline]
3526  pub fn value(&self) -> Source<'a> {
3527    // Safety:
3528    // Created from valid Table for this object
3529    // which contains a valid value in this slot
3530    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Source>>(KeyValueU64Source::VT_VALUE, None).unwrap()}
3531  }
3532}
3533
3534impl flatbuffers::Verifiable for KeyValueU64Source<'_> {
3535  #[inline]
3536  fn run_verifier(
3537    v: &mut flatbuffers::Verifier, pos: usize
3538  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
3539    use self::flatbuffers::Verifiable;
3540    v.visit_table(pos)?
3541     .visit_field::<u64>("key", Self::VT_KEY, false)?
3542     .visit_field::<flatbuffers::ForwardsUOffset<Source>>("value", Self::VT_VALUE, true)?
3543     .finish();
3544    Ok(())
3545  }
3546}
3547pub struct KeyValueU64SourceArgs<'a> {
3548    pub key: u64,
3549    pub value: Option<flatbuffers::WIPOffset<Source<'a>>>,
3550}
3551impl<'a> Default for KeyValueU64SourceArgs<'a> {
3552  #[inline]
3553  fn default() -> Self {
3554    KeyValueU64SourceArgs {
3555      key: 0,
3556      value: None, // required field
3557    }
3558  }
3559}
3560
3561pub struct KeyValueU64SourceBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
3562  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
3563  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
3564}
3565impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> KeyValueU64SourceBuilder<'a, 'b, A> {
3566  #[inline]
3567  pub fn add_key(&mut self, key: u64) {
3568    self.fbb_.push_slot::<u64>(KeyValueU64Source::VT_KEY, key, 0);
3569  }
3570  #[inline]
3571  pub fn add_value(&mut self, value: flatbuffers::WIPOffset<Source<'b >>) {
3572    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Source>>(KeyValueU64Source::VT_VALUE, value);
3573  }
3574  #[inline]
3575  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> KeyValueU64SourceBuilder<'a, 'b, A> {
3576    let start = _fbb.start_table();
3577    KeyValueU64SourceBuilder {
3578      fbb_: _fbb,
3579      start_: start,
3580    }
3581  }
3582  #[inline]
3583  pub fn finish(self) -> flatbuffers::WIPOffset<KeyValueU64Source<'a>> {
3584    let o = self.fbb_.end_table(self.start_);
3585    self.fbb_.required(o, KeyValueU64Source::VT_VALUE,"value");
3586    flatbuffers::WIPOffset::new(o.value())
3587  }
3588}
3589
3590impl core::fmt::Debug for KeyValueU64Source<'_> {
3591  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3592    let mut ds = f.debug_struct("KeyValueU64Source");
3593      ds.field("key", &self.key());
3594      ds.field("value", &self.value());
3595      ds.finish()
3596  }
3597}
3598pub enum KeyValueU64DestinationOffset {}
3599#[derive(Copy, Clone, PartialEq)]
3600
3601pub struct KeyValueU64Destination<'a> {
3602  pub _tab: flatbuffers::Table<'a>,
3603}
3604
3605impl<'a> flatbuffers::Follow<'a> for KeyValueU64Destination<'a> {
3606  type Inner = KeyValueU64Destination<'a>;
3607  #[inline]
3608  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3609    Self { _tab: flatbuffers::Table::new(buf, loc) }
3610  }
3611}
3612
3613impl<'a> KeyValueU64Destination<'a> {
3614  pub const VT_KEY: flatbuffers::VOffsetT = 4;
3615  pub const VT_VALUE: flatbuffers::VOffsetT = 6;
3616
3617  #[inline]
3618  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
3619    KeyValueU64Destination { _tab: table }
3620  }
3621  #[allow(unused_mut)]
3622  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
3623    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
3624    args: &'args KeyValueU64DestinationArgs<'args>
3625  ) -> flatbuffers::WIPOffset<KeyValueU64Destination<'bldr>> {
3626    let mut builder = KeyValueU64DestinationBuilder::new(_fbb);
3627    builder.add_key(args.key);
3628    if let Some(x) = args.value { builder.add_value(x); }
3629    builder.finish()
3630  }
3631
3632
3633  #[inline]
3634  pub fn key(&self) -> u64 {
3635    // Safety:
3636    // Created from valid Table for this object
3637    // which contains a valid value in this slot
3638    unsafe { self._tab.get::<u64>(KeyValueU64Destination::VT_KEY, Some(0)).unwrap()}
3639  }
3640  #[inline]
3641  pub fn value(&self) -> Destination<'a> {
3642    // Safety:
3643    // Created from valid Table for this object
3644    // which contains a valid value in this slot
3645    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Destination>>(KeyValueU64Destination::VT_VALUE, None).unwrap()}
3646  }
3647}
3648
3649impl flatbuffers::Verifiable for KeyValueU64Destination<'_> {
3650  #[inline]
3651  fn run_verifier(
3652    v: &mut flatbuffers::Verifier, pos: usize
3653  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
3654    use self::flatbuffers::Verifiable;
3655    v.visit_table(pos)?
3656     .visit_field::<u64>("key", Self::VT_KEY, false)?
3657     .visit_field::<flatbuffers::ForwardsUOffset<Destination>>("value", Self::VT_VALUE, true)?
3658     .finish();
3659    Ok(())
3660  }
3661}
3662pub struct KeyValueU64DestinationArgs<'a> {
3663    pub key: u64,
3664    pub value: Option<flatbuffers::WIPOffset<Destination<'a>>>,
3665}
3666impl<'a> Default for KeyValueU64DestinationArgs<'a> {
3667  #[inline]
3668  fn default() -> Self {
3669    KeyValueU64DestinationArgs {
3670      key: 0,
3671      value: None, // required field
3672    }
3673  }
3674}
3675
3676pub struct KeyValueU64DestinationBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
3677  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
3678  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
3679}
3680impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> KeyValueU64DestinationBuilder<'a, 'b, A> {
3681  #[inline]
3682  pub fn add_key(&mut self, key: u64) {
3683    self.fbb_.push_slot::<u64>(KeyValueU64Destination::VT_KEY, key, 0);
3684  }
3685  #[inline]
3686  pub fn add_value(&mut self, value: flatbuffers::WIPOffset<Destination<'b >>) {
3687    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Destination>>(KeyValueU64Destination::VT_VALUE, value);
3688  }
3689  #[inline]
3690  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> KeyValueU64DestinationBuilder<'a, 'b, A> {
3691    let start = _fbb.start_table();
3692    KeyValueU64DestinationBuilder {
3693      fbb_: _fbb,
3694      start_: start,
3695    }
3696  }
3697  #[inline]
3698  pub fn finish(self) -> flatbuffers::WIPOffset<KeyValueU64Destination<'a>> {
3699    let o = self.fbb_.end_table(self.start_);
3700    self.fbb_.required(o, KeyValueU64Destination::VT_VALUE,"value");
3701    flatbuffers::WIPOffset::new(o.value())
3702  }
3703}
3704
3705impl core::fmt::Debug for KeyValueU64Destination<'_> {
3706  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3707    let mut ds = f.debug_struct("KeyValueU64Destination");
3708      ds.field("key", &self.key());
3709      ds.field("value", &self.value());
3710      ds.finish()
3711  }
3712}
3713pub enum PlanOffset {}
3714#[derive(Copy, Clone, PartialEq)]
3715
3716pub struct Plan<'a> {
3717  pub _tab: flatbuffers::Table<'a>,
3718}
3719
3720impl<'a> flatbuffers::Follow<'a> for Plan<'a> {
3721  type Inner = Plan<'a>;
3722  #[inline]
3723  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3724    Self { _tab: flatbuffers::Table::new(buf, loc) }
3725  }
3726}
3727
3728impl<'a> Plan<'a> {
3729  pub const VT_ID: flatbuffers::VOffsetT = 4;
3730  pub const VT_NAME: flatbuffers::VOffsetT = 6;
3731  pub const VT_TEMPLATE: flatbuffers::VOffsetT = 8;
3732  pub const VT_LINES: flatbuffers::VOffsetT = 10;
3733  pub const VT_STATIONS: flatbuffers::VOffsetT = 12;
3734  pub const VT_STATIONS_TO_IN_OUTS: flatbuffers::VOffsetT = 14;
3735  pub const VT_SOURCES: flatbuffers::VOffsetT = 16;
3736  pub const VT_DESTINATIONS: flatbuffers::VOffsetT = 18;
3737  pub const VT_STATUS: flatbuffers::VOffsetT = 20;
3738  pub const VT_TRANSFORMS: flatbuffers::VOffsetT = 22;
3739
3740  #[inline]
3741  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
3742    Plan { _tab: table }
3743  }
3744  #[allow(unused_mut)]
3745  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
3746    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
3747    args: &'args PlanArgs<'args>
3748  ) -> flatbuffers::WIPOffset<Plan<'bldr>> {
3749    let mut builder = PlanBuilder::new(_fbb);
3750    builder.add_id(args.id);
3751    if let Some(x) = args.transforms { builder.add_transforms(x); }
3752    if let Some(x) = args.destinations { builder.add_destinations(x); }
3753    if let Some(x) = args.sources { builder.add_sources(x); }
3754    if let Some(x) = args.stations_to_in_outs { builder.add_stations_to_in_outs(x); }
3755    if let Some(x) = args.stations { builder.add_stations(x); }
3756    if let Some(x) = args.lines { builder.add_lines(x); }
3757    if let Some(x) = args.template { builder.add_template(x); }
3758    if let Some(x) = args.name { builder.add_name(x); }
3759    builder.add_status(args.status);
3760    builder.finish()
3761  }
3762
3763
3764  #[inline]
3765  pub fn id(&self) -> u64 {
3766    // Safety:
3767    // Created from valid Table for this object
3768    // which contains a valid value in this slot
3769    unsafe { self._tab.get::<u64>(Plan::VT_ID, Some(0)).unwrap()}
3770  }
3771  #[inline]
3772  pub fn name(&self) -> Option<&'a str> {
3773    // Safety:
3774    // Created from valid Table for this object
3775    // which contains a valid value in this slot
3776    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Plan::VT_NAME, None)}
3777  }
3778  #[inline]
3779  pub fn template(&self) -> Option<&'a str> {
3780    // Safety:
3781    // Created from valid Table for this object
3782    // which contains a valid value in this slot
3783    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Plan::VT_TEMPLATE, None)}
3784  }
3785  #[inline]
3786  pub fn lines(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueU64VecU64<'a>>>> {
3787    // Safety:
3788    // Created from valid Table for this object
3789    // which contains a valid value in this slot
3790    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueU64VecU64>>>>(Plan::VT_LINES, None)}
3791  }
3792  #[inline]
3793  pub fn stations(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueU64Station<'a>>>> {
3794    // Safety:
3795    // Created from valid Table for this object
3796    // which contains a valid value in this slot
3797    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueU64Station>>>>(Plan::VT_STATIONS, None)}
3798  }
3799  #[inline]
3800  pub fn stations_to_in_outs(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueU64VecU64<'a>>>> {
3801    // Safety:
3802    // Created from valid Table for this object
3803    // which contains a valid value in this slot
3804    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueU64VecU64>>>>(Plan::VT_STATIONS_TO_IN_OUTS, None)}
3805  }
3806  #[inline]
3807  pub fn sources(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueU64Source<'a>>>> {
3808    // Safety:
3809    // Created from valid Table for this object
3810    // which contains a valid value in this slot
3811    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueU64Source>>>>(Plan::VT_SOURCES, None)}
3812  }
3813  #[inline]
3814  pub fn destinations(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueU64Destination<'a>>>> {
3815    // Safety:
3816    // Created from valid Table for this object
3817    // which contains a valid value in this slot
3818    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueU64Destination>>>>(Plan::VT_DESTINATIONS, None)}
3819  }
3820  #[inline]
3821  pub fn status(&self) -> PlanStatus {
3822    // Safety:
3823    // Created from valid Table for this object
3824    // which contains a valid value in this slot
3825    unsafe { self._tab.get::<PlanStatus>(Plan::VT_STATUS, Some(PlanStatus::Running)).unwrap()}
3826  }
3827  #[inline]
3828  pub fn transforms(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueStringTransform<'a>>>> {
3829    // Safety:
3830    // Created from valid Table for this object
3831    // which contains a valid value in this slot
3832    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueStringTransform>>>>(Plan::VT_TRANSFORMS, None)}
3833  }
3834}
3835
3836impl flatbuffers::Verifiable for Plan<'_> {
3837  #[inline]
3838  fn run_verifier(
3839    v: &mut flatbuffers::Verifier, pos: usize
3840  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
3841    use self::flatbuffers::Verifiable;
3842    v.visit_table(pos)?
3843     .visit_field::<u64>("id", Self::VT_ID, false)?
3844     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
3845     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("template", Self::VT_TEMPLATE, false)?
3846     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValueU64VecU64>>>>("lines", Self::VT_LINES, false)?
3847     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValueU64Station>>>>("stations", Self::VT_STATIONS, false)?
3848     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValueU64VecU64>>>>("stations_to_in_outs", Self::VT_STATIONS_TO_IN_OUTS, false)?
3849     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValueU64Source>>>>("sources", Self::VT_SOURCES, false)?
3850     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValueU64Destination>>>>("destinations", Self::VT_DESTINATIONS, false)?
3851     .visit_field::<PlanStatus>("status", Self::VT_STATUS, false)?
3852     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<KeyValueStringTransform>>>>("transforms", Self::VT_TRANSFORMS, false)?
3853     .finish();
3854    Ok(())
3855  }
3856}
3857pub struct PlanArgs<'a> {
3858    pub id: u64,
3859    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
3860    pub template: Option<flatbuffers::WIPOffset<&'a str>>,
3861    pub lines: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueU64VecU64<'a>>>>>,
3862    pub stations: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueU64Station<'a>>>>>,
3863    pub stations_to_in_outs: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueU64VecU64<'a>>>>>,
3864    pub sources: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueU64Source<'a>>>>>,
3865    pub destinations: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueU64Destination<'a>>>>>,
3866    pub status: PlanStatus,
3867    pub transforms: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<KeyValueStringTransform<'a>>>>>,
3868}
3869impl<'a> Default for PlanArgs<'a> {
3870  #[inline]
3871  fn default() -> Self {
3872    PlanArgs {
3873      id: 0,
3874      name: None,
3875      template: None,
3876      lines: None,
3877      stations: None,
3878      stations_to_in_outs: None,
3879      sources: None,
3880      destinations: None,
3881      status: PlanStatus::Running,
3882      transforms: None,
3883    }
3884  }
3885}
3886
3887pub struct PlanBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
3888  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
3889  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
3890}
3891impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> PlanBuilder<'a, 'b, A> {
3892  #[inline]
3893  pub fn add_id(&mut self, id: u64) {
3894    self.fbb_.push_slot::<u64>(Plan::VT_ID, id, 0);
3895  }
3896  #[inline]
3897  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
3898    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Plan::VT_NAME, name);
3899  }
3900  #[inline]
3901  pub fn add_template(&mut self, template: flatbuffers::WIPOffset<&'b  str>) {
3902    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Plan::VT_TEMPLATE, template);
3903  }
3904  #[inline]
3905  pub fn add_lines(&mut self, lines: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<KeyValueU64VecU64<'b >>>>) {
3906    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Plan::VT_LINES, lines);
3907  }
3908  #[inline]
3909  pub fn add_stations(&mut self, stations: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<KeyValueU64Station<'b >>>>) {
3910    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Plan::VT_STATIONS, stations);
3911  }
3912  #[inline]
3913  pub fn add_stations_to_in_outs(&mut self, stations_to_in_outs: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<KeyValueU64VecU64<'b >>>>) {
3914    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Plan::VT_STATIONS_TO_IN_OUTS, stations_to_in_outs);
3915  }
3916  #[inline]
3917  pub fn add_sources(&mut self, sources: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<KeyValueU64Source<'b >>>>) {
3918    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Plan::VT_SOURCES, sources);
3919  }
3920  #[inline]
3921  pub fn add_destinations(&mut self, destinations: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<KeyValueU64Destination<'b >>>>) {
3922    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Plan::VT_DESTINATIONS, destinations);
3923  }
3924  #[inline]
3925  pub fn add_status(&mut self, status: PlanStatus) {
3926    self.fbb_.push_slot::<PlanStatus>(Plan::VT_STATUS, status, PlanStatus::Running);
3927  }
3928  #[inline]
3929  pub fn add_transforms(&mut self, transforms: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<KeyValueStringTransform<'b >>>>) {
3930    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Plan::VT_TRANSFORMS, transforms);
3931  }
3932  #[inline]
3933  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> PlanBuilder<'a, 'b, A> {
3934    let start = _fbb.start_table();
3935    PlanBuilder {
3936      fbb_: _fbb,
3937      start_: start,
3938    }
3939  }
3940  #[inline]
3941  pub fn finish(self) -> flatbuffers::WIPOffset<Plan<'a>> {
3942    let o = self.fbb_.end_table(self.start_);
3943    flatbuffers::WIPOffset::new(o.value())
3944  }
3945}
3946
3947impl core::fmt::Debug for Plan<'_> {
3948  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3949    let mut ds = f.debug_struct("Plan");
3950      ds.field("id", &self.id());
3951      ds.field("name", &self.name());
3952      ds.field("template", &self.template());
3953      ds.field("lines", &self.lines());
3954      ds.field("stations", &self.stations());
3955      ds.field("stations_to_in_outs", &self.stations_to_in_outs());
3956      ds.field("sources", &self.sources());
3957      ds.field("destinations", &self.destinations());
3958      ds.field("status", &self.status());
3959      ds.field("transforms", &self.transforms());
3960      ds.finish()
3961  }
3962}
3963pub enum PlansOffset {}
3964#[derive(Copy, Clone, PartialEq)]
3965
3966pub struct Plans<'a> {
3967  pub _tab: flatbuffers::Table<'a>,
3968}
3969
3970impl<'a> flatbuffers::Follow<'a> for Plans<'a> {
3971  type Inner = Plans<'a>;
3972  #[inline]
3973  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3974    Self { _tab: flatbuffers::Table::new(buf, loc) }
3975  }
3976}
3977
3978impl<'a> Plans<'a> {
3979  pub const VT_PLANS: flatbuffers::VOffsetT = 4;
3980
3981  #[inline]
3982  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
3983    Plans { _tab: table }
3984  }
3985  #[allow(unused_mut)]
3986  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
3987    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
3988    args: &'args PlansArgs<'args>
3989  ) -> flatbuffers::WIPOffset<Plans<'bldr>> {
3990    let mut builder = PlansBuilder::new(_fbb);
3991    if let Some(x) = args.plans { builder.add_plans(x); }
3992    builder.finish()
3993  }
3994
3995
3996  #[inline]
3997  pub fn plans(&self) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Plan<'a>>> {
3998    // Safety:
3999    // Created from valid Table for this object
4000    // which contains a valid value in this slot
4001    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Plan>>>>(Plans::VT_PLANS, None).unwrap()}
4002  }
4003}
4004
4005impl flatbuffers::Verifiable for Plans<'_> {
4006  #[inline]
4007  fn run_verifier(
4008    v: &mut flatbuffers::Verifier, pos: usize
4009  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4010    use self::flatbuffers::Verifiable;
4011    v.visit_table(pos)?
4012     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Plan>>>>("plans", Self::VT_PLANS, true)?
4013     .finish();
4014    Ok(())
4015  }
4016}
4017pub struct PlansArgs<'a> {
4018    pub plans: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Plan<'a>>>>>,
4019}
4020impl<'a> Default for PlansArgs<'a> {
4021  #[inline]
4022  fn default() -> Self {
4023    PlansArgs {
4024      plans: None, // required field
4025    }
4026  }
4027}
4028
4029pub struct PlansBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
4030  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
4031  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
4032}
4033impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> PlansBuilder<'a, 'b, A> {
4034  #[inline]
4035  pub fn add_plans(&mut self, plans: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<Plan<'b >>>>) {
4036    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Plans::VT_PLANS, plans);
4037  }
4038  #[inline]
4039  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> PlansBuilder<'a, 'b, A> {
4040    let start = _fbb.start_table();
4041    PlansBuilder {
4042      fbb_: _fbb,
4043      start_: start,
4044    }
4045  }
4046  #[inline]
4047  pub fn finish(self) -> flatbuffers::WIPOffset<Plans<'a>> {
4048    let o = self.fbb_.end_table(self.start_);
4049    self.fbb_.required(o, Plans::VT_PLANS,"plans");
4050    flatbuffers::WIPOffset::new(o.value())
4051  }
4052}
4053
4054impl core::fmt::Debug for Plans<'_> {
4055  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
4056    let mut ds = f.debug_struct("Plans");
4057      ds.field("plans", &self.plans());
4058      ds.finish()
4059  }
4060}
4061pub enum DisconnectOffset {}
4062#[derive(Copy, Clone, PartialEq)]
4063
4064pub struct Disconnect<'a> {
4065  pub _tab: flatbuffers::Table<'a>,
4066}
4067
4068impl<'a> flatbuffers::Follow<'a> for Disconnect<'a> {
4069  type Inner = Disconnect<'a>;
4070  #[inline]
4071  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4072    Self { _tab: flatbuffers::Table::new(buf, loc) }
4073  }
4074}
4075
4076impl<'a> Disconnect<'a> {
4077  pub const VT_ID: flatbuffers::VOffsetT = 4;
4078
4079  #[inline]
4080  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
4081    Disconnect { _tab: table }
4082  }
4083  #[allow(unused_mut)]
4084  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
4085    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
4086    args: &'args DisconnectArgs
4087  ) -> flatbuffers::WIPOffset<Disconnect<'bldr>> {
4088    let mut builder = DisconnectBuilder::new(_fbb);
4089    builder.add_id(args.id);
4090    builder.finish()
4091  }
4092
4093
4094  #[inline]
4095  pub fn id(&self) -> u64 {
4096    // Safety:
4097    // Created from valid Table for this object
4098    // which contains a valid value in this slot
4099    unsafe { self._tab.get::<u64>(Disconnect::VT_ID, Some(0)).unwrap()}
4100  }
4101}
4102
4103impl flatbuffers::Verifiable for Disconnect<'_> {
4104  #[inline]
4105  fn run_verifier(
4106    v: &mut flatbuffers::Verifier, pos: usize
4107  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4108    use self::flatbuffers::Verifiable;
4109    v.visit_table(pos)?
4110     .visit_field::<u64>("id", Self::VT_ID, false)?
4111     .finish();
4112    Ok(())
4113  }
4114}
4115pub struct DisconnectArgs {
4116    pub id: u64,
4117}
4118impl<'a> Default for DisconnectArgs {
4119  #[inline]
4120  fn default() -> Self {
4121    DisconnectArgs {
4122      id: 0,
4123    }
4124  }
4125}
4126
4127pub struct DisconnectBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
4128  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
4129  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
4130}
4131impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> DisconnectBuilder<'a, 'b, A> {
4132  #[inline]
4133  pub fn add_id(&mut self, id: u64) {
4134    self.fbb_.push_slot::<u64>(Disconnect::VT_ID, id, 0);
4135  }
4136  #[inline]
4137  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> DisconnectBuilder<'a, 'b, A> {
4138    let start = _fbb.start_table();
4139    DisconnectBuilder {
4140      fbb_: _fbb,
4141      start_: start,
4142    }
4143  }
4144  #[inline]
4145  pub fn finish(self) -> flatbuffers::WIPOffset<Disconnect<'a>> {
4146    let o = self.fbb_.end_table(self.start_);
4147    flatbuffers::WIPOffset::new(o.value())
4148  }
4149}
4150
4151impl core::fmt::Debug for Disconnect<'_> {
4152  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
4153    let mut ds = f.debug_struct("Disconnect");
4154      ds.field("id", &self.id());
4155      ds.finish()
4156  }
4157}
4158pub enum RegisterResponseOffset {}
4159#[derive(Copy, Clone, PartialEq)]
4160
4161pub struct RegisterResponse<'a> {
4162  pub _tab: flatbuffers::Table<'a>,
4163}
4164
4165impl<'a> flatbuffers::Follow<'a> for RegisterResponse<'a> {
4166  type Inner = RegisterResponse<'a>;
4167  #[inline]
4168  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4169    Self { _tab: flatbuffers::Table::new(buf, loc) }
4170  }
4171}
4172
4173impl<'a> RegisterResponse<'a> {
4174  pub const VT_ID: flatbuffers::VOffsetT = 4;
4175  pub const VT_PERMISSIONS: flatbuffers::VOffsetT = 6;
4176  pub const VT_CATALOG: flatbuffers::VOffsetT = 8;
4177
4178  #[inline]
4179  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
4180    RegisterResponse { _tab: table }
4181  }
4182  #[allow(unused_mut)]
4183  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
4184    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
4185    args: &'args RegisterResponseArgs<'args>
4186  ) -> flatbuffers::WIPOffset<RegisterResponse<'bldr>> {
4187    let mut builder = RegisterResponseBuilder::new(_fbb);
4188    if let Some(x) = args.id { builder.add_id(x); }
4189    if let Some(x) = args.catalog { builder.add_catalog(x); }
4190    if let Some(x) = args.permissions { builder.add_permissions(x); }
4191    builder.finish()
4192  }
4193
4194
4195  #[inline]
4196  pub fn id(&self) -> Option<u64> {
4197    // Safety:
4198    // Created from valid Table for this object
4199    // which contains a valid value in this slot
4200    unsafe { self._tab.get::<u64>(RegisterResponse::VT_ID, None)}
4201  }
4202  #[inline]
4203  pub fn permissions(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>> {
4204    // Safety:
4205    // Created from valid Table for this object
4206    // which contains a valid value in this slot
4207    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>(RegisterResponse::VT_PERMISSIONS, None)}
4208  }
4209  #[inline]
4210  pub fn catalog(&self) -> Option<Catalog<'a>> {
4211    // Safety:
4212    // Created from valid Table for this object
4213    // which contains a valid value in this slot
4214    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Catalog>>(RegisterResponse::VT_CATALOG, None)}
4215  }
4216}
4217
4218impl flatbuffers::Verifiable for RegisterResponse<'_> {
4219  #[inline]
4220  fn run_verifier(
4221    v: &mut flatbuffers::Verifier, pos: usize
4222  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4223    use self::flatbuffers::Verifiable;
4224    v.visit_table(pos)?
4225     .visit_field::<u64>("id", Self::VT_ID, false)?
4226     .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>>>("permissions", Self::VT_PERMISSIONS, false)?
4227     .visit_field::<flatbuffers::ForwardsUOffset<Catalog>>("catalog", Self::VT_CATALOG, false)?
4228     .finish();
4229    Ok(())
4230  }
4231}
4232pub struct RegisterResponseArgs<'a> {
4233    pub id: Option<u64>,
4234    pub permissions: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>>>,
4235    pub catalog: Option<flatbuffers::WIPOffset<Catalog<'a>>>,
4236}
4237impl<'a> Default for RegisterResponseArgs<'a> {
4238  #[inline]
4239  fn default() -> Self {
4240    RegisterResponseArgs {
4241      id: None,
4242      permissions: None,
4243      catalog: None,
4244    }
4245  }
4246}
4247
4248pub struct RegisterResponseBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
4249  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
4250  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
4251}
4252impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RegisterResponseBuilder<'a, 'b, A> {
4253  #[inline]
4254  pub fn add_id(&mut self, id: u64) {
4255    self.fbb_.push_slot_always::<u64>(RegisterResponse::VT_ID, id);
4256  }
4257  #[inline]
4258  pub fn add_permissions(&mut self, permissions: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<&'b  str>>>) {
4259    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(RegisterResponse::VT_PERMISSIONS, permissions);
4260  }
4261  #[inline]
4262  pub fn add_catalog(&mut self, catalog: flatbuffers::WIPOffset<Catalog<'b >>) {
4263    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Catalog>>(RegisterResponse::VT_CATALOG, catalog);
4264  }
4265  #[inline]
4266  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> RegisterResponseBuilder<'a, 'b, A> {
4267    let start = _fbb.start_table();
4268    RegisterResponseBuilder {
4269      fbb_: _fbb,
4270      start_: start,
4271    }
4272  }
4273  #[inline]
4274  pub fn finish(self) -> flatbuffers::WIPOffset<RegisterResponse<'a>> {
4275    let o = self.fbb_.end_table(self.start_);
4276    flatbuffers::WIPOffset::new(o.value())
4277  }
4278}
4279
4280impl core::fmt::Debug for RegisterResponse<'_> {
4281  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
4282    let mut ds = f.debug_struct("RegisterResponse");
4283      ds.field("id", &self.id());
4284      ds.field("permissions", &self.permissions());
4285      ds.field("catalog", &self.catalog());
4286      ds.finish()
4287  }
4288}
4289pub enum RegisterRequestOffset {}
4290#[derive(Copy, Clone, PartialEq)]
4291
4292pub struct RegisterRequest<'a> {
4293  pub _tab: flatbuffers::Table<'a>,
4294}
4295
4296impl<'a> flatbuffers::Follow<'a> for RegisterRequest<'a> {
4297  type Inner = RegisterRequest<'a>;
4298  #[inline]
4299  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4300    Self { _tab: flatbuffers::Table::new(buf, loc) }
4301  }
4302}
4303
4304impl<'a> RegisterRequest<'a> {
4305  pub const VT_ID: flatbuffers::VOffsetT = 4;
4306  pub const VT_CATALOG: flatbuffers::VOffsetT = 6;
4307
4308  #[inline]
4309  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
4310    RegisterRequest { _tab: table }
4311  }
4312  #[allow(unused_mut)]
4313  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
4314    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
4315    args: &'args RegisterRequestArgs<'args>
4316  ) -> flatbuffers::WIPOffset<RegisterRequest<'bldr>> {
4317    let mut builder = RegisterRequestBuilder::new(_fbb);
4318    if let Some(x) = args.id { builder.add_id(x); }
4319    if let Some(x) = args.catalog { builder.add_catalog(x); }
4320    builder.finish()
4321  }
4322
4323
4324  #[inline]
4325  pub fn id(&self) -> Option<u64> {
4326    // Safety:
4327    // Created from valid Table for this object
4328    // which contains a valid value in this slot
4329    unsafe { self._tab.get::<u64>(RegisterRequest::VT_ID, None)}
4330  }
4331  #[inline]
4332  pub fn catalog(&self) -> Option<Catalog<'a>> {
4333    // Safety:
4334    // Created from valid Table for this object
4335    // which contains a valid value in this slot
4336    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Catalog>>(RegisterRequest::VT_CATALOG, None)}
4337  }
4338}
4339
4340impl flatbuffers::Verifiable for RegisterRequest<'_> {
4341  #[inline]
4342  fn run_verifier(
4343    v: &mut flatbuffers::Verifier, pos: usize
4344  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4345    use self::flatbuffers::Verifiable;
4346    v.visit_table(pos)?
4347     .visit_field::<u64>("id", Self::VT_ID, false)?
4348     .visit_field::<flatbuffers::ForwardsUOffset<Catalog>>("catalog", Self::VT_CATALOG, false)?
4349     .finish();
4350    Ok(())
4351  }
4352}
4353pub struct RegisterRequestArgs<'a> {
4354    pub id: Option<u64>,
4355    pub catalog: Option<flatbuffers::WIPOffset<Catalog<'a>>>,
4356}
4357impl<'a> Default for RegisterRequestArgs<'a> {
4358  #[inline]
4359  fn default() -> Self {
4360    RegisterRequestArgs {
4361      id: None,
4362      catalog: None,
4363    }
4364  }
4365}
4366
4367pub struct RegisterRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
4368  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
4369  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
4370}
4371impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RegisterRequestBuilder<'a, 'b, A> {
4372  #[inline]
4373  pub fn add_id(&mut self, id: u64) {
4374    self.fbb_.push_slot_always::<u64>(RegisterRequest::VT_ID, id);
4375  }
4376  #[inline]
4377  pub fn add_catalog(&mut self, catalog: flatbuffers::WIPOffset<Catalog<'b >>) {
4378    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Catalog>>(RegisterRequest::VT_CATALOG, catalog);
4379  }
4380  #[inline]
4381  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> RegisterRequestBuilder<'a, 'b, A> {
4382    let start = _fbb.start_table();
4383    RegisterRequestBuilder {
4384      fbb_: _fbb,
4385      start_: start,
4386    }
4387  }
4388  #[inline]
4389  pub fn finish(self) -> flatbuffers::WIPOffset<RegisterRequest<'a>> {
4390    let o = self.fbb_.end_table(self.start_);
4391    flatbuffers::WIPOffset::new(o.value())
4392  }
4393}
4394
4395impl core::fmt::Debug for RegisterRequest<'_> {
4396  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
4397    let mut ds = f.debug_struct("RegisterRequest");
4398      ds.field("id", &self.id());
4399      ds.field("catalog", &self.catalog());
4400      ds.finish()
4401  }
4402}
4403pub enum CreatePlanRequestOffset {}
4404#[derive(Copy, Clone, PartialEq)]
4405
4406pub struct CreatePlanRequest<'a> {
4407  pub _tab: flatbuffers::Table<'a>,
4408}
4409
4410impl<'a> flatbuffers::Follow<'a> for CreatePlanRequest<'a> {
4411  type Inner = CreatePlanRequest<'a>;
4412  #[inline]
4413  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4414    Self { _tab: flatbuffers::Table::new(buf, loc) }
4415  }
4416}
4417
4418impl<'a> CreatePlanRequest<'a> {
4419  pub const VT_NAME: flatbuffers::VOffsetT = 4;
4420  pub const VT_PLAN: flatbuffers::VOffsetT = 6;
4421
4422  #[inline]
4423  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
4424    CreatePlanRequest { _tab: table }
4425  }
4426  #[allow(unused_mut)]
4427  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
4428    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
4429    args: &'args CreatePlanRequestArgs<'args>
4430  ) -> flatbuffers::WIPOffset<CreatePlanRequest<'bldr>> {
4431    let mut builder = CreatePlanRequestBuilder::new(_fbb);
4432    if let Some(x) = args.plan { builder.add_plan(x); }
4433    if let Some(x) = args.name { builder.add_name(x); }
4434    builder.finish()
4435  }
4436
4437
4438  #[inline]
4439  pub fn name(&self) -> Option<&'a str> {
4440    // Safety:
4441    // Created from valid Table for this object
4442    // which contains a valid value in this slot
4443    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(CreatePlanRequest::VT_NAME, None)}
4444  }
4445  #[inline]
4446  pub fn plan(&self) -> Option<&'a str> {
4447    // Safety:
4448    // Created from valid Table for this object
4449    // which contains a valid value in this slot
4450    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(CreatePlanRequest::VT_PLAN, None)}
4451  }
4452}
4453
4454impl flatbuffers::Verifiable for CreatePlanRequest<'_> {
4455  #[inline]
4456  fn run_verifier(
4457    v: &mut flatbuffers::Verifier, pos: usize
4458  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4459    use self::flatbuffers::Verifiable;
4460    v.visit_table(pos)?
4461     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
4462     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("plan", Self::VT_PLAN, false)?
4463     .finish();
4464    Ok(())
4465  }
4466}
4467pub struct CreatePlanRequestArgs<'a> {
4468    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
4469    pub plan: Option<flatbuffers::WIPOffset<&'a str>>,
4470}
4471impl<'a> Default for CreatePlanRequestArgs<'a> {
4472  #[inline]
4473  fn default() -> Self {
4474    CreatePlanRequestArgs {
4475      name: None,
4476      plan: None,
4477    }
4478  }
4479}
4480
4481pub struct CreatePlanRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
4482  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
4483  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
4484}
4485impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> CreatePlanRequestBuilder<'a, 'b, A> {
4486  #[inline]
4487  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
4488    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(CreatePlanRequest::VT_NAME, name);
4489  }
4490  #[inline]
4491  pub fn add_plan(&mut self, plan: flatbuffers::WIPOffset<&'b  str>) {
4492    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(CreatePlanRequest::VT_PLAN, plan);
4493  }
4494  #[inline]
4495  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> CreatePlanRequestBuilder<'a, 'b, A> {
4496    let start = _fbb.start_table();
4497    CreatePlanRequestBuilder {
4498      fbb_: _fbb,
4499      start_: start,
4500    }
4501  }
4502  #[inline]
4503  pub fn finish(self) -> flatbuffers::WIPOffset<CreatePlanRequest<'a>> {
4504    let o = self.fbb_.end_table(self.start_);
4505    flatbuffers::WIPOffset::new(o.value())
4506  }
4507}
4508
4509impl core::fmt::Debug for CreatePlanRequest<'_> {
4510  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
4511    let mut ds = f.debug_struct("CreatePlanRequest");
4512      ds.field("name", &self.name());
4513      ds.field("plan", &self.plan());
4514      ds.finish()
4515  }
4516}
4517pub enum CreatePlanResponseOffset {}
4518#[derive(Copy, Clone, PartialEq)]
4519
4520pub struct CreatePlanResponse<'a> {
4521  pub _tab: flatbuffers::Table<'a>,
4522}
4523
4524impl<'a> flatbuffers::Follow<'a> for CreatePlanResponse<'a> {
4525  type Inner = CreatePlanResponse<'a>;
4526  #[inline]
4527  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4528    Self { _tab: flatbuffers::Table::new(buf, loc) }
4529  }
4530}
4531
4532impl<'a> CreatePlanResponse<'a> {
4533  pub const VT_NAME: flatbuffers::VOffsetT = 4;
4534  pub const VT_PLAN: flatbuffers::VOffsetT = 6;
4535
4536  #[inline]
4537  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
4538    CreatePlanResponse { _tab: table }
4539  }
4540  #[allow(unused_mut)]
4541  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
4542    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
4543    args: &'args CreatePlanResponseArgs<'args>
4544  ) -> flatbuffers::WIPOffset<CreatePlanResponse<'bldr>> {
4545    let mut builder = CreatePlanResponseBuilder::new(_fbb);
4546    if let Some(x) = args.plan { builder.add_plan(x); }
4547    if let Some(x) = args.name { builder.add_name(x); }
4548    builder.finish()
4549  }
4550
4551
4552  #[inline]
4553  pub fn name(&self) -> Option<&'a str> {
4554    // Safety:
4555    // Created from valid Table for this object
4556    // which contains a valid value in this slot
4557    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(CreatePlanResponse::VT_NAME, None)}
4558  }
4559  #[inline]
4560  pub fn plan(&self) -> Option<&'a str> {
4561    // Safety:
4562    // Created from valid Table for this object
4563    // which contains a valid value in this slot
4564    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(CreatePlanResponse::VT_PLAN, None)}
4565  }
4566}
4567
4568impl flatbuffers::Verifiable for CreatePlanResponse<'_> {
4569  #[inline]
4570  fn run_verifier(
4571    v: &mut flatbuffers::Verifier, pos: usize
4572  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4573    use self::flatbuffers::Verifiable;
4574    v.visit_table(pos)?
4575     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
4576     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("plan", Self::VT_PLAN, false)?
4577     .finish();
4578    Ok(())
4579  }
4580}
4581pub struct CreatePlanResponseArgs<'a> {
4582    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
4583    pub plan: Option<flatbuffers::WIPOffset<&'a str>>,
4584}
4585impl<'a> Default for CreatePlanResponseArgs<'a> {
4586  #[inline]
4587  fn default() -> Self {
4588    CreatePlanResponseArgs {
4589      name: None,
4590      plan: None,
4591    }
4592  }
4593}
4594
4595pub struct CreatePlanResponseBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
4596  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
4597  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
4598}
4599impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> CreatePlanResponseBuilder<'a, 'b, A> {
4600  #[inline]
4601  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
4602    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(CreatePlanResponse::VT_NAME, name);
4603  }
4604  #[inline]
4605  pub fn add_plan(&mut self, plan: flatbuffers::WIPOffset<&'b  str>) {
4606    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(CreatePlanResponse::VT_PLAN, plan);
4607  }
4608  #[inline]
4609  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> CreatePlanResponseBuilder<'a, 'b, A> {
4610    let start = _fbb.start_table();
4611    CreatePlanResponseBuilder {
4612      fbb_: _fbb,
4613      start_: start,
4614    }
4615  }
4616  #[inline]
4617  pub fn finish(self) -> flatbuffers::WIPOffset<CreatePlanResponse<'a>> {
4618    let o = self.fbb_.end_table(self.start_);
4619    flatbuffers::WIPOffset::new(o.value())
4620  }
4621}
4622
4623impl core::fmt::Debug for CreatePlanResponse<'_> {
4624  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
4625    let mut ds = f.debug_struct("CreatePlanResponse");
4626      ds.field("name", &self.name());
4627      ds.field("plan", &self.plan());
4628      ds.finish()
4629  }
4630}
4631pub enum ByNameOffset {}
4632#[derive(Copy, Clone, PartialEq)]
4633
4634pub struct ByName<'a> {
4635  pub _tab: flatbuffers::Table<'a>,
4636}
4637
4638impl<'a> flatbuffers::Follow<'a> for ByName<'a> {
4639  type Inner = ByName<'a>;
4640  #[inline]
4641  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4642    Self { _tab: flatbuffers::Table::new(buf, loc) }
4643  }
4644}
4645
4646impl<'a> ByName<'a> {
4647  pub const VT_NAME: flatbuffers::VOffsetT = 4;
4648
4649  #[inline]
4650  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
4651    ByName { _tab: table }
4652  }
4653  #[allow(unused_mut)]
4654  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
4655    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
4656    args: &'args ByNameArgs<'args>
4657  ) -> flatbuffers::WIPOffset<ByName<'bldr>> {
4658    let mut builder = ByNameBuilder::new(_fbb);
4659    if let Some(x) = args.name { builder.add_name(x); }
4660    builder.finish()
4661  }
4662
4663
4664  #[inline]
4665  pub fn name(&self) -> Option<&'a str> {
4666    // Safety:
4667    // Created from valid Table for this object
4668    // which contains a valid value in this slot
4669    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ByName::VT_NAME, None)}
4670  }
4671}
4672
4673impl flatbuffers::Verifiable for ByName<'_> {
4674  #[inline]
4675  fn run_verifier(
4676    v: &mut flatbuffers::Verifier, pos: usize
4677  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4678    use self::flatbuffers::Verifiable;
4679    v.visit_table(pos)?
4680     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("name", Self::VT_NAME, false)?
4681     .finish();
4682    Ok(())
4683  }
4684}
4685pub struct ByNameArgs<'a> {
4686    pub name: Option<flatbuffers::WIPOffset<&'a str>>,
4687}
4688impl<'a> Default for ByNameArgs<'a> {
4689  #[inline]
4690  fn default() -> Self {
4691    ByNameArgs {
4692      name: None,
4693    }
4694  }
4695}
4696
4697pub struct ByNameBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
4698  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
4699  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
4700}
4701impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ByNameBuilder<'a, 'b, A> {
4702  #[inline]
4703  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
4704    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ByName::VT_NAME, name);
4705  }
4706  #[inline]
4707  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ByNameBuilder<'a, 'b, A> {
4708    let start = _fbb.start_table();
4709    ByNameBuilder {
4710      fbb_: _fbb,
4711      start_: start,
4712    }
4713  }
4714  #[inline]
4715  pub fn finish(self) -> flatbuffers::WIPOffset<ByName<'a>> {
4716    let o = self.fbb_.end_table(self.start_);
4717    flatbuffers::WIPOffset::new(o.value())
4718  }
4719}
4720
4721impl core::fmt::Debug for ByName<'_> {
4722  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
4723    let mut ds = f.debug_struct("ByName");
4724      ds.field("name", &self.name());
4725      ds.finish()
4726  }
4727}
4728pub enum FilterOffset {}
4729#[derive(Copy, Clone, PartialEq)]
4730
4731pub struct Filter<'a> {
4732  pub _tab: flatbuffers::Table<'a>,
4733}
4734
4735impl<'a> flatbuffers::Follow<'a> for Filter<'a> {
4736  type Inner = Filter<'a>;
4737  #[inline]
4738  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4739    Self { _tab: flatbuffers::Table::new(buf, loc) }
4740  }
4741}
4742
4743impl<'a> Filter<'a> {
4744  pub const VT_FILTER_TYPE_TYPE: flatbuffers::VOffsetT = 4;
4745  pub const VT_FILTER_TYPE: flatbuffers::VOffsetT = 6;
4746
4747  #[inline]
4748  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
4749    Filter { _tab: table }
4750  }
4751  #[allow(unused_mut)]
4752  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
4753    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
4754    args: &'args FilterArgs
4755  ) -> flatbuffers::WIPOffset<Filter<'bldr>> {
4756    let mut builder = FilterBuilder::new(_fbb);
4757    if let Some(x) = args.filter_type { builder.add_filter_type(x); }
4758    builder.add_filter_type_type(args.filter_type_type);
4759    builder.finish()
4760  }
4761
4762
4763  #[inline]
4764  pub fn filter_type_type(&self) -> FilterType {
4765    // Safety:
4766    // Created from valid Table for this object
4767    // which contains a valid value in this slot
4768    unsafe { self._tab.get::<FilterType>(Filter::VT_FILTER_TYPE_TYPE, Some(FilterType::NONE)).unwrap()}
4769  }
4770  #[inline]
4771  pub fn filter_type(&self) -> Option<flatbuffers::Table<'a>> {
4772    // Safety:
4773    // Created from valid Table for this object
4774    // which contains a valid value in this slot
4775    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Table<'a>>>(Filter::VT_FILTER_TYPE, None)}
4776  }
4777  #[inline]
4778  #[allow(non_snake_case)]
4779  pub fn filter_type_as_by_name(&self) -> Option<ByName<'a>> {
4780    if self.filter_type_type() == FilterType::ByName {
4781      self.filter_type().map(|t| {
4782       // Safety:
4783       // Created from a valid Table for this object
4784       // Which contains a valid union in this slot
4785       unsafe { ByName::init_from_table(t) }
4786     })
4787    } else {
4788      None
4789    }
4790  }
4791
4792}
4793
4794impl flatbuffers::Verifiable for Filter<'_> {
4795  #[inline]
4796  fn run_verifier(
4797    v: &mut flatbuffers::Verifier, pos: usize
4798  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4799    use self::flatbuffers::Verifiable;
4800    v.visit_table(pos)?
4801     .visit_union::<FilterType, _>("filter_type_type", Self::VT_FILTER_TYPE_TYPE, "filter_type", Self::VT_FILTER_TYPE, false, |key, v, pos| {
4802        match key {
4803          FilterType::ByName => v.verify_union_variant::<flatbuffers::ForwardsUOffset<ByName>>("FilterType::ByName", pos),
4804          _ => Ok(()),
4805        }
4806     })?
4807     .finish();
4808    Ok(())
4809  }
4810}
4811pub struct FilterArgs {
4812    pub filter_type_type: FilterType,
4813    pub filter_type: Option<flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>>,
4814}
4815impl<'a> Default for FilterArgs {
4816  #[inline]
4817  fn default() -> Self {
4818    FilterArgs {
4819      filter_type_type: FilterType::NONE,
4820      filter_type: None,
4821    }
4822  }
4823}
4824
4825pub struct FilterBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
4826  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
4827  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
4828}
4829impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> FilterBuilder<'a, 'b, A> {
4830  #[inline]
4831  pub fn add_filter_type_type(&mut self, filter_type_type: FilterType) {
4832    self.fbb_.push_slot::<FilterType>(Filter::VT_FILTER_TYPE_TYPE, filter_type_type, FilterType::NONE);
4833  }
4834  #[inline]
4835  pub fn add_filter_type(&mut self, filter_type: flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>) {
4836    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Filter::VT_FILTER_TYPE, filter_type);
4837  }
4838  #[inline]
4839  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> FilterBuilder<'a, 'b, A> {
4840    let start = _fbb.start_table();
4841    FilterBuilder {
4842      fbb_: _fbb,
4843      start_: start,
4844    }
4845  }
4846  #[inline]
4847  pub fn finish(self) -> flatbuffers::WIPOffset<Filter<'a>> {
4848    let o = self.fbb_.end_table(self.start_);
4849    flatbuffers::WIPOffset::new(o.value())
4850  }
4851}
4852
4853impl core::fmt::Debug for Filter<'_> {
4854  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
4855    let mut ds = f.debug_struct("Filter");
4856      ds.field("filter_type_type", &self.filter_type_type());
4857      match self.filter_type_type() {
4858        FilterType::ByName => {
4859          if let Some(x) = self.filter_type_as_by_name() {
4860            ds.field("filter_type", &x)
4861          } else {
4862            ds.field("filter_type", &"InvalidFlatbuffer: Union discriminant does not match value.")
4863          }
4864        },
4865        _ => {
4866          let x: Option<()> = None;
4867          ds.field("filter_type", &x)
4868        },
4869      };
4870      ds.finish()
4871  }
4872}
4873pub enum GetPlansRequestOffset {}
4874#[derive(Copy, Clone, PartialEq)]
4875
4876pub struct GetPlansRequest<'a> {
4877  pub _tab: flatbuffers::Table<'a>,
4878}
4879
4880impl<'a> flatbuffers::Follow<'a> for GetPlansRequest<'a> {
4881  type Inner = GetPlansRequest<'a>;
4882  #[inline]
4883  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4884    Self { _tab: flatbuffers::Table::new(buf, loc) }
4885  }
4886}
4887
4888impl<'a> GetPlansRequest<'a> {
4889  pub const VT_NAME: flatbuffers::VOffsetT = 4;
4890
4891  #[inline]
4892  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
4893    GetPlansRequest { _tab: table }
4894  }
4895  #[allow(unused_mut)]
4896  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
4897    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
4898    args: &'args GetPlansRequestArgs<'args>
4899  ) -> flatbuffers::WIPOffset<GetPlansRequest<'bldr>> {
4900    let mut builder = GetPlansRequestBuilder::new(_fbb);
4901    if let Some(x) = args.name { builder.add_name(x); }
4902    builder.finish()
4903  }
4904
4905
4906  #[inline]
4907  pub fn name(&self) -> Option<Filter<'a>> {
4908    // Safety:
4909    // Created from valid Table for this object
4910    // which contains a valid value in this slot
4911    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<Filter>>(GetPlansRequest::VT_NAME, None)}
4912  }
4913}
4914
4915impl flatbuffers::Verifiable for GetPlansRequest<'_> {
4916  #[inline]
4917  fn run_verifier(
4918    v: &mut flatbuffers::Verifier, pos: usize
4919  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4920    use self::flatbuffers::Verifiable;
4921    v.visit_table(pos)?
4922     .visit_field::<flatbuffers::ForwardsUOffset<Filter>>("name", Self::VT_NAME, false)?
4923     .finish();
4924    Ok(())
4925  }
4926}
4927pub struct GetPlansRequestArgs<'a> {
4928    pub name: Option<flatbuffers::WIPOffset<Filter<'a>>>,
4929}
4930impl<'a> Default for GetPlansRequestArgs<'a> {
4931  #[inline]
4932  fn default() -> Self {
4933    GetPlansRequestArgs {
4934      name: None,
4935    }
4936  }
4937}
4938
4939pub struct GetPlansRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
4940  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
4941  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
4942}
4943impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> GetPlansRequestBuilder<'a, 'b, A> {
4944  #[inline]
4945  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<Filter<'b >>) {
4946    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Filter>>(GetPlansRequest::VT_NAME, name);
4947  }
4948  #[inline]
4949  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> GetPlansRequestBuilder<'a, 'b, A> {
4950    let start = _fbb.start_table();
4951    GetPlansRequestBuilder {
4952      fbb_: _fbb,
4953      start_: start,
4954    }
4955  }
4956  #[inline]
4957  pub fn finish(self) -> flatbuffers::WIPOffset<GetPlansRequest<'a>> {
4958    let o = self.fbb_.end_table(self.start_);
4959    flatbuffers::WIPOffset::new(o.value())
4960  }
4961}
4962
4963impl core::fmt::Debug for GetPlansRequest<'_> {
4964  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
4965    let mut ds = f.debug_struct("GetPlansRequest");
4966      ds.field("name", &self.name());
4967      ds.finish()
4968  }
4969}
4970pub enum GetPlanRequestOffset {}
4971#[derive(Copy, Clone, PartialEq)]
4972
4973pub struct GetPlanRequest<'a> {
4974  pub _tab: flatbuffers::Table<'a>,
4975}
4976
4977impl<'a> flatbuffers::Follow<'a> for GetPlanRequest<'a> {
4978  type Inner = GetPlanRequest<'a>;
4979  #[inline]
4980  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4981    Self { _tab: flatbuffers::Table::new(buf, loc) }
4982  }
4983}
4984
4985impl<'a> GetPlanRequest<'a> {
4986  pub const VT_ID: flatbuffers::VOffsetT = 4;
4987
4988  #[inline]
4989  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
4990    GetPlanRequest { _tab: table }
4991  }
4992  #[allow(unused_mut)]
4993  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
4994    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
4995    args: &'args GetPlanRequestArgs
4996  ) -> flatbuffers::WIPOffset<GetPlanRequest<'bldr>> {
4997    let mut builder = GetPlanRequestBuilder::new(_fbb);
4998    builder.add_id(args.id);
4999    builder.finish()
5000  }
5001
5002
5003  #[inline]
5004  pub fn id(&self) -> u64 {
5005    // Safety:
5006    // Created from valid Table for this object
5007    // which contains a valid value in this slot
5008    unsafe { self._tab.get::<u64>(GetPlanRequest::VT_ID, Some(0)).unwrap()}
5009  }
5010}
5011
5012impl flatbuffers::Verifiable for GetPlanRequest<'_> {
5013  #[inline]
5014  fn run_verifier(
5015    v: &mut flatbuffers::Verifier, pos: usize
5016  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
5017    use self::flatbuffers::Verifiable;
5018    v.visit_table(pos)?
5019     .visit_field::<u64>("id", Self::VT_ID, false)?
5020     .finish();
5021    Ok(())
5022  }
5023}
5024pub struct GetPlanRequestArgs {
5025    pub id: u64,
5026}
5027impl<'a> Default for GetPlanRequestArgs {
5028  #[inline]
5029  fn default() -> Self {
5030    GetPlanRequestArgs {
5031      id: 0,
5032    }
5033  }
5034}
5035
5036pub struct GetPlanRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
5037  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
5038  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
5039}
5040impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> GetPlanRequestBuilder<'a, 'b, A> {
5041  #[inline]
5042  pub fn add_id(&mut self, id: u64) {
5043    self.fbb_.push_slot::<u64>(GetPlanRequest::VT_ID, id, 0);
5044  }
5045  #[inline]
5046  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> GetPlanRequestBuilder<'a, 'b, A> {
5047    let start = _fbb.start_table();
5048    GetPlanRequestBuilder {
5049      fbb_: _fbb,
5050      start_: start,
5051    }
5052  }
5053  #[inline]
5054  pub fn finish(self) -> flatbuffers::WIPOffset<GetPlanRequest<'a>> {
5055    let o = self.fbb_.end_table(self.start_);
5056    flatbuffers::WIPOffset::new(o.value())
5057  }
5058}
5059
5060impl core::fmt::Debug for GetPlanRequest<'_> {
5061  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
5062    let mut ds = f.debug_struct("GetPlanRequest");
5063      ds.field("id", &self.id());
5064      ds.finish()
5065  }
5066}
5067pub enum ErrorStatusOffset {}
5068#[derive(Copy, Clone, PartialEq)]
5069
5070pub struct ErrorStatus<'a> {
5071  pub _tab: flatbuffers::Table<'a>,
5072}
5073
5074impl<'a> flatbuffers::Follow<'a> for ErrorStatus<'a> {
5075  type Inner = ErrorStatus<'a>;
5076  #[inline]
5077  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5078    Self { _tab: flatbuffers::Table::new(buf, loc) }
5079  }
5080}
5081
5082impl<'a> ErrorStatus<'a> {
5083  pub const VT_CODE: flatbuffers::VOffsetT = 4;
5084  pub const VT_MSG: flatbuffers::VOffsetT = 6;
5085
5086  #[inline]
5087  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
5088    ErrorStatus { _tab: table }
5089  }
5090  #[allow(unused_mut)]
5091  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
5092    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
5093    args: &'args ErrorStatusArgs<'args>
5094  ) -> flatbuffers::WIPOffset<ErrorStatus<'bldr>> {
5095    let mut builder = ErrorStatusBuilder::new(_fbb);
5096    if let Some(x) = args.msg { builder.add_msg(x); }
5097    builder.add_code(args.code);
5098    builder.finish()
5099  }
5100
5101
5102  #[inline]
5103  pub fn code(&self) -> u32 {
5104    // Safety:
5105    // Created from valid Table for this object
5106    // which contains a valid value in this slot
5107    unsafe { self._tab.get::<u32>(ErrorStatus::VT_CODE, Some(0)).unwrap()}
5108  }
5109  #[inline]
5110  pub fn msg(&self) -> &'a str {
5111    // Safety:
5112    // Created from valid Table for this object
5113    // which contains a valid value in this slot
5114    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(ErrorStatus::VT_MSG, None).unwrap()}
5115  }
5116}
5117
5118impl flatbuffers::Verifiable for ErrorStatus<'_> {
5119  #[inline]
5120  fn run_verifier(
5121    v: &mut flatbuffers::Verifier, pos: usize
5122  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
5123    use self::flatbuffers::Verifiable;
5124    v.visit_table(pos)?
5125     .visit_field::<u32>("code", Self::VT_CODE, false)?
5126     .visit_field::<flatbuffers::ForwardsUOffset<&str>>("msg", Self::VT_MSG, true)?
5127     .finish();
5128    Ok(())
5129  }
5130}
5131pub struct ErrorStatusArgs<'a> {
5132    pub code: u32,
5133    pub msg: Option<flatbuffers::WIPOffset<&'a str>>,
5134}
5135impl<'a> Default for ErrorStatusArgs<'a> {
5136  #[inline]
5137  fn default() -> Self {
5138    ErrorStatusArgs {
5139      code: 0,
5140      msg: None, // required field
5141    }
5142  }
5143}
5144
5145pub struct ErrorStatusBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
5146  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
5147  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
5148}
5149impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ErrorStatusBuilder<'a, 'b, A> {
5150  #[inline]
5151  pub fn add_code(&mut self, code: u32) {
5152    self.fbb_.push_slot::<u32>(ErrorStatus::VT_CODE, code, 0);
5153  }
5154  #[inline]
5155  pub fn add_msg(&mut self, msg: flatbuffers::WIPOffset<&'b  str>) {
5156    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(ErrorStatus::VT_MSG, msg);
5157  }
5158  #[inline]
5159  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> ErrorStatusBuilder<'a, 'b, A> {
5160    let start = _fbb.start_table();
5161    ErrorStatusBuilder {
5162      fbb_: _fbb,
5163      start_: start,
5164    }
5165  }
5166  #[inline]
5167  pub fn finish(self) -> flatbuffers::WIPOffset<ErrorStatus<'a>> {
5168    let o = self.fbb_.end_table(self.start_);
5169    self.fbb_.required(o, ErrorStatus::VT_MSG,"msg");
5170    flatbuffers::WIPOffset::new(o.value())
5171  }
5172}
5173
5174impl core::fmt::Debug for ErrorStatus<'_> {
5175  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
5176    let mut ds = f.debug_struct("ErrorStatus");
5177      ds.field("code", &self.code());
5178      ds.field("msg", &self.msg());
5179      ds.finish()
5180  }
5181}
5182pub enum OkStatusOffset {}
5183#[derive(Copy, Clone, PartialEq)]
5184
5185pub struct OkStatus<'a> {
5186  pub _tab: flatbuffers::Table<'a>,
5187}
5188
5189impl<'a> flatbuffers::Follow<'a> for OkStatus<'a> {
5190  type Inner = OkStatus<'a>;
5191  #[inline]
5192  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5193    Self { _tab: flatbuffers::Table::new(buf, loc) }
5194  }
5195}
5196
5197impl<'a> OkStatus<'a> {
5198
5199  #[inline]
5200  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
5201    OkStatus { _tab: table }
5202  }
5203  #[allow(unused_mut)]
5204  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
5205    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
5206    _args: &'args OkStatusArgs
5207  ) -> flatbuffers::WIPOffset<OkStatus<'bldr>> {
5208    let mut builder = OkStatusBuilder::new(_fbb);
5209    builder.finish()
5210  }
5211
5212}
5213
5214impl flatbuffers::Verifiable for OkStatus<'_> {
5215  #[inline]
5216  fn run_verifier(
5217    v: &mut flatbuffers::Verifier, pos: usize
5218  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
5219    use self::flatbuffers::Verifiable;
5220    v.visit_table(pos)?
5221     .finish();
5222    Ok(())
5223  }
5224}
5225pub struct OkStatusArgs {
5226}
5227impl<'a> Default for OkStatusArgs {
5228  #[inline]
5229  fn default() -> Self {
5230    OkStatusArgs {
5231    }
5232  }
5233}
5234
5235pub struct OkStatusBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
5236  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
5237  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
5238}
5239impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> OkStatusBuilder<'a, 'b, A> {
5240  #[inline]
5241  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> OkStatusBuilder<'a, 'b, A> {
5242    let start = _fbb.start_table();
5243    OkStatusBuilder {
5244      fbb_: _fbb,
5245      start_: start,
5246    }
5247  }
5248  #[inline]
5249  pub fn finish(self) -> flatbuffers::WIPOffset<OkStatus<'a>> {
5250    let o = self.fbb_.end_table(self.start_);
5251    flatbuffers::WIPOffset::new(o.value())
5252  }
5253}
5254
5255impl core::fmt::Debug for OkStatus<'_> {
5256  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
5257    let mut ds = f.debug_struct("OkStatus");
5258      ds.finish()
5259  }
5260}
5261pub enum BindRequestOffset {}
5262#[derive(Copy, Clone, PartialEq)]
5263
5264pub struct BindRequest<'a> {
5265  pub _tab: flatbuffers::Table<'a>,
5266}
5267
5268impl<'a> flatbuffers::Follow<'a> for BindRequest<'a> {
5269  type Inner = BindRequest<'a>;
5270  #[inline]
5271  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5272    Self { _tab: flatbuffers::Table::new(buf, loc) }
5273  }
5274}
5275
5276impl<'a> BindRequest<'a> {
5277  pub const VT_PLAN_ID: flatbuffers::VOffsetT = 4;
5278  pub const VT_STOP_ID: flatbuffers::VOffsetT = 6;
5279
5280  #[inline]
5281  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
5282    BindRequest { _tab: table }
5283  }
5284  #[allow(unused_mut)]
5285  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
5286    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
5287    args: &'args BindRequestArgs
5288  ) -> flatbuffers::WIPOffset<BindRequest<'bldr>> {
5289    let mut builder = BindRequestBuilder::new(_fbb);
5290    builder.add_stop_id(args.stop_id);
5291    builder.add_plan_id(args.plan_id);
5292    builder.finish()
5293  }
5294
5295
5296  #[inline]
5297  pub fn plan_id(&self) -> u64 {
5298    // Safety:
5299    // Created from valid Table for this object
5300    // which contains a valid value in this slot
5301    unsafe { self._tab.get::<u64>(BindRequest::VT_PLAN_ID, Some(0)).unwrap()}
5302  }
5303  #[inline]
5304  pub fn stop_id(&self) -> u64 {
5305    // Safety:
5306    // Created from valid Table for this object
5307    // which contains a valid value in this slot
5308    unsafe { self._tab.get::<u64>(BindRequest::VT_STOP_ID, Some(0)).unwrap()}
5309  }
5310}
5311
5312impl flatbuffers::Verifiable for BindRequest<'_> {
5313  #[inline]
5314  fn run_verifier(
5315    v: &mut flatbuffers::Verifier, pos: usize
5316  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
5317    use self::flatbuffers::Verifiable;
5318    v.visit_table(pos)?
5319     .visit_field::<u64>("plan_id", Self::VT_PLAN_ID, false)?
5320     .visit_field::<u64>("stop_id", Self::VT_STOP_ID, false)?
5321     .finish();
5322    Ok(())
5323  }
5324}
5325pub struct BindRequestArgs {
5326    pub plan_id: u64,
5327    pub stop_id: u64,
5328}
5329impl<'a> Default for BindRequestArgs {
5330  #[inline]
5331  fn default() -> Self {
5332    BindRequestArgs {
5333      plan_id: 0,
5334      stop_id: 0,
5335    }
5336  }
5337}
5338
5339pub struct BindRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
5340  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
5341  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
5342}
5343impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> BindRequestBuilder<'a, 'b, A> {
5344  #[inline]
5345  pub fn add_plan_id(&mut self, plan_id: u64) {
5346    self.fbb_.push_slot::<u64>(BindRequest::VT_PLAN_ID, plan_id, 0);
5347  }
5348  #[inline]
5349  pub fn add_stop_id(&mut self, stop_id: u64) {
5350    self.fbb_.push_slot::<u64>(BindRequest::VT_STOP_ID, stop_id, 0);
5351  }
5352  #[inline]
5353  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> BindRequestBuilder<'a, 'b, A> {
5354    let start = _fbb.start_table();
5355    BindRequestBuilder {
5356      fbb_: _fbb,
5357      start_: start,
5358    }
5359  }
5360  #[inline]
5361  pub fn finish(self) -> flatbuffers::WIPOffset<BindRequest<'a>> {
5362    let o = self.fbb_.end_table(self.start_);
5363    flatbuffers::WIPOffset::new(o.value())
5364  }
5365}
5366
5367impl core::fmt::Debug for BindRequest<'_> {
5368  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
5369    let mut ds = f.debug_struct("BindRequest");
5370      ds.field("plan_id", &self.plan_id());
5371      ds.field("stop_id", &self.stop_id());
5372      ds.finish()
5373  }
5374}
5375pub enum BindResponseOffset {}
5376#[derive(Copy, Clone, PartialEq)]
5377
5378pub struct BindResponse<'a> {
5379  pub _tab: flatbuffers::Table<'a>,
5380}
5381
5382impl<'a> flatbuffers::Follow<'a> for BindResponse<'a> {
5383  type Inner = BindResponse<'a>;
5384  #[inline]
5385  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5386    Self { _tab: flatbuffers::Table::new(buf, loc) }
5387  }
5388}
5389
5390impl<'a> BindResponse<'a> {
5391  pub const VT_PLAN_ID: flatbuffers::VOffsetT = 4;
5392  pub const VT_STOP_ID: flatbuffers::VOffsetT = 6;
5393
5394  #[inline]
5395  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
5396    BindResponse { _tab: table }
5397  }
5398  #[allow(unused_mut)]
5399  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
5400    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
5401    args: &'args BindResponseArgs
5402  ) -> flatbuffers::WIPOffset<BindResponse<'bldr>> {
5403    let mut builder = BindResponseBuilder::new(_fbb);
5404    builder.add_stop_id(args.stop_id);
5405    builder.add_plan_id(args.plan_id);
5406    builder.finish()
5407  }
5408
5409
5410  #[inline]
5411  pub fn plan_id(&self) -> u64 {
5412    // Safety:
5413    // Created from valid Table for this object
5414    // which contains a valid value in this slot
5415    unsafe { self._tab.get::<u64>(BindResponse::VT_PLAN_ID, Some(0)).unwrap()}
5416  }
5417  #[inline]
5418  pub fn stop_id(&self) -> u64 {
5419    // Safety:
5420    // Created from valid Table for this object
5421    // which contains a valid value in this slot
5422    unsafe { self._tab.get::<u64>(BindResponse::VT_STOP_ID, Some(0)).unwrap()}
5423  }
5424}
5425
5426impl flatbuffers::Verifiable for BindResponse<'_> {
5427  #[inline]
5428  fn run_verifier(
5429    v: &mut flatbuffers::Verifier, pos: usize
5430  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
5431    use self::flatbuffers::Verifiable;
5432    v.visit_table(pos)?
5433     .visit_field::<u64>("plan_id", Self::VT_PLAN_ID, false)?
5434     .visit_field::<u64>("stop_id", Self::VT_STOP_ID, false)?
5435     .finish();
5436    Ok(())
5437  }
5438}
5439pub struct BindResponseArgs {
5440    pub plan_id: u64,
5441    pub stop_id: u64,
5442}
5443impl<'a> Default for BindResponseArgs {
5444  #[inline]
5445  fn default() -> Self {
5446    BindResponseArgs {
5447      plan_id: 0,
5448      stop_id: 0,
5449    }
5450  }
5451}
5452
5453pub struct BindResponseBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
5454  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
5455  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
5456}
5457impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> BindResponseBuilder<'a, 'b, A> {
5458  #[inline]
5459  pub fn add_plan_id(&mut self, plan_id: u64) {
5460    self.fbb_.push_slot::<u64>(BindResponse::VT_PLAN_ID, plan_id, 0);
5461  }
5462  #[inline]
5463  pub fn add_stop_id(&mut self, stop_id: u64) {
5464    self.fbb_.push_slot::<u64>(BindResponse::VT_STOP_ID, stop_id, 0);
5465  }
5466  #[inline]
5467  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> BindResponseBuilder<'a, 'b, A> {
5468    let start = _fbb.start_table();
5469    BindResponseBuilder {
5470      fbb_: _fbb,
5471      start_: start,
5472    }
5473  }
5474  #[inline]
5475  pub fn finish(self) -> flatbuffers::WIPOffset<BindResponse<'a>> {
5476    let o = self.fbb_.end_table(self.start_);
5477    flatbuffers::WIPOffset::new(o.value())
5478  }
5479}
5480
5481impl core::fmt::Debug for BindResponse<'_> {
5482  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
5483    let mut ds = f.debug_struct("BindResponse");
5484      ds.field("plan_id", &self.plan_id());
5485      ds.field("stop_id", &self.stop_id());
5486      ds.finish()
5487  }
5488}
5489pub enum UnbindRequestOffset {}
5490#[derive(Copy, Clone, PartialEq)]
5491
5492pub struct UnbindRequest<'a> {
5493  pub _tab: flatbuffers::Table<'a>,
5494}
5495
5496impl<'a> flatbuffers::Follow<'a> for UnbindRequest<'a> {
5497  type Inner = UnbindRequest<'a>;
5498  #[inline]
5499  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5500    Self { _tab: flatbuffers::Table::new(buf, loc) }
5501  }
5502}
5503
5504impl<'a> UnbindRequest<'a> {
5505  pub const VT_PLAN_ID: flatbuffers::VOffsetT = 4;
5506  pub const VT_STOP_ID: flatbuffers::VOffsetT = 6;
5507
5508  #[inline]
5509  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
5510    UnbindRequest { _tab: table }
5511  }
5512  #[allow(unused_mut)]
5513  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
5514    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
5515    args: &'args UnbindRequestArgs
5516  ) -> flatbuffers::WIPOffset<UnbindRequest<'bldr>> {
5517    let mut builder = UnbindRequestBuilder::new(_fbb);
5518    builder.add_stop_id(args.stop_id);
5519    builder.add_plan_id(args.plan_id);
5520    builder.finish()
5521  }
5522
5523
5524  #[inline]
5525  pub fn plan_id(&self) -> u64 {
5526    // Safety:
5527    // Created from valid Table for this object
5528    // which contains a valid value in this slot
5529    unsafe { self._tab.get::<u64>(UnbindRequest::VT_PLAN_ID, Some(0)).unwrap()}
5530  }
5531  #[inline]
5532  pub fn stop_id(&self) -> u64 {
5533    // Safety:
5534    // Created from valid Table for this object
5535    // which contains a valid value in this slot
5536    unsafe { self._tab.get::<u64>(UnbindRequest::VT_STOP_ID, Some(0)).unwrap()}
5537  }
5538}
5539
5540impl flatbuffers::Verifiable for UnbindRequest<'_> {
5541  #[inline]
5542  fn run_verifier(
5543    v: &mut flatbuffers::Verifier, pos: usize
5544  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
5545    use self::flatbuffers::Verifiable;
5546    v.visit_table(pos)?
5547     .visit_field::<u64>("plan_id", Self::VT_PLAN_ID, false)?
5548     .visit_field::<u64>("stop_id", Self::VT_STOP_ID, false)?
5549     .finish();
5550    Ok(())
5551  }
5552}
5553pub struct UnbindRequestArgs {
5554    pub plan_id: u64,
5555    pub stop_id: u64,
5556}
5557impl<'a> Default for UnbindRequestArgs {
5558  #[inline]
5559  fn default() -> Self {
5560    UnbindRequestArgs {
5561      plan_id: 0,
5562      stop_id: 0,
5563    }
5564  }
5565}
5566
5567pub struct UnbindRequestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
5568  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
5569  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
5570}
5571impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> UnbindRequestBuilder<'a, 'b, A> {
5572  #[inline]
5573  pub fn add_plan_id(&mut self, plan_id: u64) {
5574    self.fbb_.push_slot::<u64>(UnbindRequest::VT_PLAN_ID, plan_id, 0);
5575  }
5576  #[inline]
5577  pub fn add_stop_id(&mut self, stop_id: u64) {
5578    self.fbb_.push_slot::<u64>(UnbindRequest::VT_STOP_ID, stop_id, 0);
5579  }
5580  #[inline]
5581  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> UnbindRequestBuilder<'a, 'b, A> {
5582    let start = _fbb.start_table();
5583    UnbindRequestBuilder {
5584      fbb_: _fbb,
5585      start_: start,
5586    }
5587  }
5588  #[inline]
5589  pub fn finish(self) -> flatbuffers::WIPOffset<UnbindRequest<'a>> {
5590    let o = self.fbb_.end_table(self.start_);
5591    flatbuffers::WIPOffset::new(o.value())
5592  }
5593}
5594
5595impl core::fmt::Debug for UnbindRequest<'_> {
5596  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
5597    let mut ds = f.debug_struct("UnbindRequest");
5598      ds.field("plan_id", &self.plan_id());
5599      ds.field("stop_id", &self.stop_id());
5600      ds.finish()
5601  }
5602}
5603pub enum UnbindResponseOffset {}
5604#[derive(Copy, Clone, PartialEq)]
5605
5606pub struct UnbindResponse<'a> {
5607  pub _tab: flatbuffers::Table<'a>,
5608}
5609
5610impl<'a> flatbuffers::Follow<'a> for UnbindResponse<'a> {
5611  type Inner = UnbindResponse<'a>;
5612  #[inline]
5613  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5614    Self { _tab: flatbuffers::Table::new(buf, loc) }
5615  }
5616}
5617
5618impl<'a> UnbindResponse<'a> {
5619  pub const VT_PLAN_ID: flatbuffers::VOffsetT = 4;
5620  pub const VT_STOP_ID: flatbuffers::VOffsetT = 6;
5621
5622  #[inline]
5623  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
5624    UnbindResponse { _tab: table }
5625  }
5626  #[allow(unused_mut)]
5627  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
5628    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
5629    args: &'args UnbindResponseArgs
5630  ) -> flatbuffers::WIPOffset<UnbindResponse<'bldr>> {
5631    let mut builder = UnbindResponseBuilder::new(_fbb);
5632    builder.add_stop_id(args.stop_id);
5633    builder.add_plan_id(args.plan_id);
5634    builder.finish()
5635  }
5636
5637
5638  #[inline]
5639  pub fn plan_id(&self) -> u64 {
5640    // Safety:
5641    // Created from valid Table for this object
5642    // which contains a valid value in this slot
5643    unsafe { self._tab.get::<u64>(UnbindResponse::VT_PLAN_ID, Some(0)).unwrap()}
5644  }
5645  #[inline]
5646  pub fn stop_id(&self) -> u64 {
5647    // Safety:
5648    // Created from valid Table for this object
5649    // which contains a valid value in this slot
5650    unsafe { self._tab.get::<u64>(UnbindResponse::VT_STOP_ID, Some(0)).unwrap()}
5651  }
5652}
5653
5654impl flatbuffers::Verifiable for UnbindResponse<'_> {
5655  #[inline]
5656  fn run_verifier(
5657    v: &mut flatbuffers::Verifier, pos: usize
5658  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
5659    use self::flatbuffers::Verifiable;
5660    v.visit_table(pos)?
5661     .visit_field::<u64>("plan_id", Self::VT_PLAN_ID, false)?
5662     .visit_field::<u64>("stop_id", Self::VT_STOP_ID, false)?
5663     .finish();
5664    Ok(())
5665  }
5666}
5667pub struct UnbindResponseArgs {
5668    pub plan_id: u64,
5669    pub stop_id: u64,
5670}
5671impl<'a> Default for UnbindResponseArgs {
5672  #[inline]
5673  fn default() -> Self {
5674    UnbindResponseArgs {
5675      plan_id: 0,
5676      stop_id: 0,
5677    }
5678  }
5679}
5680
5681pub struct UnbindResponseBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
5682  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
5683  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
5684}
5685impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> UnbindResponseBuilder<'a, 'b, A> {
5686  #[inline]
5687  pub fn add_plan_id(&mut self, plan_id: u64) {
5688    self.fbb_.push_slot::<u64>(UnbindResponse::VT_PLAN_ID, plan_id, 0);
5689  }
5690  #[inline]
5691  pub fn add_stop_id(&mut self, stop_id: u64) {
5692    self.fbb_.push_slot::<u64>(UnbindResponse::VT_STOP_ID, stop_id, 0);
5693  }
5694  #[inline]
5695  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> UnbindResponseBuilder<'a, 'b, A> {
5696    let start = _fbb.start_table();
5697    UnbindResponseBuilder {
5698      fbb_: _fbb,
5699      start_: start,
5700    }
5701  }
5702  #[inline]
5703  pub fn finish(self) -> flatbuffers::WIPOffset<UnbindResponse<'a>> {
5704    let o = self.fbb_.end_table(self.start_);
5705    flatbuffers::WIPOffset::new(o.value())
5706  }
5707}
5708
5709impl core::fmt::Debug for UnbindResponse<'_> {
5710  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
5711    let mut ds = f.debug_struct("UnbindResponse");
5712      ds.field("plan_id", &self.plan_id());
5713      ds.field("stop_id", &self.stop_id());
5714      ds.finish()
5715  }
5716}
5717pub enum MessageOffset {}
5718#[derive(Copy, Clone, PartialEq)]
5719
5720pub struct Message<'a> {
5721  pub _tab: flatbuffers::Table<'a>,
5722}
5723
5724impl<'a> flatbuffers::Follow<'a> for Message<'a> {
5725  type Inner = Message<'a>;
5726  #[inline]
5727  unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5728    Self { _tab: flatbuffers::Table::new(buf, loc) }
5729  }
5730}
5731
5732impl<'a> Message<'a> {
5733  pub const VT_DATA_TYPE: flatbuffers::VOffsetT = 4;
5734  pub const VT_DATA: flatbuffers::VOffsetT = 6;
5735  pub const VT_STATUS_TYPE: flatbuffers::VOffsetT = 8;
5736  pub const VT_STATUS: flatbuffers::VOffsetT = 10;
5737
5738  #[inline]
5739  pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
5740    Message { _tab: table }
5741  }
5742  #[allow(unused_mut)]
5743  pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
5744    _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
5745    args: &'args MessageArgs
5746  ) -> flatbuffers::WIPOffset<Message<'bldr>> {
5747    let mut builder = MessageBuilder::new(_fbb);
5748    if let Some(x) = args.status { builder.add_status(x); }
5749    if let Some(x) = args.data { builder.add_data(x); }
5750    builder.add_status_type(args.status_type);
5751    builder.add_data_type(args.data_type);
5752    builder.finish()
5753  }
5754
5755
5756  #[inline]
5757  pub fn data_type(&self) -> Payload {
5758    // Safety:
5759    // Created from valid Table for this object
5760    // which contains a valid value in this slot
5761    unsafe { self._tab.get::<Payload>(Message::VT_DATA_TYPE, Some(Payload::NONE)).unwrap()}
5762  }
5763  #[inline]
5764  pub fn data(&self) -> flatbuffers::Table<'a> {
5765    // Safety:
5766    // Created from valid Table for this object
5767    // which contains a valid value in this slot
5768    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Table<'a>>>(Message::VT_DATA, None).unwrap()}
5769  }
5770  #[inline]
5771  pub fn status_type(&self) -> Status {
5772    // Safety:
5773    // Created from valid Table for this object
5774    // which contains a valid value in this slot
5775    unsafe { self._tab.get::<Status>(Message::VT_STATUS_TYPE, Some(Status::NONE)).unwrap()}
5776  }
5777  #[inline]
5778  pub fn status(&self) -> flatbuffers::Table<'a> {
5779    // Safety:
5780    // Created from valid Table for this object
5781    // which contains a valid value in this slot
5782    unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Table<'a>>>(Message::VT_STATUS, None).unwrap()}
5783  }
5784  #[inline]
5785  #[allow(non_snake_case)]
5786  pub fn data_as_create_plan_request(&self) -> Option<CreatePlanRequest<'a>> {
5787    if self.data_type() == Payload::CreatePlanRequest {
5788      let u = self.data();
5789      // Safety:
5790      // Created from a valid Table for this object
5791      // Which contains a valid union in this slot
5792      Some(unsafe { CreatePlanRequest::init_from_table(u) })
5793    } else {
5794      None
5795    }
5796  }
5797
5798  #[inline]
5799  #[allow(non_snake_case)]
5800  pub fn data_as_create_plan_response(&self) -> Option<CreatePlanResponse<'a>> {
5801    if self.data_type() == Payload::CreatePlanResponse {
5802      let u = self.data();
5803      // Safety:
5804      // Created from a valid Table for this object
5805      // Which contains a valid union in this slot
5806      Some(unsafe { CreatePlanResponse::init_from_table(u) })
5807    } else {
5808      None
5809    }
5810  }
5811
5812  #[inline]
5813  #[allow(non_snake_case)]
5814  pub fn data_as_get_plan_request(&self) -> Option<GetPlanRequest<'a>> {
5815    if self.data_type() == Payload::GetPlanRequest {
5816      let u = self.data();
5817      // Safety:
5818      // Created from a valid Table for this object
5819      // Which contains a valid union in this slot
5820      Some(unsafe { GetPlanRequest::init_from_table(u) })
5821    } else {
5822      None
5823    }
5824  }
5825
5826  #[inline]
5827  #[allow(non_snake_case)]
5828  pub fn data_as_get_plans_request(&self) -> Option<GetPlansRequest<'a>> {
5829    if self.data_type() == Payload::GetPlansRequest {
5830      let u = self.data();
5831      // Safety:
5832      // Created from a valid Table for this object
5833      // Which contains a valid union in this slot
5834      Some(unsafe { GetPlansRequest::init_from_table(u) })
5835    } else {
5836      None
5837    }
5838  }
5839
5840  #[inline]
5841  #[allow(non_snake_case)]
5842  pub fn data_as_train(&self) -> Option<Train<'a>> {
5843    if self.data_type() == Payload::Train {
5844      let u = self.data();
5845      // Safety:
5846      // Created from a valid Table for this object
5847      // Which contains a valid union in this slot
5848      Some(unsafe { Train::init_from_table(u) })
5849    } else {
5850      None
5851    }
5852  }
5853
5854  #[inline]
5855  #[allow(non_snake_case)]
5856  pub fn data_as_catalog(&self) -> Option<Catalog<'a>> {
5857    if self.data_type() == Payload::Catalog {
5858      let u = self.data();
5859      // Safety:
5860      // Created from a valid Table for this object
5861      // Which contains a valid union in this slot
5862      Some(unsafe { Catalog::init_from_table(u) })
5863    } else {
5864      None
5865    }
5866  }
5867
5868  #[inline]
5869  #[allow(non_snake_case)]
5870  pub fn data_as_register_request(&self) -> Option<RegisterRequest<'a>> {
5871    if self.data_type() == Payload::RegisterRequest {
5872      let u = self.data();
5873      // Safety:
5874      // Created from a valid Table for this object
5875      // Which contains a valid union in this slot
5876      Some(unsafe { RegisterRequest::init_from_table(u) })
5877    } else {
5878      None
5879    }
5880  }
5881
5882  #[inline]
5883  #[allow(non_snake_case)]
5884  pub fn data_as_register_response(&self) -> Option<RegisterResponse<'a>> {
5885    if self.data_type() == Payload::RegisterResponse {
5886      let u = self.data();
5887      // Safety:
5888      // Created from a valid Table for this object
5889      // Which contains a valid union in this slot
5890      Some(unsafe { RegisterResponse::init_from_table(u) })
5891    } else {
5892      None
5893    }
5894  }
5895
5896  #[inline]
5897  #[allow(non_snake_case)]
5898  pub fn data_as_bind_request(&self) -> Option<BindRequest<'a>> {
5899    if self.data_type() == Payload::BindRequest {
5900      let u = self.data();
5901      // Safety:
5902      // Created from a valid Table for this object
5903      // Which contains a valid union in this slot
5904      Some(unsafe { BindRequest::init_from_table(u) })
5905    } else {
5906      None
5907    }
5908  }
5909
5910  #[inline]
5911  #[allow(non_snake_case)]
5912  pub fn data_as_bind_response(&self) -> Option<BindResponse<'a>> {
5913    if self.data_type() == Payload::BindResponse {
5914      let u = self.data();
5915      // Safety:
5916      // Created from a valid Table for this object
5917      // Which contains a valid union in this slot
5918      Some(unsafe { BindResponse::init_from_table(u) })
5919    } else {
5920      None
5921    }
5922  }
5923
5924  #[inline]
5925  #[allow(non_snake_case)]
5926  pub fn data_as_unbind_request(&self) -> Option<UnbindRequest<'a>> {
5927    if self.data_type() == Payload::UnbindRequest {
5928      let u = self.data();
5929      // Safety:
5930      // Created from a valid Table for this object
5931      // Which contains a valid union in this slot
5932      Some(unsafe { UnbindRequest::init_from_table(u) })
5933    } else {
5934      None
5935    }
5936  }
5937
5938  #[inline]
5939  #[allow(non_snake_case)]
5940  pub fn data_as_unbind_response(&self) -> Option<UnbindResponse<'a>> {
5941    if self.data_type() == Payload::UnbindResponse {
5942      let u = self.data();
5943      // Safety:
5944      // Created from a valid Table for this object
5945      // Which contains a valid union in this slot
5946      Some(unsafe { UnbindResponse::init_from_table(u) })
5947    } else {
5948      None
5949    }
5950  }
5951
5952  #[inline]
5953  #[allow(non_snake_case)]
5954  pub fn data_as_disconnect(&self) -> Option<Disconnect<'a>> {
5955    if self.data_type() == Payload::Disconnect {
5956      let u = self.data();
5957      // Safety:
5958      // Created from a valid Table for this object
5959      // Which contains a valid union in this slot
5960      Some(unsafe { Disconnect::init_from_table(u) })
5961    } else {
5962      None
5963    }
5964  }
5965
5966  #[inline]
5967  #[allow(non_snake_case)]
5968  pub fn status_as_ok_status(&self) -> Option<OkStatus<'a>> {
5969    if self.status_type() == Status::OkStatus {
5970      let u = self.status();
5971      // Safety:
5972      // Created from a valid Table for this object
5973      // Which contains a valid union in this slot
5974      Some(unsafe { OkStatus::init_from_table(u) })
5975    } else {
5976      None
5977    }
5978  }
5979
5980  #[inline]
5981  #[allow(non_snake_case)]
5982  pub fn status_as_error_status(&self) -> Option<ErrorStatus<'a>> {
5983    if self.status_type() == Status::ErrorStatus {
5984      let u = self.status();
5985      // Safety:
5986      // Created from a valid Table for this object
5987      // Which contains a valid union in this slot
5988      Some(unsafe { ErrorStatus::init_from_table(u) })
5989    } else {
5990      None
5991    }
5992  }
5993
5994}
5995
5996impl flatbuffers::Verifiable for Message<'_> {
5997  #[inline]
5998  fn run_verifier(
5999    v: &mut flatbuffers::Verifier, pos: usize
6000  ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
6001    use self::flatbuffers::Verifiable;
6002    v.visit_table(pos)?
6003     .visit_union::<Payload, _>("data_type", Self::VT_DATA_TYPE, "data", Self::VT_DATA, true, |key, v, pos| {
6004        match key {
6005          Payload::CreatePlanRequest => v.verify_union_variant::<flatbuffers::ForwardsUOffset<CreatePlanRequest>>("Payload::CreatePlanRequest", pos),
6006          Payload::CreatePlanResponse => v.verify_union_variant::<flatbuffers::ForwardsUOffset<CreatePlanResponse>>("Payload::CreatePlanResponse", pos),
6007          Payload::GetPlanRequest => v.verify_union_variant::<flatbuffers::ForwardsUOffset<GetPlanRequest>>("Payload::GetPlanRequest", pos),
6008          Payload::GetPlansRequest => v.verify_union_variant::<flatbuffers::ForwardsUOffset<GetPlansRequest>>("Payload::GetPlansRequest", pos),
6009          Payload::Train => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Train>>("Payload::Train", pos),
6010          Payload::Catalog => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Catalog>>("Payload::Catalog", pos),
6011          Payload::RegisterRequest => v.verify_union_variant::<flatbuffers::ForwardsUOffset<RegisterRequest>>("Payload::RegisterRequest", pos),
6012          Payload::RegisterResponse => v.verify_union_variant::<flatbuffers::ForwardsUOffset<RegisterResponse>>("Payload::RegisterResponse", pos),
6013          Payload::BindRequest => v.verify_union_variant::<flatbuffers::ForwardsUOffset<BindRequest>>("Payload::BindRequest", pos),
6014          Payload::BindResponse => v.verify_union_variant::<flatbuffers::ForwardsUOffset<BindResponse>>("Payload::BindResponse", pos),
6015          Payload::UnbindRequest => v.verify_union_variant::<flatbuffers::ForwardsUOffset<UnbindRequest>>("Payload::UnbindRequest", pos),
6016          Payload::UnbindResponse => v.verify_union_variant::<flatbuffers::ForwardsUOffset<UnbindResponse>>("Payload::UnbindResponse", pos),
6017          Payload::Disconnect => v.verify_union_variant::<flatbuffers::ForwardsUOffset<Disconnect>>("Payload::Disconnect", pos),
6018          _ => Ok(()),
6019        }
6020     })?
6021     .visit_union::<Status, _>("status_type", Self::VT_STATUS_TYPE, "status", Self::VT_STATUS, true, |key, v, pos| {
6022        match key {
6023          Status::OkStatus => v.verify_union_variant::<flatbuffers::ForwardsUOffset<OkStatus>>("Status::OkStatus", pos),
6024          Status::ErrorStatus => v.verify_union_variant::<flatbuffers::ForwardsUOffset<ErrorStatus>>("Status::ErrorStatus", pos),
6025          _ => Ok(()),
6026        }
6027     })?
6028     .finish();
6029    Ok(())
6030  }
6031}
6032pub struct MessageArgs {
6033    pub data_type: Payload,
6034    pub data: Option<flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>>,
6035    pub status_type: Status,
6036    pub status: Option<flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>>,
6037}
6038impl<'a> Default for MessageArgs {
6039  #[inline]
6040  fn default() -> Self {
6041    MessageArgs {
6042      data_type: Payload::NONE,
6043      data: None, // required field
6044      status_type: Status::NONE,
6045      status: None, // required field
6046    }
6047  }
6048}
6049
6050pub struct MessageBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
6051  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
6052  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
6053}
6054impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> MessageBuilder<'a, 'b, A> {
6055  #[inline]
6056  pub fn add_data_type(&mut self, data_type: Payload) {
6057    self.fbb_.push_slot::<Payload>(Message::VT_DATA_TYPE, data_type, Payload::NONE);
6058  }
6059  #[inline]
6060  pub fn add_data(&mut self, data: flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>) {
6061    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Message::VT_DATA, data);
6062  }
6063  #[inline]
6064  pub fn add_status_type(&mut self, status_type: Status) {
6065    self.fbb_.push_slot::<Status>(Message::VT_STATUS_TYPE, status_type, Status::NONE);
6066  }
6067  #[inline]
6068  pub fn add_status(&mut self, status: flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>) {
6069    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Message::VT_STATUS, status);
6070  }
6071  #[inline]
6072  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> MessageBuilder<'a, 'b, A> {
6073    let start = _fbb.start_table();
6074    MessageBuilder {
6075      fbb_: _fbb,
6076      start_: start,
6077    }
6078  }
6079  #[inline]
6080  pub fn finish(self) -> flatbuffers::WIPOffset<Message<'a>> {
6081    let o = self.fbb_.end_table(self.start_);
6082    self.fbb_.required(o, Message::VT_DATA,"data");
6083    self.fbb_.required(o, Message::VT_STATUS,"status");
6084    flatbuffers::WIPOffset::new(o.value())
6085  }
6086}
6087
6088impl core::fmt::Debug for Message<'_> {
6089  fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
6090    let mut ds = f.debug_struct("Message");
6091      ds.field("data_type", &self.data_type());
6092      match self.data_type() {
6093        Payload::CreatePlanRequest => {
6094          if let Some(x) = self.data_as_create_plan_request() {
6095            ds.field("data", &x)
6096          } else {
6097            ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
6098          }
6099        },
6100        Payload::CreatePlanResponse => {
6101          if let Some(x) = self.data_as_create_plan_response() {
6102            ds.field("data", &x)
6103          } else {
6104            ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
6105          }
6106        },
6107        Payload::GetPlanRequest => {
6108          if let Some(x) = self.data_as_get_plan_request() {
6109            ds.field("data", &x)
6110          } else {
6111            ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
6112          }
6113        },
6114        Payload::GetPlansRequest => {
6115          if let Some(x) = self.data_as_get_plans_request() {
6116            ds.field("data", &x)
6117          } else {
6118            ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
6119          }
6120        },
6121        Payload::Train => {
6122          if let Some(x) = self.data_as_train() {
6123            ds.field("data", &x)
6124          } else {
6125            ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
6126          }
6127        },
6128        Payload::Catalog => {
6129          if let Some(x) = self.data_as_catalog() {
6130            ds.field("data", &x)
6131          } else {
6132            ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
6133          }
6134        },
6135        Payload::RegisterRequest => {
6136          if let Some(x) = self.data_as_register_request() {
6137            ds.field("data", &x)
6138          } else {
6139            ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
6140          }
6141        },
6142        Payload::RegisterResponse => {
6143          if let Some(x) = self.data_as_register_response() {
6144            ds.field("data", &x)
6145          } else {
6146            ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
6147          }
6148        },
6149        Payload::BindRequest => {
6150          if let Some(x) = self.data_as_bind_request() {
6151            ds.field("data", &x)
6152          } else {
6153            ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
6154          }
6155        },
6156        Payload::BindResponse => {
6157          if let Some(x) = self.data_as_bind_response() {
6158            ds.field("data", &x)
6159          } else {
6160            ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
6161          }
6162        },
6163        Payload::UnbindRequest => {
6164          if let Some(x) = self.data_as_unbind_request() {
6165            ds.field("data", &x)
6166          } else {
6167            ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
6168          }
6169        },
6170        Payload::UnbindResponse => {
6171          if let Some(x) = self.data_as_unbind_response() {
6172            ds.field("data", &x)
6173          } else {
6174            ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
6175          }
6176        },
6177        Payload::Disconnect => {
6178          if let Some(x) = self.data_as_disconnect() {
6179            ds.field("data", &x)
6180          } else {
6181            ds.field("data", &"InvalidFlatbuffer: Union discriminant does not match value.")
6182          }
6183        },
6184        _ => {
6185          let x: Option<()> = None;
6186          ds.field("data", &x)
6187        },
6188      };
6189      ds.field("status_type", &self.status_type());
6190      match self.status_type() {
6191        Status::OkStatus => {
6192          if let Some(x) = self.status_as_ok_status() {
6193            ds.field("status", &x)
6194          } else {
6195            ds.field("status", &"InvalidFlatbuffer: Union discriminant does not match value.")
6196          }
6197        },
6198        Status::ErrorStatus => {
6199          if let Some(x) = self.status_as_error_status() {
6200            ds.field("status", &x)
6201          } else {
6202            ds.field("status", &"InvalidFlatbuffer: Union discriminant does not match value.")
6203          }
6204        },
6205        _ => {
6206          let x: Option<()> = None;
6207          ds.field("status", &x)
6208        },
6209      };
6210      ds.finish()
6211  }
6212}
6213#[inline]
6214/// Verifies that a buffer of bytes contains a `Message`
6215/// and returns it.
6216/// Note that verification is still experimental and may not
6217/// catch every error, or be maximally performant. For the
6218/// previous, unchecked, behavior use
6219/// `root_as_message_unchecked`.
6220pub fn root_as_message(buf: &[u8]) -> Result<Message, flatbuffers::InvalidFlatbuffer> {
6221  flatbuffers::root::<Message>(buf)
6222}
6223#[inline]
6224/// Verifies that a buffer of bytes contains a size prefixed
6225/// `Message` and returns it.
6226/// Note that verification is still experimental and may not
6227/// catch every error, or be maximally performant. For the
6228/// previous, unchecked, behavior use
6229/// `size_prefixed_root_as_message_unchecked`.
6230pub fn size_prefixed_root_as_message(buf: &[u8]) -> Result<Message, flatbuffers::InvalidFlatbuffer> {
6231  flatbuffers::size_prefixed_root::<Message>(buf)
6232}
6233#[inline]
6234/// Verifies, with the given options, that a buffer of bytes
6235/// contains a `Message` and returns it.
6236/// Note that verification is still experimental and may not
6237/// catch every error, or be maximally performant. For the
6238/// previous, unchecked, behavior use
6239/// `root_as_message_unchecked`.
6240pub fn root_as_message_with_opts<'b, 'o>(
6241  opts: &'o flatbuffers::VerifierOptions,
6242  buf: &'b [u8],
6243) -> Result<Message<'b>, flatbuffers::InvalidFlatbuffer> {
6244  flatbuffers::root_with_opts::<Message<'b>>(opts, buf)
6245}
6246#[inline]
6247/// Verifies, with the given verifier options, that a buffer of
6248/// bytes contains a size prefixed `Message` and returns
6249/// it. Note that verification is still experimental and may not
6250/// catch every error, or be maximally performant. For the
6251/// previous, unchecked, behavior use
6252/// `root_as_message_unchecked`.
6253pub fn size_prefixed_root_as_message_with_opts<'b, 'o>(
6254  opts: &'o flatbuffers::VerifierOptions,
6255  buf: &'b [u8],
6256) -> Result<Message<'b>, flatbuffers::InvalidFlatbuffer> {
6257  flatbuffers::size_prefixed_root_with_opts::<Message<'b>>(opts, buf)
6258}
6259#[inline]
6260/// Assumes, without verification, that a buffer of bytes contains a Message and returns it.
6261/// # Safety
6262/// Callers must trust the given bytes do indeed contain a valid `Message`.
6263pub unsafe fn root_as_message_unchecked(buf: &[u8]) -> Message {
6264  flatbuffers::root_unchecked::<Message>(buf)
6265}
6266#[inline]
6267/// Assumes, without verification, that a buffer of bytes contains a size prefixed Message and returns it.
6268/// # Safety
6269/// Callers must trust the given bytes do indeed contain a valid size prefixed `Message`.
6270pub unsafe fn size_prefixed_root_as_message_unchecked(buf: &[u8]) -> Message {
6271  flatbuffers::size_prefixed_root_unchecked::<Message>(buf)
6272}
6273#[inline]
6274pub fn finish_message_buffer<'a, 'b, A: flatbuffers::Allocator + 'a>(
6275    fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
6276    root: flatbuffers::WIPOffset<Message<'a>>) {
6277  fbb.finish(root, None);
6278}
6279
6280#[inline]
6281pub fn finish_size_prefixed_message_buffer<'a, 'b, A: flatbuffers::Allocator + 'a>(fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, root: flatbuffers::WIPOffset<Message<'a>>) {
6282  fbb.finish_size_prefixed(root, None);
6283}
6284}  // pub mod protocol
6285