• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // This file is generated by rust-protobuf 3.2.0. Do not edit
2 // .proto file is parsed by protoc 3.21.9
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(box_pointers)]
13 #![allow(dead_code)]
14 #![allow(missing_docs)]
15 #![allow(non_camel_case_types)]
16 #![allow(non_snake_case)]
17 #![allow(non_upper_case_globals)]
18 #![allow(trivial_casts)]
19 #![allow(unused_results)]
20 #![allow(unused_mut)]
21 
22 //! Generated file from `vtpm_interface.proto`
23 // Generated for lite runtime
24 
25 /// Generated files are compatible only with the same version
26 /// of protobuf runtime.
27 const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_2_0;
28 
29 #[derive(PartialEq,Clone,Default,Debug)]
30 // @@protoc_insertion_point(message:vtpm.SendCommandRequest)
31 pub struct SendCommandRequest {
32     // message fields
33     // @@protoc_insertion_point(field:vtpm.SendCommandRequest.command)
34     pub command: ::std::option::Option<::std::vec::Vec<u8>>,
35     // special fields
36     // @@protoc_insertion_point(special_field:vtpm.SendCommandRequest.special_fields)
37     pub special_fields: ::protobuf::SpecialFields,
38 }
39 
40 impl<'a> ::std::default::Default for &'a SendCommandRequest {
default() -> &'a SendCommandRequest41     fn default() -> &'a SendCommandRequest {
42         <SendCommandRequest as ::protobuf::Message>::default_instance()
43     }
44 }
45 
46 impl SendCommandRequest {
new() -> SendCommandRequest47     pub fn new() -> SendCommandRequest {
48         ::std::default::Default::default()
49     }
50 
51     // optional bytes command = 1;
52 
command(&self) -> &[u8]53     pub fn command(&self) -> &[u8] {
54         match self.command.as_ref() {
55             Some(v) => v,
56             None => &[],
57         }
58     }
59 
clear_command(&mut self)60     pub fn clear_command(&mut self) {
61         self.command = ::std::option::Option::None;
62     }
63 
has_command(&self) -> bool64     pub fn has_command(&self) -> bool {
65         self.command.is_some()
66     }
67 
68     // Param is passed by value, moved
set_command(&mut self, v: ::std::vec::Vec<u8>)69     pub fn set_command(&mut self, v: ::std::vec::Vec<u8>) {
70         self.command = ::std::option::Option::Some(v);
71     }
72 
73     // Mutable pointer to the field.
74     // If field is not initialized, it is initialized with default value first.
mut_command(&mut self) -> &mut ::std::vec::Vec<u8>75     pub fn mut_command(&mut self) -> &mut ::std::vec::Vec<u8> {
76         if self.command.is_none() {
77             self.command = ::std::option::Option::Some(::std::vec::Vec::new());
78         }
79         self.command.as_mut().unwrap()
80     }
81 
82     // Take field
take_command(&mut self) -> ::std::vec::Vec<u8>83     pub fn take_command(&mut self) -> ::std::vec::Vec<u8> {
84         self.command.take().unwrap_or_else(|| ::std::vec::Vec::new())
85     }
86 }
87 
88 impl ::protobuf::Message for SendCommandRequest {
89     const NAME: &'static str = "SendCommandRequest";
90 
is_initialized(&self) -> bool91     fn is_initialized(&self) -> bool {
92         true
93     }
94 
merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()>95     fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
96         while let Some(tag) = is.read_raw_tag_or_eof()? {
97             match tag {
98                 10 => {
99                     self.command = ::std::option::Option::Some(is.read_bytes()?);
100                 },
101                 tag => {
102                     ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
103                 },
104             };
105         }
106         ::std::result::Result::Ok(())
107     }
108 
109     // Compute sizes of nested messages
110     #[allow(unused_variables)]
compute_size(&self) -> u64111     fn compute_size(&self) -> u64 {
112         let mut my_size = 0;
113         if let Some(v) = self.command.as_ref() {
114             my_size += ::protobuf::rt::bytes_size(1, &v);
115         }
116         my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
117         self.special_fields.cached_size().set(my_size as u32);
118         my_size
119     }
120 
write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()>121     fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
122         if let Some(v) = self.command.as_ref() {
123             os.write_bytes(1, v)?;
124         }
125         os.write_unknown_fields(self.special_fields.unknown_fields())?;
126         ::std::result::Result::Ok(())
127     }
128 
special_fields(&self) -> &::protobuf::SpecialFields129     fn special_fields(&self) -> &::protobuf::SpecialFields {
130         &self.special_fields
131     }
132 
mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields133     fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
134         &mut self.special_fields
135     }
136 
new() -> SendCommandRequest137     fn new() -> SendCommandRequest {
138         SendCommandRequest::new()
139     }
140 
clear(&mut self)141     fn clear(&mut self) {
142         self.command = ::std::option::Option::None;
143         self.special_fields.clear();
144     }
145 
default_instance() -> &'static SendCommandRequest146     fn default_instance() -> &'static SendCommandRequest {
147         static instance: SendCommandRequest = SendCommandRequest {
148             command: ::std::option::Option::None,
149             special_fields: ::protobuf::SpecialFields::new(),
150         };
151         &instance
152     }
153 }
154 
155 #[derive(PartialEq,Clone,Default,Debug)]
156 // @@protoc_insertion_point(message:vtpm.SendCommandResponse)
157 pub struct SendCommandResponse {
158     // message fields
159     // @@protoc_insertion_point(field:vtpm.SendCommandResponse.response)
160     pub response: ::std::option::Option<::std::vec::Vec<u8>>,
161     // special fields
162     // @@protoc_insertion_point(special_field:vtpm.SendCommandResponse.special_fields)
163     pub special_fields: ::protobuf::SpecialFields,
164 }
165 
166 impl<'a> ::std::default::Default for &'a SendCommandResponse {
default() -> &'a SendCommandResponse167     fn default() -> &'a SendCommandResponse {
168         <SendCommandResponse as ::protobuf::Message>::default_instance()
169     }
170 }
171 
172 impl SendCommandResponse {
new() -> SendCommandResponse173     pub fn new() -> SendCommandResponse {
174         ::std::default::Default::default()
175     }
176 
177     // optional bytes response = 1;
178 
response(&self) -> &[u8]179     pub fn response(&self) -> &[u8] {
180         match self.response.as_ref() {
181             Some(v) => v,
182             None => &[],
183         }
184     }
185 
clear_response(&mut self)186     pub fn clear_response(&mut self) {
187         self.response = ::std::option::Option::None;
188     }
189 
has_response(&self) -> bool190     pub fn has_response(&self) -> bool {
191         self.response.is_some()
192     }
193 
194     // Param is passed by value, moved
set_response(&mut self, v: ::std::vec::Vec<u8>)195     pub fn set_response(&mut self, v: ::std::vec::Vec<u8>) {
196         self.response = ::std::option::Option::Some(v);
197     }
198 
199     // Mutable pointer to the field.
200     // If field is not initialized, it is initialized with default value first.
mut_response(&mut self) -> &mut ::std::vec::Vec<u8>201     pub fn mut_response(&mut self) -> &mut ::std::vec::Vec<u8> {
202         if self.response.is_none() {
203             self.response = ::std::option::Option::Some(::std::vec::Vec::new());
204         }
205         self.response.as_mut().unwrap()
206     }
207 
208     // Take field
take_response(&mut self) -> ::std::vec::Vec<u8>209     pub fn take_response(&mut self) -> ::std::vec::Vec<u8> {
210         self.response.take().unwrap_or_else(|| ::std::vec::Vec::new())
211     }
212 }
213 
214 impl ::protobuf::Message for SendCommandResponse {
215     const NAME: &'static str = "SendCommandResponse";
216 
is_initialized(&self) -> bool217     fn is_initialized(&self) -> bool {
218         true
219     }
220 
merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()>221     fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
222         while let Some(tag) = is.read_raw_tag_or_eof()? {
223             match tag {
224                 10 => {
225                     self.response = ::std::option::Option::Some(is.read_bytes()?);
226                 },
227                 tag => {
228                     ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
229                 },
230             };
231         }
232         ::std::result::Result::Ok(())
233     }
234 
235     // Compute sizes of nested messages
236     #[allow(unused_variables)]
compute_size(&self) -> u64237     fn compute_size(&self) -> u64 {
238         let mut my_size = 0;
239         if let Some(v) = self.response.as_ref() {
240             my_size += ::protobuf::rt::bytes_size(1, &v);
241         }
242         my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
243         self.special_fields.cached_size().set(my_size as u32);
244         my_size
245     }
246 
write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()>247     fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
248         if let Some(v) = self.response.as_ref() {
249             os.write_bytes(1, v)?;
250         }
251         os.write_unknown_fields(self.special_fields.unknown_fields())?;
252         ::std::result::Result::Ok(())
253     }
254 
special_fields(&self) -> &::protobuf::SpecialFields255     fn special_fields(&self) -> &::protobuf::SpecialFields {
256         &self.special_fields
257     }
258 
mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields259     fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
260         &mut self.special_fields
261     }
262 
new() -> SendCommandResponse263     fn new() -> SendCommandResponse {
264         SendCommandResponse::new()
265     }
266 
clear(&mut self)267     fn clear(&mut self) {
268         self.response = ::std::option::Option::None;
269         self.special_fields.clear();
270     }
271 
default_instance() -> &'static SendCommandResponse272     fn default_instance() -> &'static SendCommandResponse {
273         static instance: SendCommandResponse = SendCommandResponse {
274             response: ::std::option::Option::None,
275             special_fields: ::protobuf::SpecialFields::new(),
276         };
277         &instance
278     }
279 }
280