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