track_rails/
message_generated.rs

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