1 // This file is generated by rust-protobuf 2.27.1. Do not edit 2 // @generated 3 4 // https://github.com/rust-lang/rust-clippy/issues/702 5 #![allow(unknown_lints)] 6 #![allow(clippy::all)] 7 8 #![allow(unused_attributes)] 9 #![cfg_attr(rustfmt, rustfmt::skip)] 10 11 #![allow(box_pointers)] 12 #![allow(dead_code)] 13 #![allow(missing_docs)] 14 #![allow(non_camel_case_types)] 15 #![allow(non_snake_case)] 16 #![allow(non_upper_case_globals)] 17 #![allow(trivial_casts)] 18 #![allow(unused_imports)] 19 #![allow(unused_results)] 20 //! Generated file from `vtpm_interface.proto` 21 22 /// Generated files are compatible only with the same version 23 /// of protobuf runtime. 24 // const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_27_1; 25 26 #[derive(PartialEq,Clone,Default,Debug)] 27 pub struct SendCommandRequest { 28 // message fields 29 command: ::protobuf::SingularField<::std::vec::Vec<u8>>, 30 // special fields 31 pub unknown_fields: ::protobuf::UnknownFields, 32 pub cached_size: ::protobuf::CachedSize, 33 } 34 35 impl<'a> ::std::default::Default for &'a SendCommandRequest { default() -> &'a SendCommandRequest36 fn default() -> &'a SendCommandRequest { 37 <SendCommandRequest as ::protobuf::Message>::default_instance() 38 } 39 } 40 41 impl SendCommandRequest { new() -> SendCommandRequest42 pub fn new() -> SendCommandRequest { 43 ::std::default::Default::default() 44 } 45 46 // optional bytes command = 1; 47 48 get_command(&self) -> &[u8]49 pub fn get_command(&self) -> &[u8] { 50 match self.command.as_ref() { 51 Some(v) => &v, 52 None => &[], 53 } 54 } clear_command(&mut self)55 pub fn clear_command(&mut self) { 56 self.command.clear(); 57 } 58 has_command(&self) -> bool59 pub fn has_command(&self) -> bool { 60 self.command.is_some() 61 } 62 63 // Param is passed by value, moved set_command(&mut self, v: ::std::vec::Vec<u8>)64 pub fn set_command(&mut self, v: ::std::vec::Vec<u8>) { 65 self.command = ::protobuf::SingularField::some(v); 66 } 67 68 // Mutable pointer to the field. 69 // If field is not initialized, it is initialized with default value first. mut_command(&mut self) -> &mut ::std::vec::Vec<u8>70 pub fn mut_command(&mut self) -> &mut ::std::vec::Vec<u8> { 71 if self.command.is_none() { 72 self.command.set_default(); 73 } 74 self.command.as_mut().unwrap() 75 } 76 77 // Take field take_command(&mut self) -> ::std::vec::Vec<u8>78 pub fn take_command(&mut self) -> ::std::vec::Vec<u8> { 79 self.command.take().unwrap_or_else(|| ::std::vec::Vec::new()) 80 } 81 } 82 83 impl ::protobuf::Message for SendCommandRequest { is_initialized(&self) -> bool84 fn is_initialized(&self) -> bool { 85 true 86 } 87 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>88 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 89 while !is.eof()? { 90 let (field_number, wire_type) = is.read_tag_unpack()?; 91 match field_number { 92 1 => { 93 ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.command)?; 94 }, 95 _ => { 96 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 97 }, 98 }; 99 } 100 ::std::result::Result::Ok(()) 101 } 102 103 // Compute sizes of nested messages 104 #[allow(unused_variables)] compute_size(&self) -> u32105 fn compute_size(&self) -> u32 { 106 let mut my_size = 0; 107 if let Some(ref v) = self.command.as_ref() { 108 my_size += ::protobuf::rt::bytes_size(1, &v); 109 } 110 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 111 self.cached_size.set(my_size); 112 my_size 113 } 114 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>115 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 116 if let Some(ref v) = self.command.as_ref() { 117 os.write_bytes(1, &v)?; 118 } 119 os.write_unknown_fields(self.get_unknown_fields())?; 120 ::std::result::Result::Ok(()) 121 } 122 get_cached_size(&self) -> u32123 fn get_cached_size(&self) -> u32 { 124 self.cached_size.get() 125 } 126 get_unknown_fields(&self) -> &::protobuf::UnknownFields127 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 128 &self.unknown_fields 129 } 130 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields131 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 132 &mut self.unknown_fields 133 } 134 as_any(&self) -> &dyn (::std::any::Any)135 fn as_any(&self) -> &dyn (::std::any::Any) { 136 self as &dyn (::std::any::Any) 137 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)138 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 139 self as &mut dyn (::std::any::Any) 140 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>141 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 142 self 143 } 144 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor145 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 146 Self::descriptor_static() 147 } 148 new() -> SendCommandRequest149 fn new() -> SendCommandRequest { 150 SendCommandRequest::new() 151 } 152 default_instance() -> &'static SendCommandRequest153 fn default_instance() -> &'static SendCommandRequest { 154 static instance: ::protobuf::rt::LazyV2<SendCommandRequest> = ::protobuf::rt::LazyV2::INIT; 155 instance.get(SendCommandRequest::new) 156 } 157 } 158 159 impl ::protobuf::Clear for SendCommandRequest { clear(&mut self)160 fn clear(&mut self) { 161 self.command.clear(); 162 self.unknown_fields.clear(); 163 } 164 } 165 166 impl ::protobuf::reflect::ProtobufValue for SendCommandRequest { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef167 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 168 ::protobuf::reflect::ReflectValueRef::Message(self) 169 } 170 } 171 172 #[derive(PartialEq,Clone,Default,Debug)] 173 pub struct SendCommandResponse { 174 // message fields 175 response: ::protobuf::SingularField<::std::vec::Vec<u8>>, 176 // special fields 177 pub unknown_fields: ::protobuf::UnknownFields, 178 pub cached_size: ::protobuf::CachedSize, 179 } 180 181 impl<'a> ::std::default::Default for &'a SendCommandResponse { default() -> &'a SendCommandResponse182 fn default() -> &'a SendCommandResponse { 183 <SendCommandResponse as ::protobuf::Message>::default_instance() 184 } 185 } 186 187 impl SendCommandResponse { new() -> SendCommandResponse188 pub fn new() -> SendCommandResponse { 189 ::std::default::Default::default() 190 } 191 192 // optional bytes response = 1; 193 194 get_response(&self) -> &[u8]195 pub fn get_response(&self) -> &[u8] { 196 match self.response.as_ref() { 197 Some(v) => &v, 198 None => &[], 199 } 200 } clear_response(&mut self)201 pub fn clear_response(&mut self) { 202 self.response.clear(); 203 } 204 has_response(&self) -> bool205 pub fn has_response(&self) -> bool { 206 self.response.is_some() 207 } 208 209 // Param is passed by value, moved set_response(&mut self, v: ::std::vec::Vec<u8>)210 pub fn set_response(&mut self, v: ::std::vec::Vec<u8>) { 211 self.response = ::protobuf::SingularField::some(v); 212 } 213 214 // Mutable pointer to the field. 215 // If field is not initialized, it is initialized with default value first. mut_response(&mut self) -> &mut ::std::vec::Vec<u8>216 pub fn mut_response(&mut self) -> &mut ::std::vec::Vec<u8> { 217 if self.response.is_none() { 218 self.response.set_default(); 219 } 220 self.response.as_mut().unwrap() 221 } 222 223 // Take field take_response(&mut self) -> ::std::vec::Vec<u8>224 pub fn take_response(&mut self) -> ::std::vec::Vec<u8> { 225 self.response.take().unwrap_or_else(|| ::std::vec::Vec::new()) 226 } 227 } 228 229 impl ::protobuf::Message for SendCommandResponse { is_initialized(&self) -> bool230 fn is_initialized(&self) -> bool { 231 true 232 } 233 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>234 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 235 while !is.eof()? { 236 let (field_number, wire_type) = is.read_tag_unpack()?; 237 match field_number { 238 1 => { 239 ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.response)?; 240 }, 241 _ => { 242 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 243 }, 244 }; 245 } 246 ::std::result::Result::Ok(()) 247 } 248 249 // Compute sizes of nested messages 250 #[allow(unused_variables)] compute_size(&self) -> u32251 fn compute_size(&self) -> u32 { 252 let mut my_size = 0; 253 if let Some(ref v) = self.response.as_ref() { 254 my_size += ::protobuf::rt::bytes_size(1, &v); 255 } 256 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 257 self.cached_size.set(my_size); 258 my_size 259 } 260 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>261 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 262 if let Some(ref v) = self.response.as_ref() { 263 os.write_bytes(1, &v)?; 264 } 265 os.write_unknown_fields(self.get_unknown_fields())?; 266 ::std::result::Result::Ok(()) 267 } 268 get_cached_size(&self) -> u32269 fn get_cached_size(&self) -> u32 { 270 self.cached_size.get() 271 } 272 get_unknown_fields(&self) -> &::protobuf::UnknownFields273 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 274 &self.unknown_fields 275 } 276 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields277 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 278 &mut self.unknown_fields 279 } 280 as_any(&self) -> &dyn (::std::any::Any)281 fn as_any(&self) -> &dyn (::std::any::Any) { 282 self as &dyn (::std::any::Any) 283 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)284 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 285 self as &mut dyn (::std::any::Any) 286 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>287 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 288 self 289 } 290 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor291 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 292 Self::descriptor_static() 293 } 294 new() -> SendCommandResponse295 fn new() -> SendCommandResponse { 296 SendCommandResponse::new() 297 } 298 default_instance() -> &'static SendCommandResponse299 fn default_instance() -> &'static SendCommandResponse { 300 static instance: ::protobuf::rt::LazyV2<SendCommandResponse> = ::protobuf::rt::LazyV2::INIT; 301 instance.get(SendCommandResponse::new) 302 } 303 } 304 305 impl ::protobuf::Clear for SendCommandResponse { clear(&mut self)306 fn clear(&mut self) { 307 self.response.clear(); 308 self.unknown_fields.clear(); 309 } 310 } 311 312 impl ::protobuf::reflect::ProtobufValue for SendCommandResponse { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef313 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 314 ::protobuf::reflect::ReflectValueRef::Message(self) 315 } 316 } 317