#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_results)]
#![allow(unused_mut)]
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_2;
#[derive(PartialEq,Clone,Default,Debug)]
pub struct Olecf {
pub is_olecf: ::std::option::Option<bool>,
pub streams: ::std::vec::Vec<Stream>,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a Olecf {
fn default() -> &'a Olecf {
<Olecf as ::protobuf::Message>::default_instance()
}
}
impl Olecf {
pub fn new() -> Olecf {
::std::default::Default::default()
}
pub fn is_olecf(&self) -> bool {
self.is_olecf.unwrap_or(false)
}
pub fn clear_is_olecf(&mut self) {
self.is_olecf = ::std::option::Option::None;
}
pub fn has_is_olecf(&self) -> bool {
self.is_olecf.is_some()
}
pub fn set_is_olecf(&mut self, v: bool) {
self.is_olecf = ::std::option::Option::Some(v);
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(2);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"is_olecf",
|m: &Olecf| { &m.is_olecf },
|m: &mut Olecf| { &mut m.is_olecf },
));
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"streams",
|m: &Olecf| { &m.streams },
|m: &mut Olecf| { &mut m.streams },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Olecf>(
"Olecf",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for Olecf {
const NAME: &'static str = "Olecf";
fn is_initialized(&self) -> bool {
if self.is_olecf.is_none() {
return false;
}
for v in &self.streams {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
8 => {
self.is_olecf = ::std::option::Option::Some(is.read_bool()?);
},
18 => {
self.streams.push(is.read_message()?);
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if let Some(v) = self.is_olecf {
my_size += 1 + 1;
}
for value in &self.streams {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
};
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
if let Some(v) = self.is_olecf {
os.write_bool(1, v)?;
}
for v in &self.streams {
::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
};
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> Olecf {
Olecf::new()
}
fn clear(&mut self) {
self.is_olecf = ::std::option::Option::None;
self.streams.clear();
self.special_fields.clear();
}
fn default_instance() -> &'static Olecf {
static instance: Olecf = Olecf {
is_olecf: ::std::option::Option::None,
streams: ::std::vec::Vec::new(),
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for Olecf {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| file_descriptor().message_by_package_relative_name("Olecf").unwrap()).clone()
}
}
impl ::std::fmt::Display for Olecf {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Olecf {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct Stream {
pub name: ::std::option::Option<::std::string::String>,
pub type_: ::std::option::Option<::protobuf::EnumOrUnknown<StreamType>>,
pub size: ::std::option::Option<u64>,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a Stream {
fn default() -> &'a Stream {
<Stream as ::protobuf::Message>::default_instance()
}
}
impl Stream {
pub fn new() -> Stream {
::std::default::Default::default()
}
pub fn name(&self) -> &str {
match self.name.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_name(&mut self) {
self.name = ::std::option::Option::None;
}
pub fn has_name(&self) -> bool {
self.name.is_some()
}
pub fn set_name(&mut self, v: ::std::string::String) {
self.name = ::std::option::Option::Some(v);
}
pub fn mut_name(&mut self) -> &mut ::std::string::String {
if self.name.is_none() {
self.name = ::std::option::Option::Some(::std::string::String::new());
}
self.name.as_mut().unwrap()
}
pub fn take_name(&mut self) -> ::std::string::String {
self.name.take().unwrap_or_else(|| ::std::string::String::new())
}
pub fn type_(&self) -> StreamType {
match self.type_ {
Some(e) => e.enum_value_or(StreamType::UNKNOWN),
None => StreamType::UNKNOWN,
}
}
pub fn clear_type_(&mut self) {
self.type_ = ::std::option::Option::None;
}
pub fn has_type(&self) -> bool {
self.type_.is_some()
}
pub fn set_type(&mut self, v: StreamType) {
self.type_ = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
}
pub fn size(&self) -> u64 {
self.size.unwrap_or(0)
}
pub fn clear_size(&mut self) {
self.size = ::std::option::Option::None;
}
pub fn has_size(&self) -> bool {
self.size.is_some()
}
pub fn set_size(&mut self, v: u64) {
self.size = ::std::option::Option::Some(v);
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(3);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"name",
|m: &Stream| { &m.name },
|m: &mut Stream| { &mut m.name },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"type",
|m: &Stream| { &m.type_ },
|m: &mut Stream| { &mut m.type_ },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"size",
|m: &Stream| { &m.size },
|m: &mut Stream| { &mut m.size },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Stream>(
"Stream",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for Stream {
const NAME: &'static str = "Stream";
fn is_initialized(&self) -> bool {
if self.name.is_none() {
return false;
}
if self.type_.is_none() {
return false;
}
if self.size.is_none() {
return false;
}
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
10 => {
self.name = ::std::option::Option::Some(is.read_string()?);
},
16 => {
self.type_ = ::std::option::Option::Some(is.read_enum_or_unknown()?);
},
24 => {
self.size = ::std::option::Option::Some(is.read_uint64()?);
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if let Some(v) = self.name.as_ref() {
my_size += ::protobuf::rt::string_size(1, &v);
}
if let Some(v) = self.type_ {
my_size += ::protobuf::rt::int32_size(2, v.value());
}
if let Some(v) = self.size {
my_size += ::protobuf::rt::uint64_size(3, v);
}
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
if let Some(v) = self.name.as_ref() {
os.write_string(1, v)?;
}
if let Some(v) = self.type_ {
os.write_enum(2, ::protobuf::EnumOrUnknown::value(&v))?;
}
if let Some(v) = self.size {
os.write_uint64(3, v)?;
}
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> Stream {
Stream::new()
}
fn clear(&mut self) {
self.name = ::std::option::Option::None;
self.type_ = ::std::option::Option::None;
self.size = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static Stream {
static instance: Stream = Stream {
name: ::std::option::Option::None,
type_: ::std::option::Option::None,
size: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for Stream {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| file_descriptor().message_by_package_relative_name("Stream").unwrap()).clone()
}
}
impl ::std::fmt::Display for Stream {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Stream {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
pub enum StreamType {
UNKNOWN = 0,
STORAGE = 1,
STREAM = 2,
ROOT = 5,
}
impl ::protobuf::Enum for StreamType {
const NAME: &'static str = "StreamType";
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<StreamType> {
match value {
0 => ::std::option::Option::Some(StreamType::UNKNOWN),
1 => ::std::option::Option::Some(StreamType::STORAGE),
2 => ::std::option::Option::Some(StreamType::STREAM),
5 => ::std::option::Option::Some(StreamType::ROOT),
_ => ::std::option::Option::None
}
}
fn from_str(str: &str) -> ::std::option::Option<StreamType> {
match str {
"UNKNOWN" => ::std::option::Option::Some(StreamType::UNKNOWN),
"STORAGE" => ::std::option::Option::Some(StreamType::STORAGE),
"STREAM" => ::std::option::Option::Some(StreamType::STREAM),
"ROOT" => ::std::option::Option::Some(StreamType::ROOT),
_ => ::std::option::Option::None
}
}
const VALUES: &'static [StreamType] = &[
StreamType::UNKNOWN,
StreamType::STORAGE,
StreamType::STREAM,
StreamType::ROOT,
];
}
impl ::protobuf::EnumFull for StreamType {
fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| file_descriptor().enum_by_package_relative_name("StreamType").unwrap()).clone()
}
fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
let index = match self {
StreamType::UNKNOWN => 0,
StreamType::STORAGE => 1,
StreamType::STREAM => 2,
StreamType::ROOT => 3,
};
Self::enum_descriptor().value_by_index(index)
}
}
impl ::std::default::Default for StreamType {
fn default() -> Self {
StreamType::UNKNOWN
}
}
impl StreamType {
fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
::protobuf::reflect::GeneratedEnumDescriptorData::new::<StreamType>("StreamType")
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x0bolecf.proto\x12\x05olecf\x1a\nyara.proto\"K\n\x05Olecf\x12\x19\n\
\x08is_olecf\x18\x01\x20\x02(\x08R\x07isOlecf\x12'\n\x07streams\x18\x02\
\x20\x03(\x0b2\r.olecf.StreamR\x07streams\"W\n\x06Stream\x12\x12\n\x04na\
me\x18\x01\x20\x02(\tR\x04name\x12%\n\x04type\x18\x02\x20\x02(\x0e2\x11.\
olecf.StreamTypeR\x04type\x12\x12\n\x04size\x18\x03\x20\x02(\x04R\x04siz\
e*<\n\nStreamType\x12\x0b\n\x07UNKNOWN\x10\0\x12\x0b\n\x07STORAGE\x10\
\x01\x12\n\n\x06STREAM\x10\x02\x12\x08\n\x04ROOT\x10\x05B&\xfa\x92\x19\"\
\n\x05olecf\x12\x0bolecf.Olecf\x1a\x0colecf-moduleb\x06proto2\
";
fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
file_descriptor_proto_lazy.get(|| {
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
})
}
pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
file_descriptor.get(|| {
let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
let mut deps = ::std::vec::Vec::with_capacity(1);
deps.push(super::yara::file_descriptor().clone());
let mut messages = ::std::vec::Vec::with_capacity(2);
messages.push(Olecf::generated_message_descriptor_data());
messages.push(Stream::generated_message_descriptor_data());
let mut enums = ::std::vec::Vec::with_capacity(1);
enums.push(StreamType::generated_enum_descriptor_data());
::protobuf::reflect::GeneratedFileDescriptor::new_generated(
file_descriptor_proto(),
deps,
messages,
enums,
)
});
::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
})
}