extern crate alloc;
#[allow(unused_imports, dead_code)]
pub mod nexus {
#[allow(unused_imports, dead_code)]
pub mod wal {
pub enum WebhookEventRecordV1Offset {}
#[derive(Copy, Clone, PartialEq)]
pub struct WebhookEventRecordV1<'a> {
pub _tab: ::flatbuffers::Table<'a>,
}
impl<'a> ::flatbuffers::Follow<'a> for WebhookEventRecordV1<'a> {
type Inner = WebhookEventRecordV1<'a>;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
}
}
impl<'a> WebhookEventRecordV1<'a> {
pub const VT_SEQ: ::flatbuffers::VOffsetT = 4;
pub const VT_OP: ::flatbuffers::VOffsetT = 6;
pub const VT_EVENT_ID: ::flatbuffers::VOffsetT = 8;
pub const VT_RULE_ID: ::flatbuffers::VOffsetT = 10;
pub const VT_BUCKET: ::flatbuffers::VOffsetT = 12;
pub const VT_KEY: ::flatbuffers::VOffsetT = 14;
pub const VT_PAYLOAD_JSON: ::flatbuffers::VOffsetT = 16;
pub const VT_TS_UNIX_MS: ::flatbuffers::VOffsetT = 18;
#[inline]
pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
WebhookEventRecordV1 { _tab: table }
}
#[allow(unused_mut)]
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
_fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
args: &'args WebhookEventRecordV1Args<'args>
) -> ::flatbuffers::WIPOffset<WebhookEventRecordV1<'bldr>> {
let mut builder = WebhookEventRecordV1Builder::new(_fbb);
builder.add_ts_unix_ms(args.ts_unix_ms);
builder.add_seq(args.seq);
if let Some(x) = args.payload_json { builder.add_payload_json(x); }
if let Some(x) = args.key { builder.add_key(x); }
if let Some(x) = args.bucket { builder.add_bucket(x); }
if let Some(x) = args.rule_id { builder.add_rule_id(x); }
if let Some(x) = args.event_id { builder.add_event_id(x); }
if let Some(x) = args.op { builder.add_op(x); }
builder.finish()
}
#[inline]
pub fn seq(&self) -> u64 {
unsafe { self._tab.get::<u64>(WebhookEventRecordV1::VT_SEQ, Some(0)).unwrap()}
}
#[inline]
pub fn op(&self) -> Option<&'a str> {
unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(WebhookEventRecordV1::VT_OP, None)}
}
#[inline]
pub fn event_id(&self) -> Option<&'a str> {
unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(WebhookEventRecordV1::VT_EVENT_ID, None)}
}
#[inline]
pub fn rule_id(&self) -> Option<&'a str> {
unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(WebhookEventRecordV1::VT_RULE_ID, None)}
}
#[inline]
pub fn bucket(&self) -> Option<&'a str> {
unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(WebhookEventRecordV1::VT_BUCKET, None)}
}
#[inline]
pub fn key(&self) -> Option<&'a str> {
unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(WebhookEventRecordV1::VT_KEY, None)}
}
#[inline]
pub fn payload_json(&self) -> Option<&'a str> {
unsafe { self._tab.get::<::flatbuffers::ForwardsUOffset<&str>>(WebhookEventRecordV1::VT_PAYLOAD_JSON, None)}
}
#[inline]
pub fn ts_unix_ms(&self) -> u64 {
unsafe { self._tab.get::<u64>(WebhookEventRecordV1::VT_TS_UNIX_MS, Some(0)).unwrap()}
}
}
impl ::flatbuffers::Verifiable for WebhookEventRecordV1<'_> {
#[inline]
fn run_verifier(
v: &mut ::flatbuffers::Verifier, pos: usize
) -> Result<(), ::flatbuffers::InvalidFlatbuffer> {
v.visit_table(pos)?
.visit_field::<u64>("seq", Self::VT_SEQ, false)?
.visit_field::<::flatbuffers::ForwardsUOffset<&str>>("op", Self::VT_OP, false)?
.visit_field::<::flatbuffers::ForwardsUOffset<&str>>("event_id", Self::VT_EVENT_ID, false)?
.visit_field::<::flatbuffers::ForwardsUOffset<&str>>("rule_id", Self::VT_RULE_ID, false)?
.visit_field::<::flatbuffers::ForwardsUOffset<&str>>("bucket", Self::VT_BUCKET, false)?
.visit_field::<::flatbuffers::ForwardsUOffset<&str>>("key", Self::VT_KEY, false)?
.visit_field::<::flatbuffers::ForwardsUOffset<&str>>("payload_json", Self::VT_PAYLOAD_JSON, false)?
.visit_field::<u64>("ts_unix_ms", Self::VT_TS_UNIX_MS, false)?
.finish();
Ok(())
}
}
pub struct WebhookEventRecordV1Args<'a> {
pub seq: u64,
pub op: Option<::flatbuffers::WIPOffset<&'a str>>,
pub event_id: Option<::flatbuffers::WIPOffset<&'a str>>,
pub rule_id: Option<::flatbuffers::WIPOffset<&'a str>>,
pub bucket: Option<::flatbuffers::WIPOffset<&'a str>>,
pub key: Option<::flatbuffers::WIPOffset<&'a str>>,
pub payload_json: Option<::flatbuffers::WIPOffset<&'a str>>,
pub ts_unix_ms: u64,
}
impl<'a> Default for WebhookEventRecordV1Args<'a> {
#[inline]
fn default() -> Self {
WebhookEventRecordV1Args {
seq: 0,
op: None,
event_id: None,
rule_id: None,
bucket: None,
key: None,
payload_json: None,
ts_unix_ms: 0,
}
}
}
pub struct WebhookEventRecordV1Builder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> {
fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> WebhookEventRecordV1Builder<'a, 'b, A> {
#[inline]
pub fn add_seq(&mut self, seq: u64) {
self.fbb_.push_slot::<u64>(WebhookEventRecordV1::VT_SEQ, seq, 0);
}
#[inline]
pub fn add_op(&mut self, op: ::flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(WebhookEventRecordV1::VT_OP, op);
}
#[inline]
pub fn add_event_id(&mut self, event_id: ::flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(WebhookEventRecordV1::VT_EVENT_ID, event_id);
}
#[inline]
pub fn add_rule_id(&mut self, rule_id: ::flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(WebhookEventRecordV1::VT_RULE_ID, rule_id);
}
#[inline]
pub fn add_bucket(&mut self, bucket: ::flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(WebhookEventRecordV1::VT_BUCKET, bucket);
}
#[inline]
pub fn add_key(&mut self, key: ::flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(WebhookEventRecordV1::VT_KEY, key);
}
#[inline]
pub fn add_payload_json(&mut self, payload_json: ::flatbuffers::WIPOffset<&'b str>) {
self.fbb_.push_slot_always::<::flatbuffers::WIPOffset<_>>(WebhookEventRecordV1::VT_PAYLOAD_JSON, payload_json);
}
#[inline]
pub fn add_ts_unix_ms(&mut self, ts_unix_ms: u64) {
self.fbb_.push_slot::<u64>(WebhookEventRecordV1::VT_TS_UNIX_MS, ts_unix_ms, 0);
}
#[inline]
pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> WebhookEventRecordV1Builder<'a, 'b, A> {
let start = _fbb.start_table();
WebhookEventRecordV1Builder {
fbb_: _fbb,
start_: start,
}
}
#[inline]
pub fn finish(self) -> ::flatbuffers::WIPOffset<WebhookEventRecordV1<'a>> {
let o = self.fbb_.end_table(self.start_);
::flatbuffers::WIPOffset::new(o.value())
}
}
impl ::core::fmt::Debug for WebhookEventRecordV1<'_> {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
let mut ds = f.debug_struct("WebhookEventRecordV1");
ds.field("seq", &self.seq());
ds.field("op", &self.op());
ds.field("event_id", &self.event_id());
ds.field("rule_id", &self.rule_id());
ds.field("bucket", &self.bucket());
ds.field("key", &self.key());
ds.field("payload_json", &self.payload_json());
ds.field("ts_unix_ms", &self.ts_unix_ms());
ds.finish()
}
}
#[inline]
pub fn root_as_webhook_event_record_v1(buf: &[u8]) -> Result<WebhookEventRecordV1<'_>, ::flatbuffers::InvalidFlatbuffer> {
::flatbuffers::root::<WebhookEventRecordV1>(buf)
}
#[inline]
pub fn size_prefixed_root_as_webhook_event_record_v1(buf: &[u8]) -> Result<WebhookEventRecordV1<'_>, ::flatbuffers::InvalidFlatbuffer> {
::flatbuffers::size_prefixed_root::<WebhookEventRecordV1>(buf)
}
#[inline]
pub fn root_as_webhook_event_record_v1_with_opts<'b, 'o>(
opts: &'o ::flatbuffers::VerifierOptions,
buf: &'b [u8],
) -> Result<WebhookEventRecordV1<'b>, ::flatbuffers::InvalidFlatbuffer> {
::flatbuffers::root_with_opts::<WebhookEventRecordV1<'b>>(opts, buf)
}
#[inline]
pub fn size_prefixed_root_as_webhook_event_record_v1_with_opts<'b, 'o>(
opts: &'o ::flatbuffers::VerifierOptions,
buf: &'b [u8],
) -> Result<WebhookEventRecordV1<'b>, ::flatbuffers::InvalidFlatbuffer> {
::flatbuffers::size_prefixed_root_with_opts::<WebhookEventRecordV1<'b>>(opts, buf)
}
#[inline]
pub unsafe fn root_as_webhook_event_record_v1_unchecked(buf: &[u8]) -> WebhookEventRecordV1<'_> {
unsafe { ::flatbuffers::root_unchecked::<WebhookEventRecordV1>(buf) }
}
#[inline]
pub unsafe fn size_prefixed_root_as_webhook_event_record_v1_unchecked(buf: &[u8]) -> WebhookEventRecordV1<'_> {
unsafe { ::flatbuffers::size_prefixed_root_unchecked::<WebhookEventRecordV1>(buf) }
}
#[inline]
pub fn finish_webhook_event_record_v1_buffer<'a, 'b, A: ::flatbuffers::Allocator + 'a>(
fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
root: ::flatbuffers::WIPOffset<WebhookEventRecordV1<'a>>) {
fbb.finish(root, None);
}
#[inline]
pub fn finish_size_prefixed_webhook_event_record_v1_buffer<'a, 'b, A: ::flatbuffers::Allocator + 'a>(fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>, root: ::flatbuffers::WIPOffset<WebhookEventRecordV1<'a>>) {
fbb.finish_size_prefixed(root, None);
}
} }