1 // This file is generated by rust-protobuf 3.6.0. Do not edit 2 // .proto file is parsed by protoc 3.21.12 3 // @generated 4 5 // https://github.com/rust-lang/rust-clippy/issues/702 6 #![allow(unknown_lints)] 7 #![allow(clippy::all)] 8 9 #![allow(unused_attributes)] 10 #![cfg_attr(rustfmt, rustfmt::skip)] 11 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_results)] 19 #![allow(unused_mut)] 20 21 //! Generated file from `vtpm_interface.proto` 22 // Generated for lite runtime 23 24 /// Generated files are compatible only with the same version 25 /// of protobuf runtime. 26 const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_6_0; 27 28 // @@protoc_insertion_point(message:vtpm.SendCommandRequest) 29 #[derive(PartialEq,Clone,Default,Debug)] 30 pub struct SendCommandRequest { 31 // message fields 32 // @@protoc_insertion_point(field:vtpm.SendCommandRequest.command) 33 pub command: ::std::option::Option<::std::vec::Vec<u8>>, 34 // special fields 35 // @@protoc_insertion_point(special_field:vtpm.SendCommandRequest.special_fields) 36 pub special_fields: ::protobuf::SpecialFields, 37 } 38 39 impl<'a> ::std::default::Default for &'a SendCommandRequest { default() -> &'a SendCommandRequest40 fn default() -> &'a SendCommandRequest { 41 <SendCommandRequest as ::protobuf::Message>::default_instance() 42 } 43 } 44 45 impl SendCommandRequest { new() -> SendCommandRequest46 pub fn new() -> SendCommandRequest { 47 ::std::default::Default::default() 48 } 49 50 // optional bytes command = 1; 51 command(&self) -> &[u8]52 pub fn command(&self) -> &[u8] { 53 match self.command.as_ref() { 54 Some(v) => v, 55 None => &[], 56 } 57 } 58 clear_command(&mut self)59 pub fn clear_command(&mut self) { 60 self.command = ::std::option::Option::None; 61 } 62 has_command(&self) -> bool63 pub fn has_command(&self) -> bool { 64 self.command.is_some() 65 } 66 67 // Param is passed by value, moved set_command(&mut self, v: ::std::vec::Vec<u8>)68 pub fn set_command(&mut self, v: ::std::vec::Vec<u8>) { 69 self.command = ::std::option::Option::Some(v); 70 } 71 72 // Mutable pointer to the field. 73 // If field is not initialized, it is initialized with default value first. mut_command(&mut self) -> &mut ::std::vec::Vec<u8>74 pub fn mut_command(&mut self) -> &mut ::std::vec::Vec<u8> { 75 if self.command.is_none() { 76 self.command = ::std::option::Option::Some(::std::vec::Vec::new()); 77 } 78 self.command.as_mut().unwrap() 79 } 80 81 // Take field take_command(&mut self) -> ::std::vec::Vec<u8>82 pub fn take_command(&mut self) -> ::std::vec::Vec<u8> { 83 self.command.take().unwrap_or_else(|| ::std::vec::Vec::new()) 84 } 85 } 86 87 impl ::protobuf::Message for SendCommandRequest { 88 const NAME: &'static str = "SendCommandRequest"; 89 is_initialized(&self) -> bool90 fn is_initialized(&self) -> bool { 91 true 92 } 93 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()>94 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { 95 while let Some(tag) = is.read_raw_tag_or_eof()? { 96 match tag { 97 10 => { 98 self.command = ::std::option::Option::Some(is.read_bytes()?); 99 }, 100 tag => { 101 ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; 102 }, 103 }; 104 } 105 ::std::result::Result::Ok(()) 106 } 107 108 // Compute sizes of nested messages 109 #[allow(unused_variables)] compute_size(&self) -> u64110 fn compute_size(&self) -> u64 { 111 let mut my_size = 0; 112 if let Some(v) = self.command.as_ref() { 113 my_size += ::protobuf::rt::bytes_size(1, &v); 114 } 115 my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); 116 self.special_fields.cached_size().set(my_size as u32); 117 my_size 118 } 119 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()>120 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { 121 if let Some(v) = self.command.as_ref() { 122 os.write_bytes(1, v)?; 123 } 124 os.write_unknown_fields(self.special_fields.unknown_fields())?; 125 ::std::result::Result::Ok(()) 126 } 127 special_fields(&self) -> &::protobuf::SpecialFields128 fn special_fields(&self) -> &::protobuf::SpecialFields { 129 &self.special_fields 130 } 131 mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields132 fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { 133 &mut self.special_fields 134 } 135 new() -> SendCommandRequest136 fn new() -> SendCommandRequest { 137 SendCommandRequest::new() 138 } 139 clear(&mut self)140 fn clear(&mut self) { 141 self.command = ::std::option::Option::None; 142 self.special_fields.clear(); 143 } 144 default_instance() -> &'static SendCommandRequest145 fn default_instance() -> &'static SendCommandRequest { 146 static instance: SendCommandRequest = SendCommandRequest { 147 command: ::std::option::Option::None, 148 special_fields: ::protobuf::SpecialFields::new(), 149 }; 150 &instance 151 } 152 } 153 154 // @@protoc_insertion_point(message:vtpm.SendCommandResponse) 155 #[derive(PartialEq,Clone,Default,Debug)] 156 pub struct SendCommandResponse { 157 // message fields 158 // @@protoc_insertion_point(field:vtpm.SendCommandResponse.response) 159 pub response: ::std::option::Option<::std::vec::Vec<u8>>, 160 // special fields 161 // @@protoc_insertion_point(special_field:vtpm.SendCommandResponse.special_fields) 162 pub special_fields: ::protobuf::SpecialFields, 163 } 164 165 impl<'a> ::std::default::Default for &'a SendCommandResponse { default() -> &'a SendCommandResponse166 fn default() -> &'a SendCommandResponse { 167 <SendCommandResponse as ::protobuf::Message>::default_instance() 168 } 169 } 170 171 impl SendCommandResponse { new() -> SendCommandResponse172 pub fn new() -> SendCommandResponse { 173 ::std::default::Default::default() 174 } 175 176 // optional bytes response = 1; 177 response(&self) -> &[u8]178 pub fn response(&self) -> &[u8] { 179 match self.response.as_ref() { 180 Some(v) => v, 181 None => &[], 182 } 183 } 184 clear_response(&mut self)185 pub fn clear_response(&mut self) { 186 self.response = ::std::option::Option::None; 187 } 188 has_response(&self) -> bool189 pub fn has_response(&self) -> bool { 190 self.response.is_some() 191 } 192 193 // Param is passed by value, moved set_response(&mut self, v: ::std::vec::Vec<u8>)194 pub fn set_response(&mut self, v: ::std::vec::Vec<u8>) { 195 self.response = ::std::option::Option::Some(v); 196 } 197 198 // Mutable pointer to the field. 199 // If field is not initialized, it is initialized with default value first. mut_response(&mut self) -> &mut ::std::vec::Vec<u8>200 pub fn mut_response(&mut self) -> &mut ::std::vec::Vec<u8> { 201 if self.response.is_none() { 202 self.response = ::std::option::Option::Some(::std::vec::Vec::new()); 203 } 204 self.response.as_mut().unwrap() 205 } 206 207 // Take field take_response(&mut self) -> ::std::vec::Vec<u8>208 pub fn take_response(&mut self) -> ::std::vec::Vec<u8> { 209 self.response.take().unwrap_or_else(|| ::std::vec::Vec::new()) 210 } 211 } 212 213 impl ::protobuf::Message for SendCommandResponse { 214 const NAME: &'static str = "SendCommandResponse"; 215 is_initialized(&self) -> bool216 fn is_initialized(&self) -> bool { 217 true 218 } 219 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()>220 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { 221 while let Some(tag) = is.read_raw_tag_or_eof()? { 222 match tag { 223 10 => { 224 self.response = ::std::option::Option::Some(is.read_bytes()?); 225 }, 226 tag => { 227 ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; 228 }, 229 }; 230 } 231 ::std::result::Result::Ok(()) 232 } 233 234 // Compute sizes of nested messages 235 #[allow(unused_variables)] compute_size(&self) -> u64236 fn compute_size(&self) -> u64 { 237 let mut my_size = 0; 238 if let Some(v) = self.response.as_ref() { 239 my_size += ::protobuf::rt::bytes_size(1, &v); 240 } 241 my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); 242 self.special_fields.cached_size().set(my_size as u32); 243 my_size 244 } 245 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()>246 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { 247 if let Some(v) = self.response.as_ref() { 248 os.write_bytes(1, v)?; 249 } 250 os.write_unknown_fields(self.special_fields.unknown_fields())?; 251 ::std::result::Result::Ok(()) 252 } 253 special_fields(&self) -> &::protobuf::SpecialFields254 fn special_fields(&self) -> &::protobuf::SpecialFields { 255 &self.special_fields 256 } 257 mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields258 fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { 259 &mut self.special_fields 260 } 261 new() -> SendCommandResponse262 fn new() -> SendCommandResponse { 263 SendCommandResponse::new() 264 } 265 clear(&mut self)266 fn clear(&mut self) { 267 self.response = ::std::option::Option::None; 268 self.special_fields.clear(); 269 } 270 default_instance() -> &'static SendCommandResponse271 fn default_instance() -> &'static SendCommandResponse { 272 static instance: SendCommandResponse = SendCommandResponse { 273 response: ::std::option::Option::None, 274 special_fields: ::protobuf::SpecialFields::new(), 275 }; 276 &instance 277 } 278 } 279