#![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_6_0;
#[derive(PartialEq,Clone,Default,Debug)]
pub struct ComponentDisk {
pub file_path: ::std::string::String,
pub offset: u64,
pub read_write_capability: ::protobuf::EnumOrUnknown<ReadWriteCapability>,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a ComponentDisk {
fn default() -> &'a ComponentDisk {
<ComponentDisk as ::protobuf::Message>::default_instance()
}
}
impl ComponentDisk {
pub fn new() -> ComponentDisk {
::std::default::Default::default()
}
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_simpler_field_accessor::<_, _>(
"file_path",
|m: &ComponentDisk| { &m.file_path },
|m: &mut ComponentDisk| { &mut m.file_path },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"offset",
|m: &ComponentDisk| { &m.offset },
|m: &mut ComponentDisk| { &mut m.offset },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"read_write_capability",
|m: &ComponentDisk| { &m.read_write_capability },
|m: &mut ComponentDisk| { &mut m.read_write_capability },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<ComponentDisk>(
"ComponentDisk",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for ComponentDisk {
const NAME: &'static str = "ComponentDisk";
fn is_initialized(&self) -> bool {
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.file_path = is.read_string()?;
},
16 => {
self.offset = is.read_uint64()?;
},
24 => {
self.read_write_capability = is.read_enum_or_unknown()?;
},
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 !self.file_path.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.file_path);
}
if self.offset != 0 {
my_size += ::protobuf::rt::uint64_size(2, self.offset);
}
if self.read_write_capability != ::protobuf::EnumOrUnknown::new(ReadWriteCapability::READ_ONLY) {
my_size += ::protobuf::rt::int32_size(3, self.read_write_capability.value());
}
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 !self.file_path.is_empty() {
os.write_string(1, &self.file_path)?;
}
if self.offset != 0 {
os.write_uint64(2, self.offset)?;
}
if self.read_write_capability != ::protobuf::EnumOrUnknown::new(ReadWriteCapability::READ_ONLY) {
os.write_enum(3, ::protobuf::EnumOrUnknown::value(&self.read_write_capability))?;
}
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() -> ComponentDisk {
ComponentDisk::new()
}
fn clear(&mut self) {
self.file_path.clear();
self.offset = 0;
self.read_write_capability = ::protobuf::EnumOrUnknown::new(ReadWriteCapability::READ_ONLY);
self.special_fields.clear();
}
fn default_instance() -> &'static ComponentDisk {
static instance: ComponentDisk = ComponentDisk {
file_path: ::std::string::String::new(),
offset: 0,
read_write_capability: ::protobuf::EnumOrUnknown::from_i32(0),
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for ComponentDisk {
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("ComponentDisk").unwrap()).clone()
}
}
impl ::std::fmt::Display for ComponentDisk {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for ComponentDisk {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct CompositeDisk {
pub version: u64,
pub component_disks: ::std::vec::Vec<ComponentDisk>,
pub length: u64,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a CompositeDisk {
fn default() -> &'a CompositeDisk {
<CompositeDisk as ::protobuf::Message>::default_instance()
}
}
impl CompositeDisk {
pub fn new() -> CompositeDisk {
::std::default::Default::default()
}
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_simpler_field_accessor::<_, _>(
"version",
|m: &CompositeDisk| { &m.version },
|m: &mut CompositeDisk| { &mut m.version },
));
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"component_disks",
|m: &CompositeDisk| { &m.component_disks },
|m: &mut CompositeDisk| { &mut m.component_disks },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"length",
|m: &CompositeDisk| { &m.length },
|m: &mut CompositeDisk| { &mut m.length },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<CompositeDisk>(
"CompositeDisk",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for CompositeDisk {
const NAME: &'static str = "CompositeDisk";
fn is_initialized(&self) -> bool {
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.version = is.read_uint64()?;
},
18 => {
self.component_disks.push(is.read_message()?);
},
24 => {
self.length = 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 self.version != 0 {
my_size += ::protobuf::rt::uint64_size(1, self.version);
}
for value in &self.component_disks {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
};
if self.length != 0 {
my_size += ::protobuf::rt::uint64_size(3, self.length);
}
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 self.version != 0 {
os.write_uint64(1, self.version)?;
}
for v in &self.component_disks {
::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
};
if self.length != 0 {
os.write_uint64(3, self.length)?;
}
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() -> CompositeDisk {
CompositeDisk::new()
}
fn clear(&mut self) {
self.version = 0;
self.component_disks.clear();
self.length = 0;
self.special_fields.clear();
}
fn default_instance() -> &'static CompositeDisk {
static instance: CompositeDisk = CompositeDisk {
version: 0,
component_disks: ::std::vec::Vec::new(),
length: 0,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for CompositeDisk {
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("CompositeDisk").unwrap()).clone()
}
}
impl ::std::fmt::Display for CompositeDisk {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for CompositeDisk {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
pub enum ReadWriteCapability {
READ_ONLY = 0,
READ_WRITE = 1,
}
impl ::protobuf::Enum for ReadWriteCapability {
const NAME: &'static str = "ReadWriteCapability";
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<ReadWriteCapability> {
match value {
0 => ::std::option::Option::Some(ReadWriteCapability::READ_ONLY),
1 => ::std::option::Option::Some(ReadWriteCapability::READ_WRITE),
_ => ::std::option::Option::None
}
}
fn from_str(str: &str) -> ::std::option::Option<ReadWriteCapability> {
match str {
"READ_ONLY" => ::std::option::Option::Some(ReadWriteCapability::READ_ONLY),
"READ_WRITE" => ::std::option::Option::Some(ReadWriteCapability::READ_WRITE),
_ => ::std::option::Option::None
}
}
const VALUES: &'static [ReadWriteCapability] = &[
ReadWriteCapability::READ_ONLY,
ReadWriteCapability::READ_WRITE,
];
}
impl ::protobuf::EnumFull for ReadWriteCapability {
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("ReadWriteCapability").unwrap()).clone()
}
fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
let index = *self as usize;
Self::enum_descriptor().value_by_index(index)
}
}
impl ::std::default::Default for ReadWriteCapability {
fn default() -> Self {
ReadWriteCapability::READ_ONLY
}
}
impl ReadWriteCapability {
fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
::protobuf::reflect::GeneratedEnumDescriptorData::new::<ReadWriteCapability>("ReadWriteCapability")
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x10cdisk_spec.proto\"\x8e\x01\n\rComponentDisk\x12\x1b\n\tfile_path\
\x18\x01\x20\x01(\tR\x08filePath\x12\x16\n\x06offset\x18\x02\x20\x01(\
\x04R\x06offset\x12H\n\x15read_write_capability\x18\x03\x20\x01(\x0e2\
\x14.ReadWriteCapabilityR\x13readWriteCapability\"z\n\rCompositeDisk\x12\
\x18\n\x07version\x18\x01\x20\x01(\x04R\x07version\x127\n\x0fcomponent_d\
isks\x18\x02\x20\x03(\x0b2\x0e.ComponentDiskR\x0ecomponentDisks\x12\x16\
\n\x06length\x18\x03\x20\x01(\x04R\x06length*4\n\x13ReadWriteCapability\
\x12\r\n\tREAD_ONLY\x10\0\x12\x0e\n\nREAD_WRITE\x10\x01b\x06proto3\
";
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(0);
let mut messages = ::std::vec::Vec::with_capacity(2);
messages.push(ComponentDisk::generated_message_descriptor_data());
messages.push(CompositeDisk::generated_message_descriptor_data());
let mut enums = ::std::vec::Vec::with_capacity(1);
enums.push(ReadWriteCapability::generated_enum_descriptor_data());
::protobuf::reflect::GeneratedFileDescriptor::new_generated(
file_descriptor_proto(),
deps,
messages,
enums,
)
});
::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
})
}