blob: 469a4161f2859ae8cf10caecd309a6a8952b1581 [file] [log] [blame]
// This file is generated by rust-protobuf 3.2.0. Do not edit
// .proto file is parsed by protoc 3.21.12
// @generated
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![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(unused_results)]
#![allow(unused_mut)]
//! Generated file from `frontend.proto`
/// Generated files are compatible only with the same version
/// of protobuf runtime.
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_2_0;
#[derive(PartialEq,Clone,Default,Debug)]
// @@protoc_insertion_point(message:netsim.frontend.VersionResponse)
pub struct VersionResponse {
// message fields
// @@protoc_insertion_point(field:netsim.frontend.VersionResponse.version)
pub version: ::std::string::String,
// special fields
// @@protoc_insertion_point(special_field:netsim.frontend.VersionResponse.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a VersionResponse {
fn default() -> &'a VersionResponse {
<VersionResponse as ::protobuf::Message>::default_instance()
}
}
impl VersionResponse {
pub fn new() -> VersionResponse {
::std::default::Default::default()
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(1);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"version",
|m: &VersionResponse| { &m.version },
|m: &mut VersionResponse| { &mut m.version },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<VersionResponse>(
"VersionResponse",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for VersionResponse {
const NAME: &'static str = "VersionResponse";
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.version = is.read_string()?;
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if !self.version.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.version);
}
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.is_empty() {
os.write_string(1, &self.version)?;
}
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() -> VersionResponse {
VersionResponse::new()
}
fn clear(&mut self) {
self.version.clear();
self.special_fields.clear();
}
fn default_instance() -> &'static VersionResponse {
static instance: VersionResponse = VersionResponse {
version: ::std::string::String::new(),
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for VersionResponse {
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("VersionResponse").unwrap()).clone()
}
}
impl ::std::fmt::Display for VersionResponse {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for VersionResponse {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(PartialEq,Clone,Default,Debug)]
// @@protoc_insertion_point(message:netsim.frontend.SetLinkLossRequest)
pub struct SetLinkLossRequest {
// message fields
// @@protoc_insertion_point(field:netsim.frontend.SetLinkLossRequest.device_name)
pub device_name: ::std::string::String,
// @@protoc_insertion_point(field:netsim.frontend.SetLinkLossRequest.other_device)
pub other_device: ::std::string::String,
// @@protoc_insertion_point(field:netsim.frontend.SetLinkLossRequest.radio)
pub radio: ::protobuf::EnumOrUnknown<super::model::PhyKind>,
// @@protoc_insertion_point(field:netsim.frontend.SetLinkLossRequest.link_loss)
pub link_loss: f32,
// special fields
// @@protoc_insertion_point(special_field:netsim.frontend.SetLinkLossRequest.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a SetLinkLossRequest {
fn default() -> &'a SetLinkLossRequest {
<SetLinkLossRequest as ::protobuf::Message>::default_instance()
}
}
impl SetLinkLossRequest {
pub fn new() -> SetLinkLossRequest {
::std::default::Default::default()
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(4);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"device_name",
|m: &SetLinkLossRequest| { &m.device_name },
|m: &mut SetLinkLossRequest| { &mut m.device_name },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"other_device",
|m: &SetLinkLossRequest| { &m.other_device },
|m: &mut SetLinkLossRequest| { &mut m.other_device },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"radio",
|m: &SetLinkLossRequest| { &m.radio },
|m: &mut SetLinkLossRequest| { &mut m.radio },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"link_loss",
|m: &SetLinkLossRequest| { &m.link_loss },
|m: &mut SetLinkLossRequest| { &mut m.link_loss },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<SetLinkLossRequest>(
"SetLinkLossRequest",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for SetLinkLossRequest {
const NAME: &'static str = "SetLinkLossRequest";
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.device_name = is.read_string()?;
},
18 => {
self.other_device = is.read_string()?;
},
24 => {
self.radio = is.read_enum_or_unknown()?;
},
37 => {
self.link_loss = is.read_float()?;
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if !self.device_name.is_empty() {
my_size += ::protobuf::rt::string_size(1, &self.device_name);
}
if !self.other_device.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.other_device);
}
if self.radio != ::protobuf::EnumOrUnknown::new(super::model::PhyKind::NONE) {
my_size += ::protobuf::rt::int32_size(3, self.radio.value());
}
if self.link_loss != 0. {
my_size += 1 + 4;
}
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.device_name.is_empty() {
os.write_string(1, &self.device_name)?;
}
if !self.other_device.is_empty() {
os.write_string(2, &self.other_device)?;
}
if self.radio != ::protobuf::EnumOrUnknown::new(super::model::PhyKind::NONE) {
os.write_enum(3, ::protobuf::EnumOrUnknown::value(&self.radio))?;
}
if self.link_loss != 0. {
os.write_float(4, self.link_loss)?;
}
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() -> SetLinkLossRequest {
SetLinkLossRequest::new()
}
fn clear(&mut self) {
self.device_name.clear();
self.other_device.clear();
self.radio = ::protobuf::EnumOrUnknown::new(super::model::PhyKind::NONE);
self.link_loss = 0.;
self.special_fields.clear();
}
fn default_instance() -> &'static SetLinkLossRequest {
static instance: SetLinkLossRequest = SetLinkLossRequest {
device_name: ::std::string::String::new(),
other_device: ::std::string::String::new(),
radio: ::protobuf::EnumOrUnknown::from_i32(0),
link_loss: 0.,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for SetLinkLossRequest {
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("SetLinkLossRequest").unwrap()).clone()
}
}
impl ::std::fmt::Display for SetLinkLossRequest {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for SetLinkLossRequest {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(PartialEq,Clone,Default,Debug)]
// @@protoc_insertion_point(message:netsim.frontend.PatchDeviceRequest)
pub struct PatchDeviceRequest {
// message fields
// @@protoc_insertion_point(field:netsim.frontend.PatchDeviceRequest.device)
pub device: ::protobuf::MessageField<super::model::Device>,
// special fields
// @@protoc_insertion_point(special_field:netsim.frontend.PatchDeviceRequest.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a PatchDeviceRequest {
fn default() -> &'a PatchDeviceRequest {
<PatchDeviceRequest as ::protobuf::Message>::default_instance()
}
}
impl PatchDeviceRequest {
pub fn new() -> PatchDeviceRequest {
::std::default::Default::default()
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(1);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::model::Device>(
"device",
|m: &PatchDeviceRequest| { &m.device },
|m: &mut PatchDeviceRequest| { &mut m.device },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<PatchDeviceRequest>(
"PatchDeviceRequest",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for PatchDeviceRequest {
const NAME: &'static str = "PatchDeviceRequest";
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 {
18 => {
::protobuf::rt::read_singular_message_into_field(is, &mut self.device)?;
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if let Some(v) = self.device.as_ref() {
let len = v.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.device.as_ref() {
::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() -> PatchDeviceRequest {
PatchDeviceRequest::new()
}
fn clear(&mut self) {
self.device.clear();
self.special_fields.clear();
}
fn default_instance() -> &'static PatchDeviceRequest {
static instance: PatchDeviceRequest = PatchDeviceRequest {
device: ::protobuf::MessageField::none(),
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for PatchDeviceRequest {
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("PatchDeviceRequest").unwrap()).clone()
}
}
impl ::std::fmt::Display for PatchDeviceRequest {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for PatchDeviceRequest {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(PartialEq,Clone,Default,Debug)]
// @@protoc_insertion_point(message:netsim.frontend.Event)
pub struct Event {
// message fields
// @@protoc_insertion_point(field:netsim.frontend.Event.devices)
pub devices: ::std::vec::Vec<super::model::Device>,
// special fields
// @@protoc_insertion_point(special_field:netsim.frontend.Event.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a Event {
fn default() -> &'a Event {
<Event as ::protobuf::Message>::default_instance()
}
}
impl Event {
pub fn new() -> Event {
::std::default::Default::default()
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(1);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"devices",
|m: &Event| { &m.devices },
|m: &mut Event| { &mut m.devices },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Event>(
"Event",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for Event {
const NAME: &'static str = "Event";
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.devices.push(is.read_message()?);
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
for value in &self.devices {
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<()> {
for v in &self.devices {
::protobuf::rt::write_message_field_with_cached_size(1, 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() -> Event {
Event::new()
}
fn clear(&mut self) {
self.devices.clear();
self.special_fields.clear();
}
fn default_instance() -> &'static Event {
static instance: Event = Event {
devices: ::std::vec::Vec::new(),
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for Event {
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("Event").unwrap()).clone()
}
}
impl ::std::fmt::Display for Event {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Event {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(PartialEq,Clone,Default,Debug)]
// @@protoc_insertion_point(message:netsim.frontend.GetDevicesResponse)
pub struct GetDevicesResponse {
// message fields
// @@protoc_insertion_point(field:netsim.frontend.GetDevicesResponse.devices)
pub devices: ::std::vec::Vec<super::model::Device>,
// special fields
// @@protoc_insertion_point(special_field:netsim.frontend.GetDevicesResponse.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a GetDevicesResponse {
fn default() -> &'a GetDevicesResponse {
<GetDevicesResponse as ::protobuf::Message>::default_instance()
}
}
impl GetDevicesResponse {
pub fn new() -> GetDevicesResponse {
::std::default::Default::default()
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(1);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"devices",
|m: &GetDevicesResponse| { &m.devices },
|m: &mut GetDevicesResponse| { &mut m.devices },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<GetDevicesResponse>(
"GetDevicesResponse",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for GetDevicesResponse {
const NAME: &'static str = "GetDevicesResponse";
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.devices.push(is.read_message()?);
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
for value in &self.devices {
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<()> {
for v in &self.devices {
::protobuf::rt::write_message_field_with_cached_size(1, 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() -> GetDevicesResponse {
GetDevicesResponse::new()
}
fn clear(&mut self) {
self.devices.clear();
self.special_fields.clear();
}
fn default_instance() -> &'static GetDevicesResponse {
static instance: GetDevicesResponse = GetDevicesResponse {
devices: ::std::vec::Vec::new(),
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for GetDevicesResponse {
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("GetDevicesResponse").unwrap()).clone()
}
}
impl ::std::fmt::Display for GetDevicesResponse {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for GetDevicesResponse {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(PartialEq,Clone,Default,Debug)]
// @@protoc_insertion_point(message:netsim.frontend.NetCatStream)
pub struct NetCatStream {
// message fields
// @@protoc_insertion_point(field:netsim.frontend.NetCatStream.result)
pub result: ::std::vec::Vec<::std::string::String>,
// special fields
// @@protoc_insertion_point(special_field:netsim.frontend.NetCatStream.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a NetCatStream {
fn default() -> &'a NetCatStream {
<NetCatStream as ::protobuf::Message>::default_instance()
}
}
impl NetCatStream {
pub fn new() -> NetCatStream {
::std::default::Default::default()
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(1);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"result",
|m: &NetCatStream| { &m.result },
|m: &mut NetCatStream| { &mut m.result },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<NetCatStream>(
"NetCatStream",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for NetCatStream {
const NAME: &'static str = "NetCatStream";
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.result.push(is.read_string()?);
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
for value in &self.result {
my_size += ::protobuf::rt::string_size(1, &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<()> {
for v in &self.result {
os.write_string(1, &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() -> NetCatStream {
NetCatStream::new()
}
fn clear(&mut self) {
self.result.clear();
self.special_fields.clear();
}
fn default_instance() -> &'static NetCatStream {
static instance: NetCatStream = NetCatStream {
result: ::std::vec::Vec::new(),
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for NetCatStream {
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("NetCatStream").unwrap()).clone()
}
}
impl ::std::fmt::Display for NetCatStream {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for NetCatStream {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(PartialEq,Clone,Default,Debug)]
// @@protoc_insertion_point(message:netsim.frontend.SetPacketCaptureRequest)
pub struct SetPacketCaptureRequest {
// message fields
// @@protoc_insertion_point(field:netsim.frontend.SetPacketCaptureRequest.capture)
pub capture: bool,
// @@protoc_insertion_point(field:netsim.frontend.SetPacketCaptureRequest.device_serial)
pub device_serial: ::std::string::String,
// special fields
// @@protoc_insertion_point(special_field:netsim.frontend.SetPacketCaptureRequest.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a SetPacketCaptureRequest {
fn default() -> &'a SetPacketCaptureRequest {
<SetPacketCaptureRequest as ::protobuf::Message>::default_instance()
}
}
impl SetPacketCaptureRequest {
pub fn new() -> SetPacketCaptureRequest {
::std::default::Default::default()
}
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_simpler_field_accessor::<_, _>(
"capture",
|m: &SetPacketCaptureRequest| { &m.capture },
|m: &mut SetPacketCaptureRequest| { &mut m.capture },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"device_serial",
|m: &SetPacketCaptureRequest| { &m.device_serial },
|m: &mut SetPacketCaptureRequest| { &mut m.device_serial },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<SetPacketCaptureRequest>(
"SetPacketCaptureRequest",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for SetPacketCaptureRequest {
const NAME: &'static str = "SetPacketCaptureRequest";
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.capture = is.read_bool()?;
},
18 => {
self.device_serial = is.read_string()?;
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if self.capture != false {
my_size += 1 + 1;
}
if !self.device_serial.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.device_serial);
}
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.capture != false {
os.write_bool(1, self.capture)?;
}
if !self.device_serial.is_empty() {
os.write_string(2, &self.device_serial)?;
}
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() -> SetPacketCaptureRequest {
SetPacketCaptureRequest::new()
}
fn clear(&mut self) {
self.capture = false;
self.device_serial.clear();
self.special_fields.clear();
}
fn default_instance() -> &'static SetPacketCaptureRequest {
static instance: SetPacketCaptureRequest = SetPacketCaptureRequest {
capture: false,
device_serial: ::std::string::String::new(),
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for SetPacketCaptureRequest {
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("SetPacketCaptureRequest").unwrap()).clone()
}
}
impl ::std::fmt::Display for SetPacketCaptureRequest {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for SetPacketCaptureRequest {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(PartialEq,Clone,Default,Debug)]
// @@protoc_insertion_point(message:netsim.frontend.PatchCaptureRequest)
pub struct PatchCaptureRequest {
// message fields
// @@protoc_insertion_point(field:netsim.frontend.PatchCaptureRequest.id)
pub id: i32,
// @@protoc_insertion_point(field:netsim.frontend.PatchCaptureRequest.patch)
pub patch: ::protobuf::MessageField<patch_capture_request::PatchCapture>,
// special fields
// @@protoc_insertion_point(special_field:netsim.frontend.PatchCaptureRequest.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a PatchCaptureRequest {
fn default() -> &'a PatchCaptureRequest {
<PatchCaptureRequest as ::protobuf::Message>::default_instance()
}
}
impl PatchCaptureRequest {
pub fn new() -> PatchCaptureRequest {
::std::default::Default::default()
}
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_simpler_field_accessor::<_, _>(
"id",
|m: &PatchCaptureRequest| { &m.id },
|m: &mut PatchCaptureRequest| { &mut m.id },
));
fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, patch_capture_request::PatchCapture>(
"patch",
|m: &PatchCaptureRequest| { &m.patch },
|m: &mut PatchCaptureRequest| { &mut m.patch },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<PatchCaptureRequest>(
"PatchCaptureRequest",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for PatchCaptureRequest {
const NAME: &'static str = "PatchCaptureRequest";
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.id = is.read_int32()?;
},
18 => {
::protobuf::rt::read_singular_message_into_field(is, &mut self.patch)?;
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if self.id != 0 {
my_size += ::protobuf::rt::int32_size(1, self.id);
}
if let Some(v) = self.patch.as_ref() {
let len = v.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 self.id != 0 {
os.write_int32(1, self.id)?;
}
if let Some(v) = self.patch.as_ref() {
::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() -> PatchCaptureRequest {
PatchCaptureRequest::new()
}
fn clear(&mut self) {
self.id = 0;
self.patch.clear();
self.special_fields.clear();
}
fn default_instance() -> &'static PatchCaptureRequest {
static instance: PatchCaptureRequest = PatchCaptureRequest {
id: 0,
patch: ::protobuf::MessageField::none(),
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for PatchCaptureRequest {
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("PatchCaptureRequest").unwrap()).clone()
}
}
impl ::std::fmt::Display for PatchCaptureRequest {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for PatchCaptureRequest {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
/// Nested message and enums of message `PatchCaptureRequest`
pub mod patch_capture_request {
#[derive(PartialEq,Clone,Default,Debug)]
// @@protoc_insertion_point(message:netsim.frontend.PatchCaptureRequest.PatchCapture)
pub struct PatchCapture {
// message fields
// @@protoc_insertion_point(field:netsim.frontend.PatchCaptureRequest.PatchCapture.state)
pub state: ::protobuf::EnumOrUnknown<super::super::model::State>,
// special fields
// @@protoc_insertion_point(special_field:netsim.frontend.PatchCaptureRequest.PatchCapture.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a PatchCapture {
fn default() -> &'a PatchCapture {
<PatchCapture as ::protobuf::Message>::default_instance()
}
}
impl PatchCapture {
pub fn new() -> PatchCapture {
::std::default::Default::default()
}
pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(1);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"state",
|m: &PatchCapture| { &m.state },
|m: &mut PatchCapture| { &mut m.state },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<PatchCapture>(
"PatchCaptureRequest.PatchCapture",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for PatchCapture {
const NAME: &'static str = "PatchCapture";
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.state = 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(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if self.state != ::protobuf::EnumOrUnknown::new(super::super::model::State::UNKNOWN) {
my_size += ::protobuf::rt::int32_size(1, self.state.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.state != ::protobuf::EnumOrUnknown::new(super::super::model::State::UNKNOWN) {
os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.state))?;
}
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() -> PatchCapture {
PatchCapture::new()
}
fn clear(&mut self) {
self.state = ::protobuf::EnumOrUnknown::new(super::super::model::State::UNKNOWN);
self.special_fields.clear();
}
fn default_instance() -> &'static PatchCapture {
static instance: PatchCapture = PatchCapture {
state: ::protobuf::EnumOrUnknown::from_i32(0),
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for PatchCapture {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| super::file_descriptor().message_by_package_relative_name("PatchCaptureRequest.PatchCapture").unwrap()).clone()
}
}
impl ::std::fmt::Display for PatchCapture {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for PatchCapture {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
}
#[derive(PartialEq,Clone,Default,Debug)]
// @@protoc_insertion_point(message:netsim.frontend.ListCaptureResponse)
pub struct ListCaptureResponse {
// message fields
// @@protoc_insertion_point(field:netsim.frontend.ListCaptureResponse.captures)
pub captures: ::std::vec::Vec<super::model::Capture>,
// special fields
// @@protoc_insertion_point(special_field:netsim.frontend.ListCaptureResponse.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a ListCaptureResponse {
fn default() -> &'a ListCaptureResponse {
<ListCaptureResponse as ::protobuf::Message>::default_instance()
}
}
impl ListCaptureResponse {
pub fn new() -> ListCaptureResponse {
::std::default::Default::default()
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(1);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"captures",
|m: &ListCaptureResponse| { &m.captures },
|m: &mut ListCaptureResponse| { &mut m.captures },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<ListCaptureResponse>(
"ListCaptureResponse",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for ListCaptureResponse {
const NAME: &'static str = "ListCaptureResponse";
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.captures.push(is.read_message()?);
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
for value in &self.captures {
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<()> {
for v in &self.captures {
::protobuf::rt::write_message_field_with_cached_size(1, 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() -> ListCaptureResponse {
ListCaptureResponse::new()
}
fn clear(&mut self) {
self.captures.clear();
self.special_fields.clear();
}
fn default_instance() -> &'static ListCaptureResponse {
static instance: ListCaptureResponse = ListCaptureResponse {
captures: ::std::vec::Vec::new(),
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for ListCaptureResponse {
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("ListCaptureResponse").unwrap()).clone()
}
}
impl ::std::fmt::Display for ListCaptureResponse {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for ListCaptureResponse {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(PartialEq,Clone,Default,Debug)]
// @@protoc_insertion_point(message:netsim.frontend.GetCaptureRequest)
pub struct GetCaptureRequest {
// message fields
// @@protoc_insertion_point(field:netsim.frontend.GetCaptureRequest.id)
pub id: i32,
// special fields
// @@protoc_insertion_point(special_field:netsim.frontend.GetCaptureRequest.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a GetCaptureRequest {
fn default() -> &'a GetCaptureRequest {
<GetCaptureRequest as ::protobuf::Message>::default_instance()
}
}
impl GetCaptureRequest {
pub fn new() -> GetCaptureRequest {
::std::default::Default::default()
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(1);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"id",
|m: &GetCaptureRequest| { &m.id },
|m: &mut GetCaptureRequest| { &mut m.id },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<GetCaptureRequest>(
"GetCaptureRequest",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for GetCaptureRequest {
const NAME: &'static str = "GetCaptureRequest";
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.id = is.read_int32()?;
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if self.id != 0 {
my_size += ::protobuf::rt::int32_size(1, self.id);
}
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.id != 0 {
os.write_int32(1, self.id)?;
}
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() -> GetCaptureRequest {
GetCaptureRequest::new()
}
fn clear(&mut self) {
self.id = 0;
self.special_fields.clear();
}
fn default_instance() -> &'static GetCaptureRequest {
static instance: GetCaptureRequest = GetCaptureRequest {
id: 0,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for GetCaptureRequest {
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("GetCaptureRequest").unwrap()).clone()
}
}
impl ::std::fmt::Display for GetCaptureRequest {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for GetCaptureRequest {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(PartialEq,Clone,Default,Debug)]
// @@protoc_insertion_point(message:netsim.frontend.GetCaptureResponse)
pub struct GetCaptureResponse {
// message fields
// @@protoc_insertion_point(field:netsim.frontend.GetCaptureResponse.capture_stream)
pub capture_stream: ::std::vec::Vec<u8>,
// special fields
// @@protoc_insertion_point(special_field:netsim.frontend.GetCaptureResponse.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a GetCaptureResponse {
fn default() -> &'a GetCaptureResponse {
<GetCaptureResponse as ::protobuf::Message>::default_instance()
}
}
impl GetCaptureResponse {
pub fn new() -> GetCaptureResponse {
::std::default::Default::default()
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(1);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"capture_stream",
|m: &GetCaptureResponse| { &m.capture_stream },
|m: &mut GetCaptureResponse| { &mut m.capture_stream },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<GetCaptureResponse>(
"GetCaptureResponse",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for GetCaptureResponse {
const NAME: &'static str = "GetCaptureResponse";
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.capture_stream = is.read_bytes()?;
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if !self.capture_stream.is_empty() {
my_size += ::protobuf::rt::bytes_size(1, &self.capture_stream);
}
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.capture_stream.is_empty() {
os.write_bytes(1, &self.capture_stream)?;
}
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() -> GetCaptureResponse {
GetCaptureResponse::new()
}
fn clear(&mut self) {
self.capture_stream.clear();
self.special_fields.clear();
}
fn default_instance() -> &'static GetCaptureResponse {
static instance: GetCaptureResponse = GetCaptureResponse {
capture_stream: ::std::vec::Vec::new(),
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for GetCaptureResponse {
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("GetCaptureResponse").unwrap()).clone()
}
}
impl ::std::fmt::Display for GetCaptureResponse {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for GetCaptureResponse {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(PartialEq,Clone,Default,Debug)]
// @@protoc_insertion_point(message:netsim.frontend.ErrorResponse)
pub struct ErrorResponse {
// message fields
// @@protoc_insertion_point(field:netsim.frontend.ErrorResponse.code)
pub code: i32,
// @@protoc_insertion_point(field:netsim.frontend.ErrorResponse.error_message)
pub error_message: ::std::string::String,
// @@protoc_insertion_point(field:netsim.frontend.ErrorResponse.status)
pub status: ::std::string::String,
// special fields
// @@protoc_insertion_point(special_field:netsim.frontend.ErrorResponse.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a ErrorResponse {
fn default() -> &'a ErrorResponse {
<ErrorResponse as ::protobuf::Message>::default_instance()
}
}
impl ErrorResponse {
pub fn new() -> ErrorResponse {
::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::<_, _>(
"code",
|m: &ErrorResponse| { &m.code },
|m: &mut ErrorResponse| { &mut m.code },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"error_message",
|m: &ErrorResponse| { &m.error_message },
|m: &mut ErrorResponse| { &mut m.error_message },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"status",
|m: &ErrorResponse| { &m.status },
|m: &mut ErrorResponse| { &mut m.status },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<ErrorResponse>(
"ErrorResponse",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for ErrorResponse {
const NAME: &'static str = "ErrorResponse";
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.code = is.read_int32()?;
},
18 => {
self.error_message = is.read_string()?;
},
26 => {
self.status = is.read_string()?;
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if self.code != 0 {
my_size += ::protobuf::rt::int32_size(1, self.code);
}
if !self.error_message.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.error_message);
}
if !self.status.is_empty() {
my_size += ::protobuf::rt::string_size(3, &self.status);
}
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.code != 0 {
os.write_int32(1, self.code)?;
}
if !self.error_message.is_empty() {
os.write_string(2, &self.error_message)?;
}
if !self.status.is_empty() {
os.write_string(3, &self.status)?;
}
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() -> ErrorResponse {
ErrorResponse::new()
}
fn clear(&mut self) {
self.code = 0;
self.error_message.clear();
self.status.clear();
self.special_fields.clear();
}
fn default_instance() -> &'static ErrorResponse {
static instance: ErrorResponse = ErrorResponse {
code: 0,
error_message: ::std::string::String::new(),
status: ::std::string::String::new(),
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for ErrorResponse {
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("ErrorResponse").unwrap()).clone()
}
}
impl ::std::fmt::Display for ErrorResponse {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for ErrorResponse {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x0efrontend.proto\x12\x0fnetsim.frontend\x1a\x1bgoogle/protobuf/empty\
.proto\x1a\x0bmodel.proto\"+\n\x0fVersionResponse\x12\x18\n\x07version\
\x18\x01\x20\x01(\tR\x07version\"\xa2\x01\n\x12SetLinkLossRequest\x12\
\x1f\n\x0bdevice_name\x18\x01\x20\x01(\tR\ndeviceName\x12!\n\x0cother_de\
vice\x18\x02\x20\x01(\tR\x0botherDevice\x12+\n\x05radio\x18\x03\x20\x01(\
\x0e2\x15.netsim.model.PhyKindR\x05radio\x12\x1b\n\tlink_loss\x18\x04\
\x20\x01(\x02R\x08linkLoss\"B\n\x12PatchDeviceRequest\x12,\n\x06device\
\x18\x02\x20\x01(\x0b2\x14.netsim.model.DeviceR\x06device\"7\n\x05Event\
\x12.\n\x07devices\x18\x01\x20\x03(\x0b2\x14.netsim.model.DeviceR\x07dev\
ices\"D\n\x12GetDevicesResponse\x12.\n\x07devices\x18\x01\x20\x03(\x0b2\
\x14.netsim.model.DeviceR\x07devices\"&\n\x0cNetCatStream\x12\x16\n\x06r\
esult\x18\x01\x20\x03(\tR\x06result\"X\n\x17SetPacketCaptureRequest\x12\
\x18\n\x07capture\x18\x01\x20\x01(\x08R\x07capture\x12#\n\rdevice_serial\
\x18\x02\x20\x01(\tR\x0cdeviceSerial\"\xa9\x01\n\x13PatchCaptureRequest\
\x12\x0e\n\x02id\x18\x01\x20\x01(\x05R\x02id\x12G\n\x05patch\x18\x02\x20\
\x01(\x0b21.netsim.frontend.PatchCaptureRequest.PatchCaptureR\x05patch\
\x1a9\n\x0cPatchCapture\x12)\n\x05state\x18\x01\x20\x01(\x0e2\x13.netsim\
.model.StateR\x05state\"H\n\x13ListCaptureResponse\x121\n\x08captures\
\x18\x01\x20\x03(\x0b2\x15.netsim.model.CaptureR\x08captures\"#\n\x11Get\
CaptureRequest\x12\x0e\n\x02id\x18\x01\x20\x01(\x05R\x02id\";\n\x12GetCa\
ptureResponse\x12%\n\x0ecapture_stream\x18\x01\x20\x01(\x0cR\rcaptureStr\
eam\"`\n\rErrorResponse\x12\x12\n\x04code\x18\x01\x20\x01(\x05R\x04code\
\x12#\n\rerror_message\x18\x02\x20\x01(\tR\x0cerrorMessage\x12\x16\n\x06\
status\x18\x03\x20\x01(\tR\x06status2\xf0\x05\n\x0fFrontendService\x12F\
\n\nGetVersion\x12\x16.google.protobuf.Empty\x1a\x20.netsim.frontend.Ver\
sionResponse\x12B\n\x0eRegisterEvents\x12\x16.google.protobuf.Empty\x1a\
\x16.netsim.frontend.Event0\x01\x12I\n\nGetDevices\x12\x16.google.protob\
uf.Empty\x1a#.netsim.frontend.GetDevicesResponse\x12J\n\x0bPatchDevice\
\x12#.netsim.frontend.PatchDeviceRequest\x1a\x16.google.protobuf.Empty\
\x127\n\x05Reset\x12\x16.google.protobuf.Empty\x1a\x16.google.protobuf.E\
mpty\x12J\n\x0bSetLinkLoss\x12#.netsim.frontend.SetLinkLossRequest\x1a\
\x16.google.protobuf.Empty\x12A\n\x06NetCat\x12\x16.google.protobuf.Empt\
y\x1a\x1d.netsim.frontend.NetCatStream0\x01\x12L\n\x0cPatchCapture\x12$.\
netsim.frontend.PatchCaptureRequest\x1a\x16.google.protobuf.Empty\x12K\n\
\x0bListCapture\x12\x16.google.protobuf.Empty\x1a$.netsim.frontend.ListC\
aptureResponse\x12W\n\nGetCapture\x12\".netsim.frontend.GetCaptureReques\
t\x1a#.netsim.frontend.GetCaptureResponse0\x01b\x06proto3\
";
/// `FileDescriptorProto` object which was a source for this generated file
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()
})
}
/// `FileDescriptor` object which allows dynamic access to files
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(2);
deps.push(::protobuf::well_known_types::empty::file_descriptor().clone());
deps.push(super::model::file_descriptor().clone());
let mut messages = ::std::vec::Vec::with_capacity(13);
messages.push(VersionResponse::generated_message_descriptor_data());
messages.push(SetLinkLossRequest::generated_message_descriptor_data());
messages.push(PatchDeviceRequest::generated_message_descriptor_data());
messages.push(Event::generated_message_descriptor_data());
messages.push(GetDevicesResponse::generated_message_descriptor_data());
messages.push(NetCatStream::generated_message_descriptor_data());
messages.push(SetPacketCaptureRequest::generated_message_descriptor_data());
messages.push(PatchCaptureRequest::generated_message_descriptor_data());
messages.push(ListCaptureResponse::generated_message_descriptor_data());
messages.push(GetCaptureRequest::generated_message_descriptor_data());
messages.push(GetCaptureResponse::generated_message_descriptor_data());
messages.push(ErrorResponse::generated_message_descriptor_data());
messages.push(patch_capture_request::PatchCapture::generated_message_descriptor_data());
let mut enums = ::std::vec::Vec::with_capacity(0);
::protobuf::reflect::GeneratedFileDescriptor::new_generated(
file_descriptor_proto(),
deps,
messages,
enums,
)
});
::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
})
}