#![allow(unknown_lints)]
#![allow(clippy::all)]
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unsafe_code)]
#![allow(unused_imports)]
#![allow(unused_results)]
use protobuf::Message as Message_imported_for_functions;
use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_8_0;
#[derive(PartialEq,Clone,Default)]
pub struct KeyedElement {
pub timestamp: u64,
pub key: u64,
pub data: ::std::vec::Vec<u8>,
pub task_id: ::std::string::String,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a KeyedElement {
fn default() -> &'a KeyedElement {
<KeyedElement as ::protobuf::Message>::default_instance()
}
}
impl KeyedElement {
pub fn new() -> KeyedElement {
::std::default::Default::default()
}
pub fn get_timestamp(&self) -> u64 {
self.timestamp
}
pub fn clear_timestamp(&mut self) {
self.timestamp = 0;
}
pub fn set_timestamp(&mut self, v: u64) {
self.timestamp = v;
}
pub fn get_key(&self) -> u64 {
self.key
}
pub fn clear_key(&mut self) {
self.key = 0;
}
pub fn set_key(&mut self, v: u64) {
self.key = v;
}
pub fn get_data(&self) -> &[u8] {
&self.data
}
pub fn clear_data(&mut self) {
self.data.clear();
}
pub fn set_data(&mut self, v: ::std::vec::Vec<u8>) {
self.data = v;
}
pub fn mut_data(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.data
}
pub fn take_data(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.data, ::std::vec::Vec::new())
}
pub fn get_task_id(&self) -> &str {
&self.task_id
}
pub fn clear_task_id(&mut self) {
self.task_id.clear();
}
pub fn set_task_id(&mut self, v: ::std::string::String) {
self.task_id = v;
}
pub fn mut_task_id(&mut self) -> &mut ::std::string::String {
&mut self.task_id
}
pub fn take_task_id(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.task_id, ::std::string::String::new())
}
}
impl ::protobuf::Message for KeyedElement {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint64()?;
self.timestamp = tmp;
},
2 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint64()?;
self.key = tmp;
},
3 => {
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.data)?;
},
4 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.task_id)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if self.timestamp != 0 {
my_size += ::protobuf::rt::value_size(1, self.timestamp, ::protobuf::wire_format::WireTypeVarint);
}
if self.key != 0 {
my_size += ::protobuf::rt::value_size(2, self.key, ::protobuf::wire_format::WireTypeVarint);
}
if !self.data.is_empty() {
my_size += ::protobuf::rt::bytes_size(3, &self.data);
}
if !self.task_id.is_empty() {
my_size += ::protobuf::rt::string_size(4, &self.task_id);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
if self.timestamp != 0 {
os.write_uint64(1, self.timestamp)?;
}
if self.key != 0 {
os.write_uint64(2, self.key)?;
}
if !self.data.is_empty() {
os.write_bytes(3, &self.data)?;
}
if !self.task_id.is_empty() {
os.write_string(4, &self.task_id)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> KeyedElement {
KeyedElement::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
"timestamp",
|m: &KeyedElement| { &m.timestamp },
|m: &mut KeyedElement| { &mut m.timestamp },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
"key",
|m: &KeyedElement| { &m.key },
|m: &mut KeyedElement| { &mut m.key },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"data",
|m: &KeyedElement| { &m.data },
|m: &mut KeyedElement| { &mut m.data },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"task_id",
|m: &KeyedElement| { &m.task_id },
|m: &mut KeyedElement| { &mut m.task_id },
));
::protobuf::reflect::MessageDescriptor::new::<KeyedElement>(
"KeyedElement",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static KeyedElement {
static mut instance: ::protobuf::lazy::Lazy<KeyedElement> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const KeyedElement,
};
unsafe {
instance.get(KeyedElement::new)
}
}
}
impl ::protobuf::Clear for KeyedElement {
fn clear(&mut self) {
self.timestamp = 0;
self.key = 0;
self.data.clear();
self.task_id.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for KeyedElement {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for KeyedElement {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct Element {
pub timestamp: u64,
pub data: ::std::vec::Vec<u8>,
pub task_id: ::std::string::String,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a Element {
fn default() -> &'a Element {
<Element as ::protobuf::Message>::default_instance()
}
}
impl Element {
pub fn new() -> Element {
::std::default::Default::default()
}
pub fn get_timestamp(&self) -> u64 {
self.timestamp
}
pub fn clear_timestamp(&mut self) {
self.timestamp = 0;
}
pub fn set_timestamp(&mut self, v: u64) {
self.timestamp = v;
}
pub fn get_data(&self) -> &[u8] {
&self.data
}
pub fn clear_data(&mut self) {
self.data.clear();
}
pub fn set_data(&mut self, v: ::std::vec::Vec<u8>) {
self.data = v;
}
pub fn mut_data(&mut self) -> &mut ::std::vec::Vec<u8> {
&mut self.data
}
pub fn take_data(&mut self) -> ::std::vec::Vec<u8> {
::std::mem::replace(&mut self.data, ::std::vec::Vec::new())
}
pub fn get_task_id(&self) -> &str {
&self.task_id
}
pub fn clear_task_id(&mut self) {
self.task_id.clear();
}
pub fn set_task_id(&mut self, v: ::std::string::String) {
self.task_id = v;
}
pub fn mut_task_id(&mut self) -> &mut ::std::string::String {
&mut self.task_id
}
pub fn take_task_id(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.task_id, ::std::string::String::new())
}
}
impl ::protobuf::Message for Element {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint64()?;
self.timestamp = tmp;
},
2 => {
::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.data)?;
},
3 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.task_id)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if self.timestamp != 0 {
my_size += ::protobuf::rt::value_size(1, self.timestamp, ::protobuf::wire_format::WireTypeVarint);
}
if !self.data.is_empty() {
my_size += ::protobuf::rt::bytes_size(2, &self.data);
}
if !self.task_id.is_empty() {
my_size += ::protobuf::rt::string_size(3, &self.task_id);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
if self.timestamp != 0 {
os.write_uint64(1, self.timestamp)?;
}
if !self.data.is_empty() {
os.write_bytes(2, &self.data)?;
}
if !self.task_id.is_empty() {
os.write_string(3, &self.task_id)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> Element {
Element::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
"timestamp",
|m: &Element| { &m.timestamp },
|m: &mut Element| { &mut m.timestamp },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBytes>(
"data",
|m: &Element| { &m.data },
|m: &mut Element| { &mut m.data },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"task_id",
|m: &Element| { &m.task_id },
|m: &mut Element| { &mut m.task_id },
));
::protobuf::reflect::MessageDescriptor::new::<Element>(
"Element",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static Element {
static mut instance: ::protobuf::lazy::Lazy<Element> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const Element,
};
unsafe {
instance.get(Element::new)
}
}
}
impl ::protobuf::Clear for Element {
fn clear(&mut self) {
self.timestamp = 0;
self.data.clear();
self.task_id.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for Element {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Element {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct WindowTrigger {
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a WindowTrigger {
fn default() -> &'a WindowTrigger {
<WindowTrigger as ::protobuf::Message>::default_instance()
}
}
impl WindowTrigger {
pub fn new() -> WindowTrigger {
::std::default::Default::default()
}
}
impl ::protobuf::Message for WindowTrigger {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> WindowTrigger {
WindowTrigger::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let fields = ::std::vec::Vec::new();
::protobuf::reflect::MessageDescriptor::new::<WindowTrigger>(
"WindowTrigger",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static WindowTrigger {
static mut instance: ::protobuf::lazy::Lazy<WindowTrigger> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const WindowTrigger,
};
unsafe {
instance.get(WindowTrigger::new)
}
}
}
impl ::protobuf::Clear for WindowTrigger {
fn clear(&mut self) {
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for WindowTrigger {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for WindowTrigger {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct WindowComplete {
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a WindowComplete {
fn default() -> &'a WindowComplete {
<WindowComplete as ::protobuf::Message>::default_instance()
}
}
impl WindowComplete {
pub fn new() -> WindowComplete {
::std::default::Default::default()
}
}
impl ::protobuf::Message for WindowComplete {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> WindowComplete {
WindowComplete::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let fields = ::std::vec::Vec::new();
::protobuf::reflect::MessageDescriptor::new::<WindowComplete>(
"WindowComplete",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static WindowComplete {
static mut instance: ::protobuf::lazy::Lazy<WindowComplete> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const WindowComplete,
};
unsafe {
instance.get(WindowComplete::new)
}
}
}
impl ::protobuf::Clear for WindowComplete {
fn clear(&mut self) {
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for WindowComplete {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for WindowComplete {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct WindowMessage {
pub payload: ::std::option::Option<WindowMessage_oneof_payload>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a WindowMessage {
fn default() -> &'a WindowMessage {
<WindowMessage as ::protobuf::Message>::default_instance()
}
}
#[derive(Clone,PartialEq,Debug)]
pub enum WindowMessage_oneof_payload {
trigger(WindowTrigger),
complete(WindowComplete),
element(Element),
keyed_element(KeyedElement),
}
impl WindowMessage {
pub fn new() -> WindowMessage {
::std::default::Default::default()
}
pub fn get_trigger(&self) -> &WindowTrigger {
match self.payload {
::std::option::Option::Some(WindowMessage_oneof_payload::trigger(ref v)) => v,
_ => WindowTrigger::default_instance(),
}
}
pub fn clear_trigger(&mut self) {
self.payload = ::std::option::Option::None;
}
pub fn has_trigger(&self) -> bool {
match self.payload {
::std::option::Option::Some(WindowMessage_oneof_payload::trigger(..)) => true,
_ => false,
}
}
pub fn set_trigger(&mut self, v: WindowTrigger) {
self.payload = ::std::option::Option::Some(WindowMessage_oneof_payload::trigger(v))
}
pub fn mut_trigger(&mut self) -> &mut WindowTrigger {
if let ::std::option::Option::Some(WindowMessage_oneof_payload::trigger(_)) = self.payload {
} else {
self.payload = ::std::option::Option::Some(WindowMessage_oneof_payload::trigger(WindowTrigger::new()));
}
match self.payload {
::std::option::Option::Some(WindowMessage_oneof_payload::trigger(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_trigger(&mut self) -> WindowTrigger {
if self.has_trigger() {
match self.payload.take() {
::std::option::Option::Some(WindowMessage_oneof_payload::trigger(v)) => v,
_ => panic!(),
}
} else {
WindowTrigger::new()
}
}
pub fn get_complete(&self) -> &WindowComplete {
match self.payload {
::std::option::Option::Some(WindowMessage_oneof_payload::complete(ref v)) => v,
_ => WindowComplete::default_instance(),
}
}
pub fn clear_complete(&mut self) {
self.payload = ::std::option::Option::None;
}
pub fn has_complete(&self) -> bool {
match self.payload {
::std::option::Option::Some(WindowMessage_oneof_payload::complete(..)) => true,
_ => false,
}
}
pub fn set_complete(&mut self, v: WindowComplete) {
self.payload = ::std::option::Option::Some(WindowMessage_oneof_payload::complete(v))
}
pub fn mut_complete(&mut self) -> &mut WindowComplete {
if let ::std::option::Option::Some(WindowMessage_oneof_payload::complete(_)) = self.payload {
} else {
self.payload = ::std::option::Option::Some(WindowMessage_oneof_payload::complete(WindowComplete::new()));
}
match self.payload {
::std::option::Option::Some(WindowMessage_oneof_payload::complete(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_complete(&mut self) -> WindowComplete {
if self.has_complete() {
match self.payload.take() {
::std::option::Option::Some(WindowMessage_oneof_payload::complete(v)) => v,
_ => panic!(),
}
} else {
WindowComplete::new()
}
}
pub fn get_element(&self) -> &Element {
match self.payload {
::std::option::Option::Some(WindowMessage_oneof_payload::element(ref v)) => v,
_ => Element::default_instance(),
}
}
pub fn clear_element(&mut self) {
self.payload = ::std::option::Option::None;
}
pub fn has_element(&self) -> bool {
match self.payload {
::std::option::Option::Some(WindowMessage_oneof_payload::element(..)) => true,
_ => false,
}
}
pub fn set_element(&mut self, v: Element) {
self.payload = ::std::option::Option::Some(WindowMessage_oneof_payload::element(v))
}
pub fn mut_element(&mut self) -> &mut Element {
if let ::std::option::Option::Some(WindowMessage_oneof_payload::element(_)) = self.payload {
} else {
self.payload = ::std::option::Option::Some(WindowMessage_oneof_payload::element(Element::new()));
}
match self.payload {
::std::option::Option::Some(WindowMessage_oneof_payload::element(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_element(&mut self) -> Element {
if self.has_element() {
match self.payload.take() {
::std::option::Option::Some(WindowMessage_oneof_payload::element(v)) => v,
_ => panic!(),
}
} else {
Element::new()
}
}
pub fn get_keyed_element(&self) -> &KeyedElement {
match self.payload {
::std::option::Option::Some(WindowMessage_oneof_payload::keyed_element(ref v)) => v,
_ => KeyedElement::default_instance(),
}
}
pub fn clear_keyed_element(&mut self) {
self.payload = ::std::option::Option::None;
}
pub fn has_keyed_element(&self) -> bool {
match self.payload {
::std::option::Option::Some(WindowMessage_oneof_payload::keyed_element(..)) => true,
_ => false,
}
}
pub fn set_keyed_element(&mut self, v: KeyedElement) {
self.payload = ::std::option::Option::Some(WindowMessage_oneof_payload::keyed_element(v))
}
pub fn mut_keyed_element(&mut self) -> &mut KeyedElement {
if let ::std::option::Option::Some(WindowMessage_oneof_payload::keyed_element(_)) = self.payload {
} else {
self.payload = ::std::option::Option::Some(WindowMessage_oneof_payload::keyed_element(KeyedElement::new()));
}
match self.payload {
::std::option::Option::Some(WindowMessage_oneof_payload::keyed_element(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_keyed_element(&mut self) -> KeyedElement {
if self.has_keyed_element() {
match self.payload.take() {
::std::option::Option::Some(WindowMessage_oneof_payload::keyed_element(v)) => v,
_ => panic!(),
}
} else {
KeyedElement::new()
}
}
}
impl ::protobuf::Message for WindowMessage {
fn is_initialized(&self) -> bool {
if let Some(WindowMessage_oneof_payload::trigger(ref v)) = self.payload {
if !v.is_initialized() {
return false;
}
}
if let Some(WindowMessage_oneof_payload::complete(ref v)) = self.payload {
if !v.is_initialized() {
return false;
}
}
if let Some(WindowMessage_oneof_payload::element(ref v)) = self.payload {
if !v.is_initialized() {
return false;
}
}
if let Some(WindowMessage_oneof_payload::keyed_element(ref v)) = self.payload {
if !v.is_initialized() {
return false;
}
}
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.payload = ::std::option::Option::Some(WindowMessage_oneof_payload::trigger(is.read_message()?));
},
2 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.payload = ::std::option::Option::Some(WindowMessage_oneof_payload::complete(is.read_message()?));
},
3 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.payload = ::std::option::Option::Some(WindowMessage_oneof_payload::element(is.read_message()?));
},
4 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.payload = ::std::option::Option::Some(WindowMessage_oneof_payload::keyed_element(is.read_message()?));
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let ::std::option::Option::Some(ref v) = self.payload {
match v {
&WindowMessage_oneof_payload::trigger(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&WindowMessage_oneof_payload::complete(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&WindowMessage_oneof_payload::element(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&WindowMessage_oneof_payload::keyed_element(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
};
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
if let ::std::option::Option::Some(ref v) = self.payload {
match v {
&WindowMessage_oneof_payload::trigger(ref v) => {
os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&WindowMessage_oneof_payload::complete(ref v) => {
os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&WindowMessage_oneof_payload::element(ref v) => {
os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&WindowMessage_oneof_payload::keyed_element(ref v) => {
os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
};
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> WindowMessage {
WindowMessage::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, WindowTrigger>(
"trigger",
WindowMessage::has_trigger,
WindowMessage::get_trigger,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, WindowComplete>(
"complete",
WindowMessage::has_complete,
WindowMessage::get_complete,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, Element>(
"element",
WindowMessage::has_element,
WindowMessage::get_element,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, KeyedElement>(
"keyed_element",
WindowMessage::has_keyed_element,
WindowMessage::get_keyed_element,
));
::protobuf::reflect::MessageDescriptor::new::<WindowMessage>(
"WindowMessage",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static WindowMessage {
static mut instance: ::protobuf::lazy::Lazy<WindowMessage> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const WindowMessage,
};
unsafe {
instance.get(WindowMessage::new)
}
}
}
impl ::protobuf::Clear for WindowMessage {
fn clear(&mut self) {
self.payload = ::std::option::Option::None;
self.payload = ::std::option::Option::None;
self.payload = ::std::option::Option::None;
self.payload = ::std::option::Option::None;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for WindowMessage {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for WindowMessage {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct Checkpoint {
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a Checkpoint {
fn default() -> &'a Checkpoint {
<Checkpoint as ::protobuf::Message>::default_instance()
}
}
impl Checkpoint {
pub fn new() -> Checkpoint {
::std::default::Default::default()
}
}
impl ::protobuf::Message for Checkpoint {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> Checkpoint {
Checkpoint::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let fields = ::std::vec::Vec::new();
::protobuf::reflect::MessageDescriptor::new::<Checkpoint>(
"Checkpoint",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static Checkpoint {
static mut instance: ::protobuf::lazy::Lazy<Checkpoint> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const Checkpoint,
};
unsafe {
instance.get(Checkpoint::new)
}
}
}
impl ::protobuf::Clear for Checkpoint {
fn clear(&mut self) {
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for Checkpoint {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Checkpoint {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct Watermark {
pub timestamp: u64,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a Watermark {
fn default() -> &'a Watermark {
<Watermark as ::protobuf::Message>::default_instance()
}
}
impl Watermark {
pub fn new() -> Watermark {
::std::default::Default::default()
}
pub fn get_timestamp(&self) -> u64 {
self.timestamp
}
pub fn clear_timestamp(&mut self) {
self.timestamp = 0;
}
pub fn set_timestamp(&mut self, v: u64) {
self.timestamp = v;
}
}
impl ::protobuf::Message for Watermark {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_uint64()?;
self.timestamp = tmp;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if self.timestamp != 0 {
my_size += ::protobuf::rt::value_size(1, self.timestamp, ::protobuf::wire_format::WireTypeVarint);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
if self.timestamp != 0 {
os.write_uint64(1, self.timestamp)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> Watermark {
Watermark::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeUint64>(
"timestamp",
|m: &Watermark| { &m.timestamp },
|m: &mut Watermark| { &mut m.timestamp },
));
::protobuf::reflect::MessageDescriptor::new::<Watermark>(
"Watermark",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static Watermark {
static mut instance: ::protobuf::lazy::Lazy<Watermark> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const Watermark,
};
unsafe {
instance.get(Watermark::new)
}
}
}
impl ::protobuf::Clear for Watermark {
fn clear(&mut self) {
self.timestamp = 0;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for Watermark {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Watermark {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct StreamTaskMessage {
pub payload: ::std::option::Option<StreamTaskMessage_oneof_payload>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a StreamTaskMessage {
fn default() -> &'a StreamTaskMessage {
<StreamTaskMessage as ::protobuf::Message>::default_instance()
}
}
#[derive(Clone,PartialEq,Debug)]
pub enum StreamTaskMessage_oneof_payload {
element(Element),
keyed_element(KeyedElement),
watermark(Watermark),
checkpoint(Checkpoint),
}
impl StreamTaskMessage {
pub fn new() -> StreamTaskMessage {
::std::default::Default::default()
}
pub fn get_element(&self) -> &Element {
match self.payload {
::std::option::Option::Some(StreamTaskMessage_oneof_payload::element(ref v)) => v,
_ => Element::default_instance(),
}
}
pub fn clear_element(&mut self) {
self.payload = ::std::option::Option::None;
}
pub fn has_element(&self) -> bool {
match self.payload {
::std::option::Option::Some(StreamTaskMessage_oneof_payload::element(..)) => true,
_ => false,
}
}
pub fn set_element(&mut self, v: Element) {
self.payload = ::std::option::Option::Some(StreamTaskMessage_oneof_payload::element(v))
}
pub fn mut_element(&mut self) -> &mut Element {
if let ::std::option::Option::Some(StreamTaskMessage_oneof_payload::element(_)) = self.payload {
} else {
self.payload = ::std::option::Option::Some(StreamTaskMessage_oneof_payload::element(Element::new()));
}
match self.payload {
::std::option::Option::Some(StreamTaskMessage_oneof_payload::element(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_element(&mut self) -> Element {
if self.has_element() {
match self.payload.take() {
::std::option::Option::Some(StreamTaskMessage_oneof_payload::element(v)) => v,
_ => panic!(),
}
} else {
Element::new()
}
}
pub fn get_keyed_element(&self) -> &KeyedElement {
match self.payload {
::std::option::Option::Some(StreamTaskMessage_oneof_payload::keyed_element(ref v)) => v,
_ => KeyedElement::default_instance(),
}
}
pub fn clear_keyed_element(&mut self) {
self.payload = ::std::option::Option::None;
}
pub fn has_keyed_element(&self) -> bool {
match self.payload {
::std::option::Option::Some(StreamTaskMessage_oneof_payload::keyed_element(..)) => true,
_ => false,
}
}
pub fn set_keyed_element(&mut self, v: KeyedElement) {
self.payload = ::std::option::Option::Some(StreamTaskMessage_oneof_payload::keyed_element(v))
}
pub fn mut_keyed_element(&mut self) -> &mut KeyedElement {
if let ::std::option::Option::Some(StreamTaskMessage_oneof_payload::keyed_element(_)) = self.payload {
} else {
self.payload = ::std::option::Option::Some(StreamTaskMessage_oneof_payload::keyed_element(KeyedElement::new()));
}
match self.payload {
::std::option::Option::Some(StreamTaskMessage_oneof_payload::keyed_element(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_keyed_element(&mut self) -> KeyedElement {
if self.has_keyed_element() {
match self.payload.take() {
::std::option::Option::Some(StreamTaskMessage_oneof_payload::keyed_element(v)) => v,
_ => panic!(),
}
} else {
KeyedElement::new()
}
}
pub fn get_watermark(&self) -> &Watermark {
match self.payload {
::std::option::Option::Some(StreamTaskMessage_oneof_payload::watermark(ref v)) => v,
_ => Watermark::default_instance(),
}
}
pub fn clear_watermark(&mut self) {
self.payload = ::std::option::Option::None;
}
pub fn has_watermark(&self) -> bool {
match self.payload {
::std::option::Option::Some(StreamTaskMessage_oneof_payload::watermark(..)) => true,
_ => false,
}
}
pub fn set_watermark(&mut self, v: Watermark) {
self.payload = ::std::option::Option::Some(StreamTaskMessage_oneof_payload::watermark(v))
}
pub fn mut_watermark(&mut self) -> &mut Watermark {
if let ::std::option::Option::Some(StreamTaskMessage_oneof_payload::watermark(_)) = self.payload {
} else {
self.payload = ::std::option::Option::Some(StreamTaskMessage_oneof_payload::watermark(Watermark::new()));
}
match self.payload {
::std::option::Option::Some(StreamTaskMessage_oneof_payload::watermark(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_watermark(&mut self) -> Watermark {
if self.has_watermark() {
match self.payload.take() {
::std::option::Option::Some(StreamTaskMessage_oneof_payload::watermark(v)) => v,
_ => panic!(),
}
} else {
Watermark::new()
}
}
pub fn get_checkpoint(&self) -> &Checkpoint {
match self.payload {
::std::option::Option::Some(StreamTaskMessage_oneof_payload::checkpoint(ref v)) => v,
_ => Checkpoint::default_instance(),
}
}
pub fn clear_checkpoint(&mut self) {
self.payload = ::std::option::Option::None;
}
pub fn has_checkpoint(&self) -> bool {
match self.payload {
::std::option::Option::Some(StreamTaskMessage_oneof_payload::checkpoint(..)) => true,
_ => false,
}
}
pub fn set_checkpoint(&mut self, v: Checkpoint) {
self.payload = ::std::option::Option::Some(StreamTaskMessage_oneof_payload::checkpoint(v))
}
pub fn mut_checkpoint(&mut self) -> &mut Checkpoint {
if let ::std::option::Option::Some(StreamTaskMessage_oneof_payload::checkpoint(_)) = self.payload {
} else {
self.payload = ::std::option::Option::Some(StreamTaskMessage_oneof_payload::checkpoint(Checkpoint::new()));
}
match self.payload {
::std::option::Option::Some(StreamTaskMessage_oneof_payload::checkpoint(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_checkpoint(&mut self) -> Checkpoint {
if self.has_checkpoint() {
match self.payload.take() {
::std::option::Option::Some(StreamTaskMessage_oneof_payload::checkpoint(v)) => v,
_ => panic!(),
}
} else {
Checkpoint::new()
}
}
}
impl ::protobuf::Message for StreamTaskMessage {
fn is_initialized(&self) -> bool {
if let Some(StreamTaskMessage_oneof_payload::element(ref v)) = self.payload {
if !v.is_initialized() {
return false;
}
}
if let Some(StreamTaskMessage_oneof_payload::keyed_element(ref v)) = self.payload {
if !v.is_initialized() {
return false;
}
}
if let Some(StreamTaskMessage_oneof_payload::watermark(ref v)) = self.payload {
if !v.is_initialized() {
return false;
}
}
if let Some(StreamTaskMessage_oneof_payload::checkpoint(ref v)) = self.payload {
if !v.is_initialized() {
return false;
}
}
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.payload = ::std::option::Option::Some(StreamTaskMessage_oneof_payload::element(is.read_message()?));
},
2 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.payload = ::std::option::Option::Some(StreamTaskMessage_oneof_payload::keyed_element(is.read_message()?));
},
3 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.payload = ::std::option::Option::Some(StreamTaskMessage_oneof_payload::watermark(is.read_message()?));
},
4 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.payload = ::std::option::Option::Some(StreamTaskMessage_oneof_payload::checkpoint(is.read_message()?));
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let ::std::option::Option::Some(ref v) = self.payload {
match v {
&StreamTaskMessage_oneof_payload::element(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&StreamTaskMessage_oneof_payload::keyed_element(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&StreamTaskMessage_oneof_payload::watermark(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&StreamTaskMessage_oneof_payload::checkpoint(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
};
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> {
if let ::std::option::Option::Some(ref v) = self.payload {
match v {
&StreamTaskMessage_oneof_payload::element(ref v) => {
os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&StreamTaskMessage_oneof_payload::keyed_element(ref v) => {
os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&StreamTaskMessage_oneof_payload::watermark(ref v) => {
os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&StreamTaskMessage_oneof_payload::checkpoint(ref v) => {
os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
};
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> StreamTaskMessage {
StreamTaskMessage::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, Element>(
"element",
StreamTaskMessage::has_element,
StreamTaskMessage::get_element,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, KeyedElement>(
"keyed_element",
StreamTaskMessage::has_keyed_element,
StreamTaskMessage::get_keyed_element,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, Watermark>(
"watermark",
StreamTaskMessage::has_watermark,
StreamTaskMessage::get_watermark,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, Checkpoint>(
"checkpoint",
StreamTaskMessage::has_checkpoint,
StreamTaskMessage::get_checkpoint,
));
::protobuf::reflect::MessageDescriptor::new::<StreamTaskMessage>(
"StreamTaskMessage",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static StreamTaskMessage {
static mut instance: ::protobuf::lazy::Lazy<StreamTaskMessage> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const StreamTaskMessage,
};
unsafe {
instance.get(StreamTaskMessage::new)
}
}
}
impl ::protobuf::Clear for StreamTaskMessage {
fn clear(&mut self) {
self.payload = ::std::option::Option::None;
self.payload = ::std::option::Option::None;
self.payload = ::std::option::Option::None;
self.payload = ::std::option::Option::None;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for StreamTaskMessage {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for StreamTaskMessage {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x0emessages.proto\"k\n\x0cKeyedElement\x12\x1c\n\ttimestamp\x18\x01\
\x20\x01(\x04R\ttimestamp\x12\x10\n\x03key\x18\x02\x20\x01(\x04R\x03key\
\x12\x12\n\x04data\x18\x03\x20\x01(\x0cR\x04data\x12\x17\n\x07task_id\
\x18\x04\x20\x01(\tR\x06taskId\"T\n\x07Element\x12\x1c\n\ttimestamp\x18\
\x01\x20\x01(\x04R\ttimestamp\x12\x12\n\x04data\x18\x02\x20\x01(\x0cR\
\x04data\x12\x17\n\x07task_id\x18\x03\x20\x01(\tR\x06taskId\"\x0f\n\rWin\
dowTrigger\"\x10\n\x0eWindowComplete\"\xd1\x01\n\rWindowMessage\x12*\n\
\x07trigger\x18\x01\x20\x01(\x0b2\x0e.WindowTriggerH\0R\x07trigger\x12-\
\n\x08complete\x18\x02\x20\x01(\x0b2\x0f.WindowCompleteH\0R\x08complete\
\x12$\n\x07element\x18\x03\x20\x01(\x0b2\x08.ElementH\0R\x07element\x124\
\n\rkeyed_element\x18\x04\x20\x01(\x0b2\r.KeyedElementH\0R\x0ckeyedEleme\
ntB\t\n\x07payload\"\x0c\n\nCheckpoint\")\n\tWatermark\x12\x1c\n\ttimest\
amp\x18\x01\x20\x01(\x04R\ttimestamp\"\xd5\x01\n\x11StreamTaskMessage\
\x12$\n\x07element\x18\x01\x20\x01(\x0b2\x08.ElementH\0R\x07element\x124\
\n\rkeyed_element\x18\x02\x20\x01(\x0b2\r.KeyedElementH\0R\x0ckeyedEleme\
nt\x12*\n\twatermark\x18\x03\x20\x01(\x0b2\n.WatermarkH\0R\twatermark\
\x12-\n\ncheckpoint\x18\x04\x20\x01(\x0b2\x0b.CheckpointH\0R\ncheckpoint\
B\t\n\x07payloadb\x06proto3\
";
static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
};
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
unsafe {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}
}