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