// This file is generated by rust-protobuf 2.27.1. Do not edit // @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_imports)] #![allow(unused_results)] //! Generated file from `vtpm_interface.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. // const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_27_1; #[derive(PartialEq,Clone,Default,Debug)] pub struct SendCommandRequest { // message fields command: ::protobuf::SingularField<::std::vec::Vec>, // special fields pub unknown_fields: ::protobuf::UnknownFields, pub cached_size: ::protobuf::CachedSize, } impl<'a> ::std::default::Default for &'a SendCommandRequest { fn default() -> &'a SendCommandRequest { ::default_instance() } } impl SendCommandRequest { pub fn new() -> SendCommandRequest { ::std::default::Default::default() } // optional bytes command = 1; pub fn get_command(&self) -> &[u8] { match self.command.as_ref() { Some(v) => &v, None => &[], } } pub fn clear_command(&mut self) { self.command.clear(); } pub fn has_command(&self) -> bool { self.command.is_some() } // Param is passed by value, moved pub fn set_command(&mut self, v: ::std::vec::Vec) { self.command = ::protobuf::SingularField::some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_command(&mut self) -> &mut ::std::vec::Vec { if self.command.is_none() { self.command.set_default(); } self.command.as_mut().unwrap() } // Take field pub fn take_command(&mut self) -> ::std::vec::Vec { self.command.take().unwrap_or_else(|| ::std::vec::Vec::new()) } } impl ::protobuf::Message for SendCommandRequest { 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 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.command)?; }, _ => { ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u32 { let mut my_size = 0; if let Some(ref v) = self.command.as_ref() { my_size += ::protobuf::rt::bytes_size(1, &v); } 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 Some(ref v) = self.command.as_ref() { os.write_bytes(1, &v)?; } 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: ::std::boxed::Box) -> ::std::boxed::Box { self } fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } fn new() -> SendCommandRequest { SendCommandRequest::new() } fn default_instance() -> &'static SendCommandRequest { static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; instance.get(SendCommandRequest::new) } } impl ::protobuf::Clear for SendCommandRequest { fn clear(&mut self) { self.command.clear(); self.unknown_fields.clear(); } } impl ::protobuf::reflect::ProtobufValue for SendCommandRequest { fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { ::protobuf::reflect::ReflectValueRef::Message(self) } } #[derive(PartialEq,Clone,Default,Debug)] pub struct SendCommandResponse { // message fields response: ::protobuf::SingularField<::std::vec::Vec>, // special fields pub unknown_fields: ::protobuf::UnknownFields, pub cached_size: ::protobuf::CachedSize, } impl<'a> ::std::default::Default for &'a SendCommandResponse { fn default() -> &'a SendCommandResponse { ::default_instance() } } impl SendCommandResponse { pub fn new() -> SendCommandResponse { ::std::default::Default::default() } // optional bytes response = 1; pub fn get_response(&self) -> &[u8] { match self.response.as_ref() { Some(v) => &v, None => &[], } } pub fn clear_response(&mut self) { self.response.clear(); } pub fn has_response(&self) -> bool { self.response.is_some() } // Param is passed by value, moved pub fn set_response(&mut self, v: ::std::vec::Vec) { self.response = ::protobuf::SingularField::some(v); } // Mutable pointer to the field. // If field is not initialized, it is initialized with default value first. pub fn mut_response(&mut self) -> &mut ::std::vec::Vec { if self.response.is_none() { self.response.set_default(); } self.response.as_mut().unwrap() } // Take field pub fn take_response(&mut self) -> ::std::vec::Vec { self.response.take().unwrap_or_else(|| ::std::vec::Vec::new()) } } impl ::protobuf::Message for SendCommandResponse { 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 => { ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.response)?; }, _ => { ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u32 { let mut my_size = 0; if let Some(ref v) = self.response.as_ref() { my_size += ::protobuf::rt::bytes_size(1, &v); } 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 Some(ref v) = self.response.as_ref() { os.write_bytes(1, &v)?; } 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: ::std::boxed::Box) -> ::std::boxed::Box { self } fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { Self::descriptor_static() } fn new() -> SendCommandResponse { SendCommandResponse::new() } fn default_instance() -> &'static SendCommandResponse { static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; instance.get(SendCommandResponse::new) } } impl ::protobuf::Clear for SendCommandResponse { fn clear(&mut self) { self.response.clear(); self.unknown_fields.clear(); } } impl ::protobuf::reflect::ProtobufValue for SendCommandResponse { fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { ::protobuf::reflect::ReflectValueRef::Message(self) } }