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