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