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 `UserDataAuth.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 CreateRequest { 28 // message fields 29 pub keys: ::protobuf::RepeatedField<super::key::Key>, 30 pub copy_authorization_key: bool, 31 pub force_ecryptfs: bool, 32 // special fields 33 pub unknown_fields: ::protobuf::UnknownFields, 34 pub cached_size: ::protobuf::CachedSize, 35 } 36 37 impl<'a> ::std::default::Default for &'a CreateRequest { default() -> &'a CreateRequest38 fn default() -> &'a CreateRequest { 39 <CreateRequest as ::protobuf::Message>::default_instance() 40 } 41 } 42 43 impl CreateRequest { new() -> CreateRequest44 pub fn new() -> CreateRequest { 45 ::std::default::Default::default() 46 } 47 48 // repeated .cryptohome.Key keys = 1; 49 50 get_keys(&self) -> &[super::key::Key]51 pub fn get_keys(&self) -> &[super::key::Key] { 52 &self.keys 53 } clear_keys(&mut self)54 pub fn clear_keys(&mut self) { 55 self.keys.clear(); 56 } 57 58 // Param is passed by value, moved set_keys(&mut self, v: ::protobuf::RepeatedField<super::key::Key>)59 pub fn set_keys(&mut self, v: ::protobuf::RepeatedField<super::key::Key>) { 60 self.keys = v; 61 } 62 63 // Mutable pointer to the field. mut_keys(&mut self) -> &mut ::protobuf::RepeatedField<super::key::Key>64 pub fn mut_keys(&mut self) -> &mut ::protobuf::RepeatedField<super::key::Key> { 65 &mut self.keys 66 } 67 68 // Take field take_keys(&mut self) -> ::protobuf::RepeatedField<super::key::Key>69 pub fn take_keys(&mut self) -> ::protobuf::RepeatedField<super::key::Key> { 70 ::std::mem::replace(&mut self.keys, ::protobuf::RepeatedField::new()) 71 } 72 73 // bool copy_authorization_key = 2; 74 75 get_copy_authorization_key(&self) -> bool76 pub fn get_copy_authorization_key(&self) -> bool { 77 self.copy_authorization_key 78 } clear_copy_authorization_key(&mut self)79 pub fn clear_copy_authorization_key(&mut self) { 80 self.copy_authorization_key = false; 81 } 82 83 // Param is passed by value, moved set_copy_authorization_key(&mut self, v: bool)84 pub fn set_copy_authorization_key(&mut self, v: bool) { 85 self.copy_authorization_key = v; 86 } 87 88 // bool force_ecryptfs = 3; 89 90 get_force_ecryptfs(&self) -> bool91 pub fn get_force_ecryptfs(&self) -> bool { 92 self.force_ecryptfs 93 } clear_force_ecryptfs(&mut self)94 pub fn clear_force_ecryptfs(&mut self) { 95 self.force_ecryptfs = false; 96 } 97 98 // Param is passed by value, moved set_force_ecryptfs(&mut self, v: bool)99 pub fn set_force_ecryptfs(&mut self, v: bool) { 100 self.force_ecryptfs = v; 101 } 102 } 103 104 impl ::protobuf::Message for CreateRequest { is_initialized(&self) -> bool105 fn is_initialized(&self) -> bool { 106 for v in &self.keys { 107 if !v.is_initialized() { 108 return false; 109 } 110 }; 111 true 112 } 113 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>114 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 115 while !is.eof()? { 116 let (field_number, wire_type) = is.read_tag_unpack()?; 117 match field_number { 118 1 => { 119 ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.keys)?; 120 }, 121 2 => { 122 if wire_type != ::protobuf::wire_format::WireTypeVarint { 123 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); 124 } 125 let tmp = is.read_bool()?; 126 self.copy_authorization_key = tmp; 127 }, 128 3 => { 129 if wire_type != ::protobuf::wire_format::WireTypeVarint { 130 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); 131 } 132 let tmp = is.read_bool()?; 133 self.force_ecryptfs = tmp; 134 }, 135 _ => { 136 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 137 }, 138 }; 139 } 140 ::std::result::Result::Ok(()) 141 } 142 143 // Compute sizes of nested messages 144 #[allow(unused_variables)] compute_size(&self) -> u32145 fn compute_size(&self) -> u32 { 146 let mut my_size = 0; 147 for value in &self.keys { 148 let len = value.compute_size(); 149 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 150 }; 151 if self.copy_authorization_key != false { 152 my_size += 2; 153 } 154 if self.force_ecryptfs != false { 155 my_size += 2; 156 } 157 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 158 self.cached_size.set(my_size); 159 my_size 160 } 161 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>162 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 163 for v in &self.keys { 164 os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; 165 os.write_raw_varint32(v.get_cached_size())?; 166 v.write_to_with_cached_sizes(os)?; 167 }; 168 if self.copy_authorization_key != false { 169 os.write_bool(2, self.copy_authorization_key)?; 170 } 171 if self.force_ecryptfs != false { 172 os.write_bool(3, self.force_ecryptfs)?; 173 } 174 os.write_unknown_fields(self.get_unknown_fields())?; 175 ::std::result::Result::Ok(()) 176 } 177 get_cached_size(&self) -> u32178 fn get_cached_size(&self) -> u32 { 179 self.cached_size.get() 180 } 181 get_unknown_fields(&self) -> &::protobuf::UnknownFields182 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 183 &self.unknown_fields 184 } 185 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields186 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 187 &mut self.unknown_fields 188 } 189 as_any(&self) -> &dyn (::std::any::Any)190 fn as_any(&self) -> &dyn (::std::any::Any) { 191 self as &dyn (::std::any::Any) 192 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)193 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 194 self as &mut dyn (::std::any::Any) 195 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>196 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 197 self 198 } 199 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor200 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 201 Self::descriptor_static() 202 } 203 new() -> CreateRequest204 fn new() -> CreateRequest { 205 CreateRequest::new() 206 } 207 default_instance() -> &'static CreateRequest208 fn default_instance() -> &'static CreateRequest { 209 static instance: ::protobuf::rt::LazyV2<CreateRequest> = ::protobuf::rt::LazyV2::INIT; 210 instance.get(CreateRequest::new) 211 } 212 } 213 214 impl ::protobuf::Clear for CreateRequest { clear(&mut self)215 fn clear(&mut self) { 216 self.keys.clear(); 217 self.copy_authorization_key = false; 218 self.force_ecryptfs = false; 219 self.unknown_fields.clear(); 220 } 221 } 222 223 impl ::protobuf::reflect::ProtobufValue for CreateRequest { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef224 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 225 ::protobuf::reflect::ReflectValueRef::Message(self) 226 } 227 } 228 229 #[derive(PartialEq,Clone,Default,Debug)] 230 pub struct CryptohomeErrorInfo { 231 // message fields 232 pub error_id: ::std::string::String, 233 pub readable_error_id: ::std::string::String, 234 pub primary_action: PrimaryAction, 235 pub possible_actions: ::std::vec::Vec<PossibleAction>, 236 // special fields 237 pub unknown_fields: ::protobuf::UnknownFields, 238 pub cached_size: ::protobuf::CachedSize, 239 } 240 241 impl<'a> ::std::default::Default for &'a CryptohomeErrorInfo { default() -> &'a CryptohomeErrorInfo242 fn default() -> &'a CryptohomeErrorInfo { 243 <CryptohomeErrorInfo as ::protobuf::Message>::default_instance() 244 } 245 } 246 247 impl CryptohomeErrorInfo { new() -> CryptohomeErrorInfo248 pub fn new() -> CryptohomeErrorInfo { 249 ::std::default::Default::default() 250 } 251 252 // string error_id = 1; 253 254 get_error_id(&self) -> &str255 pub fn get_error_id(&self) -> &str { 256 &self.error_id 257 } clear_error_id(&mut self)258 pub fn clear_error_id(&mut self) { 259 self.error_id.clear(); 260 } 261 262 // Param is passed by value, moved set_error_id(&mut self, v: ::std::string::String)263 pub fn set_error_id(&mut self, v: ::std::string::String) { 264 self.error_id = v; 265 } 266 267 // Mutable pointer to the field. 268 // If field is not initialized, it is initialized with default value first. mut_error_id(&mut self) -> &mut ::std::string::String269 pub fn mut_error_id(&mut self) -> &mut ::std::string::String { 270 &mut self.error_id 271 } 272 273 // Take field take_error_id(&mut self) -> ::std::string::String274 pub fn take_error_id(&mut self) -> ::std::string::String { 275 ::std::mem::replace(&mut self.error_id, ::std::string::String::new()) 276 } 277 278 // string readable_error_id = 2; 279 280 get_readable_error_id(&self) -> &str281 pub fn get_readable_error_id(&self) -> &str { 282 &self.readable_error_id 283 } clear_readable_error_id(&mut self)284 pub fn clear_readable_error_id(&mut self) { 285 self.readable_error_id.clear(); 286 } 287 288 // Param is passed by value, moved set_readable_error_id(&mut self, v: ::std::string::String)289 pub fn set_readable_error_id(&mut self, v: ::std::string::String) { 290 self.readable_error_id = v; 291 } 292 293 // Mutable pointer to the field. 294 // If field is not initialized, it is initialized with default value first. mut_readable_error_id(&mut self) -> &mut ::std::string::String295 pub fn mut_readable_error_id(&mut self) -> &mut ::std::string::String { 296 &mut self.readable_error_id 297 } 298 299 // Take field take_readable_error_id(&mut self) -> ::std::string::String300 pub fn take_readable_error_id(&mut self) -> ::std::string::String { 301 ::std::mem::replace(&mut self.readable_error_id, ::std::string::String::new()) 302 } 303 304 // .user_data_auth.PrimaryAction primary_action = 3; 305 306 get_primary_action(&self) -> PrimaryAction307 pub fn get_primary_action(&self) -> PrimaryAction { 308 self.primary_action 309 } clear_primary_action(&mut self)310 pub fn clear_primary_action(&mut self) { 311 self.primary_action = PrimaryAction::PRIMARY_NO_ERROR; 312 } 313 314 // Param is passed by value, moved set_primary_action(&mut self, v: PrimaryAction)315 pub fn set_primary_action(&mut self, v: PrimaryAction) { 316 self.primary_action = v; 317 } 318 319 // repeated .user_data_auth.PossibleAction possible_actions = 4; 320 321 get_possible_actions(&self) -> &[PossibleAction]322 pub fn get_possible_actions(&self) -> &[PossibleAction] { 323 &self.possible_actions 324 } clear_possible_actions(&mut self)325 pub fn clear_possible_actions(&mut self) { 326 self.possible_actions.clear(); 327 } 328 329 // Param is passed by value, moved set_possible_actions(&mut self, v: ::std::vec::Vec<PossibleAction>)330 pub fn set_possible_actions(&mut self, v: ::std::vec::Vec<PossibleAction>) { 331 self.possible_actions = v; 332 } 333 334 // Mutable pointer to the field. mut_possible_actions(&mut self) -> &mut ::std::vec::Vec<PossibleAction>335 pub fn mut_possible_actions(&mut self) -> &mut ::std::vec::Vec<PossibleAction> { 336 &mut self.possible_actions 337 } 338 339 // Take field take_possible_actions(&mut self) -> ::std::vec::Vec<PossibleAction>340 pub fn take_possible_actions(&mut self) -> ::std::vec::Vec<PossibleAction> { 341 ::std::mem::replace(&mut self.possible_actions, ::std::vec::Vec::new()) 342 } 343 } 344 345 impl ::protobuf::Message for CryptohomeErrorInfo { is_initialized(&self) -> bool346 fn is_initialized(&self) -> bool { 347 true 348 } 349 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>350 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 351 while !is.eof()? { 352 let (field_number, wire_type) = is.read_tag_unpack()?; 353 match field_number { 354 1 => { 355 ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.error_id)?; 356 }, 357 2 => { 358 ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.readable_error_id)?; 359 }, 360 3 => { 361 ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.primary_action, 3, &mut self.unknown_fields)? 362 }, 363 4 => { 364 ::protobuf::rt::read_repeated_enum_with_unknown_fields_into(wire_type, is, &mut self.possible_actions, 4, &mut self.unknown_fields)? 365 }, 366 _ => { 367 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 368 }, 369 }; 370 } 371 ::std::result::Result::Ok(()) 372 } 373 374 // Compute sizes of nested messages 375 #[allow(unused_variables)] compute_size(&self) -> u32376 fn compute_size(&self) -> u32 { 377 let mut my_size = 0; 378 if !self.error_id.is_empty() { 379 my_size += ::protobuf::rt::string_size(1, &self.error_id); 380 } 381 if !self.readable_error_id.is_empty() { 382 my_size += ::protobuf::rt::string_size(2, &self.readable_error_id); 383 } 384 if self.primary_action != PrimaryAction::PRIMARY_NO_ERROR { 385 my_size += ::protobuf::rt::enum_size(3, self.primary_action); 386 } 387 for value in &self.possible_actions { 388 my_size += ::protobuf::rt::enum_size(4, *value); 389 }; 390 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 391 self.cached_size.set(my_size); 392 my_size 393 } 394 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>395 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 396 if !self.error_id.is_empty() { 397 os.write_string(1, &self.error_id)?; 398 } 399 if !self.readable_error_id.is_empty() { 400 os.write_string(2, &self.readable_error_id)?; 401 } 402 if self.primary_action != PrimaryAction::PRIMARY_NO_ERROR { 403 os.write_enum(3, ::protobuf::ProtobufEnum::value(&self.primary_action))?; 404 } 405 for v in &self.possible_actions { 406 os.write_enum(4, ::protobuf::ProtobufEnum::value(v))?; 407 }; 408 os.write_unknown_fields(self.get_unknown_fields())?; 409 ::std::result::Result::Ok(()) 410 } 411 get_cached_size(&self) -> u32412 fn get_cached_size(&self) -> u32 { 413 self.cached_size.get() 414 } 415 get_unknown_fields(&self) -> &::protobuf::UnknownFields416 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 417 &self.unknown_fields 418 } 419 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields420 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 421 &mut self.unknown_fields 422 } 423 as_any(&self) -> &dyn (::std::any::Any)424 fn as_any(&self) -> &dyn (::std::any::Any) { 425 self as &dyn (::std::any::Any) 426 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)427 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 428 self as &mut dyn (::std::any::Any) 429 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>430 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 431 self 432 } 433 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor434 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 435 Self::descriptor_static() 436 } 437 new() -> CryptohomeErrorInfo438 fn new() -> CryptohomeErrorInfo { 439 CryptohomeErrorInfo::new() 440 } 441 default_instance() -> &'static CryptohomeErrorInfo442 fn default_instance() -> &'static CryptohomeErrorInfo { 443 static instance: ::protobuf::rt::LazyV2<CryptohomeErrorInfo> = ::protobuf::rt::LazyV2::INIT; 444 instance.get(CryptohomeErrorInfo::new) 445 } 446 } 447 448 impl ::protobuf::Clear for CryptohomeErrorInfo { clear(&mut self)449 fn clear(&mut self) { 450 self.error_id.clear(); 451 self.readable_error_id.clear(); 452 self.primary_action = PrimaryAction::PRIMARY_NO_ERROR; 453 self.possible_actions.clear(); 454 self.unknown_fields.clear(); 455 } 456 } 457 458 impl ::protobuf::reflect::ProtobufValue for CryptohomeErrorInfo { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef459 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 460 ::protobuf::reflect::ReflectValueRef::Message(self) 461 } 462 } 463 464 #[derive(PartialEq,Clone,Default,Debug)] 465 pub struct IsMountedRequest { 466 // message fields 467 pub username: ::std::string::String, 468 // special fields 469 pub unknown_fields: ::protobuf::UnknownFields, 470 pub cached_size: ::protobuf::CachedSize, 471 } 472 473 impl<'a> ::std::default::Default for &'a IsMountedRequest { default() -> &'a IsMountedRequest474 fn default() -> &'a IsMountedRequest { 475 <IsMountedRequest as ::protobuf::Message>::default_instance() 476 } 477 } 478 479 impl IsMountedRequest { new() -> IsMountedRequest480 pub fn new() -> IsMountedRequest { 481 ::std::default::Default::default() 482 } 483 484 // string username = 1; 485 486 get_username(&self) -> &str487 pub fn get_username(&self) -> &str { 488 &self.username 489 } clear_username(&mut self)490 pub fn clear_username(&mut self) { 491 self.username.clear(); 492 } 493 494 // Param is passed by value, moved set_username(&mut self, v: ::std::string::String)495 pub fn set_username(&mut self, v: ::std::string::String) { 496 self.username = v; 497 } 498 499 // Mutable pointer to the field. 500 // If field is not initialized, it is initialized with default value first. mut_username(&mut self) -> &mut ::std::string::String501 pub fn mut_username(&mut self) -> &mut ::std::string::String { 502 &mut self.username 503 } 504 505 // Take field take_username(&mut self) -> ::std::string::String506 pub fn take_username(&mut self) -> ::std::string::String { 507 ::std::mem::replace(&mut self.username, ::std::string::String::new()) 508 } 509 } 510 511 impl ::protobuf::Message for IsMountedRequest { is_initialized(&self) -> bool512 fn is_initialized(&self) -> bool { 513 true 514 } 515 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>516 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 517 while !is.eof()? { 518 let (field_number, wire_type) = is.read_tag_unpack()?; 519 match field_number { 520 1 => { 521 ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.username)?; 522 }, 523 _ => { 524 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 525 }, 526 }; 527 } 528 ::std::result::Result::Ok(()) 529 } 530 531 // Compute sizes of nested messages 532 #[allow(unused_variables)] compute_size(&self) -> u32533 fn compute_size(&self) -> u32 { 534 let mut my_size = 0; 535 if !self.username.is_empty() { 536 my_size += ::protobuf::rt::string_size(1, &self.username); 537 } 538 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 539 self.cached_size.set(my_size); 540 my_size 541 } 542 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>543 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 544 if !self.username.is_empty() { 545 os.write_string(1, &self.username)?; 546 } 547 os.write_unknown_fields(self.get_unknown_fields())?; 548 ::std::result::Result::Ok(()) 549 } 550 get_cached_size(&self) -> u32551 fn get_cached_size(&self) -> u32 { 552 self.cached_size.get() 553 } 554 get_unknown_fields(&self) -> &::protobuf::UnknownFields555 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 556 &self.unknown_fields 557 } 558 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields559 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 560 &mut self.unknown_fields 561 } 562 as_any(&self) -> &dyn (::std::any::Any)563 fn as_any(&self) -> &dyn (::std::any::Any) { 564 self as &dyn (::std::any::Any) 565 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)566 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 567 self as &mut dyn (::std::any::Any) 568 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>569 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 570 self 571 } 572 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor573 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 574 Self::descriptor_static() 575 } 576 new() -> IsMountedRequest577 fn new() -> IsMountedRequest { 578 IsMountedRequest::new() 579 } 580 default_instance() -> &'static IsMountedRequest581 fn default_instance() -> &'static IsMountedRequest { 582 static instance: ::protobuf::rt::LazyV2<IsMountedRequest> = ::protobuf::rt::LazyV2::INIT; 583 instance.get(IsMountedRequest::new) 584 } 585 } 586 587 impl ::protobuf::Clear for IsMountedRequest { clear(&mut self)588 fn clear(&mut self) { 589 self.username.clear(); 590 self.unknown_fields.clear(); 591 } 592 } 593 594 impl ::protobuf::reflect::ProtobufValue for IsMountedRequest { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef595 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 596 ::protobuf::reflect::ReflectValueRef::Message(self) 597 } 598 } 599 600 #[derive(PartialEq,Clone,Default,Debug)] 601 pub struct IsMountedReply { 602 // message fields 603 pub is_mounted: bool, 604 pub is_ephemeral_mount: bool, 605 // special fields 606 pub unknown_fields: ::protobuf::UnknownFields, 607 pub cached_size: ::protobuf::CachedSize, 608 } 609 610 impl<'a> ::std::default::Default for &'a IsMountedReply { default() -> &'a IsMountedReply611 fn default() -> &'a IsMountedReply { 612 <IsMountedReply as ::protobuf::Message>::default_instance() 613 } 614 } 615 616 impl IsMountedReply { new() -> IsMountedReply617 pub fn new() -> IsMountedReply { 618 ::std::default::Default::default() 619 } 620 621 // bool is_mounted = 1; 622 623 get_is_mounted(&self) -> bool624 pub fn get_is_mounted(&self) -> bool { 625 self.is_mounted 626 } clear_is_mounted(&mut self)627 pub fn clear_is_mounted(&mut self) { 628 self.is_mounted = false; 629 } 630 631 // Param is passed by value, moved set_is_mounted(&mut self, v: bool)632 pub fn set_is_mounted(&mut self, v: bool) { 633 self.is_mounted = v; 634 } 635 636 // bool is_ephemeral_mount = 2; 637 638 get_is_ephemeral_mount(&self) -> bool639 pub fn get_is_ephemeral_mount(&self) -> bool { 640 self.is_ephemeral_mount 641 } clear_is_ephemeral_mount(&mut self)642 pub fn clear_is_ephemeral_mount(&mut self) { 643 self.is_ephemeral_mount = false; 644 } 645 646 // Param is passed by value, moved set_is_ephemeral_mount(&mut self, v: bool)647 pub fn set_is_ephemeral_mount(&mut self, v: bool) { 648 self.is_ephemeral_mount = v; 649 } 650 } 651 652 impl ::protobuf::Message for IsMountedReply { is_initialized(&self) -> bool653 fn is_initialized(&self) -> bool { 654 true 655 } 656 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>657 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 658 while !is.eof()? { 659 let (field_number, wire_type) = is.read_tag_unpack()?; 660 match field_number { 661 1 => { 662 if wire_type != ::protobuf::wire_format::WireTypeVarint { 663 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); 664 } 665 let tmp = is.read_bool()?; 666 self.is_mounted = tmp; 667 }, 668 2 => { 669 if wire_type != ::protobuf::wire_format::WireTypeVarint { 670 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); 671 } 672 let tmp = is.read_bool()?; 673 self.is_ephemeral_mount = tmp; 674 }, 675 _ => { 676 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 677 }, 678 }; 679 } 680 ::std::result::Result::Ok(()) 681 } 682 683 // Compute sizes of nested messages 684 #[allow(unused_variables)] compute_size(&self) -> u32685 fn compute_size(&self) -> u32 { 686 let mut my_size = 0; 687 if self.is_mounted != false { 688 my_size += 2; 689 } 690 if self.is_ephemeral_mount != false { 691 my_size += 2; 692 } 693 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 694 self.cached_size.set(my_size); 695 my_size 696 } 697 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>698 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 699 if self.is_mounted != false { 700 os.write_bool(1, self.is_mounted)?; 701 } 702 if self.is_ephemeral_mount != false { 703 os.write_bool(2, self.is_ephemeral_mount)?; 704 } 705 os.write_unknown_fields(self.get_unknown_fields())?; 706 ::std::result::Result::Ok(()) 707 } 708 get_cached_size(&self) -> u32709 fn get_cached_size(&self) -> u32 { 710 self.cached_size.get() 711 } 712 get_unknown_fields(&self) -> &::protobuf::UnknownFields713 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 714 &self.unknown_fields 715 } 716 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields717 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 718 &mut self.unknown_fields 719 } 720 as_any(&self) -> &dyn (::std::any::Any)721 fn as_any(&self) -> &dyn (::std::any::Any) { 722 self as &dyn (::std::any::Any) 723 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)724 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 725 self as &mut dyn (::std::any::Any) 726 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>727 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 728 self 729 } 730 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor731 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 732 Self::descriptor_static() 733 } 734 new() -> IsMountedReply735 fn new() -> IsMountedReply { 736 IsMountedReply::new() 737 } 738 default_instance() -> &'static IsMountedReply739 fn default_instance() -> &'static IsMountedReply { 740 static instance: ::protobuf::rt::LazyV2<IsMountedReply> = ::protobuf::rt::LazyV2::INIT; 741 instance.get(IsMountedReply::new) 742 } 743 } 744 745 impl ::protobuf::Clear for IsMountedReply { clear(&mut self)746 fn clear(&mut self) { 747 self.is_mounted = false; 748 self.is_ephemeral_mount = false; 749 self.unknown_fields.clear(); 750 } 751 } 752 753 impl ::protobuf::reflect::ProtobufValue for IsMountedReply { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef754 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 755 ::protobuf::reflect::ReflectValueRef::Message(self) 756 } 757 } 758 759 #[derive(PartialEq,Clone,Default,Debug)] 760 pub struct UnmountRequest { 761 // special fields 762 pub unknown_fields: ::protobuf::UnknownFields, 763 pub cached_size: ::protobuf::CachedSize, 764 } 765 766 impl<'a> ::std::default::Default for &'a UnmountRequest { default() -> &'a UnmountRequest767 fn default() -> &'a UnmountRequest { 768 <UnmountRequest as ::protobuf::Message>::default_instance() 769 } 770 } 771 772 impl UnmountRequest { new() -> UnmountRequest773 pub fn new() -> UnmountRequest { 774 ::std::default::Default::default() 775 } 776 } 777 778 impl ::protobuf::Message for UnmountRequest { is_initialized(&self) -> bool779 fn is_initialized(&self) -> bool { 780 true 781 } 782 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>783 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 784 while !is.eof()? { 785 let (field_number, wire_type) = is.read_tag_unpack()?; 786 match field_number { 787 _ => { 788 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 789 }, 790 }; 791 } 792 ::std::result::Result::Ok(()) 793 } 794 795 // Compute sizes of nested messages 796 #[allow(unused_variables)] compute_size(&self) -> u32797 fn compute_size(&self) -> u32 { 798 let mut my_size = 0; 799 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 800 self.cached_size.set(my_size); 801 my_size 802 } 803 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>804 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 805 os.write_unknown_fields(self.get_unknown_fields())?; 806 ::std::result::Result::Ok(()) 807 } 808 get_cached_size(&self) -> u32809 fn get_cached_size(&self) -> u32 { 810 self.cached_size.get() 811 } 812 get_unknown_fields(&self) -> &::protobuf::UnknownFields813 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 814 &self.unknown_fields 815 } 816 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields817 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 818 &mut self.unknown_fields 819 } 820 as_any(&self) -> &dyn (::std::any::Any)821 fn as_any(&self) -> &dyn (::std::any::Any) { 822 self as &dyn (::std::any::Any) 823 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)824 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 825 self as &mut dyn (::std::any::Any) 826 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>827 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 828 self 829 } 830 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor831 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 832 Self::descriptor_static() 833 } 834 new() -> UnmountRequest835 fn new() -> UnmountRequest { 836 UnmountRequest::new() 837 } 838 default_instance() -> &'static UnmountRequest839 fn default_instance() -> &'static UnmountRequest { 840 static instance: ::protobuf::rt::LazyV2<UnmountRequest> = ::protobuf::rt::LazyV2::INIT; 841 instance.get(UnmountRequest::new) 842 } 843 } 844 845 impl ::protobuf::Clear for UnmountRequest { clear(&mut self)846 fn clear(&mut self) { 847 self.unknown_fields.clear(); 848 } 849 } 850 851 impl ::protobuf::reflect::ProtobufValue for UnmountRequest { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef852 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 853 ::protobuf::reflect::ReflectValueRef::Message(self) 854 } 855 } 856 857 #[derive(PartialEq,Clone,Default,Debug)] 858 pub struct UnmountReply { 859 // message fields 860 pub error: CryptohomeErrorCode, 861 pub error_info: ::protobuf::SingularPtrField<CryptohomeErrorInfo>, 862 // special fields 863 pub unknown_fields: ::protobuf::UnknownFields, 864 pub cached_size: ::protobuf::CachedSize, 865 } 866 867 impl<'a> ::std::default::Default for &'a UnmountReply { default() -> &'a UnmountReply868 fn default() -> &'a UnmountReply { 869 <UnmountReply as ::protobuf::Message>::default_instance() 870 } 871 } 872 873 impl UnmountReply { new() -> UnmountReply874 pub fn new() -> UnmountReply { 875 ::std::default::Default::default() 876 } 877 878 // .user_data_auth.CryptohomeErrorCode error = 1; 879 880 get_error(&self) -> CryptohomeErrorCode881 pub fn get_error(&self) -> CryptohomeErrorCode { 882 self.error 883 } clear_error(&mut self)884 pub fn clear_error(&mut self) { 885 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 886 } 887 888 // Param is passed by value, moved set_error(&mut self, v: CryptohomeErrorCode)889 pub fn set_error(&mut self, v: CryptohomeErrorCode) { 890 self.error = v; 891 } 892 893 // .user_data_auth.CryptohomeErrorInfo error_info = 2; 894 895 get_error_info(&self) -> &CryptohomeErrorInfo896 pub fn get_error_info(&self) -> &CryptohomeErrorInfo { 897 self.error_info.as_ref().unwrap_or_else(|| <CryptohomeErrorInfo as ::protobuf::Message>::default_instance()) 898 } clear_error_info(&mut self)899 pub fn clear_error_info(&mut self) { 900 self.error_info.clear(); 901 } 902 has_error_info(&self) -> bool903 pub fn has_error_info(&self) -> bool { 904 self.error_info.is_some() 905 } 906 907 // Param is passed by value, moved set_error_info(&mut self, v: CryptohomeErrorInfo)908 pub fn set_error_info(&mut self, v: CryptohomeErrorInfo) { 909 self.error_info = ::protobuf::SingularPtrField::some(v); 910 } 911 912 // Mutable pointer to the field. 913 // If field is not initialized, it is initialized with default value first. mut_error_info(&mut self) -> &mut CryptohomeErrorInfo914 pub fn mut_error_info(&mut self) -> &mut CryptohomeErrorInfo { 915 if self.error_info.is_none() { 916 self.error_info.set_default(); 917 } 918 self.error_info.as_mut().unwrap() 919 } 920 921 // Take field take_error_info(&mut self) -> CryptohomeErrorInfo922 pub fn take_error_info(&mut self) -> CryptohomeErrorInfo { 923 self.error_info.take().unwrap_or_else(|| CryptohomeErrorInfo::new()) 924 } 925 } 926 927 impl ::protobuf::Message for UnmountReply { is_initialized(&self) -> bool928 fn is_initialized(&self) -> bool { 929 for v in &self.error_info { 930 if !v.is_initialized() { 931 return false; 932 } 933 }; 934 true 935 } 936 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>937 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 938 while !is.eof()? { 939 let (field_number, wire_type) = is.read_tag_unpack()?; 940 match field_number { 941 1 => { 942 ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? 943 }, 944 2 => { 945 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.error_info)?; 946 }, 947 _ => { 948 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 949 }, 950 }; 951 } 952 ::std::result::Result::Ok(()) 953 } 954 955 // Compute sizes of nested messages 956 #[allow(unused_variables)] compute_size(&self) -> u32957 fn compute_size(&self) -> u32 { 958 let mut my_size = 0; 959 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 960 my_size += ::protobuf::rt::enum_size(1, self.error); 961 } 962 if let Some(ref v) = self.error_info.as_ref() { 963 let len = v.compute_size(); 964 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 965 } 966 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 967 self.cached_size.set(my_size); 968 my_size 969 } 970 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>971 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 972 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 973 os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; 974 } 975 if let Some(ref v) = self.error_info.as_ref() { 976 os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; 977 os.write_raw_varint32(v.get_cached_size())?; 978 v.write_to_with_cached_sizes(os)?; 979 } 980 os.write_unknown_fields(self.get_unknown_fields())?; 981 ::std::result::Result::Ok(()) 982 } 983 get_cached_size(&self) -> u32984 fn get_cached_size(&self) -> u32 { 985 self.cached_size.get() 986 } 987 get_unknown_fields(&self) -> &::protobuf::UnknownFields988 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 989 &self.unknown_fields 990 } 991 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields992 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 993 &mut self.unknown_fields 994 } 995 as_any(&self) -> &dyn (::std::any::Any)996 fn as_any(&self) -> &dyn (::std::any::Any) { 997 self as &dyn (::std::any::Any) 998 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)999 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 1000 self as &mut dyn (::std::any::Any) 1001 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>1002 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 1003 self 1004 } 1005 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor1006 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 1007 Self::descriptor_static() 1008 } 1009 new() -> UnmountReply1010 fn new() -> UnmountReply { 1011 UnmountReply::new() 1012 } 1013 default_instance() -> &'static UnmountReply1014 fn default_instance() -> &'static UnmountReply { 1015 static instance: ::protobuf::rt::LazyV2<UnmountReply> = ::protobuf::rt::LazyV2::INIT; 1016 instance.get(UnmountReply::new) 1017 } 1018 } 1019 1020 impl ::protobuf::Clear for UnmountReply { clear(&mut self)1021 fn clear(&mut self) { 1022 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 1023 self.error_info.clear(); 1024 self.unknown_fields.clear(); 1025 } 1026 } 1027 1028 impl ::protobuf::reflect::ProtobufValue for UnmountReply { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef1029 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 1030 ::protobuf::reflect::ReflectValueRef::Message(self) 1031 } 1032 } 1033 1034 #[derive(PartialEq,Clone,Default,Debug)] 1035 pub struct MountRequest { 1036 // message fields 1037 pub account: ::protobuf::SingularPtrField<super::rpc::AccountIdentifier>, 1038 pub authorization: ::protobuf::SingularPtrField<super::rpc::AuthorizationRequest>, 1039 pub require_ephemeral: bool, 1040 pub create: ::protobuf::SingularPtrField<CreateRequest>, 1041 pub force_dircrypto_if_available: bool, 1042 pub to_migrate_from_ecryptfs: bool, 1043 pub public_mount: bool, 1044 pub guest_mount: bool, 1045 pub auth_session_id: ::std::vec::Vec<u8>, 1046 // special fields 1047 pub unknown_fields: ::protobuf::UnknownFields, 1048 pub cached_size: ::protobuf::CachedSize, 1049 } 1050 1051 impl<'a> ::std::default::Default for &'a MountRequest { default() -> &'a MountRequest1052 fn default() -> &'a MountRequest { 1053 <MountRequest as ::protobuf::Message>::default_instance() 1054 } 1055 } 1056 1057 impl MountRequest { new() -> MountRequest1058 pub fn new() -> MountRequest { 1059 ::std::default::Default::default() 1060 } 1061 1062 // .cryptohome.AccountIdentifier account = 1; 1063 1064 get_account(&self) -> &super::rpc::AccountIdentifier1065 pub fn get_account(&self) -> &super::rpc::AccountIdentifier { 1066 self.account.as_ref().unwrap_or_else(|| <super::rpc::AccountIdentifier as ::protobuf::Message>::default_instance()) 1067 } clear_account(&mut self)1068 pub fn clear_account(&mut self) { 1069 self.account.clear(); 1070 } 1071 has_account(&self) -> bool1072 pub fn has_account(&self) -> bool { 1073 self.account.is_some() 1074 } 1075 1076 // Param is passed by value, moved set_account(&mut self, v: super::rpc::AccountIdentifier)1077 pub fn set_account(&mut self, v: super::rpc::AccountIdentifier) { 1078 self.account = ::protobuf::SingularPtrField::some(v); 1079 } 1080 1081 // Mutable pointer to the field. 1082 // If field is not initialized, it is initialized with default value first. mut_account(&mut self) -> &mut super::rpc::AccountIdentifier1083 pub fn mut_account(&mut self) -> &mut super::rpc::AccountIdentifier { 1084 if self.account.is_none() { 1085 self.account.set_default(); 1086 } 1087 self.account.as_mut().unwrap() 1088 } 1089 1090 // Take field take_account(&mut self) -> super::rpc::AccountIdentifier1091 pub fn take_account(&mut self) -> super::rpc::AccountIdentifier { 1092 self.account.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) 1093 } 1094 1095 // .cryptohome.AuthorizationRequest authorization = 2; 1096 1097 get_authorization(&self) -> &super::rpc::AuthorizationRequest1098 pub fn get_authorization(&self) -> &super::rpc::AuthorizationRequest { 1099 self.authorization.as_ref().unwrap_or_else(|| <super::rpc::AuthorizationRequest as ::protobuf::Message>::default_instance()) 1100 } clear_authorization(&mut self)1101 pub fn clear_authorization(&mut self) { 1102 self.authorization.clear(); 1103 } 1104 has_authorization(&self) -> bool1105 pub fn has_authorization(&self) -> bool { 1106 self.authorization.is_some() 1107 } 1108 1109 // Param is passed by value, moved set_authorization(&mut self, v: super::rpc::AuthorizationRequest)1110 pub fn set_authorization(&mut self, v: super::rpc::AuthorizationRequest) { 1111 self.authorization = ::protobuf::SingularPtrField::some(v); 1112 } 1113 1114 // Mutable pointer to the field. 1115 // If field is not initialized, it is initialized with default value first. mut_authorization(&mut self) -> &mut super::rpc::AuthorizationRequest1116 pub fn mut_authorization(&mut self) -> &mut super::rpc::AuthorizationRequest { 1117 if self.authorization.is_none() { 1118 self.authorization.set_default(); 1119 } 1120 self.authorization.as_mut().unwrap() 1121 } 1122 1123 // Take field take_authorization(&mut self) -> super::rpc::AuthorizationRequest1124 pub fn take_authorization(&mut self) -> super::rpc::AuthorizationRequest { 1125 self.authorization.take().unwrap_or_else(|| super::rpc::AuthorizationRequest::new()) 1126 } 1127 1128 // bool require_ephemeral = 3; 1129 1130 get_require_ephemeral(&self) -> bool1131 pub fn get_require_ephemeral(&self) -> bool { 1132 self.require_ephemeral 1133 } clear_require_ephemeral(&mut self)1134 pub fn clear_require_ephemeral(&mut self) { 1135 self.require_ephemeral = false; 1136 } 1137 1138 // Param is passed by value, moved set_require_ephemeral(&mut self, v: bool)1139 pub fn set_require_ephemeral(&mut self, v: bool) { 1140 self.require_ephemeral = v; 1141 } 1142 1143 // .user_data_auth.CreateRequest create = 4; 1144 1145 get_create(&self) -> &CreateRequest1146 pub fn get_create(&self) -> &CreateRequest { 1147 self.create.as_ref().unwrap_or_else(|| <CreateRequest as ::protobuf::Message>::default_instance()) 1148 } clear_create(&mut self)1149 pub fn clear_create(&mut self) { 1150 self.create.clear(); 1151 } 1152 has_create(&self) -> bool1153 pub fn has_create(&self) -> bool { 1154 self.create.is_some() 1155 } 1156 1157 // Param is passed by value, moved set_create(&mut self, v: CreateRequest)1158 pub fn set_create(&mut self, v: CreateRequest) { 1159 self.create = ::protobuf::SingularPtrField::some(v); 1160 } 1161 1162 // Mutable pointer to the field. 1163 // If field is not initialized, it is initialized with default value first. mut_create(&mut self) -> &mut CreateRequest1164 pub fn mut_create(&mut self) -> &mut CreateRequest { 1165 if self.create.is_none() { 1166 self.create.set_default(); 1167 } 1168 self.create.as_mut().unwrap() 1169 } 1170 1171 // Take field take_create(&mut self) -> CreateRequest1172 pub fn take_create(&mut self) -> CreateRequest { 1173 self.create.take().unwrap_or_else(|| CreateRequest::new()) 1174 } 1175 1176 // bool force_dircrypto_if_available = 5; 1177 1178 get_force_dircrypto_if_available(&self) -> bool1179 pub fn get_force_dircrypto_if_available(&self) -> bool { 1180 self.force_dircrypto_if_available 1181 } clear_force_dircrypto_if_available(&mut self)1182 pub fn clear_force_dircrypto_if_available(&mut self) { 1183 self.force_dircrypto_if_available = false; 1184 } 1185 1186 // Param is passed by value, moved set_force_dircrypto_if_available(&mut self, v: bool)1187 pub fn set_force_dircrypto_if_available(&mut self, v: bool) { 1188 self.force_dircrypto_if_available = v; 1189 } 1190 1191 // bool to_migrate_from_ecryptfs = 6; 1192 1193 get_to_migrate_from_ecryptfs(&self) -> bool1194 pub fn get_to_migrate_from_ecryptfs(&self) -> bool { 1195 self.to_migrate_from_ecryptfs 1196 } clear_to_migrate_from_ecryptfs(&mut self)1197 pub fn clear_to_migrate_from_ecryptfs(&mut self) { 1198 self.to_migrate_from_ecryptfs = false; 1199 } 1200 1201 // Param is passed by value, moved set_to_migrate_from_ecryptfs(&mut self, v: bool)1202 pub fn set_to_migrate_from_ecryptfs(&mut self, v: bool) { 1203 self.to_migrate_from_ecryptfs = v; 1204 } 1205 1206 // bool public_mount = 7; 1207 1208 get_public_mount(&self) -> bool1209 pub fn get_public_mount(&self) -> bool { 1210 self.public_mount 1211 } clear_public_mount(&mut self)1212 pub fn clear_public_mount(&mut self) { 1213 self.public_mount = false; 1214 } 1215 1216 // Param is passed by value, moved set_public_mount(&mut self, v: bool)1217 pub fn set_public_mount(&mut self, v: bool) { 1218 self.public_mount = v; 1219 } 1220 1221 // bool guest_mount = 8; 1222 1223 get_guest_mount(&self) -> bool1224 pub fn get_guest_mount(&self) -> bool { 1225 self.guest_mount 1226 } clear_guest_mount(&mut self)1227 pub fn clear_guest_mount(&mut self) { 1228 self.guest_mount = false; 1229 } 1230 1231 // Param is passed by value, moved set_guest_mount(&mut self, v: bool)1232 pub fn set_guest_mount(&mut self, v: bool) { 1233 self.guest_mount = v; 1234 } 1235 1236 // bytes auth_session_id = 9; 1237 1238 get_auth_session_id(&self) -> &[u8]1239 pub fn get_auth_session_id(&self) -> &[u8] { 1240 &self.auth_session_id 1241 } clear_auth_session_id(&mut self)1242 pub fn clear_auth_session_id(&mut self) { 1243 self.auth_session_id.clear(); 1244 } 1245 1246 // Param is passed by value, moved set_auth_session_id(&mut self, v: ::std::vec::Vec<u8>)1247 pub fn set_auth_session_id(&mut self, v: ::std::vec::Vec<u8>) { 1248 self.auth_session_id = v; 1249 } 1250 1251 // Mutable pointer to the field. 1252 // If field is not initialized, it is initialized with default value first. mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec<u8>1253 pub fn mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec<u8> { 1254 &mut self.auth_session_id 1255 } 1256 1257 // Take field take_auth_session_id(&mut self) -> ::std::vec::Vec<u8>1258 pub fn take_auth_session_id(&mut self) -> ::std::vec::Vec<u8> { 1259 ::std::mem::replace(&mut self.auth_session_id, ::std::vec::Vec::new()) 1260 } 1261 } 1262 1263 impl ::protobuf::Message for MountRequest { is_initialized(&self) -> bool1264 fn is_initialized(&self) -> bool { 1265 for v in &self.account { 1266 if !v.is_initialized() { 1267 return false; 1268 } 1269 }; 1270 for v in &self.authorization { 1271 if !v.is_initialized() { 1272 return false; 1273 } 1274 }; 1275 for v in &self.create { 1276 if !v.is_initialized() { 1277 return false; 1278 } 1279 }; 1280 true 1281 } 1282 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>1283 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 1284 while !is.eof()? { 1285 let (field_number, wire_type) = is.read_tag_unpack()?; 1286 match field_number { 1287 1 => { 1288 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account)?; 1289 }, 1290 2 => { 1291 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.authorization)?; 1292 }, 1293 3 => { 1294 if wire_type != ::protobuf::wire_format::WireTypeVarint { 1295 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); 1296 } 1297 let tmp = is.read_bool()?; 1298 self.require_ephemeral = tmp; 1299 }, 1300 4 => { 1301 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.create)?; 1302 }, 1303 5 => { 1304 if wire_type != ::protobuf::wire_format::WireTypeVarint { 1305 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); 1306 } 1307 let tmp = is.read_bool()?; 1308 self.force_dircrypto_if_available = tmp; 1309 }, 1310 6 => { 1311 if wire_type != ::protobuf::wire_format::WireTypeVarint { 1312 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); 1313 } 1314 let tmp = is.read_bool()?; 1315 self.to_migrate_from_ecryptfs = tmp; 1316 }, 1317 7 => { 1318 if wire_type != ::protobuf::wire_format::WireTypeVarint { 1319 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); 1320 } 1321 let tmp = is.read_bool()?; 1322 self.public_mount = tmp; 1323 }, 1324 8 => { 1325 if wire_type != ::protobuf::wire_format::WireTypeVarint { 1326 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); 1327 } 1328 let tmp = is.read_bool()?; 1329 self.guest_mount = tmp; 1330 }, 1331 9 => { 1332 ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.auth_session_id)?; 1333 }, 1334 _ => { 1335 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 1336 }, 1337 }; 1338 } 1339 ::std::result::Result::Ok(()) 1340 } 1341 1342 // Compute sizes of nested messages 1343 #[allow(unused_variables)] compute_size(&self) -> u321344 fn compute_size(&self) -> u32 { 1345 let mut my_size = 0; 1346 if let Some(ref v) = self.account.as_ref() { 1347 let len = v.compute_size(); 1348 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 1349 } 1350 if let Some(ref v) = self.authorization.as_ref() { 1351 let len = v.compute_size(); 1352 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 1353 } 1354 if self.require_ephemeral != false { 1355 my_size += 2; 1356 } 1357 if let Some(ref v) = self.create.as_ref() { 1358 let len = v.compute_size(); 1359 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 1360 } 1361 if self.force_dircrypto_if_available != false { 1362 my_size += 2; 1363 } 1364 if self.to_migrate_from_ecryptfs != false { 1365 my_size += 2; 1366 } 1367 if self.public_mount != false { 1368 my_size += 2; 1369 } 1370 if self.guest_mount != false { 1371 my_size += 2; 1372 } 1373 if !self.auth_session_id.is_empty() { 1374 my_size += ::protobuf::rt::bytes_size(9, &self.auth_session_id); 1375 } 1376 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 1377 self.cached_size.set(my_size); 1378 my_size 1379 } 1380 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>1381 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 1382 if let Some(ref v) = self.account.as_ref() { 1383 os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; 1384 os.write_raw_varint32(v.get_cached_size())?; 1385 v.write_to_with_cached_sizes(os)?; 1386 } 1387 if let Some(ref v) = self.authorization.as_ref() { 1388 os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; 1389 os.write_raw_varint32(v.get_cached_size())?; 1390 v.write_to_with_cached_sizes(os)?; 1391 } 1392 if self.require_ephemeral != false { 1393 os.write_bool(3, self.require_ephemeral)?; 1394 } 1395 if let Some(ref v) = self.create.as_ref() { 1396 os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; 1397 os.write_raw_varint32(v.get_cached_size())?; 1398 v.write_to_with_cached_sizes(os)?; 1399 } 1400 if self.force_dircrypto_if_available != false { 1401 os.write_bool(5, self.force_dircrypto_if_available)?; 1402 } 1403 if self.to_migrate_from_ecryptfs != false { 1404 os.write_bool(6, self.to_migrate_from_ecryptfs)?; 1405 } 1406 if self.public_mount != false { 1407 os.write_bool(7, self.public_mount)?; 1408 } 1409 if self.guest_mount != false { 1410 os.write_bool(8, self.guest_mount)?; 1411 } 1412 if !self.auth_session_id.is_empty() { 1413 os.write_bytes(9, &self.auth_session_id)?; 1414 } 1415 os.write_unknown_fields(self.get_unknown_fields())?; 1416 ::std::result::Result::Ok(()) 1417 } 1418 get_cached_size(&self) -> u321419 fn get_cached_size(&self) -> u32 { 1420 self.cached_size.get() 1421 } 1422 get_unknown_fields(&self) -> &::protobuf::UnknownFields1423 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 1424 &self.unknown_fields 1425 } 1426 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields1427 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 1428 &mut self.unknown_fields 1429 } 1430 as_any(&self) -> &dyn (::std::any::Any)1431 fn as_any(&self) -> &dyn (::std::any::Any) { 1432 self as &dyn (::std::any::Any) 1433 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)1434 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 1435 self as &mut dyn (::std::any::Any) 1436 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>1437 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 1438 self 1439 } 1440 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor1441 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 1442 Self::descriptor_static() 1443 } 1444 new() -> MountRequest1445 fn new() -> MountRequest { 1446 MountRequest::new() 1447 } 1448 default_instance() -> &'static MountRequest1449 fn default_instance() -> &'static MountRequest { 1450 static instance: ::protobuf::rt::LazyV2<MountRequest> = ::protobuf::rt::LazyV2::INIT; 1451 instance.get(MountRequest::new) 1452 } 1453 } 1454 1455 impl ::protobuf::Clear for MountRequest { clear(&mut self)1456 fn clear(&mut self) { 1457 self.account.clear(); 1458 self.authorization.clear(); 1459 self.require_ephemeral = false; 1460 self.create.clear(); 1461 self.force_dircrypto_if_available = false; 1462 self.to_migrate_from_ecryptfs = false; 1463 self.public_mount = false; 1464 self.guest_mount = false; 1465 self.auth_session_id.clear(); 1466 self.unknown_fields.clear(); 1467 } 1468 } 1469 1470 impl ::protobuf::reflect::ProtobufValue for MountRequest { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef1471 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 1472 ::protobuf::reflect::ReflectValueRef::Message(self) 1473 } 1474 } 1475 1476 #[derive(PartialEq,Clone,Default,Debug)] 1477 pub struct MountReply { 1478 // message fields 1479 pub error: CryptohomeErrorCode, 1480 pub recreated: bool, 1481 pub sanitized_username: ::std::string::String, 1482 pub error_info: ::protobuf::SingularPtrField<CryptohomeErrorInfo>, 1483 // special fields 1484 pub unknown_fields: ::protobuf::UnknownFields, 1485 pub cached_size: ::protobuf::CachedSize, 1486 } 1487 1488 impl<'a> ::std::default::Default for &'a MountReply { default() -> &'a MountReply1489 fn default() -> &'a MountReply { 1490 <MountReply as ::protobuf::Message>::default_instance() 1491 } 1492 } 1493 1494 impl MountReply { new() -> MountReply1495 pub fn new() -> MountReply { 1496 ::std::default::Default::default() 1497 } 1498 1499 // .user_data_auth.CryptohomeErrorCode error = 1; 1500 1501 get_error(&self) -> CryptohomeErrorCode1502 pub fn get_error(&self) -> CryptohomeErrorCode { 1503 self.error 1504 } clear_error(&mut self)1505 pub fn clear_error(&mut self) { 1506 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 1507 } 1508 1509 // Param is passed by value, moved set_error(&mut self, v: CryptohomeErrorCode)1510 pub fn set_error(&mut self, v: CryptohomeErrorCode) { 1511 self.error = v; 1512 } 1513 1514 // bool recreated = 2; 1515 1516 get_recreated(&self) -> bool1517 pub fn get_recreated(&self) -> bool { 1518 self.recreated 1519 } clear_recreated(&mut self)1520 pub fn clear_recreated(&mut self) { 1521 self.recreated = false; 1522 } 1523 1524 // Param is passed by value, moved set_recreated(&mut self, v: bool)1525 pub fn set_recreated(&mut self, v: bool) { 1526 self.recreated = v; 1527 } 1528 1529 // string sanitized_username = 3; 1530 1531 get_sanitized_username(&self) -> &str1532 pub fn get_sanitized_username(&self) -> &str { 1533 &self.sanitized_username 1534 } clear_sanitized_username(&mut self)1535 pub fn clear_sanitized_username(&mut self) { 1536 self.sanitized_username.clear(); 1537 } 1538 1539 // Param is passed by value, moved set_sanitized_username(&mut self, v: ::std::string::String)1540 pub fn set_sanitized_username(&mut self, v: ::std::string::String) { 1541 self.sanitized_username = v; 1542 } 1543 1544 // Mutable pointer to the field. 1545 // If field is not initialized, it is initialized with default value first. mut_sanitized_username(&mut self) -> &mut ::std::string::String1546 pub fn mut_sanitized_username(&mut self) -> &mut ::std::string::String { 1547 &mut self.sanitized_username 1548 } 1549 1550 // Take field take_sanitized_username(&mut self) -> ::std::string::String1551 pub fn take_sanitized_username(&mut self) -> ::std::string::String { 1552 ::std::mem::replace(&mut self.sanitized_username, ::std::string::String::new()) 1553 } 1554 1555 // .user_data_auth.CryptohomeErrorInfo error_info = 4; 1556 1557 get_error_info(&self) -> &CryptohomeErrorInfo1558 pub fn get_error_info(&self) -> &CryptohomeErrorInfo { 1559 self.error_info.as_ref().unwrap_or_else(|| <CryptohomeErrorInfo as ::protobuf::Message>::default_instance()) 1560 } clear_error_info(&mut self)1561 pub fn clear_error_info(&mut self) { 1562 self.error_info.clear(); 1563 } 1564 has_error_info(&self) -> bool1565 pub fn has_error_info(&self) -> bool { 1566 self.error_info.is_some() 1567 } 1568 1569 // Param is passed by value, moved set_error_info(&mut self, v: CryptohomeErrorInfo)1570 pub fn set_error_info(&mut self, v: CryptohomeErrorInfo) { 1571 self.error_info = ::protobuf::SingularPtrField::some(v); 1572 } 1573 1574 // Mutable pointer to the field. 1575 // If field is not initialized, it is initialized with default value first. mut_error_info(&mut self) -> &mut CryptohomeErrorInfo1576 pub fn mut_error_info(&mut self) -> &mut CryptohomeErrorInfo { 1577 if self.error_info.is_none() { 1578 self.error_info.set_default(); 1579 } 1580 self.error_info.as_mut().unwrap() 1581 } 1582 1583 // Take field take_error_info(&mut self) -> CryptohomeErrorInfo1584 pub fn take_error_info(&mut self) -> CryptohomeErrorInfo { 1585 self.error_info.take().unwrap_or_else(|| CryptohomeErrorInfo::new()) 1586 } 1587 } 1588 1589 impl ::protobuf::Message for MountReply { is_initialized(&self) -> bool1590 fn is_initialized(&self) -> bool { 1591 for v in &self.error_info { 1592 if !v.is_initialized() { 1593 return false; 1594 } 1595 }; 1596 true 1597 } 1598 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>1599 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 1600 while !is.eof()? { 1601 let (field_number, wire_type) = is.read_tag_unpack()?; 1602 match field_number { 1603 1 => { 1604 ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? 1605 }, 1606 2 => { 1607 if wire_type != ::protobuf::wire_format::WireTypeVarint { 1608 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); 1609 } 1610 let tmp = is.read_bool()?; 1611 self.recreated = tmp; 1612 }, 1613 3 => { 1614 ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sanitized_username)?; 1615 }, 1616 4 => { 1617 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.error_info)?; 1618 }, 1619 _ => { 1620 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 1621 }, 1622 }; 1623 } 1624 ::std::result::Result::Ok(()) 1625 } 1626 1627 // Compute sizes of nested messages 1628 #[allow(unused_variables)] compute_size(&self) -> u321629 fn compute_size(&self) -> u32 { 1630 let mut my_size = 0; 1631 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 1632 my_size += ::protobuf::rt::enum_size(1, self.error); 1633 } 1634 if self.recreated != false { 1635 my_size += 2; 1636 } 1637 if !self.sanitized_username.is_empty() { 1638 my_size += ::protobuf::rt::string_size(3, &self.sanitized_username); 1639 } 1640 if let Some(ref v) = self.error_info.as_ref() { 1641 let len = v.compute_size(); 1642 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 1643 } 1644 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 1645 self.cached_size.set(my_size); 1646 my_size 1647 } 1648 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>1649 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 1650 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 1651 os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; 1652 } 1653 if self.recreated != false { 1654 os.write_bool(2, self.recreated)?; 1655 } 1656 if !self.sanitized_username.is_empty() { 1657 os.write_string(3, &self.sanitized_username)?; 1658 } 1659 if let Some(ref v) = self.error_info.as_ref() { 1660 os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; 1661 os.write_raw_varint32(v.get_cached_size())?; 1662 v.write_to_with_cached_sizes(os)?; 1663 } 1664 os.write_unknown_fields(self.get_unknown_fields())?; 1665 ::std::result::Result::Ok(()) 1666 } 1667 get_cached_size(&self) -> u321668 fn get_cached_size(&self) -> u32 { 1669 self.cached_size.get() 1670 } 1671 get_unknown_fields(&self) -> &::protobuf::UnknownFields1672 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 1673 &self.unknown_fields 1674 } 1675 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields1676 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 1677 &mut self.unknown_fields 1678 } 1679 as_any(&self) -> &dyn (::std::any::Any)1680 fn as_any(&self) -> &dyn (::std::any::Any) { 1681 self as &dyn (::std::any::Any) 1682 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)1683 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 1684 self as &mut dyn (::std::any::Any) 1685 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>1686 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 1687 self 1688 } 1689 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor1690 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 1691 Self::descriptor_static() 1692 } 1693 new() -> MountReply1694 fn new() -> MountReply { 1695 MountReply::new() 1696 } 1697 default_instance() -> &'static MountReply1698 fn default_instance() -> &'static MountReply { 1699 static instance: ::protobuf::rt::LazyV2<MountReply> = ::protobuf::rt::LazyV2::INIT; 1700 instance.get(MountReply::new) 1701 } 1702 } 1703 1704 impl ::protobuf::Clear for MountReply { clear(&mut self)1705 fn clear(&mut self) { 1706 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 1707 self.recreated = false; 1708 self.sanitized_username.clear(); 1709 self.error_info.clear(); 1710 self.unknown_fields.clear(); 1711 } 1712 } 1713 1714 impl ::protobuf::reflect::ProtobufValue for MountReply { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef1715 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 1716 ::protobuf::reflect::ReflectValueRef::Message(self) 1717 } 1718 } 1719 1720 #[derive(PartialEq,Clone,Default,Debug)] 1721 pub struct RemoveRequest { 1722 // message fields 1723 pub identifier: ::protobuf::SingularPtrField<super::rpc::AccountIdentifier>, 1724 pub auth_session_id: ::std::vec::Vec<u8>, 1725 // special fields 1726 pub unknown_fields: ::protobuf::UnknownFields, 1727 pub cached_size: ::protobuf::CachedSize, 1728 } 1729 1730 impl<'a> ::std::default::Default for &'a RemoveRequest { default() -> &'a RemoveRequest1731 fn default() -> &'a RemoveRequest { 1732 <RemoveRequest as ::protobuf::Message>::default_instance() 1733 } 1734 } 1735 1736 impl RemoveRequest { new() -> RemoveRequest1737 pub fn new() -> RemoveRequest { 1738 ::std::default::Default::default() 1739 } 1740 1741 // .cryptohome.AccountIdentifier identifier = 1; 1742 1743 get_identifier(&self) -> &super::rpc::AccountIdentifier1744 pub fn get_identifier(&self) -> &super::rpc::AccountIdentifier { 1745 self.identifier.as_ref().unwrap_or_else(|| <super::rpc::AccountIdentifier as ::protobuf::Message>::default_instance()) 1746 } clear_identifier(&mut self)1747 pub fn clear_identifier(&mut self) { 1748 self.identifier.clear(); 1749 } 1750 has_identifier(&self) -> bool1751 pub fn has_identifier(&self) -> bool { 1752 self.identifier.is_some() 1753 } 1754 1755 // Param is passed by value, moved set_identifier(&mut self, v: super::rpc::AccountIdentifier)1756 pub fn set_identifier(&mut self, v: super::rpc::AccountIdentifier) { 1757 self.identifier = ::protobuf::SingularPtrField::some(v); 1758 } 1759 1760 // Mutable pointer to the field. 1761 // If field is not initialized, it is initialized with default value first. mut_identifier(&mut self) -> &mut super::rpc::AccountIdentifier1762 pub fn mut_identifier(&mut self) -> &mut super::rpc::AccountIdentifier { 1763 if self.identifier.is_none() { 1764 self.identifier.set_default(); 1765 } 1766 self.identifier.as_mut().unwrap() 1767 } 1768 1769 // Take field take_identifier(&mut self) -> super::rpc::AccountIdentifier1770 pub fn take_identifier(&mut self) -> super::rpc::AccountIdentifier { 1771 self.identifier.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) 1772 } 1773 1774 // bytes auth_session_id = 2; 1775 1776 get_auth_session_id(&self) -> &[u8]1777 pub fn get_auth_session_id(&self) -> &[u8] { 1778 &self.auth_session_id 1779 } clear_auth_session_id(&mut self)1780 pub fn clear_auth_session_id(&mut self) { 1781 self.auth_session_id.clear(); 1782 } 1783 1784 // Param is passed by value, moved set_auth_session_id(&mut self, v: ::std::vec::Vec<u8>)1785 pub fn set_auth_session_id(&mut self, v: ::std::vec::Vec<u8>) { 1786 self.auth_session_id = v; 1787 } 1788 1789 // Mutable pointer to the field. 1790 // If field is not initialized, it is initialized with default value first. mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec<u8>1791 pub fn mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec<u8> { 1792 &mut self.auth_session_id 1793 } 1794 1795 // Take field take_auth_session_id(&mut self) -> ::std::vec::Vec<u8>1796 pub fn take_auth_session_id(&mut self) -> ::std::vec::Vec<u8> { 1797 ::std::mem::replace(&mut self.auth_session_id, ::std::vec::Vec::new()) 1798 } 1799 } 1800 1801 impl ::protobuf::Message for RemoveRequest { is_initialized(&self) -> bool1802 fn is_initialized(&self) -> bool { 1803 for v in &self.identifier { 1804 if !v.is_initialized() { 1805 return false; 1806 } 1807 }; 1808 true 1809 } 1810 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>1811 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 1812 while !is.eof()? { 1813 let (field_number, wire_type) = is.read_tag_unpack()?; 1814 match field_number { 1815 1 => { 1816 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.identifier)?; 1817 }, 1818 2 => { 1819 ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.auth_session_id)?; 1820 }, 1821 _ => { 1822 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 1823 }, 1824 }; 1825 } 1826 ::std::result::Result::Ok(()) 1827 } 1828 1829 // Compute sizes of nested messages 1830 #[allow(unused_variables)] compute_size(&self) -> u321831 fn compute_size(&self) -> u32 { 1832 let mut my_size = 0; 1833 if let Some(ref v) = self.identifier.as_ref() { 1834 let len = v.compute_size(); 1835 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 1836 } 1837 if !self.auth_session_id.is_empty() { 1838 my_size += ::protobuf::rt::bytes_size(2, &self.auth_session_id); 1839 } 1840 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 1841 self.cached_size.set(my_size); 1842 my_size 1843 } 1844 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>1845 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 1846 if let Some(ref v) = self.identifier.as_ref() { 1847 os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; 1848 os.write_raw_varint32(v.get_cached_size())?; 1849 v.write_to_with_cached_sizes(os)?; 1850 } 1851 if !self.auth_session_id.is_empty() { 1852 os.write_bytes(2, &self.auth_session_id)?; 1853 } 1854 os.write_unknown_fields(self.get_unknown_fields())?; 1855 ::std::result::Result::Ok(()) 1856 } 1857 get_cached_size(&self) -> u321858 fn get_cached_size(&self) -> u32 { 1859 self.cached_size.get() 1860 } 1861 get_unknown_fields(&self) -> &::protobuf::UnknownFields1862 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 1863 &self.unknown_fields 1864 } 1865 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields1866 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 1867 &mut self.unknown_fields 1868 } 1869 as_any(&self) -> &dyn (::std::any::Any)1870 fn as_any(&self) -> &dyn (::std::any::Any) { 1871 self as &dyn (::std::any::Any) 1872 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)1873 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 1874 self as &mut dyn (::std::any::Any) 1875 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>1876 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 1877 self 1878 } 1879 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor1880 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 1881 Self::descriptor_static() 1882 } 1883 new() -> RemoveRequest1884 fn new() -> RemoveRequest { 1885 RemoveRequest::new() 1886 } 1887 default_instance() -> &'static RemoveRequest1888 fn default_instance() -> &'static RemoveRequest { 1889 static instance: ::protobuf::rt::LazyV2<RemoveRequest> = ::protobuf::rt::LazyV2::INIT; 1890 instance.get(RemoveRequest::new) 1891 } 1892 } 1893 1894 impl ::protobuf::Clear for RemoveRequest { clear(&mut self)1895 fn clear(&mut self) { 1896 self.identifier.clear(); 1897 self.auth_session_id.clear(); 1898 self.unknown_fields.clear(); 1899 } 1900 } 1901 1902 impl ::protobuf::reflect::ProtobufValue for RemoveRequest { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef1903 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 1904 ::protobuf::reflect::ReflectValueRef::Message(self) 1905 } 1906 } 1907 1908 #[derive(PartialEq,Clone,Default,Debug)] 1909 pub struct RemoveReply { 1910 // message fields 1911 pub error: CryptohomeErrorCode, 1912 pub error_info: ::protobuf::SingularPtrField<CryptohomeErrorInfo>, 1913 // special fields 1914 pub unknown_fields: ::protobuf::UnknownFields, 1915 pub cached_size: ::protobuf::CachedSize, 1916 } 1917 1918 impl<'a> ::std::default::Default for &'a RemoveReply { default() -> &'a RemoveReply1919 fn default() -> &'a RemoveReply { 1920 <RemoveReply as ::protobuf::Message>::default_instance() 1921 } 1922 } 1923 1924 impl RemoveReply { new() -> RemoveReply1925 pub fn new() -> RemoveReply { 1926 ::std::default::Default::default() 1927 } 1928 1929 // .user_data_auth.CryptohomeErrorCode error = 1; 1930 1931 get_error(&self) -> CryptohomeErrorCode1932 pub fn get_error(&self) -> CryptohomeErrorCode { 1933 self.error 1934 } clear_error(&mut self)1935 pub fn clear_error(&mut self) { 1936 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 1937 } 1938 1939 // Param is passed by value, moved set_error(&mut self, v: CryptohomeErrorCode)1940 pub fn set_error(&mut self, v: CryptohomeErrorCode) { 1941 self.error = v; 1942 } 1943 1944 // .user_data_auth.CryptohomeErrorInfo error_info = 2; 1945 1946 get_error_info(&self) -> &CryptohomeErrorInfo1947 pub fn get_error_info(&self) -> &CryptohomeErrorInfo { 1948 self.error_info.as_ref().unwrap_or_else(|| <CryptohomeErrorInfo as ::protobuf::Message>::default_instance()) 1949 } clear_error_info(&mut self)1950 pub fn clear_error_info(&mut self) { 1951 self.error_info.clear(); 1952 } 1953 has_error_info(&self) -> bool1954 pub fn has_error_info(&self) -> bool { 1955 self.error_info.is_some() 1956 } 1957 1958 // Param is passed by value, moved set_error_info(&mut self, v: CryptohomeErrorInfo)1959 pub fn set_error_info(&mut self, v: CryptohomeErrorInfo) { 1960 self.error_info = ::protobuf::SingularPtrField::some(v); 1961 } 1962 1963 // Mutable pointer to the field. 1964 // If field is not initialized, it is initialized with default value first. mut_error_info(&mut self) -> &mut CryptohomeErrorInfo1965 pub fn mut_error_info(&mut self) -> &mut CryptohomeErrorInfo { 1966 if self.error_info.is_none() { 1967 self.error_info.set_default(); 1968 } 1969 self.error_info.as_mut().unwrap() 1970 } 1971 1972 // Take field take_error_info(&mut self) -> CryptohomeErrorInfo1973 pub fn take_error_info(&mut self) -> CryptohomeErrorInfo { 1974 self.error_info.take().unwrap_or_else(|| CryptohomeErrorInfo::new()) 1975 } 1976 } 1977 1978 impl ::protobuf::Message for RemoveReply { is_initialized(&self) -> bool1979 fn is_initialized(&self) -> bool { 1980 for v in &self.error_info { 1981 if !v.is_initialized() { 1982 return false; 1983 } 1984 }; 1985 true 1986 } 1987 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>1988 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 1989 while !is.eof()? { 1990 let (field_number, wire_type) = is.read_tag_unpack()?; 1991 match field_number { 1992 1 => { 1993 ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? 1994 }, 1995 2 => { 1996 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.error_info)?; 1997 }, 1998 _ => { 1999 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 2000 }, 2001 }; 2002 } 2003 ::std::result::Result::Ok(()) 2004 } 2005 2006 // Compute sizes of nested messages 2007 #[allow(unused_variables)] compute_size(&self) -> u322008 fn compute_size(&self) -> u32 { 2009 let mut my_size = 0; 2010 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 2011 my_size += ::protobuf::rt::enum_size(1, self.error); 2012 } 2013 if let Some(ref v) = self.error_info.as_ref() { 2014 let len = v.compute_size(); 2015 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 2016 } 2017 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 2018 self.cached_size.set(my_size); 2019 my_size 2020 } 2021 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>2022 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 2023 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 2024 os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; 2025 } 2026 if let Some(ref v) = self.error_info.as_ref() { 2027 os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; 2028 os.write_raw_varint32(v.get_cached_size())?; 2029 v.write_to_with_cached_sizes(os)?; 2030 } 2031 os.write_unknown_fields(self.get_unknown_fields())?; 2032 ::std::result::Result::Ok(()) 2033 } 2034 get_cached_size(&self) -> u322035 fn get_cached_size(&self) -> u32 { 2036 self.cached_size.get() 2037 } 2038 get_unknown_fields(&self) -> &::protobuf::UnknownFields2039 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 2040 &self.unknown_fields 2041 } 2042 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields2043 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 2044 &mut self.unknown_fields 2045 } 2046 as_any(&self) -> &dyn (::std::any::Any)2047 fn as_any(&self) -> &dyn (::std::any::Any) { 2048 self as &dyn (::std::any::Any) 2049 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)2050 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 2051 self as &mut dyn (::std::any::Any) 2052 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>2053 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 2054 self 2055 } 2056 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor2057 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 2058 Self::descriptor_static() 2059 } 2060 new() -> RemoveReply2061 fn new() -> RemoveReply { 2062 RemoveReply::new() 2063 } 2064 default_instance() -> &'static RemoveReply2065 fn default_instance() -> &'static RemoveReply { 2066 static instance: ::protobuf::rt::LazyV2<RemoveReply> = ::protobuf::rt::LazyV2::INIT; 2067 instance.get(RemoveReply::new) 2068 } 2069 } 2070 2071 impl ::protobuf::Clear for RemoveReply { clear(&mut self)2072 fn clear(&mut self) { 2073 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 2074 self.error_info.clear(); 2075 self.unknown_fields.clear(); 2076 } 2077 } 2078 2079 impl ::protobuf::reflect::ProtobufValue for RemoveReply { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef2080 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 2081 ::protobuf::reflect::ReflectValueRef::Message(self) 2082 } 2083 } 2084 2085 #[derive(PartialEq,Clone,Default,Debug)] 2086 pub struct ListKeysRequest { 2087 // message fields 2088 pub account_id: ::protobuf::SingularPtrField<super::rpc::AccountIdentifier>, 2089 pub authorization_request: ::protobuf::SingularPtrField<super::rpc::AuthorizationRequest>, 2090 // special fields 2091 pub unknown_fields: ::protobuf::UnknownFields, 2092 pub cached_size: ::protobuf::CachedSize, 2093 } 2094 2095 impl<'a> ::std::default::Default for &'a ListKeysRequest { default() -> &'a ListKeysRequest2096 fn default() -> &'a ListKeysRequest { 2097 <ListKeysRequest as ::protobuf::Message>::default_instance() 2098 } 2099 } 2100 2101 impl ListKeysRequest { new() -> ListKeysRequest2102 pub fn new() -> ListKeysRequest { 2103 ::std::default::Default::default() 2104 } 2105 2106 // .cryptohome.AccountIdentifier account_id = 1; 2107 2108 get_account_id(&self) -> &super::rpc::AccountIdentifier2109 pub fn get_account_id(&self) -> &super::rpc::AccountIdentifier { 2110 self.account_id.as_ref().unwrap_or_else(|| <super::rpc::AccountIdentifier as ::protobuf::Message>::default_instance()) 2111 } clear_account_id(&mut self)2112 pub fn clear_account_id(&mut self) { 2113 self.account_id.clear(); 2114 } 2115 has_account_id(&self) -> bool2116 pub fn has_account_id(&self) -> bool { 2117 self.account_id.is_some() 2118 } 2119 2120 // Param is passed by value, moved set_account_id(&mut self, v: super::rpc::AccountIdentifier)2121 pub fn set_account_id(&mut self, v: super::rpc::AccountIdentifier) { 2122 self.account_id = ::protobuf::SingularPtrField::some(v); 2123 } 2124 2125 // Mutable pointer to the field. 2126 // If field is not initialized, it is initialized with default value first. mut_account_id(&mut self) -> &mut super::rpc::AccountIdentifier2127 pub fn mut_account_id(&mut self) -> &mut super::rpc::AccountIdentifier { 2128 if self.account_id.is_none() { 2129 self.account_id.set_default(); 2130 } 2131 self.account_id.as_mut().unwrap() 2132 } 2133 2134 // Take field take_account_id(&mut self) -> super::rpc::AccountIdentifier2135 pub fn take_account_id(&mut self) -> super::rpc::AccountIdentifier { 2136 self.account_id.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) 2137 } 2138 2139 // .cryptohome.AuthorizationRequest authorization_request = 2; 2140 2141 get_authorization_request(&self) -> &super::rpc::AuthorizationRequest2142 pub fn get_authorization_request(&self) -> &super::rpc::AuthorizationRequest { 2143 self.authorization_request.as_ref().unwrap_or_else(|| <super::rpc::AuthorizationRequest as ::protobuf::Message>::default_instance()) 2144 } clear_authorization_request(&mut self)2145 pub fn clear_authorization_request(&mut self) { 2146 self.authorization_request.clear(); 2147 } 2148 has_authorization_request(&self) -> bool2149 pub fn has_authorization_request(&self) -> bool { 2150 self.authorization_request.is_some() 2151 } 2152 2153 // Param is passed by value, moved set_authorization_request(&mut self, v: super::rpc::AuthorizationRequest)2154 pub fn set_authorization_request(&mut self, v: super::rpc::AuthorizationRequest) { 2155 self.authorization_request = ::protobuf::SingularPtrField::some(v); 2156 } 2157 2158 // Mutable pointer to the field. 2159 // If field is not initialized, it is initialized with default value first. mut_authorization_request(&mut self) -> &mut super::rpc::AuthorizationRequest2160 pub fn mut_authorization_request(&mut self) -> &mut super::rpc::AuthorizationRequest { 2161 if self.authorization_request.is_none() { 2162 self.authorization_request.set_default(); 2163 } 2164 self.authorization_request.as_mut().unwrap() 2165 } 2166 2167 // Take field take_authorization_request(&mut self) -> super::rpc::AuthorizationRequest2168 pub fn take_authorization_request(&mut self) -> super::rpc::AuthorizationRequest { 2169 self.authorization_request.take().unwrap_or_else(|| super::rpc::AuthorizationRequest::new()) 2170 } 2171 } 2172 2173 impl ::protobuf::Message for ListKeysRequest { is_initialized(&self) -> bool2174 fn is_initialized(&self) -> bool { 2175 for v in &self.account_id { 2176 if !v.is_initialized() { 2177 return false; 2178 } 2179 }; 2180 for v in &self.authorization_request { 2181 if !v.is_initialized() { 2182 return false; 2183 } 2184 }; 2185 true 2186 } 2187 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>2188 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 2189 while !is.eof()? { 2190 let (field_number, wire_type) = is.read_tag_unpack()?; 2191 match field_number { 2192 1 => { 2193 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account_id)?; 2194 }, 2195 2 => { 2196 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.authorization_request)?; 2197 }, 2198 _ => { 2199 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 2200 }, 2201 }; 2202 } 2203 ::std::result::Result::Ok(()) 2204 } 2205 2206 // Compute sizes of nested messages 2207 #[allow(unused_variables)] compute_size(&self) -> u322208 fn compute_size(&self) -> u32 { 2209 let mut my_size = 0; 2210 if let Some(ref v) = self.account_id.as_ref() { 2211 let len = v.compute_size(); 2212 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 2213 } 2214 if let Some(ref v) = self.authorization_request.as_ref() { 2215 let len = v.compute_size(); 2216 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 2217 } 2218 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 2219 self.cached_size.set(my_size); 2220 my_size 2221 } 2222 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>2223 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 2224 if let Some(ref v) = self.account_id.as_ref() { 2225 os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; 2226 os.write_raw_varint32(v.get_cached_size())?; 2227 v.write_to_with_cached_sizes(os)?; 2228 } 2229 if let Some(ref v) = self.authorization_request.as_ref() { 2230 os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; 2231 os.write_raw_varint32(v.get_cached_size())?; 2232 v.write_to_with_cached_sizes(os)?; 2233 } 2234 os.write_unknown_fields(self.get_unknown_fields())?; 2235 ::std::result::Result::Ok(()) 2236 } 2237 get_cached_size(&self) -> u322238 fn get_cached_size(&self) -> u32 { 2239 self.cached_size.get() 2240 } 2241 get_unknown_fields(&self) -> &::protobuf::UnknownFields2242 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 2243 &self.unknown_fields 2244 } 2245 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields2246 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 2247 &mut self.unknown_fields 2248 } 2249 as_any(&self) -> &dyn (::std::any::Any)2250 fn as_any(&self) -> &dyn (::std::any::Any) { 2251 self as &dyn (::std::any::Any) 2252 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)2253 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 2254 self as &mut dyn (::std::any::Any) 2255 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>2256 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 2257 self 2258 } 2259 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor2260 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 2261 Self::descriptor_static() 2262 } 2263 new() -> ListKeysRequest2264 fn new() -> ListKeysRequest { 2265 ListKeysRequest::new() 2266 } 2267 default_instance() -> &'static ListKeysRequest2268 fn default_instance() -> &'static ListKeysRequest { 2269 static instance: ::protobuf::rt::LazyV2<ListKeysRequest> = ::protobuf::rt::LazyV2::INIT; 2270 instance.get(ListKeysRequest::new) 2271 } 2272 } 2273 2274 impl ::protobuf::Clear for ListKeysRequest { clear(&mut self)2275 fn clear(&mut self) { 2276 self.account_id.clear(); 2277 self.authorization_request.clear(); 2278 self.unknown_fields.clear(); 2279 } 2280 } 2281 2282 impl ::protobuf::reflect::ProtobufValue for ListKeysRequest { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef2283 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 2284 ::protobuf::reflect::ReflectValueRef::Message(self) 2285 } 2286 } 2287 2288 #[derive(PartialEq,Clone,Default,Debug)] 2289 pub struct ListKeysReply { 2290 // message fields 2291 pub error: CryptohomeErrorCode, 2292 pub labels: ::protobuf::RepeatedField<::std::string::String>, 2293 pub error_info: ::protobuf::SingularPtrField<CryptohomeErrorInfo>, 2294 // special fields 2295 pub unknown_fields: ::protobuf::UnknownFields, 2296 pub cached_size: ::protobuf::CachedSize, 2297 } 2298 2299 impl<'a> ::std::default::Default for &'a ListKeysReply { default() -> &'a ListKeysReply2300 fn default() -> &'a ListKeysReply { 2301 <ListKeysReply as ::protobuf::Message>::default_instance() 2302 } 2303 } 2304 2305 impl ListKeysReply { new() -> ListKeysReply2306 pub fn new() -> ListKeysReply { 2307 ::std::default::Default::default() 2308 } 2309 2310 // .user_data_auth.CryptohomeErrorCode error = 1; 2311 2312 get_error(&self) -> CryptohomeErrorCode2313 pub fn get_error(&self) -> CryptohomeErrorCode { 2314 self.error 2315 } clear_error(&mut self)2316 pub fn clear_error(&mut self) { 2317 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 2318 } 2319 2320 // Param is passed by value, moved set_error(&mut self, v: CryptohomeErrorCode)2321 pub fn set_error(&mut self, v: CryptohomeErrorCode) { 2322 self.error = v; 2323 } 2324 2325 // repeated string labels = 2; 2326 2327 get_labels(&self) -> &[::std::string::String]2328 pub fn get_labels(&self) -> &[::std::string::String] { 2329 &self.labels 2330 } clear_labels(&mut self)2331 pub fn clear_labels(&mut self) { 2332 self.labels.clear(); 2333 } 2334 2335 // Param is passed by value, moved set_labels(&mut self, v: ::protobuf::RepeatedField<::std::string::String>)2336 pub fn set_labels(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { 2337 self.labels = v; 2338 } 2339 2340 // Mutable pointer to the field. mut_labels(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String>2341 pub fn mut_labels(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { 2342 &mut self.labels 2343 } 2344 2345 // Take field take_labels(&mut self) -> ::protobuf::RepeatedField<::std::string::String>2346 pub fn take_labels(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { 2347 ::std::mem::replace(&mut self.labels, ::protobuf::RepeatedField::new()) 2348 } 2349 2350 // .user_data_auth.CryptohomeErrorInfo error_info = 3; 2351 2352 get_error_info(&self) -> &CryptohomeErrorInfo2353 pub fn get_error_info(&self) -> &CryptohomeErrorInfo { 2354 self.error_info.as_ref().unwrap_or_else(|| <CryptohomeErrorInfo as ::protobuf::Message>::default_instance()) 2355 } clear_error_info(&mut self)2356 pub fn clear_error_info(&mut self) { 2357 self.error_info.clear(); 2358 } 2359 has_error_info(&self) -> bool2360 pub fn has_error_info(&self) -> bool { 2361 self.error_info.is_some() 2362 } 2363 2364 // Param is passed by value, moved set_error_info(&mut self, v: CryptohomeErrorInfo)2365 pub fn set_error_info(&mut self, v: CryptohomeErrorInfo) { 2366 self.error_info = ::protobuf::SingularPtrField::some(v); 2367 } 2368 2369 // Mutable pointer to the field. 2370 // If field is not initialized, it is initialized with default value first. mut_error_info(&mut self) -> &mut CryptohomeErrorInfo2371 pub fn mut_error_info(&mut self) -> &mut CryptohomeErrorInfo { 2372 if self.error_info.is_none() { 2373 self.error_info.set_default(); 2374 } 2375 self.error_info.as_mut().unwrap() 2376 } 2377 2378 // Take field take_error_info(&mut self) -> CryptohomeErrorInfo2379 pub fn take_error_info(&mut self) -> CryptohomeErrorInfo { 2380 self.error_info.take().unwrap_or_else(|| CryptohomeErrorInfo::new()) 2381 } 2382 } 2383 2384 impl ::protobuf::Message for ListKeysReply { is_initialized(&self) -> bool2385 fn is_initialized(&self) -> bool { 2386 for v in &self.error_info { 2387 if !v.is_initialized() { 2388 return false; 2389 } 2390 }; 2391 true 2392 } 2393 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>2394 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 2395 while !is.eof()? { 2396 let (field_number, wire_type) = is.read_tag_unpack()?; 2397 match field_number { 2398 1 => { 2399 ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? 2400 }, 2401 2 => { 2402 ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.labels)?; 2403 }, 2404 3 => { 2405 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.error_info)?; 2406 }, 2407 _ => { 2408 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 2409 }, 2410 }; 2411 } 2412 ::std::result::Result::Ok(()) 2413 } 2414 2415 // Compute sizes of nested messages 2416 #[allow(unused_variables)] compute_size(&self) -> u322417 fn compute_size(&self) -> u32 { 2418 let mut my_size = 0; 2419 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 2420 my_size += ::protobuf::rt::enum_size(1, self.error); 2421 } 2422 for value in &self.labels { 2423 my_size += ::protobuf::rt::string_size(2, &value); 2424 }; 2425 if let Some(ref v) = self.error_info.as_ref() { 2426 let len = v.compute_size(); 2427 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 2428 } 2429 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 2430 self.cached_size.set(my_size); 2431 my_size 2432 } 2433 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>2434 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 2435 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 2436 os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; 2437 } 2438 for v in &self.labels { 2439 os.write_string(2, &v)?; 2440 }; 2441 if let Some(ref v) = self.error_info.as_ref() { 2442 os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; 2443 os.write_raw_varint32(v.get_cached_size())?; 2444 v.write_to_with_cached_sizes(os)?; 2445 } 2446 os.write_unknown_fields(self.get_unknown_fields())?; 2447 ::std::result::Result::Ok(()) 2448 } 2449 get_cached_size(&self) -> u322450 fn get_cached_size(&self) -> u32 { 2451 self.cached_size.get() 2452 } 2453 get_unknown_fields(&self) -> &::protobuf::UnknownFields2454 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 2455 &self.unknown_fields 2456 } 2457 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields2458 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 2459 &mut self.unknown_fields 2460 } 2461 as_any(&self) -> &dyn (::std::any::Any)2462 fn as_any(&self) -> &dyn (::std::any::Any) { 2463 self as &dyn (::std::any::Any) 2464 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)2465 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 2466 self as &mut dyn (::std::any::Any) 2467 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>2468 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 2469 self 2470 } 2471 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor2472 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 2473 Self::descriptor_static() 2474 } 2475 new() -> ListKeysReply2476 fn new() -> ListKeysReply { 2477 ListKeysReply::new() 2478 } 2479 default_instance() -> &'static ListKeysReply2480 fn default_instance() -> &'static ListKeysReply { 2481 static instance: ::protobuf::rt::LazyV2<ListKeysReply> = ::protobuf::rt::LazyV2::INIT; 2482 instance.get(ListKeysReply::new) 2483 } 2484 } 2485 2486 impl ::protobuf::Clear for ListKeysReply { clear(&mut self)2487 fn clear(&mut self) { 2488 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 2489 self.labels.clear(); 2490 self.error_info.clear(); 2491 self.unknown_fields.clear(); 2492 } 2493 } 2494 2495 impl ::protobuf::reflect::ProtobufValue for ListKeysReply { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef2496 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 2497 ::protobuf::reflect::ReflectValueRef::Message(self) 2498 } 2499 } 2500 2501 #[derive(PartialEq,Clone,Default,Debug)] 2502 pub struct GetKeyDataRequest { 2503 // message fields 2504 pub account_id: ::protobuf::SingularPtrField<super::rpc::AccountIdentifier>, 2505 pub authorization_request: ::protobuf::SingularPtrField<super::rpc::AuthorizationRequest>, 2506 pub key: ::protobuf::SingularPtrField<super::key::Key>, 2507 // special fields 2508 pub unknown_fields: ::protobuf::UnknownFields, 2509 pub cached_size: ::protobuf::CachedSize, 2510 } 2511 2512 impl<'a> ::std::default::Default for &'a GetKeyDataRequest { default() -> &'a GetKeyDataRequest2513 fn default() -> &'a GetKeyDataRequest { 2514 <GetKeyDataRequest as ::protobuf::Message>::default_instance() 2515 } 2516 } 2517 2518 impl GetKeyDataRequest { new() -> GetKeyDataRequest2519 pub fn new() -> GetKeyDataRequest { 2520 ::std::default::Default::default() 2521 } 2522 2523 // .cryptohome.AccountIdentifier account_id = 1; 2524 2525 get_account_id(&self) -> &super::rpc::AccountIdentifier2526 pub fn get_account_id(&self) -> &super::rpc::AccountIdentifier { 2527 self.account_id.as_ref().unwrap_or_else(|| <super::rpc::AccountIdentifier as ::protobuf::Message>::default_instance()) 2528 } clear_account_id(&mut self)2529 pub fn clear_account_id(&mut self) { 2530 self.account_id.clear(); 2531 } 2532 has_account_id(&self) -> bool2533 pub fn has_account_id(&self) -> bool { 2534 self.account_id.is_some() 2535 } 2536 2537 // Param is passed by value, moved set_account_id(&mut self, v: super::rpc::AccountIdentifier)2538 pub fn set_account_id(&mut self, v: super::rpc::AccountIdentifier) { 2539 self.account_id = ::protobuf::SingularPtrField::some(v); 2540 } 2541 2542 // Mutable pointer to the field. 2543 // If field is not initialized, it is initialized with default value first. mut_account_id(&mut self) -> &mut super::rpc::AccountIdentifier2544 pub fn mut_account_id(&mut self) -> &mut super::rpc::AccountIdentifier { 2545 if self.account_id.is_none() { 2546 self.account_id.set_default(); 2547 } 2548 self.account_id.as_mut().unwrap() 2549 } 2550 2551 // Take field take_account_id(&mut self) -> super::rpc::AccountIdentifier2552 pub fn take_account_id(&mut self) -> super::rpc::AccountIdentifier { 2553 self.account_id.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) 2554 } 2555 2556 // .cryptohome.AuthorizationRequest authorization_request = 2; 2557 2558 get_authorization_request(&self) -> &super::rpc::AuthorizationRequest2559 pub fn get_authorization_request(&self) -> &super::rpc::AuthorizationRequest { 2560 self.authorization_request.as_ref().unwrap_or_else(|| <super::rpc::AuthorizationRequest as ::protobuf::Message>::default_instance()) 2561 } clear_authorization_request(&mut self)2562 pub fn clear_authorization_request(&mut self) { 2563 self.authorization_request.clear(); 2564 } 2565 has_authorization_request(&self) -> bool2566 pub fn has_authorization_request(&self) -> bool { 2567 self.authorization_request.is_some() 2568 } 2569 2570 // Param is passed by value, moved set_authorization_request(&mut self, v: super::rpc::AuthorizationRequest)2571 pub fn set_authorization_request(&mut self, v: super::rpc::AuthorizationRequest) { 2572 self.authorization_request = ::protobuf::SingularPtrField::some(v); 2573 } 2574 2575 // Mutable pointer to the field. 2576 // If field is not initialized, it is initialized with default value first. mut_authorization_request(&mut self) -> &mut super::rpc::AuthorizationRequest2577 pub fn mut_authorization_request(&mut self) -> &mut super::rpc::AuthorizationRequest { 2578 if self.authorization_request.is_none() { 2579 self.authorization_request.set_default(); 2580 } 2581 self.authorization_request.as_mut().unwrap() 2582 } 2583 2584 // Take field take_authorization_request(&mut self) -> super::rpc::AuthorizationRequest2585 pub fn take_authorization_request(&mut self) -> super::rpc::AuthorizationRequest { 2586 self.authorization_request.take().unwrap_or_else(|| super::rpc::AuthorizationRequest::new()) 2587 } 2588 2589 // .cryptohome.Key key = 3; 2590 2591 get_key(&self) -> &super::key::Key2592 pub fn get_key(&self) -> &super::key::Key { 2593 self.key.as_ref().unwrap_or_else(|| <super::key::Key as ::protobuf::Message>::default_instance()) 2594 } clear_key(&mut self)2595 pub fn clear_key(&mut self) { 2596 self.key.clear(); 2597 } 2598 has_key(&self) -> bool2599 pub fn has_key(&self) -> bool { 2600 self.key.is_some() 2601 } 2602 2603 // Param is passed by value, moved set_key(&mut self, v: super::key::Key)2604 pub fn set_key(&mut self, v: super::key::Key) { 2605 self.key = ::protobuf::SingularPtrField::some(v); 2606 } 2607 2608 // Mutable pointer to the field. 2609 // If field is not initialized, it is initialized with default value first. mut_key(&mut self) -> &mut super::key::Key2610 pub fn mut_key(&mut self) -> &mut super::key::Key { 2611 if self.key.is_none() { 2612 self.key.set_default(); 2613 } 2614 self.key.as_mut().unwrap() 2615 } 2616 2617 // Take field take_key(&mut self) -> super::key::Key2618 pub fn take_key(&mut self) -> super::key::Key { 2619 self.key.take().unwrap_or_else(|| super::key::Key::new()) 2620 } 2621 } 2622 2623 impl ::protobuf::Message for GetKeyDataRequest { is_initialized(&self) -> bool2624 fn is_initialized(&self) -> bool { 2625 for v in &self.account_id { 2626 if !v.is_initialized() { 2627 return false; 2628 } 2629 }; 2630 for v in &self.authorization_request { 2631 if !v.is_initialized() { 2632 return false; 2633 } 2634 }; 2635 for v in &self.key { 2636 if !v.is_initialized() { 2637 return false; 2638 } 2639 }; 2640 true 2641 } 2642 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>2643 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 2644 while !is.eof()? { 2645 let (field_number, wire_type) = is.read_tag_unpack()?; 2646 match field_number { 2647 1 => { 2648 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account_id)?; 2649 }, 2650 2 => { 2651 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.authorization_request)?; 2652 }, 2653 3 => { 2654 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.key)?; 2655 }, 2656 _ => { 2657 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 2658 }, 2659 }; 2660 } 2661 ::std::result::Result::Ok(()) 2662 } 2663 2664 // Compute sizes of nested messages 2665 #[allow(unused_variables)] compute_size(&self) -> u322666 fn compute_size(&self) -> u32 { 2667 let mut my_size = 0; 2668 if let Some(ref v) = self.account_id.as_ref() { 2669 let len = v.compute_size(); 2670 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 2671 } 2672 if let Some(ref v) = self.authorization_request.as_ref() { 2673 let len = v.compute_size(); 2674 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 2675 } 2676 if let Some(ref v) = self.key.as_ref() { 2677 let len = v.compute_size(); 2678 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 2679 } 2680 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 2681 self.cached_size.set(my_size); 2682 my_size 2683 } 2684 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>2685 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 2686 if let Some(ref v) = self.account_id.as_ref() { 2687 os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; 2688 os.write_raw_varint32(v.get_cached_size())?; 2689 v.write_to_with_cached_sizes(os)?; 2690 } 2691 if let Some(ref v) = self.authorization_request.as_ref() { 2692 os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; 2693 os.write_raw_varint32(v.get_cached_size())?; 2694 v.write_to_with_cached_sizes(os)?; 2695 } 2696 if let Some(ref v) = self.key.as_ref() { 2697 os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; 2698 os.write_raw_varint32(v.get_cached_size())?; 2699 v.write_to_with_cached_sizes(os)?; 2700 } 2701 os.write_unknown_fields(self.get_unknown_fields())?; 2702 ::std::result::Result::Ok(()) 2703 } 2704 get_cached_size(&self) -> u322705 fn get_cached_size(&self) -> u32 { 2706 self.cached_size.get() 2707 } 2708 get_unknown_fields(&self) -> &::protobuf::UnknownFields2709 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 2710 &self.unknown_fields 2711 } 2712 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields2713 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 2714 &mut self.unknown_fields 2715 } 2716 as_any(&self) -> &dyn (::std::any::Any)2717 fn as_any(&self) -> &dyn (::std::any::Any) { 2718 self as &dyn (::std::any::Any) 2719 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)2720 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 2721 self as &mut dyn (::std::any::Any) 2722 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>2723 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 2724 self 2725 } 2726 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor2727 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 2728 Self::descriptor_static() 2729 } 2730 new() -> GetKeyDataRequest2731 fn new() -> GetKeyDataRequest { 2732 GetKeyDataRequest::new() 2733 } 2734 default_instance() -> &'static GetKeyDataRequest2735 fn default_instance() -> &'static GetKeyDataRequest { 2736 static instance: ::protobuf::rt::LazyV2<GetKeyDataRequest> = ::protobuf::rt::LazyV2::INIT; 2737 instance.get(GetKeyDataRequest::new) 2738 } 2739 } 2740 2741 impl ::protobuf::Clear for GetKeyDataRequest { clear(&mut self)2742 fn clear(&mut self) { 2743 self.account_id.clear(); 2744 self.authorization_request.clear(); 2745 self.key.clear(); 2746 self.unknown_fields.clear(); 2747 } 2748 } 2749 2750 impl ::protobuf::reflect::ProtobufValue for GetKeyDataRequest { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef2751 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 2752 ::protobuf::reflect::ReflectValueRef::Message(self) 2753 } 2754 } 2755 2756 #[derive(PartialEq,Clone,Default,Debug)] 2757 pub struct GetKeyDataReply { 2758 // message fields 2759 pub error: CryptohomeErrorCode, 2760 pub key_data: ::protobuf::RepeatedField<super::key::KeyData>, 2761 // special fields 2762 pub unknown_fields: ::protobuf::UnknownFields, 2763 pub cached_size: ::protobuf::CachedSize, 2764 } 2765 2766 impl<'a> ::std::default::Default for &'a GetKeyDataReply { default() -> &'a GetKeyDataReply2767 fn default() -> &'a GetKeyDataReply { 2768 <GetKeyDataReply as ::protobuf::Message>::default_instance() 2769 } 2770 } 2771 2772 impl GetKeyDataReply { new() -> GetKeyDataReply2773 pub fn new() -> GetKeyDataReply { 2774 ::std::default::Default::default() 2775 } 2776 2777 // .user_data_auth.CryptohomeErrorCode error = 1; 2778 2779 get_error(&self) -> CryptohomeErrorCode2780 pub fn get_error(&self) -> CryptohomeErrorCode { 2781 self.error 2782 } clear_error(&mut self)2783 pub fn clear_error(&mut self) { 2784 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 2785 } 2786 2787 // Param is passed by value, moved set_error(&mut self, v: CryptohomeErrorCode)2788 pub fn set_error(&mut self, v: CryptohomeErrorCode) { 2789 self.error = v; 2790 } 2791 2792 // repeated .cryptohome.KeyData key_data = 2; 2793 2794 get_key_data(&self) -> &[super::key::KeyData]2795 pub fn get_key_data(&self) -> &[super::key::KeyData] { 2796 &self.key_data 2797 } clear_key_data(&mut self)2798 pub fn clear_key_data(&mut self) { 2799 self.key_data.clear(); 2800 } 2801 2802 // Param is passed by value, moved set_key_data(&mut self, v: ::protobuf::RepeatedField<super::key::KeyData>)2803 pub fn set_key_data(&mut self, v: ::protobuf::RepeatedField<super::key::KeyData>) { 2804 self.key_data = v; 2805 } 2806 2807 // Mutable pointer to the field. mut_key_data(&mut self) -> &mut ::protobuf::RepeatedField<super::key::KeyData>2808 pub fn mut_key_data(&mut self) -> &mut ::protobuf::RepeatedField<super::key::KeyData> { 2809 &mut self.key_data 2810 } 2811 2812 // Take field take_key_data(&mut self) -> ::protobuf::RepeatedField<super::key::KeyData>2813 pub fn take_key_data(&mut self) -> ::protobuf::RepeatedField<super::key::KeyData> { 2814 ::std::mem::replace(&mut self.key_data, ::protobuf::RepeatedField::new()) 2815 } 2816 } 2817 2818 impl ::protobuf::Message for GetKeyDataReply { is_initialized(&self) -> bool2819 fn is_initialized(&self) -> bool { 2820 for v in &self.key_data { 2821 if !v.is_initialized() { 2822 return false; 2823 } 2824 }; 2825 true 2826 } 2827 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>2828 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 2829 while !is.eof()? { 2830 let (field_number, wire_type) = is.read_tag_unpack()?; 2831 match field_number { 2832 1 => { 2833 ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? 2834 }, 2835 2 => { 2836 ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.key_data)?; 2837 }, 2838 _ => { 2839 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 2840 }, 2841 }; 2842 } 2843 ::std::result::Result::Ok(()) 2844 } 2845 2846 // Compute sizes of nested messages 2847 #[allow(unused_variables)] compute_size(&self) -> u322848 fn compute_size(&self) -> u32 { 2849 let mut my_size = 0; 2850 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 2851 my_size += ::protobuf::rt::enum_size(1, self.error); 2852 } 2853 for value in &self.key_data { 2854 let len = value.compute_size(); 2855 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 2856 }; 2857 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 2858 self.cached_size.set(my_size); 2859 my_size 2860 } 2861 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>2862 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 2863 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 2864 os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; 2865 } 2866 for v in &self.key_data { 2867 os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; 2868 os.write_raw_varint32(v.get_cached_size())?; 2869 v.write_to_with_cached_sizes(os)?; 2870 }; 2871 os.write_unknown_fields(self.get_unknown_fields())?; 2872 ::std::result::Result::Ok(()) 2873 } 2874 get_cached_size(&self) -> u322875 fn get_cached_size(&self) -> u32 { 2876 self.cached_size.get() 2877 } 2878 get_unknown_fields(&self) -> &::protobuf::UnknownFields2879 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 2880 &self.unknown_fields 2881 } 2882 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields2883 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 2884 &mut self.unknown_fields 2885 } 2886 as_any(&self) -> &dyn (::std::any::Any)2887 fn as_any(&self) -> &dyn (::std::any::Any) { 2888 self as &dyn (::std::any::Any) 2889 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)2890 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 2891 self as &mut dyn (::std::any::Any) 2892 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>2893 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 2894 self 2895 } 2896 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor2897 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 2898 Self::descriptor_static() 2899 } 2900 new() -> GetKeyDataReply2901 fn new() -> GetKeyDataReply { 2902 GetKeyDataReply::new() 2903 } 2904 default_instance() -> &'static GetKeyDataReply2905 fn default_instance() -> &'static GetKeyDataReply { 2906 static instance: ::protobuf::rt::LazyV2<GetKeyDataReply> = ::protobuf::rt::LazyV2::INIT; 2907 instance.get(GetKeyDataReply::new) 2908 } 2909 } 2910 2911 impl ::protobuf::Clear for GetKeyDataReply { clear(&mut self)2912 fn clear(&mut self) { 2913 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 2914 self.key_data.clear(); 2915 self.unknown_fields.clear(); 2916 } 2917 } 2918 2919 impl ::protobuf::reflect::ProtobufValue for GetKeyDataReply { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef2920 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 2921 ::protobuf::reflect::ReflectValueRef::Message(self) 2922 } 2923 } 2924 2925 #[derive(PartialEq,Clone,Default,Debug)] 2926 pub struct CheckKeyRequest { 2927 // message fields 2928 pub account_id: ::protobuf::SingularPtrField<super::rpc::AccountIdentifier>, 2929 pub authorization_request: ::protobuf::SingularPtrField<super::rpc::AuthorizationRequest>, 2930 pub unlock_webauthn_secret: bool, 2931 // special fields 2932 pub unknown_fields: ::protobuf::UnknownFields, 2933 pub cached_size: ::protobuf::CachedSize, 2934 } 2935 2936 impl<'a> ::std::default::Default for &'a CheckKeyRequest { default() -> &'a CheckKeyRequest2937 fn default() -> &'a CheckKeyRequest { 2938 <CheckKeyRequest as ::protobuf::Message>::default_instance() 2939 } 2940 } 2941 2942 impl CheckKeyRequest { new() -> CheckKeyRequest2943 pub fn new() -> CheckKeyRequest { 2944 ::std::default::Default::default() 2945 } 2946 2947 // .cryptohome.AccountIdentifier account_id = 1; 2948 2949 get_account_id(&self) -> &super::rpc::AccountIdentifier2950 pub fn get_account_id(&self) -> &super::rpc::AccountIdentifier { 2951 self.account_id.as_ref().unwrap_or_else(|| <super::rpc::AccountIdentifier as ::protobuf::Message>::default_instance()) 2952 } clear_account_id(&mut self)2953 pub fn clear_account_id(&mut self) { 2954 self.account_id.clear(); 2955 } 2956 has_account_id(&self) -> bool2957 pub fn has_account_id(&self) -> bool { 2958 self.account_id.is_some() 2959 } 2960 2961 // Param is passed by value, moved set_account_id(&mut self, v: super::rpc::AccountIdentifier)2962 pub fn set_account_id(&mut self, v: super::rpc::AccountIdentifier) { 2963 self.account_id = ::protobuf::SingularPtrField::some(v); 2964 } 2965 2966 // Mutable pointer to the field. 2967 // If field is not initialized, it is initialized with default value first. mut_account_id(&mut self) -> &mut super::rpc::AccountIdentifier2968 pub fn mut_account_id(&mut self) -> &mut super::rpc::AccountIdentifier { 2969 if self.account_id.is_none() { 2970 self.account_id.set_default(); 2971 } 2972 self.account_id.as_mut().unwrap() 2973 } 2974 2975 // Take field take_account_id(&mut self) -> super::rpc::AccountIdentifier2976 pub fn take_account_id(&mut self) -> super::rpc::AccountIdentifier { 2977 self.account_id.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) 2978 } 2979 2980 // .cryptohome.AuthorizationRequest authorization_request = 2; 2981 2982 get_authorization_request(&self) -> &super::rpc::AuthorizationRequest2983 pub fn get_authorization_request(&self) -> &super::rpc::AuthorizationRequest { 2984 self.authorization_request.as_ref().unwrap_or_else(|| <super::rpc::AuthorizationRequest as ::protobuf::Message>::default_instance()) 2985 } clear_authorization_request(&mut self)2986 pub fn clear_authorization_request(&mut self) { 2987 self.authorization_request.clear(); 2988 } 2989 has_authorization_request(&self) -> bool2990 pub fn has_authorization_request(&self) -> bool { 2991 self.authorization_request.is_some() 2992 } 2993 2994 // Param is passed by value, moved set_authorization_request(&mut self, v: super::rpc::AuthorizationRequest)2995 pub fn set_authorization_request(&mut self, v: super::rpc::AuthorizationRequest) { 2996 self.authorization_request = ::protobuf::SingularPtrField::some(v); 2997 } 2998 2999 // Mutable pointer to the field. 3000 // If field is not initialized, it is initialized with default value first. mut_authorization_request(&mut self) -> &mut super::rpc::AuthorizationRequest3001 pub fn mut_authorization_request(&mut self) -> &mut super::rpc::AuthorizationRequest { 3002 if self.authorization_request.is_none() { 3003 self.authorization_request.set_default(); 3004 } 3005 self.authorization_request.as_mut().unwrap() 3006 } 3007 3008 // Take field take_authorization_request(&mut self) -> super::rpc::AuthorizationRequest3009 pub fn take_authorization_request(&mut self) -> super::rpc::AuthorizationRequest { 3010 self.authorization_request.take().unwrap_or_else(|| super::rpc::AuthorizationRequest::new()) 3011 } 3012 3013 // bool unlock_webauthn_secret = 3; 3014 3015 get_unlock_webauthn_secret(&self) -> bool3016 pub fn get_unlock_webauthn_secret(&self) -> bool { 3017 self.unlock_webauthn_secret 3018 } clear_unlock_webauthn_secret(&mut self)3019 pub fn clear_unlock_webauthn_secret(&mut self) { 3020 self.unlock_webauthn_secret = false; 3021 } 3022 3023 // Param is passed by value, moved set_unlock_webauthn_secret(&mut self, v: bool)3024 pub fn set_unlock_webauthn_secret(&mut self, v: bool) { 3025 self.unlock_webauthn_secret = v; 3026 } 3027 } 3028 3029 impl ::protobuf::Message for CheckKeyRequest { is_initialized(&self) -> bool3030 fn is_initialized(&self) -> bool { 3031 for v in &self.account_id { 3032 if !v.is_initialized() { 3033 return false; 3034 } 3035 }; 3036 for v in &self.authorization_request { 3037 if !v.is_initialized() { 3038 return false; 3039 } 3040 }; 3041 true 3042 } 3043 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>3044 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 3045 while !is.eof()? { 3046 let (field_number, wire_type) = is.read_tag_unpack()?; 3047 match field_number { 3048 1 => { 3049 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account_id)?; 3050 }, 3051 2 => { 3052 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.authorization_request)?; 3053 }, 3054 3 => { 3055 if wire_type != ::protobuf::wire_format::WireTypeVarint { 3056 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); 3057 } 3058 let tmp = is.read_bool()?; 3059 self.unlock_webauthn_secret = tmp; 3060 }, 3061 _ => { 3062 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 3063 }, 3064 }; 3065 } 3066 ::std::result::Result::Ok(()) 3067 } 3068 3069 // Compute sizes of nested messages 3070 #[allow(unused_variables)] compute_size(&self) -> u323071 fn compute_size(&self) -> u32 { 3072 let mut my_size = 0; 3073 if let Some(ref v) = self.account_id.as_ref() { 3074 let len = v.compute_size(); 3075 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 3076 } 3077 if let Some(ref v) = self.authorization_request.as_ref() { 3078 let len = v.compute_size(); 3079 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 3080 } 3081 if self.unlock_webauthn_secret != false { 3082 my_size += 2; 3083 } 3084 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 3085 self.cached_size.set(my_size); 3086 my_size 3087 } 3088 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>3089 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 3090 if let Some(ref v) = self.account_id.as_ref() { 3091 os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; 3092 os.write_raw_varint32(v.get_cached_size())?; 3093 v.write_to_with_cached_sizes(os)?; 3094 } 3095 if let Some(ref v) = self.authorization_request.as_ref() { 3096 os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; 3097 os.write_raw_varint32(v.get_cached_size())?; 3098 v.write_to_with_cached_sizes(os)?; 3099 } 3100 if self.unlock_webauthn_secret != false { 3101 os.write_bool(3, self.unlock_webauthn_secret)?; 3102 } 3103 os.write_unknown_fields(self.get_unknown_fields())?; 3104 ::std::result::Result::Ok(()) 3105 } 3106 get_cached_size(&self) -> u323107 fn get_cached_size(&self) -> u32 { 3108 self.cached_size.get() 3109 } 3110 get_unknown_fields(&self) -> &::protobuf::UnknownFields3111 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 3112 &self.unknown_fields 3113 } 3114 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields3115 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 3116 &mut self.unknown_fields 3117 } 3118 as_any(&self) -> &dyn (::std::any::Any)3119 fn as_any(&self) -> &dyn (::std::any::Any) { 3120 self as &dyn (::std::any::Any) 3121 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)3122 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 3123 self as &mut dyn (::std::any::Any) 3124 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>3125 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 3126 self 3127 } 3128 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor3129 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 3130 Self::descriptor_static() 3131 } 3132 new() -> CheckKeyRequest3133 fn new() -> CheckKeyRequest { 3134 CheckKeyRequest::new() 3135 } 3136 default_instance() -> &'static CheckKeyRequest3137 fn default_instance() -> &'static CheckKeyRequest { 3138 static instance: ::protobuf::rt::LazyV2<CheckKeyRequest> = ::protobuf::rt::LazyV2::INIT; 3139 instance.get(CheckKeyRequest::new) 3140 } 3141 } 3142 3143 impl ::protobuf::Clear for CheckKeyRequest { clear(&mut self)3144 fn clear(&mut self) { 3145 self.account_id.clear(); 3146 self.authorization_request.clear(); 3147 self.unlock_webauthn_secret = false; 3148 self.unknown_fields.clear(); 3149 } 3150 } 3151 3152 impl ::protobuf::reflect::ProtobufValue for CheckKeyRequest { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef3153 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 3154 ::protobuf::reflect::ReflectValueRef::Message(self) 3155 } 3156 } 3157 3158 #[derive(PartialEq,Clone,Default,Debug)] 3159 pub struct CheckKeyReply { 3160 // message fields 3161 pub error: CryptohomeErrorCode, 3162 // special fields 3163 pub unknown_fields: ::protobuf::UnknownFields, 3164 pub cached_size: ::protobuf::CachedSize, 3165 } 3166 3167 impl<'a> ::std::default::Default for &'a CheckKeyReply { default() -> &'a CheckKeyReply3168 fn default() -> &'a CheckKeyReply { 3169 <CheckKeyReply as ::protobuf::Message>::default_instance() 3170 } 3171 } 3172 3173 impl CheckKeyReply { new() -> CheckKeyReply3174 pub fn new() -> CheckKeyReply { 3175 ::std::default::Default::default() 3176 } 3177 3178 // .user_data_auth.CryptohomeErrorCode error = 1; 3179 3180 get_error(&self) -> CryptohomeErrorCode3181 pub fn get_error(&self) -> CryptohomeErrorCode { 3182 self.error 3183 } clear_error(&mut self)3184 pub fn clear_error(&mut self) { 3185 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 3186 } 3187 3188 // Param is passed by value, moved set_error(&mut self, v: CryptohomeErrorCode)3189 pub fn set_error(&mut self, v: CryptohomeErrorCode) { 3190 self.error = v; 3191 } 3192 } 3193 3194 impl ::protobuf::Message for CheckKeyReply { is_initialized(&self) -> bool3195 fn is_initialized(&self) -> bool { 3196 true 3197 } 3198 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>3199 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 3200 while !is.eof()? { 3201 let (field_number, wire_type) = is.read_tag_unpack()?; 3202 match field_number { 3203 1 => { 3204 ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? 3205 }, 3206 _ => { 3207 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 3208 }, 3209 }; 3210 } 3211 ::std::result::Result::Ok(()) 3212 } 3213 3214 // Compute sizes of nested messages 3215 #[allow(unused_variables)] compute_size(&self) -> u323216 fn compute_size(&self) -> u32 { 3217 let mut my_size = 0; 3218 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 3219 my_size += ::protobuf::rt::enum_size(1, self.error); 3220 } 3221 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 3222 self.cached_size.set(my_size); 3223 my_size 3224 } 3225 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>3226 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 3227 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 3228 os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; 3229 } 3230 os.write_unknown_fields(self.get_unknown_fields())?; 3231 ::std::result::Result::Ok(()) 3232 } 3233 get_cached_size(&self) -> u323234 fn get_cached_size(&self) -> u32 { 3235 self.cached_size.get() 3236 } 3237 get_unknown_fields(&self) -> &::protobuf::UnknownFields3238 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 3239 &self.unknown_fields 3240 } 3241 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields3242 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 3243 &mut self.unknown_fields 3244 } 3245 as_any(&self) -> &dyn (::std::any::Any)3246 fn as_any(&self) -> &dyn (::std::any::Any) { 3247 self as &dyn (::std::any::Any) 3248 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)3249 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 3250 self as &mut dyn (::std::any::Any) 3251 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>3252 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 3253 self 3254 } 3255 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor3256 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 3257 Self::descriptor_static() 3258 } 3259 new() -> CheckKeyReply3260 fn new() -> CheckKeyReply { 3261 CheckKeyReply::new() 3262 } 3263 default_instance() -> &'static CheckKeyReply3264 fn default_instance() -> &'static CheckKeyReply { 3265 static instance: ::protobuf::rt::LazyV2<CheckKeyReply> = ::protobuf::rt::LazyV2::INIT; 3266 instance.get(CheckKeyReply::new) 3267 } 3268 } 3269 3270 impl ::protobuf::Clear for CheckKeyReply { clear(&mut self)3271 fn clear(&mut self) { 3272 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 3273 self.unknown_fields.clear(); 3274 } 3275 } 3276 3277 impl ::protobuf::reflect::ProtobufValue for CheckKeyReply { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef3278 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 3279 ::protobuf::reflect::ReflectValueRef::Message(self) 3280 } 3281 } 3282 3283 #[derive(PartialEq,Clone,Default,Debug)] 3284 pub struct AddKeyRequest { 3285 // message fields 3286 pub account_id: ::protobuf::SingularPtrField<super::rpc::AccountIdentifier>, 3287 pub authorization_request: ::protobuf::SingularPtrField<super::rpc::AuthorizationRequest>, 3288 pub key: ::protobuf::SingularPtrField<super::key::Key>, 3289 pub clobber_if_exists: bool, 3290 // special fields 3291 pub unknown_fields: ::protobuf::UnknownFields, 3292 pub cached_size: ::protobuf::CachedSize, 3293 } 3294 3295 impl<'a> ::std::default::Default for &'a AddKeyRequest { default() -> &'a AddKeyRequest3296 fn default() -> &'a AddKeyRequest { 3297 <AddKeyRequest as ::protobuf::Message>::default_instance() 3298 } 3299 } 3300 3301 impl AddKeyRequest { new() -> AddKeyRequest3302 pub fn new() -> AddKeyRequest { 3303 ::std::default::Default::default() 3304 } 3305 3306 // .cryptohome.AccountIdentifier account_id = 1; 3307 3308 get_account_id(&self) -> &super::rpc::AccountIdentifier3309 pub fn get_account_id(&self) -> &super::rpc::AccountIdentifier { 3310 self.account_id.as_ref().unwrap_or_else(|| <super::rpc::AccountIdentifier as ::protobuf::Message>::default_instance()) 3311 } clear_account_id(&mut self)3312 pub fn clear_account_id(&mut self) { 3313 self.account_id.clear(); 3314 } 3315 has_account_id(&self) -> bool3316 pub fn has_account_id(&self) -> bool { 3317 self.account_id.is_some() 3318 } 3319 3320 // Param is passed by value, moved set_account_id(&mut self, v: super::rpc::AccountIdentifier)3321 pub fn set_account_id(&mut self, v: super::rpc::AccountIdentifier) { 3322 self.account_id = ::protobuf::SingularPtrField::some(v); 3323 } 3324 3325 // Mutable pointer to the field. 3326 // If field is not initialized, it is initialized with default value first. mut_account_id(&mut self) -> &mut super::rpc::AccountIdentifier3327 pub fn mut_account_id(&mut self) -> &mut super::rpc::AccountIdentifier { 3328 if self.account_id.is_none() { 3329 self.account_id.set_default(); 3330 } 3331 self.account_id.as_mut().unwrap() 3332 } 3333 3334 // Take field take_account_id(&mut self) -> super::rpc::AccountIdentifier3335 pub fn take_account_id(&mut self) -> super::rpc::AccountIdentifier { 3336 self.account_id.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) 3337 } 3338 3339 // .cryptohome.AuthorizationRequest authorization_request = 2; 3340 3341 get_authorization_request(&self) -> &super::rpc::AuthorizationRequest3342 pub fn get_authorization_request(&self) -> &super::rpc::AuthorizationRequest { 3343 self.authorization_request.as_ref().unwrap_or_else(|| <super::rpc::AuthorizationRequest as ::protobuf::Message>::default_instance()) 3344 } clear_authorization_request(&mut self)3345 pub fn clear_authorization_request(&mut self) { 3346 self.authorization_request.clear(); 3347 } 3348 has_authorization_request(&self) -> bool3349 pub fn has_authorization_request(&self) -> bool { 3350 self.authorization_request.is_some() 3351 } 3352 3353 // Param is passed by value, moved set_authorization_request(&mut self, v: super::rpc::AuthorizationRequest)3354 pub fn set_authorization_request(&mut self, v: super::rpc::AuthorizationRequest) { 3355 self.authorization_request = ::protobuf::SingularPtrField::some(v); 3356 } 3357 3358 // Mutable pointer to the field. 3359 // If field is not initialized, it is initialized with default value first. mut_authorization_request(&mut self) -> &mut super::rpc::AuthorizationRequest3360 pub fn mut_authorization_request(&mut self) -> &mut super::rpc::AuthorizationRequest { 3361 if self.authorization_request.is_none() { 3362 self.authorization_request.set_default(); 3363 } 3364 self.authorization_request.as_mut().unwrap() 3365 } 3366 3367 // Take field take_authorization_request(&mut self) -> super::rpc::AuthorizationRequest3368 pub fn take_authorization_request(&mut self) -> super::rpc::AuthorizationRequest { 3369 self.authorization_request.take().unwrap_or_else(|| super::rpc::AuthorizationRequest::new()) 3370 } 3371 3372 // .cryptohome.Key key = 3; 3373 3374 get_key(&self) -> &super::key::Key3375 pub fn get_key(&self) -> &super::key::Key { 3376 self.key.as_ref().unwrap_or_else(|| <super::key::Key as ::protobuf::Message>::default_instance()) 3377 } clear_key(&mut self)3378 pub fn clear_key(&mut self) { 3379 self.key.clear(); 3380 } 3381 has_key(&self) -> bool3382 pub fn has_key(&self) -> bool { 3383 self.key.is_some() 3384 } 3385 3386 // Param is passed by value, moved set_key(&mut self, v: super::key::Key)3387 pub fn set_key(&mut self, v: super::key::Key) { 3388 self.key = ::protobuf::SingularPtrField::some(v); 3389 } 3390 3391 // Mutable pointer to the field. 3392 // If field is not initialized, it is initialized with default value first. mut_key(&mut self) -> &mut super::key::Key3393 pub fn mut_key(&mut self) -> &mut super::key::Key { 3394 if self.key.is_none() { 3395 self.key.set_default(); 3396 } 3397 self.key.as_mut().unwrap() 3398 } 3399 3400 // Take field take_key(&mut self) -> super::key::Key3401 pub fn take_key(&mut self) -> super::key::Key { 3402 self.key.take().unwrap_or_else(|| super::key::Key::new()) 3403 } 3404 3405 // bool clobber_if_exists = 4; 3406 3407 get_clobber_if_exists(&self) -> bool3408 pub fn get_clobber_if_exists(&self) -> bool { 3409 self.clobber_if_exists 3410 } clear_clobber_if_exists(&mut self)3411 pub fn clear_clobber_if_exists(&mut self) { 3412 self.clobber_if_exists = false; 3413 } 3414 3415 // Param is passed by value, moved set_clobber_if_exists(&mut self, v: bool)3416 pub fn set_clobber_if_exists(&mut self, v: bool) { 3417 self.clobber_if_exists = v; 3418 } 3419 } 3420 3421 impl ::protobuf::Message for AddKeyRequest { is_initialized(&self) -> bool3422 fn is_initialized(&self) -> bool { 3423 for v in &self.account_id { 3424 if !v.is_initialized() { 3425 return false; 3426 } 3427 }; 3428 for v in &self.authorization_request { 3429 if !v.is_initialized() { 3430 return false; 3431 } 3432 }; 3433 for v in &self.key { 3434 if !v.is_initialized() { 3435 return false; 3436 } 3437 }; 3438 true 3439 } 3440 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>3441 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 3442 while !is.eof()? { 3443 let (field_number, wire_type) = is.read_tag_unpack()?; 3444 match field_number { 3445 1 => { 3446 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account_id)?; 3447 }, 3448 2 => { 3449 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.authorization_request)?; 3450 }, 3451 3 => { 3452 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.key)?; 3453 }, 3454 4 => { 3455 if wire_type != ::protobuf::wire_format::WireTypeVarint { 3456 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); 3457 } 3458 let tmp = is.read_bool()?; 3459 self.clobber_if_exists = tmp; 3460 }, 3461 _ => { 3462 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 3463 }, 3464 }; 3465 } 3466 ::std::result::Result::Ok(()) 3467 } 3468 3469 // Compute sizes of nested messages 3470 #[allow(unused_variables)] compute_size(&self) -> u323471 fn compute_size(&self) -> u32 { 3472 let mut my_size = 0; 3473 if let Some(ref v) = self.account_id.as_ref() { 3474 let len = v.compute_size(); 3475 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 3476 } 3477 if let Some(ref v) = self.authorization_request.as_ref() { 3478 let len = v.compute_size(); 3479 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 3480 } 3481 if let Some(ref v) = self.key.as_ref() { 3482 let len = v.compute_size(); 3483 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 3484 } 3485 if self.clobber_if_exists != false { 3486 my_size += 2; 3487 } 3488 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 3489 self.cached_size.set(my_size); 3490 my_size 3491 } 3492 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>3493 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 3494 if let Some(ref v) = self.account_id.as_ref() { 3495 os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; 3496 os.write_raw_varint32(v.get_cached_size())?; 3497 v.write_to_with_cached_sizes(os)?; 3498 } 3499 if let Some(ref v) = self.authorization_request.as_ref() { 3500 os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; 3501 os.write_raw_varint32(v.get_cached_size())?; 3502 v.write_to_with_cached_sizes(os)?; 3503 } 3504 if let Some(ref v) = self.key.as_ref() { 3505 os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; 3506 os.write_raw_varint32(v.get_cached_size())?; 3507 v.write_to_with_cached_sizes(os)?; 3508 } 3509 if self.clobber_if_exists != false { 3510 os.write_bool(4, self.clobber_if_exists)?; 3511 } 3512 os.write_unknown_fields(self.get_unknown_fields())?; 3513 ::std::result::Result::Ok(()) 3514 } 3515 get_cached_size(&self) -> u323516 fn get_cached_size(&self) -> u32 { 3517 self.cached_size.get() 3518 } 3519 get_unknown_fields(&self) -> &::protobuf::UnknownFields3520 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 3521 &self.unknown_fields 3522 } 3523 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields3524 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 3525 &mut self.unknown_fields 3526 } 3527 as_any(&self) -> &dyn (::std::any::Any)3528 fn as_any(&self) -> &dyn (::std::any::Any) { 3529 self as &dyn (::std::any::Any) 3530 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)3531 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 3532 self as &mut dyn (::std::any::Any) 3533 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>3534 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 3535 self 3536 } 3537 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor3538 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 3539 Self::descriptor_static() 3540 } 3541 new() -> AddKeyRequest3542 fn new() -> AddKeyRequest { 3543 AddKeyRequest::new() 3544 } 3545 default_instance() -> &'static AddKeyRequest3546 fn default_instance() -> &'static AddKeyRequest { 3547 static instance: ::protobuf::rt::LazyV2<AddKeyRequest> = ::protobuf::rt::LazyV2::INIT; 3548 instance.get(AddKeyRequest::new) 3549 } 3550 } 3551 3552 impl ::protobuf::Clear for AddKeyRequest { clear(&mut self)3553 fn clear(&mut self) { 3554 self.account_id.clear(); 3555 self.authorization_request.clear(); 3556 self.key.clear(); 3557 self.clobber_if_exists = false; 3558 self.unknown_fields.clear(); 3559 } 3560 } 3561 3562 impl ::protobuf::reflect::ProtobufValue for AddKeyRequest { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef3563 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 3564 ::protobuf::reflect::ReflectValueRef::Message(self) 3565 } 3566 } 3567 3568 #[derive(PartialEq,Clone,Default,Debug)] 3569 pub struct AddKeyReply { 3570 // message fields 3571 pub error: CryptohomeErrorCode, 3572 // special fields 3573 pub unknown_fields: ::protobuf::UnknownFields, 3574 pub cached_size: ::protobuf::CachedSize, 3575 } 3576 3577 impl<'a> ::std::default::Default for &'a AddKeyReply { default() -> &'a AddKeyReply3578 fn default() -> &'a AddKeyReply { 3579 <AddKeyReply as ::protobuf::Message>::default_instance() 3580 } 3581 } 3582 3583 impl AddKeyReply { new() -> AddKeyReply3584 pub fn new() -> AddKeyReply { 3585 ::std::default::Default::default() 3586 } 3587 3588 // .user_data_auth.CryptohomeErrorCode error = 1; 3589 3590 get_error(&self) -> CryptohomeErrorCode3591 pub fn get_error(&self) -> CryptohomeErrorCode { 3592 self.error 3593 } clear_error(&mut self)3594 pub fn clear_error(&mut self) { 3595 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 3596 } 3597 3598 // Param is passed by value, moved set_error(&mut self, v: CryptohomeErrorCode)3599 pub fn set_error(&mut self, v: CryptohomeErrorCode) { 3600 self.error = v; 3601 } 3602 } 3603 3604 impl ::protobuf::Message for AddKeyReply { is_initialized(&self) -> bool3605 fn is_initialized(&self) -> bool { 3606 true 3607 } 3608 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>3609 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 3610 while !is.eof()? { 3611 let (field_number, wire_type) = is.read_tag_unpack()?; 3612 match field_number { 3613 1 => { 3614 ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? 3615 }, 3616 _ => { 3617 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 3618 }, 3619 }; 3620 } 3621 ::std::result::Result::Ok(()) 3622 } 3623 3624 // Compute sizes of nested messages 3625 #[allow(unused_variables)] compute_size(&self) -> u323626 fn compute_size(&self) -> u32 { 3627 let mut my_size = 0; 3628 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 3629 my_size += ::protobuf::rt::enum_size(1, self.error); 3630 } 3631 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 3632 self.cached_size.set(my_size); 3633 my_size 3634 } 3635 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>3636 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 3637 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 3638 os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; 3639 } 3640 os.write_unknown_fields(self.get_unknown_fields())?; 3641 ::std::result::Result::Ok(()) 3642 } 3643 get_cached_size(&self) -> u323644 fn get_cached_size(&self) -> u32 { 3645 self.cached_size.get() 3646 } 3647 get_unknown_fields(&self) -> &::protobuf::UnknownFields3648 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 3649 &self.unknown_fields 3650 } 3651 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields3652 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 3653 &mut self.unknown_fields 3654 } 3655 as_any(&self) -> &dyn (::std::any::Any)3656 fn as_any(&self) -> &dyn (::std::any::Any) { 3657 self as &dyn (::std::any::Any) 3658 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)3659 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 3660 self as &mut dyn (::std::any::Any) 3661 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>3662 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 3663 self 3664 } 3665 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor3666 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 3667 Self::descriptor_static() 3668 } 3669 new() -> AddKeyReply3670 fn new() -> AddKeyReply { 3671 AddKeyReply::new() 3672 } 3673 default_instance() -> &'static AddKeyReply3674 fn default_instance() -> &'static AddKeyReply { 3675 static instance: ::protobuf::rt::LazyV2<AddKeyReply> = ::protobuf::rt::LazyV2::INIT; 3676 instance.get(AddKeyReply::new) 3677 } 3678 } 3679 3680 impl ::protobuf::Clear for AddKeyReply { clear(&mut self)3681 fn clear(&mut self) { 3682 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 3683 self.unknown_fields.clear(); 3684 } 3685 } 3686 3687 impl ::protobuf::reflect::ProtobufValue for AddKeyReply { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef3688 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 3689 ::protobuf::reflect::ReflectValueRef::Message(self) 3690 } 3691 } 3692 3693 #[derive(PartialEq,Clone,Default,Debug)] 3694 pub struct RemoveKeyRequest { 3695 // message fields 3696 pub account_id: ::protobuf::SingularPtrField<super::rpc::AccountIdentifier>, 3697 pub authorization_request: ::protobuf::SingularPtrField<super::rpc::AuthorizationRequest>, 3698 pub key: ::protobuf::SingularPtrField<super::key::Key>, 3699 // special fields 3700 pub unknown_fields: ::protobuf::UnknownFields, 3701 pub cached_size: ::protobuf::CachedSize, 3702 } 3703 3704 impl<'a> ::std::default::Default for &'a RemoveKeyRequest { default() -> &'a RemoveKeyRequest3705 fn default() -> &'a RemoveKeyRequest { 3706 <RemoveKeyRequest as ::protobuf::Message>::default_instance() 3707 } 3708 } 3709 3710 impl RemoveKeyRequest { new() -> RemoveKeyRequest3711 pub fn new() -> RemoveKeyRequest { 3712 ::std::default::Default::default() 3713 } 3714 3715 // .cryptohome.AccountIdentifier account_id = 1; 3716 3717 get_account_id(&self) -> &super::rpc::AccountIdentifier3718 pub fn get_account_id(&self) -> &super::rpc::AccountIdentifier { 3719 self.account_id.as_ref().unwrap_or_else(|| <super::rpc::AccountIdentifier as ::protobuf::Message>::default_instance()) 3720 } clear_account_id(&mut self)3721 pub fn clear_account_id(&mut self) { 3722 self.account_id.clear(); 3723 } 3724 has_account_id(&self) -> bool3725 pub fn has_account_id(&self) -> bool { 3726 self.account_id.is_some() 3727 } 3728 3729 // Param is passed by value, moved set_account_id(&mut self, v: super::rpc::AccountIdentifier)3730 pub fn set_account_id(&mut self, v: super::rpc::AccountIdentifier) { 3731 self.account_id = ::protobuf::SingularPtrField::some(v); 3732 } 3733 3734 // Mutable pointer to the field. 3735 // If field is not initialized, it is initialized with default value first. mut_account_id(&mut self) -> &mut super::rpc::AccountIdentifier3736 pub fn mut_account_id(&mut self) -> &mut super::rpc::AccountIdentifier { 3737 if self.account_id.is_none() { 3738 self.account_id.set_default(); 3739 } 3740 self.account_id.as_mut().unwrap() 3741 } 3742 3743 // Take field take_account_id(&mut self) -> super::rpc::AccountIdentifier3744 pub fn take_account_id(&mut self) -> super::rpc::AccountIdentifier { 3745 self.account_id.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) 3746 } 3747 3748 // .cryptohome.AuthorizationRequest authorization_request = 2; 3749 3750 get_authorization_request(&self) -> &super::rpc::AuthorizationRequest3751 pub fn get_authorization_request(&self) -> &super::rpc::AuthorizationRequest { 3752 self.authorization_request.as_ref().unwrap_or_else(|| <super::rpc::AuthorizationRequest as ::protobuf::Message>::default_instance()) 3753 } clear_authorization_request(&mut self)3754 pub fn clear_authorization_request(&mut self) { 3755 self.authorization_request.clear(); 3756 } 3757 has_authorization_request(&self) -> bool3758 pub fn has_authorization_request(&self) -> bool { 3759 self.authorization_request.is_some() 3760 } 3761 3762 // Param is passed by value, moved set_authorization_request(&mut self, v: super::rpc::AuthorizationRequest)3763 pub fn set_authorization_request(&mut self, v: super::rpc::AuthorizationRequest) { 3764 self.authorization_request = ::protobuf::SingularPtrField::some(v); 3765 } 3766 3767 // Mutable pointer to the field. 3768 // If field is not initialized, it is initialized with default value first. mut_authorization_request(&mut self) -> &mut super::rpc::AuthorizationRequest3769 pub fn mut_authorization_request(&mut self) -> &mut super::rpc::AuthorizationRequest { 3770 if self.authorization_request.is_none() { 3771 self.authorization_request.set_default(); 3772 } 3773 self.authorization_request.as_mut().unwrap() 3774 } 3775 3776 // Take field take_authorization_request(&mut self) -> super::rpc::AuthorizationRequest3777 pub fn take_authorization_request(&mut self) -> super::rpc::AuthorizationRequest { 3778 self.authorization_request.take().unwrap_or_else(|| super::rpc::AuthorizationRequest::new()) 3779 } 3780 3781 // .cryptohome.Key key = 3; 3782 3783 get_key(&self) -> &super::key::Key3784 pub fn get_key(&self) -> &super::key::Key { 3785 self.key.as_ref().unwrap_or_else(|| <super::key::Key as ::protobuf::Message>::default_instance()) 3786 } clear_key(&mut self)3787 pub fn clear_key(&mut self) { 3788 self.key.clear(); 3789 } 3790 has_key(&self) -> bool3791 pub fn has_key(&self) -> bool { 3792 self.key.is_some() 3793 } 3794 3795 // Param is passed by value, moved set_key(&mut self, v: super::key::Key)3796 pub fn set_key(&mut self, v: super::key::Key) { 3797 self.key = ::protobuf::SingularPtrField::some(v); 3798 } 3799 3800 // Mutable pointer to the field. 3801 // If field is not initialized, it is initialized with default value first. mut_key(&mut self) -> &mut super::key::Key3802 pub fn mut_key(&mut self) -> &mut super::key::Key { 3803 if self.key.is_none() { 3804 self.key.set_default(); 3805 } 3806 self.key.as_mut().unwrap() 3807 } 3808 3809 // Take field take_key(&mut self) -> super::key::Key3810 pub fn take_key(&mut self) -> super::key::Key { 3811 self.key.take().unwrap_or_else(|| super::key::Key::new()) 3812 } 3813 } 3814 3815 impl ::protobuf::Message for RemoveKeyRequest { is_initialized(&self) -> bool3816 fn is_initialized(&self) -> bool { 3817 for v in &self.account_id { 3818 if !v.is_initialized() { 3819 return false; 3820 } 3821 }; 3822 for v in &self.authorization_request { 3823 if !v.is_initialized() { 3824 return false; 3825 } 3826 }; 3827 for v in &self.key { 3828 if !v.is_initialized() { 3829 return false; 3830 } 3831 }; 3832 true 3833 } 3834 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>3835 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 3836 while !is.eof()? { 3837 let (field_number, wire_type) = is.read_tag_unpack()?; 3838 match field_number { 3839 1 => { 3840 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account_id)?; 3841 }, 3842 2 => { 3843 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.authorization_request)?; 3844 }, 3845 3 => { 3846 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.key)?; 3847 }, 3848 _ => { 3849 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 3850 }, 3851 }; 3852 } 3853 ::std::result::Result::Ok(()) 3854 } 3855 3856 // Compute sizes of nested messages 3857 #[allow(unused_variables)] compute_size(&self) -> u323858 fn compute_size(&self) -> u32 { 3859 let mut my_size = 0; 3860 if let Some(ref v) = self.account_id.as_ref() { 3861 let len = v.compute_size(); 3862 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 3863 } 3864 if let Some(ref v) = self.authorization_request.as_ref() { 3865 let len = v.compute_size(); 3866 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 3867 } 3868 if let Some(ref v) = self.key.as_ref() { 3869 let len = v.compute_size(); 3870 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 3871 } 3872 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 3873 self.cached_size.set(my_size); 3874 my_size 3875 } 3876 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>3877 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 3878 if let Some(ref v) = self.account_id.as_ref() { 3879 os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; 3880 os.write_raw_varint32(v.get_cached_size())?; 3881 v.write_to_with_cached_sizes(os)?; 3882 } 3883 if let Some(ref v) = self.authorization_request.as_ref() { 3884 os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; 3885 os.write_raw_varint32(v.get_cached_size())?; 3886 v.write_to_with_cached_sizes(os)?; 3887 } 3888 if let Some(ref v) = self.key.as_ref() { 3889 os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; 3890 os.write_raw_varint32(v.get_cached_size())?; 3891 v.write_to_with_cached_sizes(os)?; 3892 } 3893 os.write_unknown_fields(self.get_unknown_fields())?; 3894 ::std::result::Result::Ok(()) 3895 } 3896 get_cached_size(&self) -> u323897 fn get_cached_size(&self) -> u32 { 3898 self.cached_size.get() 3899 } 3900 get_unknown_fields(&self) -> &::protobuf::UnknownFields3901 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 3902 &self.unknown_fields 3903 } 3904 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields3905 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 3906 &mut self.unknown_fields 3907 } 3908 as_any(&self) -> &dyn (::std::any::Any)3909 fn as_any(&self) -> &dyn (::std::any::Any) { 3910 self as &dyn (::std::any::Any) 3911 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)3912 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 3913 self as &mut dyn (::std::any::Any) 3914 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>3915 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 3916 self 3917 } 3918 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor3919 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 3920 Self::descriptor_static() 3921 } 3922 new() -> RemoveKeyRequest3923 fn new() -> RemoveKeyRequest { 3924 RemoveKeyRequest::new() 3925 } 3926 default_instance() -> &'static RemoveKeyRequest3927 fn default_instance() -> &'static RemoveKeyRequest { 3928 static instance: ::protobuf::rt::LazyV2<RemoveKeyRequest> = ::protobuf::rt::LazyV2::INIT; 3929 instance.get(RemoveKeyRequest::new) 3930 } 3931 } 3932 3933 impl ::protobuf::Clear for RemoveKeyRequest { clear(&mut self)3934 fn clear(&mut self) { 3935 self.account_id.clear(); 3936 self.authorization_request.clear(); 3937 self.key.clear(); 3938 self.unknown_fields.clear(); 3939 } 3940 } 3941 3942 impl ::protobuf::reflect::ProtobufValue for RemoveKeyRequest { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef3943 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 3944 ::protobuf::reflect::ReflectValueRef::Message(self) 3945 } 3946 } 3947 3948 #[derive(PartialEq,Clone,Default,Debug)] 3949 pub struct RemoveKeyReply { 3950 // message fields 3951 pub error: CryptohomeErrorCode, 3952 // special fields 3953 pub unknown_fields: ::protobuf::UnknownFields, 3954 pub cached_size: ::protobuf::CachedSize, 3955 } 3956 3957 impl<'a> ::std::default::Default for &'a RemoveKeyReply { default() -> &'a RemoveKeyReply3958 fn default() -> &'a RemoveKeyReply { 3959 <RemoveKeyReply as ::protobuf::Message>::default_instance() 3960 } 3961 } 3962 3963 impl RemoveKeyReply { new() -> RemoveKeyReply3964 pub fn new() -> RemoveKeyReply { 3965 ::std::default::Default::default() 3966 } 3967 3968 // .user_data_auth.CryptohomeErrorCode error = 1; 3969 3970 get_error(&self) -> CryptohomeErrorCode3971 pub fn get_error(&self) -> CryptohomeErrorCode { 3972 self.error 3973 } clear_error(&mut self)3974 pub fn clear_error(&mut self) { 3975 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 3976 } 3977 3978 // Param is passed by value, moved set_error(&mut self, v: CryptohomeErrorCode)3979 pub fn set_error(&mut self, v: CryptohomeErrorCode) { 3980 self.error = v; 3981 } 3982 } 3983 3984 impl ::protobuf::Message for RemoveKeyReply { is_initialized(&self) -> bool3985 fn is_initialized(&self) -> bool { 3986 true 3987 } 3988 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>3989 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 3990 while !is.eof()? { 3991 let (field_number, wire_type) = is.read_tag_unpack()?; 3992 match field_number { 3993 1 => { 3994 ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? 3995 }, 3996 _ => { 3997 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 3998 }, 3999 }; 4000 } 4001 ::std::result::Result::Ok(()) 4002 } 4003 4004 // Compute sizes of nested messages 4005 #[allow(unused_variables)] compute_size(&self) -> u324006 fn compute_size(&self) -> u32 { 4007 let mut my_size = 0; 4008 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 4009 my_size += ::protobuf::rt::enum_size(1, self.error); 4010 } 4011 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 4012 self.cached_size.set(my_size); 4013 my_size 4014 } 4015 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>4016 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 4017 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 4018 os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; 4019 } 4020 os.write_unknown_fields(self.get_unknown_fields())?; 4021 ::std::result::Result::Ok(()) 4022 } 4023 get_cached_size(&self) -> u324024 fn get_cached_size(&self) -> u32 { 4025 self.cached_size.get() 4026 } 4027 get_unknown_fields(&self) -> &::protobuf::UnknownFields4028 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 4029 &self.unknown_fields 4030 } 4031 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields4032 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 4033 &mut self.unknown_fields 4034 } 4035 as_any(&self) -> &dyn (::std::any::Any)4036 fn as_any(&self) -> &dyn (::std::any::Any) { 4037 self as &dyn (::std::any::Any) 4038 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)4039 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 4040 self as &mut dyn (::std::any::Any) 4041 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>4042 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 4043 self 4044 } 4045 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor4046 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 4047 Self::descriptor_static() 4048 } 4049 new() -> RemoveKeyReply4050 fn new() -> RemoveKeyReply { 4051 RemoveKeyReply::new() 4052 } 4053 default_instance() -> &'static RemoveKeyReply4054 fn default_instance() -> &'static RemoveKeyReply { 4055 static instance: ::protobuf::rt::LazyV2<RemoveKeyReply> = ::protobuf::rt::LazyV2::INIT; 4056 instance.get(RemoveKeyReply::new) 4057 } 4058 } 4059 4060 impl ::protobuf::Clear for RemoveKeyReply { clear(&mut self)4061 fn clear(&mut self) { 4062 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 4063 self.unknown_fields.clear(); 4064 } 4065 } 4066 4067 impl ::protobuf::reflect::ProtobufValue for RemoveKeyReply { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef4068 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 4069 ::protobuf::reflect::ReflectValueRef::Message(self) 4070 } 4071 } 4072 4073 #[derive(PartialEq,Clone,Default,Debug)] 4074 pub struct MassRemoveKeysRequest { 4075 // message fields 4076 pub account_id: ::protobuf::SingularPtrField<super::rpc::AccountIdentifier>, 4077 pub authorization_request: ::protobuf::SingularPtrField<super::rpc::AuthorizationRequest>, 4078 pub exempt_key_data: ::protobuf::RepeatedField<super::key::KeyData>, 4079 // special fields 4080 pub unknown_fields: ::protobuf::UnknownFields, 4081 pub cached_size: ::protobuf::CachedSize, 4082 } 4083 4084 impl<'a> ::std::default::Default for &'a MassRemoveKeysRequest { default() -> &'a MassRemoveKeysRequest4085 fn default() -> &'a MassRemoveKeysRequest { 4086 <MassRemoveKeysRequest as ::protobuf::Message>::default_instance() 4087 } 4088 } 4089 4090 impl MassRemoveKeysRequest { new() -> MassRemoveKeysRequest4091 pub fn new() -> MassRemoveKeysRequest { 4092 ::std::default::Default::default() 4093 } 4094 4095 // .cryptohome.AccountIdentifier account_id = 1; 4096 4097 get_account_id(&self) -> &super::rpc::AccountIdentifier4098 pub fn get_account_id(&self) -> &super::rpc::AccountIdentifier { 4099 self.account_id.as_ref().unwrap_or_else(|| <super::rpc::AccountIdentifier as ::protobuf::Message>::default_instance()) 4100 } clear_account_id(&mut self)4101 pub fn clear_account_id(&mut self) { 4102 self.account_id.clear(); 4103 } 4104 has_account_id(&self) -> bool4105 pub fn has_account_id(&self) -> bool { 4106 self.account_id.is_some() 4107 } 4108 4109 // Param is passed by value, moved set_account_id(&mut self, v: super::rpc::AccountIdentifier)4110 pub fn set_account_id(&mut self, v: super::rpc::AccountIdentifier) { 4111 self.account_id = ::protobuf::SingularPtrField::some(v); 4112 } 4113 4114 // Mutable pointer to the field. 4115 // If field is not initialized, it is initialized with default value first. mut_account_id(&mut self) -> &mut super::rpc::AccountIdentifier4116 pub fn mut_account_id(&mut self) -> &mut super::rpc::AccountIdentifier { 4117 if self.account_id.is_none() { 4118 self.account_id.set_default(); 4119 } 4120 self.account_id.as_mut().unwrap() 4121 } 4122 4123 // Take field take_account_id(&mut self) -> super::rpc::AccountIdentifier4124 pub fn take_account_id(&mut self) -> super::rpc::AccountIdentifier { 4125 self.account_id.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) 4126 } 4127 4128 // .cryptohome.AuthorizationRequest authorization_request = 2; 4129 4130 get_authorization_request(&self) -> &super::rpc::AuthorizationRequest4131 pub fn get_authorization_request(&self) -> &super::rpc::AuthorizationRequest { 4132 self.authorization_request.as_ref().unwrap_or_else(|| <super::rpc::AuthorizationRequest as ::protobuf::Message>::default_instance()) 4133 } clear_authorization_request(&mut self)4134 pub fn clear_authorization_request(&mut self) { 4135 self.authorization_request.clear(); 4136 } 4137 has_authorization_request(&self) -> bool4138 pub fn has_authorization_request(&self) -> bool { 4139 self.authorization_request.is_some() 4140 } 4141 4142 // Param is passed by value, moved set_authorization_request(&mut self, v: super::rpc::AuthorizationRequest)4143 pub fn set_authorization_request(&mut self, v: super::rpc::AuthorizationRequest) { 4144 self.authorization_request = ::protobuf::SingularPtrField::some(v); 4145 } 4146 4147 // Mutable pointer to the field. 4148 // If field is not initialized, it is initialized with default value first. mut_authorization_request(&mut self) -> &mut super::rpc::AuthorizationRequest4149 pub fn mut_authorization_request(&mut self) -> &mut super::rpc::AuthorizationRequest { 4150 if self.authorization_request.is_none() { 4151 self.authorization_request.set_default(); 4152 } 4153 self.authorization_request.as_mut().unwrap() 4154 } 4155 4156 // Take field take_authorization_request(&mut self) -> super::rpc::AuthorizationRequest4157 pub fn take_authorization_request(&mut self) -> super::rpc::AuthorizationRequest { 4158 self.authorization_request.take().unwrap_or_else(|| super::rpc::AuthorizationRequest::new()) 4159 } 4160 4161 // repeated .cryptohome.KeyData exempt_key_data = 3; 4162 4163 get_exempt_key_data(&self) -> &[super::key::KeyData]4164 pub fn get_exempt_key_data(&self) -> &[super::key::KeyData] { 4165 &self.exempt_key_data 4166 } clear_exempt_key_data(&mut self)4167 pub fn clear_exempt_key_data(&mut self) { 4168 self.exempt_key_data.clear(); 4169 } 4170 4171 // Param is passed by value, moved set_exempt_key_data(&mut self, v: ::protobuf::RepeatedField<super::key::KeyData>)4172 pub fn set_exempt_key_data(&mut self, v: ::protobuf::RepeatedField<super::key::KeyData>) { 4173 self.exempt_key_data = v; 4174 } 4175 4176 // Mutable pointer to the field. mut_exempt_key_data(&mut self) -> &mut ::protobuf::RepeatedField<super::key::KeyData>4177 pub fn mut_exempt_key_data(&mut self) -> &mut ::protobuf::RepeatedField<super::key::KeyData> { 4178 &mut self.exempt_key_data 4179 } 4180 4181 // Take field take_exempt_key_data(&mut self) -> ::protobuf::RepeatedField<super::key::KeyData>4182 pub fn take_exempt_key_data(&mut self) -> ::protobuf::RepeatedField<super::key::KeyData> { 4183 ::std::mem::replace(&mut self.exempt_key_data, ::protobuf::RepeatedField::new()) 4184 } 4185 } 4186 4187 impl ::protobuf::Message for MassRemoveKeysRequest { is_initialized(&self) -> bool4188 fn is_initialized(&self) -> bool { 4189 for v in &self.account_id { 4190 if !v.is_initialized() { 4191 return false; 4192 } 4193 }; 4194 for v in &self.authorization_request { 4195 if !v.is_initialized() { 4196 return false; 4197 } 4198 }; 4199 for v in &self.exempt_key_data { 4200 if !v.is_initialized() { 4201 return false; 4202 } 4203 }; 4204 true 4205 } 4206 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>4207 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 4208 while !is.eof()? { 4209 let (field_number, wire_type) = is.read_tag_unpack()?; 4210 match field_number { 4211 1 => { 4212 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account_id)?; 4213 }, 4214 2 => { 4215 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.authorization_request)?; 4216 }, 4217 3 => { 4218 ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.exempt_key_data)?; 4219 }, 4220 _ => { 4221 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 4222 }, 4223 }; 4224 } 4225 ::std::result::Result::Ok(()) 4226 } 4227 4228 // Compute sizes of nested messages 4229 #[allow(unused_variables)] compute_size(&self) -> u324230 fn compute_size(&self) -> u32 { 4231 let mut my_size = 0; 4232 if let Some(ref v) = self.account_id.as_ref() { 4233 let len = v.compute_size(); 4234 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 4235 } 4236 if let Some(ref v) = self.authorization_request.as_ref() { 4237 let len = v.compute_size(); 4238 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 4239 } 4240 for value in &self.exempt_key_data { 4241 let len = value.compute_size(); 4242 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 4243 }; 4244 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 4245 self.cached_size.set(my_size); 4246 my_size 4247 } 4248 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>4249 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 4250 if let Some(ref v) = self.account_id.as_ref() { 4251 os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; 4252 os.write_raw_varint32(v.get_cached_size())?; 4253 v.write_to_with_cached_sizes(os)?; 4254 } 4255 if let Some(ref v) = self.authorization_request.as_ref() { 4256 os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; 4257 os.write_raw_varint32(v.get_cached_size())?; 4258 v.write_to_with_cached_sizes(os)?; 4259 } 4260 for v in &self.exempt_key_data { 4261 os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; 4262 os.write_raw_varint32(v.get_cached_size())?; 4263 v.write_to_with_cached_sizes(os)?; 4264 }; 4265 os.write_unknown_fields(self.get_unknown_fields())?; 4266 ::std::result::Result::Ok(()) 4267 } 4268 get_cached_size(&self) -> u324269 fn get_cached_size(&self) -> u32 { 4270 self.cached_size.get() 4271 } 4272 get_unknown_fields(&self) -> &::protobuf::UnknownFields4273 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 4274 &self.unknown_fields 4275 } 4276 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields4277 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 4278 &mut self.unknown_fields 4279 } 4280 as_any(&self) -> &dyn (::std::any::Any)4281 fn as_any(&self) -> &dyn (::std::any::Any) { 4282 self as &dyn (::std::any::Any) 4283 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)4284 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 4285 self as &mut dyn (::std::any::Any) 4286 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>4287 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 4288 self 4289 } 4290 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor4291 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 4292 Self::descriptor_static() 4293 } 4294 new() -> MassRemoveKeysRequest4295 fn new() -> MassRemoveKeysRequest { 4296 MassRemoveKeysRequest::new() 4297 } 4298 default_instance() -> &'static MassRemoveKeysRequest4299 fn default_instance() -> &'static MassRemoveKeysRequest { 4300 static instance: ::protobuf::rt::LazyV2<MassRemoveKeysRequest> = ::protobuf::rt::LazyV2::INIT; 4301 instance.get(MassRemoveKeysRequest::new) 4302 } 4303 } 4304 4305 impl ::protobuf::Clear for MassRemoveKeysRequest { clear(&mut self)4306 fn clear(&mut self) { 4307 self.account_id.clear(); 4308 self.authorization_request.clear(); 4309 self.exempt_key_data.clear(); 4310 self.unknown_fields.clear(); 4311 } 4312 } 4313 4314 impl ::protobuf::reflect::ProtobufValue for MassRemoveKeysRequest { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef4315 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 4316 ::protobuf::reflect::ReflectValueRef::Message(self) 4317 } 4318 } 4319 4320 #[derive(PartialEq,Clone,Default,Debug)] 4321 pub struct MassRemoveKeysReply { 4322 // message fields 4323 pub error: CryptohomeErrorCode, 4324 // special fields 4325 pub unknown_fields: ::protobuf::UnknownFields, 4326 pub cached_size: ::protobuf::CachedSize, 4327 } 4328 4329 impl<'a> ::std::default::Default for &'a MassRemoveKeysReply { default() -> &'a MassRemoveKeysReply4330 fn default() -> &'a MassRemoveKeysReply { 4331 <MassRemoveKeysReply as ::protobuf::Message>::default_instance() 4332 } 4333 } 4334 4335 impl MassRemoveKeysReply { new() -> MassRemoveKeysReply4336 pub fn new() -> MassRemoveKeysReply { 4337 ::std::default::Default::default() 4338 } 4339 4340 // .user_data_auth.CryptohomeErrorCode error = 1; 4341 4342 get_error(&self) -> CryptohomeErrorCode4343 pub fn get_error(&self) -> CryptohomeErrorCode { 4344 self.error 4345 } clear_error(&mut self)4346 pub fn clear_error(&mut self) { 4347 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 4348 } 4349 4350 // Param is passed by value, moved set_error(&mut self, v: CryptohomeErrorCode)4351 pub fn set_error(&mut self, v: CryptohomeErrorCode) { 4352 self.error = v; 4353 } 4354 } 4355 4356 impl ::protobuf::Message for MassRemoveKeysReply { is_initialized(&self) -> bool4357 fn is_initialized(&self) -> bool { 4358 true 4359 } 4360 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>4361 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 4362 while !is.eof()? { 4363 let (field_number, wire_type) = is.read_tag_unpack()?; 4364 match field_number { 4365 1 => { 4366 ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? 4367 }, 4368 _ => { 4369 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 4370 }, 4371 }; 4372 } 4373 ::std::result::Result::Ok(()) 4374 } 4375 4376 // Compute sizes of nested messages 4377 #[allow(unused_variables)] compute_size(&self) -> u324378 fn compute_size(&self) -> u32 { 4379 let mut my_size = 0; 4380 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 4381 my_size += ::protobuf::rt::enum_size(1, self.error); 4382 } 4383 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 4384 self.cached_size.set(my_size); 4385 my_size 4386 } 4387 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>4388 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 4389 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 4390 os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; 4391 } 4392 os.write_unknown_fields(self.get_unknown_fields())?; 4393 ::std::result::Result::Ok(()) 4394 } 4395 get_cached_size(&self) -> u324396 fn get_cached_size(&self) -> u32 { 4397 self.cached_size.get() 4398 } 4399 get_unknown_fields(&self) -> &::protobuf::UnknownFields4400 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 4401 &self.unknown_fields 4402 } 4403 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields4404 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 4405 &mut self.unknown_fields 4406 } 4407 as_any(&self) -> &dyn (::std::any::Any)4408 fn as_any(&self) -> &dyn (::std::any::Any) { 4409 self as &dyn (::std::any::Any) 4410 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)4411 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 4412 self as &mut dyn (::std::any::Any) 4413 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>4414 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 4415 self 4416 } 4417 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor4418 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 4419 Self::descriptor_static() 4420 } 4421 new() -> MassRemoveKeysReply4422 fn new() -> MassRemoveKeysReply { 4423 MassRemoveKeysReply::new() 4424 } 4425 default_instance() -> &'static MassRemoveKeysReply4426 fn default_instance() -> &'static MassRemoveKeysReply { 4427 static instance: ::protobuf::rt::LazyV2<MassRemoveKeysReply> = ::protobuf::rt::LazyV2::INIT; 4428 instance.get(MassRemoveKeysReply::new) 4429 } 4430 } 4431 4432 impl ::protobuf::Clear for MassRemoveKeysReply { clear(&mut self)4433 fn clear(&mut self) { 4434 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 4435 self.unknown_fields.clear(); 4436 } 4437 } 4438 4439 impl ::protobuf::reflect::ProtobufValue for MassRemoveKeysReply { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef4440 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 4441 ::protobuf::reflect::ReflectValueRef::Message(self) 4442 } 4443 } 4444 4445 #[derive(PartialEq,Clone,Default,Debug)] 4446 pub struct MigrateKeyRequest { 4447 // message fields 4448 pub account_id: ::protobuf::SingularPtrField<super::rpc::AccountIdentifier>, 4449 pub authorization_request: ::protobuf::SingularPtrField<super::rpc::AuthorizationRequest>, 4450 pub secret: ::std::vec::Vec<u8>, 4451 // special fields 4452 pub unknown_fields: ::protobuf::UnknownFields, 4453 pub cached_size: ::protobuf::CachedSize, 4454 } 4455 4456 impl<'a> ::std::default::Default for &'a MigrateKeyRequest { default() -> &'a MigrateKeyRequest4457 fn default() -> &'a MigrateKeyRequest { 4458 <MigrateKeyRequest as ::protobuf::Message>::default_instance() 4459 } 4460 } 4461 4462 impl MigrateKeyRequest { new() -> MigrateKeyRequest4463 pub fn new() -> MigrateKeyRequest { 4464 ::std::default::Default::default() 4465 } 4466 4467 // .cryptohome.AccountIdentifier account_id = 1; 4468 4469 get_account_id(&self) -> &super::rpc::AccountIdentifier4470 pub fn get_account_id(&self) -> &super::rpc::AccountIdentifier { 4471 self.account_id.as_ref().unwrap_or_else(|| <super::rpc::AccountIdentifier as ::protobuf::Message>::default_instance()) 4472 } clear_account_id(&mut self)4473 pub fn clear_account_id(&mut self) { 4474 self.account_id.clear(); 4475 } 4476 has_account_id(&self) -> bool4477 pub fn has_account_id(&self) -> bool { 4478 self.account_id.is_some() 4479 } 4480 4481 // Param is passed by value, moved set_account_id(&mut self, v: super::rpc::AccountIdentifier)4482 pub fn set_account_id(&mut self, v: super::rpc::AccountIdentifier) { 4483 self.account_id = ::protobuf::SingularPtrField::some(v); 4484 } 4485 4486 // Mutable pointer to the field. 4487 // If field is not initialized, it is initialized with default value first. mut_account_id(&mut self) -> &mut super::rpc::AccountIdentifier4488 pub fn mut_account_id(&mut self) -> &mut super::rpc::AccountIdentifier { 4489 if self.account_id.is_none() { 4490 self.account_id.set_default(); 4491 } 4492 self.account_id.as_mut().unwrap() 4493 } 4494 4495 // Take field take_account_id(&mut self) -> super::rpc::AccountIdentifier4496 pub fn take_account_id(&mut self) -> super::rpc::AccountIdentifier { 4497 self.account_id.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) 4498 } 4499 4500 // .cryptohome.AuthorizationRequest authorization_request = 2; 4501 4502 get_authorization_request(&self) -> &super::rpc::AuthorizationRequest4503 pub fn get_authorization_request(&self) -> &super::rpc::AuthorizationRequest { 4504 self.authorization_request.as_ref().unwrap_or_else(|| <super::rpc::AuthorizationRequest as ::protobuf::Message>::default_instance()) 4505 } clear_authorization_request(&mut self)4506 pub fn clear_authorization_request(&mut self) { 4507 self.authorization_request.clear(); 4508 } 4509 has_authorization_request(&self) -> bool4510 pub fn has_authorization_request(&self) -> bool { 4511 self.authorization_request.is_some() 4512 } 4513 4514 // Param is passed by value, moved set_authorization_request(&mut self, v: super::rpc::AuthorizationRequest)4515 pub fn set_authorization_request(&mut self, v: super::rpc::AuthorizationRequest) { 4516 self.authorization_request = ::protobuf::SingularPtrField::some(v); 4517 } 4518 4519 // Mutable pointer to the field. 4520 // If field is not initialized, it is initialized with default value first. mut_authorization_request(&mut self) -> &mut super::rpc::AuthorizationRequest4521 pub fn mut_authorization_request(&mut self) -> &mut super::rpc::AuthorizationRequest { 4522 if self.authorization_request.is_none() { 4523 self.authorization_request.set_default(); 4524 } 4525 self.authorization_request.as_mut().unwrap() 4526 } 4527 4528 // Take field take_authorization_request(&mut self) -> super::rpc::AuthorizationRequest4529 pub fn take_authorization_request(&mut self) -> super::rpc::AuthorizationRequest { 4530 self.authorization_request.take().unwrap_or_else(|| super::rpc::AuthorizationRequest::new()) 4531 } 4532 4533 // bytes secret = 3; 4534 4535 get_secret(&self) -> &[u8]4536 pub fn get_secret(&self) -> &[u8] { 4537 &self.secret 4538 } clear_secret(&mut self)4539 pub fn clear_secret(&mut self) { 4540 self.secret.clear(); 4541 } 4542 4543 // Param is passed by value, moved set_secret(&mut self, v: ::std::vec::Vec<u8>)4544 pub fn set_secret(&mut self, v: ::std::vec::Vec<u8>) { 4545 self.secret = v; 4546 } 4547 4548 // Mutable pointer to the field. 4549 // If field is not initialized, it is initialized with default value first. mut_secret(&mut self) -> &mut ::std::vec::Vec<u8>4550 pub fn mut_secret(&mut self) -> &mut ::std::vec::Vec<u8> { 4551 &mut self.secret 4552 } 4553 4554 // Take field take_secret(&mut self) -> ::std::vec::Vec<u8>4555 pub fn take_secret(&mut self) -> ::std::vec::Vec<u8> { 4556 ::std::mem::replace(&mut self.secret, ::std::vec::Vec::new()) 4557 } 4558 } 4559 4560 impl ::protobuf::Message for MigrateKeyRequest { is_initialized(&self) -> bool4561 fn is_initialized(&self) -> bool { 4562 for v in &self.account_id { 4563 if !v.is_initialized() { 4564 return false; 4565 } 4566 }; 4567 for v in &self.authorization_request { 4568 if !v.is_initialized() { 4569 return false; 4570 } 4571 }; 4572 true 4573 } 4574 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>4575 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 4576 while !is.eof()? { 4577 let (field_number, wire_type) = is.read_tag_unpack()?; 4578 match field_number { 4579 1 => { 4580 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account_id)?; 4581 }, 4582 2 => { 4583 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.authorization_request)?; 4584 }, 4585 3 => { 4586 ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.secret)?; 4587 }, 4588 _ => { 4589 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 4590 }, 4591 }; 4592 } 4593 ::std::result::Result::Ok(()) 4594 } 4595 4596 // Compute sizes of nested messages 4597 #[allow(unused_variables)] compute_size(&self) -> u324598 fn compute_size(&self) -> u32 { 4599 let mut my_size = 0; 4600 if let Some(ref v) = self.account_id.as_ref() { 4601 let len = v.compute_size(); 4602 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 4603 } 4604 if let Some(ref v) = self.authorization_request.as_ref() { 4605 let len = v.compute_size(); 4606 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 4607 } 4608 if !self.secret.is_empty() { 4609 my_size += ::protobuf::rt::bytes_size(3, &self.secret); 4610 } 4611 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 4612 self.cached_size.set(my_size); 4613 my_size 4614 } 4615 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>4616 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 4617 if let Some(ref v) = self.account_id.as_ref() { 4618 os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; 4619 os.write_raw_varint32(v.get_cached_size())?; 4620 v.write_to_with_cached_sizes(os)?; 4621 } 4622 if let Some(ref v) = self.authorization_request.as_ref() { 4623 os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; 4624 os.write_raw_varint32(v.get_cached_size())?; 4625 v.write_to_with_cached_sizes(os)?; 4626 } 4627 if !self.secret.is_empty() { 4628 os.write_bytes(3, &self.secret)?; 4629 } 4630 os.write_unknown_fields(self.get_unknown_fields())?; 4631 ::std::result::Result::Ok(()) 4632 } 4633 get_cached_size(&self) -> u324634 fn get_cached_size(&self) -> u32 { 4635 self.cached_size.get() 4636 } 4637 get_unknown_fields(&self) -> &::protobuf::UnknownFields4638 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 4639 &self.unknown_fields 4640 } 4641 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields4642 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 4643 &mut self.unknown_fields 4644 } 4645 as_any(&self) -> &dyn (::std::any::Any)4646 fn as_any(&self) -> &dyn (::std::any::Any) { 4647 self as &dyn (::std::any::Any) 4648 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)4649 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 4650 self as &mut dyn (::std::any::Any) 4651 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>4652 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 4653 self 4654 } 4655 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor4656 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 4657 Self::descriptor_static() 4658 } 4659 new() -> MigrateKeyRequest4660 fn new() -> MigrateKeyRequest { 4661 MigrateKeyRequest::new() 4662 } 4663 default_instance() -> &'static MigrateKeyRequest4664 fn default_instance() -> &'static MigrateKeyRequest { 4665 static instance: ::protobuf::rt::LazyV2<MigrateKeyRequest> = ::protobuf::rt::LazyV2::INIT; 4666 instance.get(MigrateKeyRequest::new) 4667 } 4668 } 4669 4670 impl ::protobuf::Clear for MigrateKeyRequest { clear(&mut self)4671 fn clear(&mut self) { 4672 self.account_id.clear(); 4673 self.authorization_request.clear(); 4674 self.secret.clear(); 4675 self.unknown_fields.clear(); 4676 } 4677 } 4678 4679 impl ::protobuf::reflect::ProtobufValue for MigrateKeyRequest { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef4680 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 4681 ::protobuf::reflect::ReflectValueRef::Message(self) 4682 } 4683 } 4684 4685 #[derive(PartialEq,Clone,Default,Debug)] 4686 pub struct MigrateKeyReply { 4687 // message fields 4688 pub error: CryptohomeErrorCode, 4689 // special fields 4690 pub unknown_fields: ::protobuf::UnknownFields, 4691 pub cached_size: ::protobuf::CachedSize, 4692 } 4693 4694 impl<'a> ::std::default::Default for &'a MigrateKeyReply { default() -> &'a MigrateKeyReply4695 fn default() -> &'a MigrateKeyReply { 4696 <MigrateKeyReply as ::protobuf::Message>::default_instance() 4697 } 4698 } 4699 4700 impl MigrateKeyReply { new() -> MigrateKeyReply4701 pub fn new() -> MigrateKeyReply { 4702 ::std::default::Default::default() 4703 } 4704 4705 // .user_data_auth.CryptohomeErrorCode error = 1; 4706 4707 get_error(&self) -> CryptohomeErrorCode4708 pub fn get_error(&self) -> CryptohomeErrorCode { 4709 self.error 4710 } clear_error(&mut self)4711 pub fn clear_error(&mut self) { 4712 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 4713 } 4714 4715 // Param is passed by value, moved set_error(&mut self, v: CryptohomeErrorCode)4716 pub fn set_error(&mut self, v: CryptohomeErrorCode) { 4717 self.error = v; 4718 } 4719 } 4720 4721 impl ::protobuf::Message for MigrateKeyReply { is_initialized(&self) -> bool4722 fn is_initialized(&self) -> bool { 4723 true 4724 } 4725 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>4726 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 4727 while !is.eof()? { 4728 let (field_number, wire_type) = is.read_tag_unpack()?; 4729 match field_number { 4730 1 => { 4731 ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? 4732 }, 4733 _ => { 4734 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 4735 }, 4736 }; 4737 } 4738 ::std::result::Result::Ok(()) 4739 } 4740 4741 // Compute sizes of nested messages 4742 #[allow(unused_variables)] compute_size(&self) -> u324743 fn compute_size(&self) -> u32 { 4744 let mut my_size = 0; 4745 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 4746 my_size += ::protobuf::rt::enum_size(1, self.error); 4747 } 4748 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 4749 self.cached_size.set(my_size); 4750 my_size 4751 } 4752 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>4753 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 4754 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 4755 os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; 4756 } 4757 os.write_unknown_fields(self.get_unknown_fields())?; 4758 ::std::result::Result::Ok(()) 4759 } 4760 get_cached_size(&self) -> u324761 fn get_cached_size(&self) -> u32 { 4762 self.cached_size.get() 4763 } 4764 get_unknown_fields(&self) -> &::protobuf::UnknownFields4765 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 4766 &self.unknown_fields 4767 } 4768 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields4769 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 4770 &mut self.unknown_fields 4771 } 4772 as_any(&self) -> &dyn (::std::any::Any)4773 fn as_any(&self) -> &dyn (::std::any::Any) { 4774 self as &dyn (::std::any::Any) 4775 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)4776 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 4777 self as &mut dyn (::std::any::Any) 4778 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>4779 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 4780 self 4781 } 4782 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor4783 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 4784 Self::descriptor_static() 4785 } 4786 new() -> MigrateKeyReply4787 fn new() -> MigrateKeyReply { 4788 MigrateKeyReply::new() 4789 } 4790 default_instance() -> &'static MigrateKeyReply4791 fn default_instance() -> &'static MigrateKeyReply { 4792 static instance: ::protobuf::rt::LazyV2<MigrateKeyReply> = ::protobuf::rt::LazyV2::INIT; 4793 instance.get(MigrateKeyReply::new) 4794 } 4795 } 4796 4797 impl ::protobuf::Clear for MigrateKeyReply { clear(&mut self)4798 fn clear(&mut self) { 4799 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 4800 self.unknown_fields.clear(); 4801 } 4802 } 4803 4804 impl ::protobuf::reflect::ProtobufValue for MigrateKeyReply { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef4805 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 4806 ::protobuf::reflect::ReflectValueRef::Message(self) 4807 } 4808 } 4809 4810 #[derive(PartialEq,Clone,Default,Debug)] 4811 pub struct StartFingerprintAuthSessionRequest { 4812 // message fields 4813 pub account_id: ::protobuf::SingularPtrField<super::rpc::AccountIdentifier>, 4814 // special fields 4815 pub unknown_fields: ::protobuf::UnknownFields, 4816 pub cached_size: ::protobuf::CachedSize, 4817 } 4818 4819 impl<'a> ::std::default::Default for &'a StartFingerprintAuthSessionRequest { default() -> &'a StartFingerprintAuthSessionRequest4820 fn default() -> &'a StartFingerprintAuthSessionRequest { 4821 <StartFingerprintAuthSessionRequest as ::protobuf::Message>::default_instance() 4822 } 4823 } 4824 4825 impl StartFingerprintAuthSessionRequest { new() -> StartFingerprintAuthSessionRequest4826 pub fn new() -> StartFingerprintAuthSessionRequest { 4827 ::std::default::Default::default() 4828 } 4829 4830 // .cryptohome.AccountIdentifier account_id = 1; 4831 4832 get_account_id(&self) -> &super::rpc::AccountIdentifier4833 pub fn get_account_id(&self) -> &super::rpc::AccountIdentifier { 4834 self.account_id.as_ref().unwrap_or_else(|| <super::rpc::AccountIdentifier as ::protobuf::Message>::default_instance()) 4835 } clear_account_id(&mut self)4836 pub fn clear_account_id(&mut self) { 4837 self.account_id.clear(); 4838 } 4839 has_account_id(&self) -> bool4840 pub fn has_account_id(&self) -> bool { 4841 self.account_id.is_some() 4842 } 4843 4844 // Param is passed by value, moved set_account_id(&mut self, v: super::rpc::AccountIdentifier)4845 pub fn set_account_id(&mut self, v: super::rpc::AccountIdentifier) { 4846 self.account_id = ::protobuf::SingularPtrField::some(v); 4847 } 4848 4849 // Mutable pointer to the field. 4850 // If field is not initialized, it is initialized with default value first. mut_account_id(&mut self) -> &mut super::rpc::AccountIdentifier4851 pub fn mut_account_id(&mut self) -> &mut super::rpc::AccountIdentifier { 4852 if self.account_id.is_none() { 4853 self.account_id.set_default(); 4854 } 4855 self.account_id.as_mut().unwrap() 4856 } 4857 4858 // Take field take_account_id(&mut self) -> super::rpc::AccountIdentifier4859 pub fn take_account_id(&mut self) -> super::rpc::AccountIdentifier { 4860 self.account_id.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) 4861 } 4862 } 4863 4864 impl ::protobuf::Message for StartFingerprintAuthSessionRequest { is_initialized(&self) -> bool4865 fn is_initialized(&self) -> bool { 4866 for v in &self.account_id { 4867 if !v.is_initialized() { 4868 return false; 4869 } 4870 }; 4871 true 4872 } 4873 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>4874 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 4875 while !is.eof()? { 4876 let (field_number, wire_type) = is.read_tag_unpack()?; 4877 match field_number { 4878 1 => { 4879 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account_id)?; 4880 }, 4881 _ => { 4882 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 4883 }, 4884 }; 4885 } 4886 ::std::result::Result::Ok(()) 4887 } 4888 4889 // Compute sizes of nested messages 4890 #[allow(unused_variables)] compute_size(&self) -> u324891 fn compute_size(&self) -> u32 { 4892 let mut my_size = 0; 4893 if let Some(ref v) = self.account_id.as_ref() { 4894 let len = v.compute_size(); 4895 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 4896 } 4897 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 4898 self.cached_size.set(my_size); 4899 my_size 4900 } 4901 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>4902 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 4903 if let Some(ref v) = self.account_id.as_ref() { 4904 os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; 4905 os.write_raw_varint32(v.get_cached_size())?; 4906 v.write_to_with_cached_sizes(os)?; 4907 } 4908 os.write_unknown_fields(self.get_unknown_fields())?; 4909 ::std::result::Result::Ok(()) 4910 } 4911 get_cached_size(&self) -> u324912 fn get_cached_size(&self) -> u32 { 4913 self.cached_size.get() 4914 } 4915 get_unknown_fields(&self) -> &::protobuf::UnknownFields4916 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 4917 &self.unknown_fields 4918 } 4919 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields4920 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 4921 &mut self.unknown_fields 4922 } 4923 as_any(&self) -> &dyn (::std::any::Any)4924 fn as_any(&self) -> &dyn (::std::any::Any) { 4925 self as &dyn (::std::any::Any) 4926 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)4927 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 4928 self as &mut dyn (::std::any::Any) 4929 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>4930 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 4931 self 4932 } 4933 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor4934 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 4935 Self::descriptor_static() 4936 } 4937 new() -> StartFingerprintAuthSessionRequest4938 fn new() -> StartFingerprintAuthSessionRequest { 4939 StartFingerprintAuthSessionRequest::new() 4940 } 4941 default_instance() -> &'static StartFingerprintAuthSessionRequest4942 fn default_instance() -> &'static StartFingerprintAuthSessionRequest { 4943 static instance: ::protobuf::rt::LazyV2<StartFingerprintAuthSessionRequest> = ::protobuf::rt::LazyV2::INIT; 4944 instance.get(StartFingerprintAuthSessionRequest::new) 4945 } 4946 } 4947 4948 impl ::protobuf::Clear for StartFingerprintAuthSessionRequest { clear(&mut self)4949 fn clear(&mut self) { 4950 self.account_id.clear(); 4951 self.unknown_fields.clear(); 4952 } 4953 } 4954 4955 impl ::protobuf::reflect::ProtobufValue for StartFingerprintAuthSessionRequest { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef4956 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 4957 ::protobuf::reflect::ReflectValueRef::Message(self) 4958 } 4959 } 4960 4961 #[derive(PartialEq,Clone,Default,Debug)] 4962 pub struct StartFingerprintAuthSessionReply { 4963 // message fields 4964 pub error: CryptohomeErrorCode, 4965 // special fields 4966 pub unknown_fields: ::protobuf::UnknownFields, 4967 pub cached_size: ::protobuf::CachedSize, 4968 } 4969 4970 impl<'a> ::std::default::Default for &'a StartFingerprintAuthSessionReply { default() -> &'a StartFingerprintAuthSessionReply4971 fn default() -> &'a StartFingerprintAuthSessionReply { 4972 <StartFingerprintAuthSessionReply as ::protobuf::Message>::default_instance() 4973 } 4974 } 4975 4976 impl StartFingerprintAuthSessionReply { new() -> StartFingerprintAuthSessionReply4977 pub fn new() -> StartFingerprintAuthSessionReply { 4978 ::std::default::Default::default() 4979 } 4980 4981 // .user_data_auth.CryptohomeErrorCode error = 1; 4982 4983 get_error(&self) -> CryptohomeErrorCode4984 pub fn get_error(&self) -> CryptohomeErrorCode { 4985 self.error 4986 } clear_error(&mut self)4987 pub fn clear_error(&mut self) { 4988 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 4989 } 4990 4991 // Param is passed by value, moved set_error(&mut self, v: CryptohomeErrorCode)4992 pub fn set_error(&mut self, v: CryptohomeErrorCode) { 4993 self.error = v; 4994 } 4995 } 4996 4997 impl ::protobuf::Message for StartFingerprintAuthSessionReply { is_initialized(&self) -> bool4998 fn is_initialized(&self) -> bool { 4999 true 5000 } 5001 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>5002 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 5003 while !is.eof()? { 5004 let (field_number, wire_type) = is.read_tag_unpack()?; 5005 match field_number { 5006 1 => { 5007 ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? 5008 }, 5009 _ => { 5010 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 5011 }, 5012 }; 5013 } 5014 ::std::result::Result::Ok(()) 5015 } 5016 5017 // Compute sizes of nested messages 5018 #[allow(unused_variables)] compute_size(&self) -> u325019 fn compute_size(&self) -> u32 { 5020 let mut my_size = 0; 5021 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 5022 my_size += ::protobuf::rt::enum_size(1, self.error); 5023 } 5024 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 5025 self.cached_size.set(my_size); 5026 my_size 5027 } 5028 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>5029 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 5030 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 5031 os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; 5032 } 5033 os.write_unknown_fields(self.get_unknown_fields())?; 5034 ::std::result::Result::Ok(()) 5035 } 5036 get_cached_size(&self) -> u325037 fn get_cached_size(&self) -> u32 { 5038 self.cached_size.get() 5039 } 5040 get_unknown_fields(&self) -> &::protobuf::UnknownFields5041 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 5042 &self.unknown_fields 5043 } 5044 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields5045 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 5046 &mut self.unknown_fields 5047 } 5048 as_any(&self) -> &dyn (::std::any::Any)5049 fn as_any(&self) -> &dyn (::std::any::Any) { 5050 self as &dyn (::std::any::Any) 5051 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)5052 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 5053 self as &mut dyn (::std::any::Any) 5054 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>5055 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 5056 self 5057 } 5058 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor5059 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 5060 Self::descriptor_static() 5061 } 5062 new() -> StartFingerprintAuthSessionReply5063 fn new() -> StartFingerprintAuthSessionReply { 5064 StartFingerprintAuthSessionReply::new() 5065 } 5066 default_instance() -> &'static StartFingerprintAuthSessionReply5067 fn default_instance() -> &'static StartFingerprintAuthSessionReply { 5068 static instance: ::protobuf::rt::LazyV2<StartFingerprintAuthSessionReply> = ::protobuf::rt::LazyV2::INIT; 5069 instance.get(StartFingerprintAuthSessionReply::new) 5070 } 5071 } 5072 5073 impl ::protobuf::Clear for StartFingerprintAuthSessionReply { clear(&mut self)5074 fn clear(&mut self) { 5075 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 5076 self.unknown_fields.clear(); 5077 } 5078 } 5079 5080 impl ::protobuf::reflect::ProtobufValue for StartFingerprintAuthSessionReply { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef5081 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 5082 ::protobuf::reflect::ReflectValueRef::Message(self) 5083 } 5084 } 5085 5086 #[derive(PartialEq,Clone,Default,Debug)] 5087 pub struct EndFingerprintAuthSessionRequest { 5088 // special fields 5089 pub unknown_fields: ::protobuf::UnknownFields, 5090 pub cached_size: ::protobuf::CachedSize, 5091 } 5092 5093 impl<'a> ::std::default::Default for &'a EndFingerprintAuthSessionRequest { default() -> &'a EndFingerprintAuthSessionRequest5094 fn default() -> &'a EndFingerprintAuthSessionRequest { 5095 <EndFingerprintAuthSessionRequest as ::protobuf::Message>::default_instance() 5096 } 5097 } 5098 5099 impl EndFingerprintAuthSessionRequest { new() -> EndFingerprintAuthSessionRequest5100 pub fn new() -> EndFingerprintAuthSessionRequest { 5101 ::std::default::Default::default() 5102 } 5103 } 5104 5105 impl ::protobuf::Message for EndFingerprintAuthSessionRequest { is_initialized(&self) -> bool5106 fn is_initialized(&self) -> bool { 5107 true 5108 } 5109 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>5110 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 5111 while !is.eof()? { 5112 let (field_number, wire_type) = is.read_tag_unpack()?; 5113 match field_number { 5114 _ => { 5115 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 5116 }, 5117 }; 5118 } 5119 ::std::result::Result::Ok(()) 5120 } 5121 5122 // Compute sizes of nested messages 5123 #[allow(unused_variables)] compute_size(&self) -> u325124 fn compute_size(&self) -> u32 { 5125 let mut my_size = 0; 5126 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 5127 self.cached_size.set(my_size); 5128 my_size 5129 } 5130 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>5131 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 5132 os.write_unknown_fields(self.get_unknown_fields())?; 5133 ::std::result::Result::Ok(()) 5134 } 5135 get_cached_size(&self) -> u325136 fn get_cached_size(&self) -> u32 { 5137 self.cached_size.get() 5138 } 5139 get_unknown_fields(&self) -> &::protobuf::UnknownFields5140 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 5141 &self.unknown_fields 5142 } 5143 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields5144 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 5145 &mut self.unknown_fields 5146 } 5147 as_any(&self) -> &dyn (::std::any::Any)5148 fn as_any(&self) -> &dyn (::std::any::Any) { 5149 self as &dyn (::std::any::Any) 5150 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)5151 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 5152 self as &mut dyn (::std::any::Any) 5153 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>5154 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 5155 self 5156 } 5157 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor5158 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 5159 Self::descriptor_static() 5160 } 5161 new() -> EndFingerprintAuthSessionRequest5162 fn new() -> EndFingerprintAuthSessionRequest { 5163 EndFingerprintAuthSessionRequest::new() 5164 } 5165 default_instance() -> &'static EndFingerprintAuthSessionRequest5166 fn default_instance() -> &'static EndFingerprintAuthSessionRequest { 5167 static instance: ::protobuf::rt::LazyV2<EndFingerprintAuthSessionRequest> = ::protobuf::rt::LazyV2::INIT; 5168 instance.get(EndFingerprintAuthSessionRequest::new) 5169 } 5170 } 5171 5172 impl ::protobuf::Clear for EndFingerprintAuthSessionRequest { clear(&mut self)5173 fn clear(&mut self) { 5174 self.unknown_fields.clear(); 5175 } 5176 } 5177 5178 impl ::protobuf::reflect::ProtobufValue for EndFingerprintAuthSessionRequest { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef5179 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 5180 ::protobuf::reflect::ReflectValueRef::Message(self) 5181 } 5182 } 5183 5184 #[derive(PartialEq,Clone,Default,Debug)] 5185 pub struct EndFingerprintAuthSessionReply { 5186 // message fields 5187 pub error: CryptohomeErrorCode, 5188 // special fields 5189 pub unknown_fields: ::protobuf::UnknownFields, 5190 pub cached_size: ::protobuf::CachedSize, 5191 } 5192 5193 impl<'a> ::std::default::Default for &'a EndFingerprintAuthSessionReply { default() -> &'a EndFingerprintAuthSessionReply5194 fn default() -> &'a EndFingerprintAuthSessionReply { 5195 <EndFingerprintAuthSessionReply as ::protobuf::Message>::default_instance() 5196 } 5197 } 5198 5199 impl EndFingerprintAuthSessionReply { new() -> EndFingerprintAuthSessionReply5200 pub fn new() -> EndFingerprintAuthSessionReply { 5201 ::std::default::Default::default() 5202 } 5203 5204 // .user_data_auth.CryptohomeErrorCode error = 1; 5205 5206 get_error(&self) -> CryptohomeErrorCode5207 pub fn get_error(&self) -> CryptohomeErrorCode { 5208 self.error 5209 } clear_error(&mut self)5210 pub fn clear_error(&mut self) { 5211 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 5212 } 5213 5214 // Param is passed by value, moved set_error(&mut self, v: CryptohomeErrorCode)5215 pub fn set_error(&mut self, v: CryptohomeErrorCode) { 5216 self.error = v; 5217 } 5218 } 5219 5220 impl ::protobuf::Message for EndFingerprintAuthSessionReply { is_initialized(&self) -> bool5221 fn is_initialized(&self) -> bool { 5222 true 5223 } 5224 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>5225 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 5226 while !is.eof()? { 5227 let (field_number, wire_type) = is.read_tag_unpack()?; 5228 match field_number { 5229 1 => { 5230 ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? 5231 }, 5232 _ => { 5233 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 5234 }, 5235 }; 5236 } 5237 ::std::result::Result::Ok(()) 5238 } 5239 5240 // Compute sizes of nested messages 5241 #[allow(unused_variables)] compute_size(&self) -> u325242 fn compute_size(&self) -> u32 { 5243 let mut my_size = 0; 5244 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 5245 my_size += ::protobuf::rt::enum_size(1, self.error); 5246 } 5247 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 5248 self.cached_size.set(my_size); 5249 my_size 5250 } 5251 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>5252 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 5253 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 5254 os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; 5255 } 5256 os.write_unknown_fields(self.get_unknown_fields())?; 5257 ::std::result::Result::Ok(()) 5258 } 5259 get_cached_size(&self) -> u325260 fn get_cached_size(&self) -> u32 { 5261 self.cached_size.get() 5262 } 5263 get_unknown_fields(&self) -> &::protobuf::UnknownFields5264 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 5265 &self.unknown_fields 5266 } 5267 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields5268 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 5269 &mut self.unknown_fields 5270 } 5271 as_any(&self) -> &dyn (::std::any::Any)5272 fn as_any(&self) -> &dyn (::std::any::Any) { 5273 self as &dyn (::std::any::Any) 5274 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)5275 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 5276 self as &mut dyn (::std::any::Any) 5277 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>5278 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 5279 self 5280 } 5281 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor5282 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 5283 Self::descriptor_static() 5284 } 5285 new() -> EndFingerprintAuthSessionReply5286 fn new() -> EndFingerprintAuthSessionReply { 5287 EndFingerprintAuthSessionReply::new() 5288 } 5289 default_instance() -> &'static EndFingerprintAuthSessionReply5290 fn default_instance() -> &'static EndFingerprintAuthSessionReply { 5291 static instance: ::protobuf::rt::LazyV2<EndFingerprintAuthSessionReply> = ::protobuf::rt::LazyV2::INIT; 5292 instance.get(EndFingerprintAuthSessionReply::new) 5293 } 5294 } 5295 5296 impl ::protobuf::Clear for EndFingerprintAuthSessionReply { clear(&mut self)5297 fn clear(&mut self) { 5298 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 5299 self.unknown_fields.clear(); 5300 } 5301 } 5302 5303 impl ::protobuf::reflect::ProtobufValue for EndFingerprintAuthSessionReply { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef5304 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 5305 ::protobuf::reflect::ReflectValueRef::Message(self) 5306 } 5307 } 5308 5309 #[derive(PartialEq,Clone,Default,Debug)] 5310 pub struct GetWebAuthnSecretRequest { 5311 // message fields 5312 pub account_id: ::protobuf::SingularPtrField<super::rpc::AccountIdentifier>, 5313 // special fields 5314 pub unknown_fields: ::protobuf::UnknownFields, 5315 pub cached_size: ::protobuf::CachedSize, 5316 } 5317 5318 impl<'a> ::std::default::Default for &'a GetWebAuthnSecretRequest { default() -> &'a GetWebAuthnSecretRequest5319 fn default() -> &'a GetWebAuthnSecretRequest { 5320 <GetWebAuthnSecretRequest as ::protobuf::Message>::default_instance() 5321 } 5322 } 5323 5324 impl GetWebAuthnSecretRequest { new() -> GetWebAuthnSecretRequest5325 pub fn new() -> GetWebAuthnSecretRequest { 5326 ::std::default::Default::default() 5327 } 5328 5329 // .cryptohome.AccountIdentifier account_id = 1; 5330 5331 get_account_id(&self) -> &super::rpc::AccountIdentifier5332 pub fn get_account_id(&self) -> &super::rpc::AccountIdentifier { 5333 self.account_id.as_ref().unwrap_or_else(|| <super::rpc::AccountIdentifier as ::protobuf::Message>::default_instance()) 5334 } clear_account_id(&mut self)5335 pub fn clear_account_id(&mut self) { 5336 self.account_id.clear(); 5337 } 5338 has_account_id(&self) -> bool5339 pub fn has_account_id(&self) -> bool { 5340 self.account_id.is_some() 5341 } 5342 5343 // Param is passed by value, moved set_account_id(&mut self, v: super::rpc::AccountIdentifier)5344 pub fn set_account_id(&mut self, v: super::rpc::AccountIdentifier) { 5345 self.account_id = ::protobuf::SingularPtrField::some(v); 5346 } 5347 5348 // Mutable pointer to the field. 5349 // If field is not initialized, it is initialized with default value first. mut_account_id(&mut self) -> &mut super::rpc::AccountIdentifier5350 pub fn mut_account_id(&mut self) -> &mut super::rpc::AccountIdentifier { 5351 if self.account_id.is_none() { 5352 self.account_id.set_default(); 5353 } 5354 self.account_id.as_mut().unwrap() 5355 } 5356 5357 // Take field take_account_id(&mut self) -> super::rpc::AccountIdentifier5358 pub fn take_account_id(&mut self) -> super::rpc::AccountIdentifier { 5359 self.account_id.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) 5360 } 5361 } 5362 5363 impl ::protobuf::Message for GetWebAuthnSecretRequest { is_initialized(&self) -> bool5364 fn is_initialized(&self) -> bool { 5365 for v in &self.account_id { 5366 if !v.is_initialized() { 5367 return false; 5368 } 5369 }; 5370 true 5371 } 5372 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>5373 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 5374 while !is.eof()? { 5375 let (field_number, wire_type) = is.read_tag_unpack()?; 5376 match field_number { 5377 1 => { 5378 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account_id)?; 5379 }, 5380 _ => { 5381 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 5382 }, 5383 }; 5384 } 5385 ::std::result::Result::Ok(()) 5386 } 5387 5388 // Compute sizes of nested messages 5389 #[allow(unused_variables)] compute_size(&self) -> u325390 fn compute_size(&self) -> u32 { 5391 let mut my_size = 0; 5392 if let Some(ref v) = self.account_id.as_ref() { 5393 let len = v.compute_size(); 5394 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 5395 } 5396 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 5397 self.cached_size.set(my_size); 5398 my_size 5399 } 5400 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>5401 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 5402 if let Some(ref v) = self.account_id.as_ref() { 5403 os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; 5404 os.write_raw_varint32(v.get_cached_size())?; 5405 v.write_to_with_cached_sizes(os)?; 5406 } 5407 os.write_unknown_fields(self.get_unknown_fields())?; 5408 ::std::result::Result::Ok(()) 5409 } 5410 get_cached_size(&self) -> u325411 fn get_cached_size(&self) -> u32 { 5412 self.cached_size.get() 5413 } 5414 get_unknown_fields(&self) -> &::protobuf::UnknownFields5415 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 5416 &self.unknown_fields 5417 } 5418 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields5419 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 5420 &mut self.unknown_fields 5421 } 5422 as_any(&self) -> &dyn (::std::any::Any)5423 fn as_any(&self) -> &dyn (::std::any::Any) { 5424 self as &dyn (::std::any::Any) 5425 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)5426 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 5427 self as &mut dyn (::std::any::Any) 5428 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>5429 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 5430 self 5431 } 5432 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor5433 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 5434 Self::descriptor_static() 5435 } 5436 new() -> GetWebAuthnSecretRequest5437 fn new() -> GetWebAuthnSecretRequest { 5438 GetWebAuthnSecretRequest::new() 5439 } 5440 default_instance() -> &'static GetWebAuthnSecretRequest5441 fn default_instance() -> &'static GetWebAuthnSecretRequest { 5442 static instance: ::protobuf::rt::LazyV2<GetWebAuthnSecretRequest> = ::protobuf::rt::LazyV2::INIT; 5443 instance.get(GetWebAuthnSecretRequest::new) 5444 } 5445 } 5446 5447 impl ::protobuf::Clear for GetWebAuthnSecretRequest { clear(&mut self)5448 fn clear(&mut self) { 5449 self.account_id.clear(); 5450 self.unknown_fields.clear(); 5451 } 5452 } 5453 5454 impl ::protobuf::reflect::ProtobufValue for GetWebAuthnSecretRequest { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef5455 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 5456 ::protobuf::reflect::ReflectValueRef::Message(self) 5457 } 5458 } 5459 5460 #[derive(PartialEq,Clone,Default,Debug)] 5461 pub struct GetWebAuthnSecretReply { 5462 // message fields 5463 pub error: CryptohomeErrorCode, 5464 pub webauthn_secret: ::std::vec::Vec<u8>, 5465 // special fields 5466 pub unknown_fields: ::protobuf::UnknownFields, 5467 pub cached_size: ::protobuf::CachedSize, 5468 } 5469 5470 impl<'a> ::std::default::Default for &'a GetWebAuthnSecretReply { default() -> &'a GetWebAuthnSecretReply5471 fn default() -> &'a GetWebAuthnSecretReply { 5472 <GetWebAuthnSecretReply as ::protobuf::Message>::default_instance() 5473 } 5474 } 5475 5476 impl GetWebAuthnSecretReply { new() -> GetWebAuthnSecretReply5477 pub fn new() -> GetWebAuthnSecretReply { 5478 ::std::default::Default::default() 5479 } 5480 5481 // .user_data_auth.CryptohomeErrorCode error = 1; 5482 5483 get_error(&self) -> CryptohomeErrorCode5484 pub fn get_error(&self) -> CryptohomeErrorCode { 5485 self.error 5486 } clear_error(&mut self)5487 pub fn clear_error(&mut self) { 5488 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 5489 } 5490 5491 // Param is passed by value, moved set_error(&mut self, v: CryptohomeErrorCode)5492 pub fn set_error(&mut self, v: CryptohomeErrorCode) { 5493 self.error = v; 5494 } 5495 5496 // bytes webauthn_secret = 2; 5497 5498 get_webauthn_secret(&self) -> &[u8]5499 pub fn get_webauthn_secret(&self) -> &[u8] { 5500 &self.webauthn_secret 5501 } clear_webauthn_secret(&mut self)5502 pub fn clear_webauthn_secret(&mut self) { 5503 self.webauthn_secret.clear(); 5504 } 5505 5506 // Param is passed by value, moved set_webauthn_secret(&mut self, v: ::std::vec::Vec<u8>)5507 pub fn set_webauthn_secret(&mut self, v: ::std::vec::Vec<u8>) { 5508 self.webauthn_secret = v; 5509 } 5510 5511 // Mutable pointer to the field. 5512 // If field is not initialized, it is initialized with default value first. mut_webauthn_secret(&mut self) -> &mut ::std::vec::Vec<u8>5513 pub fn mut_webauthn_secret(&mut self) -> &mut ::std::vec::Vec<u8> { 5514 &mut self.webauthn_secret 5515 } 5516 5517 // Take field take_webauthn_secret(&mut self) -> ::std::vec::Vec<u8>5518 pub fn take_webauthn_secret(&mut self) -> ::std::vec::Vec<u8> { 5519 ::std::mem::replace(&mut self.webauthn_secret, ::std::vec::Vec::new()) 5520 } 5521 } 5522 5523 impl ::protobuf::Message for GetWebAuthnSecretReply { is_initialized(&self) -> bool5524 fn is_initialized(&self) -> bool { 5525 true 5526 } 5527 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>5528 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 5529 while !is.eof()? { 5530 let (field_number, wire_type) = is.read_tag_unpack()?; 5531 match field_number { 5532 1 => { 5533 ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? 5534 }, 5535 2 => { 5536 ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.webauthn_secret)?; 5537 }, 5538 _ => { 5539 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 5540 }, 5541 }; 5542 } 5543 ::std::result::Result::Ok(()) 5544 } 5545 5546 // Compute sizes of nested messages 5547 #[allow(unused_variables)] compute_size(&self) -> u325548 fn compute_size(&self) -> u32 { 5549 let mut my_size = 0; 5550 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 5551 my_size += ::protobuf::rt::enum_size(1, self.error); 5552 } 5553 if !self.webauthn_secret.is_empty() { 5554 my_size += ::protobuf::rt::bytes_size(2, &self.webauthn_secret); 5555 } 5556 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 5557 self.cached_size.set(my_size); 5558 my_size 5559 } 5560 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>5561 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 5562 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 5563 os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; 5564 } 5565 if !self.webauthn_secret.is_empty() { 5566 os.write_bytes(2, &self.webauthn_secret)?; 5567 } 5568 os.write_unknown_fields(self.get_unknown_fields())?; 5569 ::std::result::Result::Ok(()) 5570 } 5571 get_cached_size(&self) -> u325572 fn get_cached_size(&self) -> u32 { 5573 self.cached_size.get() 5574 } 5575 get_unknown_fields(&self) -> &::protobuf::UnknownFields5576 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 5577 &self.unknown_fields 5578 } 5579 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields5580 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 5581 &mut self.unknown_fields 5582 } 5583 as_any(&self) -> &dyn (::std::any::Any)5584 fn as_any(&self) -> &dyn (::std::any::Any) { 5585 self as &dyn (::std::any::Any) 5586 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)5587 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 5588 self as &mut dyn (::std::any::Any) 5589 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>5590 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 5591 self 5592 } 5593 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor5594 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 5595 Self::descriptor_static() 5596 } 5597 new() -> GetWebAuthnSecretReply5598 fn new() -> GetWebAuthnSecretReply { 5599 GetWebAuthnSecretReply::new() 5600 } 5601 default_instance() -> &'static GetWebAuthnSecretReply5602 fn default_instance() -> &'static GetWebAuthnSecretReply { 5603 static instance: ::protobuf::rt::LazyV2<GetWebAuthnSecretReply> = ::protobuf::rt::LazyV2::INIT; 5604 instance.get(GetWebAuthnSecretReply::new) 5605 } 5606 } 5607 5608 impl ::protobuf::Clear for GetWebAuthnSecretReply { clear(&mut self)5609 fn clear(&mut self) { 5610 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 5611 self.webauthn_secret.clear(); 5612 self.unknown_fields.clear(); 5613 } 5614 } 5615 5616 impl ::protobuf::reflect::ProtobufValue for GetWebAuthnSecretReply { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef5617 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 5618 ::protobuf::reflect::ReflectValueRef::Message(self) 5619 } 5620 } 5621 5622 #[derive(PartialEq,Clone,Default,Debug)] 5623 pub struct GetWebAuthnSecretHashRequest { 5624 // message fields 5625 pub account_id: ::protobuf::SingularPtrField<super::rpc::AccountIdentifier>, 5626 // special fields 5627 pub unknown_fields: ::protobuf::UnknownFields, 5628 pub cached_size: ::protobuf::CachedSize, 5629 } 5630 5631 impl<'a> ::std::default::Default for &'a GetWebAuthnSecretHashRequest { default() -> &'a GetWebAuthnSecretHashRequest5632 fn default() -> &'a GetWebAuthnSecretHashRequest { 5633 <GetWebAuthnSecretHashRequest as ::protobuf::Message>::default_instance() 5634 } 5635 } 5636 5637 impl GetWebAuthnSecretHashRequest { new() -> GetWebAuthnSecretHashRequest5638 pub fn new() -> GetWebAuthnSecretHashRequest { 5639 ::std::default::Default::default() 5640 } 5641 5642 // .cryptohome.AccountIdentifier account_id = 1; 5643 5644 get_account_id(&self) -> &super::rpc::AccountIdentifier5645 pub fn get_account_id(&self) -> &super::rpc::AccountIdentifier { 5646 self.account_id.as_ref().unwrap_or_else(|| <super::rpc::AccountIdentifier as ::protobuf::Message>::default_instance()) 5647 } clear_account_id(&mut self)5648 pub fn clear_account_id(&mut self) { 5649 self.account_id.clear(); 5650 } 5651 has_account_id(&self) -> bool5652 pub fn has_account_id(&self) -> bool { 5653 self.account_id.is_some() 5654 } 5655 5656 // Param is passed by value, moved set_account_id(&mut self, v: super::rpc::AccountIdentifier)5657 pub fn set_account_id(&mut self, v: super::rpc::AccountIdentifier) { 5658 self.account_id = ::protobuf::SingularPtrField::some(v); 5659 } 5660 5661 // Mutable pointer to the field. 5662 // If field is not initialized, it is initialized with default value first. mut_account_id(&mut self) -> &mut super::rpc::AccountIdentifier5663 pub fn mut_account_id(&mut self) -> &mut super::rpc::AccountIdentifier { 5664 if self.account_id.is_none() { 5665 self.account_id.set_default(); 5666 } 5667 self.account_id.as_mut().unwrap() 5668 } 5669 5670 // Take field take_account_id(&mut self) -> super::rpc::AccountIdentifier5671 pub fn take_account_id(&mut self) -> super::rpc::AccountIdentifier { 5672 self.account_id.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) 5673 } 5674 } 5675 5676 impl ::protobuf::Message for GetWebAuthnSecretHashRequest { is_initialized(&self) -> bool5677 fn is_initialized(&self) -> bool { 5678 for v in &self.account_id { 5679 if !v.is_initialized() { 5680 return false; 5681 } 5682 }; 5683 true 5684 } 5685 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>5686 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 5687 while !is.eof()? { 5688 let (field_number, wire_type) = is.read_tag_unpack()?; 5689 match field_number { 5690 1 => { 5691 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account_id)?; 5692 }, 5693 _ => { 5694 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 5695 }, 5696 }; 5697 } 5698 ::std::result::Result::Ok(()) 5699 } 5700 5701 // Compute sizes of nested messages 5702 #[allow(unused_variables)] compute_size(&self) -> u325703 fn compute_size(&self) -> u32 { 5704 let mut my_size = 0; 5705 if let Some(ref v) = self.account_id.as_ref() { 5706 let len = v.compute_size(); 5707 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 5708 } 5709 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 5710 self.cached_size.set(my_size); 5711 my_size 5712 } 5713 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>5714 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 5715 if let Some(ref v) = self.account_id.as_ref() { 5716 os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; 5717 os.write_raw_varint32(v.get_cached_size())?; 5718 v.write_to_with_cached_sizes(os)?; 5719 } 5720 os.write_unknown_fields(self.get_unknown_fields())?; 5721 ::std::result::Result::Ok(()) 5722 } 5723 get_cached_size(&self) -> u325724 fn get_cached_size(&self) -> u32 { 5725 self.cached_size.get() 5726 } 5727 get_unknown_fields(&self) -> &::protobuf::UnknownFields5728 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 5729 &self.unknown_fields 5730 } 5731 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields5732 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 5733 &mut self.unknown_fields 5734 } 5735 as_any(&self) -> &dyn (::std::any::Any)5736 fn as_any(&self) -> &dyn (::std::any::Any) { 5737 self as &dyn (::std::any::Any) 5738 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)5739 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 5740 self as &mut dyn (::std::any::Any) 5741 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>5742 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 5743 self 5744 } 5745 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor5746 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 5747 Self::descriptor_static() 5748 } 5749 new() -> GetWebAuthnSecretHashRequest5750 fn new() -> GetWebAuthnSecretHashRequest { 5751 GetWebAuthnSecretHashRequest::new() 5752 } 5753 default_instance() -> &'static GetWebAuthnSecretHashRequest5754 fn default_instance() -> &'static GetWebAuthnSecretHashRequest { 5755 static instance: ::protobuf::rt::LazyV2<GetWebAuthnSecretHashRequest> = ::protobuf::rt::LazyV2::INIT; 5756 instance.get(GetWebAuthnSecretHashRequest::new) 5757 } 5758 } 5759 5760 impl ::protobuf::Clear for GetWebAuthnSecretHashRequest { clear(&mut self)5761 fn clear(&mut self) { 5762 self.account_id.clear(); 5763 self.unknown_fields.clear(); 5764 } 5765 } 5766 5767 impl ::protobuf::reflect::ProtobufValue for GetWebAuthnSecretHashRequest { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef5768 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 5769 ::protobuf::reflect::ReflectValueRef::Message(self) 5770 } 5771 } 5772 5773 #[derive(PartialEq,Clone,Default,Debug)] 5774 pub struct GetWebAuthnSecretHashReply { 5775 // message fields 5776 pub error: CryptohomeErrorCode, 5777 pub webauthn_secret_hash: ::std::vec::Vec<u8>, 5778 // special fields 5779 pub unknown_fields: ::protobuf::UnknownFields, 5780 pub cached_size: ::protobuf::CachedSize, 5781 } 5782 5783 impl<'a> ::std::default::Default for &'a GetWebAuthnSecretHashReply { default() -> &'a GetWebAuthnSecretHashReply5784 fn default() -> &'a GetWebAuthnSecretHashReply { 5785 <GetWebAuthnSecretHashReply as ::protobuf::Message>::default_instance() 5786 } 5787 } 5788 5789 impl GetWebAuthnSecretHashReply { new() -> GetWebAuthnSecretHashReply5790 pub fn new() -> GetWebAuthnSecretHashReply { 5791 ::std::default::Default::default() 5792 } 5793 5794 // .user_data_auth.CryptohomeErrorCode error = 1; 5795 5796 get_error(&self) -> CryptohomeErrorCode5797 pub fn get_error(&self) -> CryptohomeErrorCode { 5798 self.error 5799 } clear_error(&mut self)5800 pub fn clear_error(&mut self) { 5801 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 5802 } 5803 5804 // Param is passed by value, moved set_error(&mut self, v: CryptohomeErrorCode)5805 pub fn set_error(&mut self, v: CryptohomeErrorCode) { 5806 self.error = v; 5807 } 5808 5809 // bytes webauthn_secret_hash = 2; 5810 5811 get_webauthn_secret_hash(&self) -> &[u8]5812 pub fn get_webauthn_secret_hash(&self) -> &[u8] { 5813 &self.webauthn_secret_hash 5814 } clear_webauthn_secret_hash(&mut self)5815 pub fn clear_webauthn_secret_hash(&mut self) { 5816 self.webauthn_secret_hash.clear(); 5817 } 5818 5819 // Param is passed by value, moved set_webauthn_secret_hash(&mut self, v: ::std::vec::Vec<u8>)5820 pub fn set_webauthn_secret_hash(&mut self, v: ::std::vec::Vec<u8>) { 5821 self.webauthn_secret_hash = v; 5822 } 5823 5824 // Mutable pointer to the field. 5825 // If field is not initialized, it is initialized with default value first. mut_webauthn_secret_hash(&mut self) -> &mut ::std::vec::Vec<u8>5826 pub fn mut_webauthn_secret_hash(&mut self) -> &mut ::std::vec::Vec<u8> { 5827 &mut self.webauthn_secret_hash 5828 } 5829 5830 // Take field take_webauthn_secret_hash(&mut self) -> ::std::vec::Vec<u8>5831 pub fn take_webauthn_secret_hash(&mut self) -> ::std::vec::Vec<u8> { 5832 ::std::mem::replace(&mut self.webauthn_secret_hash, ::std::vec::Vec::new()) 5833 } 5834 } 5835 5836 impl ::protobuf::Message for GetWebAuthnSecretHashReply { is_initialized(&self) -> bool5837 fn is_initialized(&self) -> bool { 5838 true 5839 } 5840 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>5841 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 5842 while !is.eof()? { 5843 let (field_number, wire_type) = is.read_tag_unpack()?; 5844 match field_number { 5845 1 => { 5846 ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? 5847 }, 5848 2 => { 5849 ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.webauthn_secret_hash)?; 5850 }, 5851 _ => { 5852 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 5853 }, 5854 }; 5855 } 5856 ::std::result::Result::Ok(()) 5857 } 5858 5859 // Compute sizes of nested messages 5860 #[allow(unused_variables)] compute_size(&self) -> u325861 fn compute_size(&self) -> u32 { 5862 let mut my_size = 0; 5863 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 5864 my_size += ::protobuf::rt::enum_size(1, self.error); 5865 } 5866 if !self.webauthn_secret_hash.is_empty() { 5867 my_size += ::protobuf::rt::bytes_size(2, &self.webauthn_secret_hash); 5868 } 5869 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 5870 self.cached_size.set(my_size); 5871 my_size 5872 } 5873 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>5874 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 5875 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 5876 os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; 5877 } 5878 if !self.webauthn_secret_hash.is_empty() { 5879 os.write_bytes(2, &self.webauthn_secret_hash)?; 5880 } 5881 os.write_unknown_fields(self.get_unknown_fields())?; 5882 ::std::result::Result::Ok(()) 5883 } 5884 get_cached_size(&self) -> u325885 fn get_cached_size(&self) -> u32 { 5886 self.cached_size.get() 5887 } 5888 get_unknown_fields(&self) -> &::protobuf::UnknownFields5889 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 5890 &self.unknown_fields 5891 } 5892 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields5893 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 5894 &mut self.unknown_fields 5895 } 5896 as_any(&self) -> &dyn (::std::any::Any)5897 fn as_any(&self) -> &dyn (::std::any::Any) { 5898 self as &dyn (::std::any::Any) 5899 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)5900 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 5901 self as &mut dyn (::std::any::Any) 5902 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>5903 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 5904 self 5905 } 5906 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor5907 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 5908 Self::descriptor_static() 5909 } 5910 new() -> GetWebAuthnSecretHashReply5911 fn new() -> GetWebAuthnSecretHashReply { 5912 GetWebAuthnSecretHashReply::new() 5913 } 5914 default_instance() -> &'static GetWebAuthnSecretHashReply5915 fn default_instance() -> &'static GetWebAuthnSecretHashReply { 5916 static instance: ::protobuf::rt::LazyV2<GetWebAuthnSecretHashReply> = ::protobuf::rt::LazyV2::INIT; 5917 instance.get(GetWebAuthnSecretHashReply::new) 5918 } 5919 } 5920 5921 impl ::protobuf::Clear for GetWebAuthnSecretHashReply { clear(&mut self)5922 fn clear(&mut self) { 5923 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 5924 self.webauthn_secret_hash.clear(); 5925 self.unknown_fields.clear(); 5926 } 5927 } 5928 5929 impl ::protobuf::reflect::ProtobufValue for GetWebAuthnSecretHashReply { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef5930 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 5931 ::protobuf::reflect::ReflectValueRef::Message(self) 5932 } 5933 } 5934 5935 #[derive(PartialEq,Clone,Default,Debug)] 5936 pub struct GetHibernateSecretRequest { 5937 // message fields 5938 pub account_id: ::protobuf::SingularPtrField<super::rpc::AccountIdentifier>, 5939 pub auth_session_id: ::std::vec::Vec<u8>, 5940 // special fields 5941 pub unknown_fields: ::protobuf::UnknownFields, 5942 pub cached_size: ::protobuf::CachedSize, 5943 } 5944 5945 impl<'a> ::std::default::Default for &'a GetHibernateSecretRequest { default() -> &'a GetHibernateSecretRequest5946 fn default() -> &'a GetHibernateSecretRequest { 5947 <GetHibernateSecretRequest as ::protobuf::Message>::default_instance() 5948 } 5949 } 5950 5951 impl GetHibernateSecretRequest { new() -> GetHibernateSecretRequest5952 pub fn new() -> GetHibernateSecretRequest { 5953 ::std::default::Default::default() 5954 } 5955 5956 // .cryptohome.AccountIdentifier account_id = 1; 5957 5958 get_account_id(&self) -> &super::rpc::AccountIdentifier5959 pub fn get_account_id(&self) -> &super::rpc::AccountIdentifier { 5960 self.account_id.as_ref().unwrap_or_else(|| <super::rpc::AccountIdentifier as ::protobuf::Message>::default_instance()) 5961 } clear_account_id(&mut self)5962 pub fn clear_account_id(&mut self) { 5963 self.account_id.clear(); 5964 } 5965 has_account_id(&self) -> bool5966 pub fn has_account_id(&self) -> bool { 5967 self.account_id.is_some() 5968 } 5969 5970 // Param is passed by value, moved set_account_id(&mut self, v: super::rpc::AccountIdentifier)5971 pub fn set_account_id(&mut self, v: super::rpc::AccountIdentifier) { 5972 self.account_id = ::protobuf::SingularPtrField::some(v); 5973 } 5974 5975 // Mutable pointer to the field. 5976 // If field is not initialized, it is initialized with default value first. mut_account_id(&mut self) -> &mut super::rpc::AccountIdentifier5977 pub fn mut_account_id(&mut self) -> &mut super::rpc::AccountIdentifier { 5978 if self.account_id.is_none() { 5979 self.account_id.set_default(); 5980 } 5981 self.account_id.as_mut().unwrap() 5982 } 5983 5984 // Take field take_account_id(&mut self) -> super::rpc::AccountIdentifier5985 pub fn take_account_id(&mut self) -> super::rpc::AccountIdentifier { 5986 self.account_id.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) 5987 } 5988 5989 // bytes auth_session_id = 2; 5990 5991 get_auth_session_id(&self) -> &[u8]5992 pub fn get_auth_session_id(&self) -> &[u8] { 5993 &self.auth_session_id 5994 } clear_auth_session_id(&mut self)5995 pub fn clear_auth_session_id(&mut self) { 5996 self.auth_session_id.clear(); 5997 } 5998 5999 // Param is passed by value, moved set_auth_session_id(&mut self, v: ::std::vec::Vec<u8>)6000 pub fn set_auth_session_id(&mut self, v: ::std::vec::Vec<u8>) { 6001 self.auth_session_id = v; 6002 } 6003 6004 // Mutable pointer to the field. 6005 // If field is not initialized, it is initialized with default value first. mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec<u8>6006 pub fn mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec<u8> { 6007 &mut self.auth_session_id 6008 } 6009 6010 // Take field take_auth_session_id(&mut self) -> ::std::vec::Vec<u8>6011 pub fn take_auth_session_id(&mut self) -> ::std::vec::Vec<u8> { 6012 ::std::mem::replace(&mut self.auth_session_id, ::std::vec::Vec::new()) 6013 } 6014 } 6015 6016 impl ::protobuf::Message for GetHibernateSecretRequest { is_initialized(&self) -> bool6017 fn is_initialized(&self) -> bool { 6018 for v in &self.account_id { 6019 if !v.is_initialized() { 6020 return false; 6021 } 6022 }; 6023 true 6024 } 6025 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>6026 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 6027 while !is.eof()? { 6028 let (field_number, wire_type) = is.read_tag_unpack()?; 6029 match field_number { 6030 1 => { 6031 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account_id)?; 6032 }, 6033 2 => { 6034 ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.auth_session_id)?; 6035 }, 6036 _ => { 6037 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 6038 }, 6039 }; 6040 } 6041 ::std::result::Result::Ok(()) 6042 } 6043 6044 // Compute sizes of nested messages 6045 #[allow(unused_variables)] compute_size(&self) -> u326046 fn compute_size(&self) -> u32 { 6047 let mut my_size = 0; 6048 if let Some(ref v) = self.account_id.as_ref() { 6049 let len = v.compute_size(); 6050 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 6051 } 6052 if !self.auth_session_id.is_empty() { 6053 my_size += ::protobuf::rt::bytes_size(2, &self.auth_session_id); 6054 } 6055 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 6056 self.cached_size.set(my_size); 6057 my_size 6058 } 6059 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>6060 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 6061 if let Some(ref v) = self.account_id.as_ref() { 6062 os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; 6063 os.write_raw_varint32(v.get_cached_size())?; 6064 v.write_to_with_cached_sizes(os)?; 6065 } 6066 if !self.auth_session_id.is_empty() { 6067 os.write_bytes(2, &self.auth_session_id)?; 6068 } 6069 os.write_unknown_fields(self.get_unknown_fields())?; 6070 ::std::result::Result::Ok(()) 6071 } 6072 get_cached_size(&self) -> u326073 fn get_cached_size(&self) -> u32 { 6074 self.cached_size.get() 6075 } 6076 get_unknown_fields(&self) -> &::protobuf::UnknownFields6077 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 6078 &self.unknown_fields 6079 } 6080 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields6081 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 6082 &mut self.unknown_fields 6083 } 6084 as_any(&self) -> &dyn (::std::any::Any)6085 fn as_any(&self) -> &dyn (::std::any::Any) { 6086 self as &dyn (::std::any::Any) 6087 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)6088 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 6089 self as &mut dyn (::std::any::Any) 6090 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>6091 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 6092 self 6093 } 6094 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor6095 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 6096 Self::descriptor_static() 6097 } 6098 new() -> GetHibernateSecretRequest6099 fn new() -> GetHibernateSecretRequest { 6100 GetHibernateSecretRequest::new() 6101 } 6102 default_instance() -> &'static GetHibernateSecretRequest6103 fn default_instance() -> &'static GetHibernateSecretRequest { 6104 static instance: ::protobuf::rt::LazyV2<GetHibernateSecretRequest> = ::protobuf::rt::LazyV2::INIT; 6105 instance.get(GetHibernateSecretRequest::new) 6106 } 6107 } 6108 6109 impl ::protobuf::Clear for GetHibernateSecretRequest { clear(&mut self)6110 fn clear(&mut self) { 6111 self.account_id.clear(); 6112 self.auth_session_id.clear(); 6113 self.unknown_fields.clear(); 6114 } 6115 } 6116 6117 impl ::protobuf::reflect::ProtobufValue for GetHibernateSecretRequest { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef6118 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 6119 ::protobuf::reflect::ReflectValueRef::Message(self) 6120 } 6121 } 6122 6123 #[derive(PartialEq,Clone,Default,Debug)] 6124 pub struct GetHibernateSecretReply { 6125 // message fields 6126 pub error: CryptohomeErrorCode, 6127 pub hibernate_secret: ::std::vec::Vec<u8>, 6128 // special fields 6129 pub unknown_fields: ::protobuf::UnknownFields, 6130 pub cached_size: ::protobuf::CachedSize, 6131 } 6132 6133 impl<'a> ::std::default::Default for &'a GetHibernateSecretReply { default() -> &'a GetHibernateSecretReply6134 fn default() -> &'a GetHibernateSecretReply { 6135 <GetHibernateSecretReply as ::protobuf::Message>::default_instance() 6136 } 6137 } 6138 6139 impl GetHibernateSecretReply { new() -> GetHibernateSecretReply6140 pub fn new() -> GetHibernateSecretReply { 6141 ::std::default::Default::default() 6142 } 6143 6144 // .user_data_auth.CryptohomeErrorCode error = 1; 6145 6146 get_error(&self) -> CryptohomeErrorCode6147 pub fn get_error(&self) -> CryptohomeErrorCode { 6148 self.error 6149 } clear_error(&mut self)6150 pub fn clear_error(&mut self) { 6151 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 6152 } 6153 6154 // Param is passed by value, moved set_error(&mut self, v: CryptohomeErrorCode)6155 pub fn set_error(&mut self, v: CryptohomeErrorCode) { 6156 self.error = v; 6157 } 6158 6159 // bytes hibernate_secret = 2; 6160 6161 get_hibernate_secret(&self) -> &[u8]6162 pub fn get_hibernate_secret(&self) -> &[u8] { 6163 &self.hibernate_secret 6164 } clear_hibernate_secret(&mut self)6165 pub fn clear_hibernate_secret(&mut self) { 6166 self.hibernate_secret.clear(); 6167 } 6168 6169 // Param is passed by value, moved set_hibernate_secret(&mut self, v: ::std::vec::Vec<u8>)6170 pub fn set_hibernate_secret(&mut self, v: ::std::vec::Vec<u8>) { 6171 self.hibernate_secret = v; 6172 } 6173 6174 // Mutable pointer to the field. 6175 // If field is not initialized, it is initialized with default value first. mut_hibernate_secret(&mut self) -> &mut ::std::vec::Vec<u8>6176 pub fn mut_hibernate_secret(&mut self) -> &mut ::std::vec::Vec<u8> { 6177 &mut self.hibernate_secret 6178 } 6179 6180 // Take field take_hibernate_secret(&mut self) -> ::std::vec::Vec<u8>6181 pub fn take_hibernate_secret(&mut self) -> ::std::vec::Vec<u8> { 6182 ::std::mem::replace(&mut self.hibernate_secret, ::std::vec::Vec::new()) 6183 } 6184 } 6185 6186 impl ::protobuf::Message for GetHibernateSecretReply { is_initialized(&self) -> bool6187 fn is_initialized(&self) -> bool { 6188 true 6189 } 6190 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>6191 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 6192 while !is.eof()? { 6193 let (field_number, wire_type) = is.read_tag_unpack()?; 6194 match field_number { 6195 1 => { 6196 ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? 6197 }, 6198 2 => { 6199 ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.hibernate_secret)?; 6200 }, 6201 _ => { 6202 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 6203 }, 6204 }; 6205 } 6206 ::std::result::Result::Ok(()) 6207 } 6208 6209 // Compute sizes of nested messages 6210 #[allow(unused_variables)] compute_size(&self) -> u326211 fn compute_size(&self) -> u32 { 6212 let mut my_size = 0; 6213 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 6214 my_size += ::protobuf::rt::enum_size(1, self.error); 6215 } 6216 if !self.hibernate_secret.is_empty() { 6217 my_size += ::protobuf::rt::bytes_size(2, &self.hibernate_secret); 6218 } 6219 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 6220 self.cached_size.set(my_size); 6221 my_size 6222 } 6223 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>6224 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 6225 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 6226 os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; 6227 } 6228 if !self.hibernate_secret.is_empty() { 6229 os.write_bytes(2, &self.hibernate_secret)?; 6230 } 6231 os.write_unknown_fields(self.get_unknown_fields())?; 6232 ::std::result::Result::Ok(()) 6233 } 6234 get_cached_size(&self) -> u326235 fn get_cached_size(&self) -> u32 { 6236 self.cached_size.get() 6237 } 6238 get_unknown_fields(&self) -> &::protobuf::UnknownFields6239 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 6240 &self.unknown_fields 6241 } 6242 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields6243 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 6244 &mut self.unknown_fields 6245 } 6246 as_any(&self) -> &dyn (::std::any::Any)6247 fn as_any(&self) -> &dyn (::std::any::Any) { 6248 self as &dyn (::std::any::Any) 6249 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)6250 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 6251 self as &mut dyn (::std::any::Any) 6252 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>6253 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 6254 self 6255 } 6256 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor6257 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 6258 Self::descriptor_static() 6259 } 6260 new() -> GetHibernateSecretReply6261 fn new() -> GetHibernateSecretReply { 6262 GetHibernateSecretReply::new() 6263 } 6264 default_instance() -> &'static GetHibernateSecretReply6265 fn default_instance() -> &'static GetHibernateSecretReply { 6266 static instance: ::protobuf::rt::LazyV2<GetHibernateSecretReply> = ::protobuf::rt::LazyV2::INIT; 6267 instance.get(GetHibernateSecretReply::new) 6268 } 6269 } 6270 6271 impl ::protobuf::Clear for GetHibernateSecretReply { clear(&mut self)6272 fn clear(&mut self) { 6273 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 6274 self.hibernate_secret.clear(); 6275 self.unknown_fields.clear(); 6276 } 6277 } 6278 6279 impl ::protobuf::reflect::ProtobufValue for GetHibernateSecretReply { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef6280 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 6281 ::protobuf::reflect::ReflectValueRef::Message(self) 6282 } 6283 } 6284 6285 #[derive(PartialEq,Clone,Default,Debug)] 6286 pub struct StartMigrateToDircryptoRequest { 6287 // message fields 6288 pub account_id: ::protobuf::SingularPtrField<super::rpc::AccountIdentifier>, 6289 pub minimal_migration: bool, 6290 pub auth_session_id: ::std::vec::Vec<u8>, 6291 // special fields 6292 pub unknown_fields: ::protobuf::UnknownFields, 6293 pub cached_size: ::protobuf::CachedSize, 6294 } 6295 6296 impl<'a> ::std::default::Default for &'a StartMigrateToDircryptoRequest { default() -> &'a StartMigrateToDircryptoRequest6297 fn default() -> &'a StartMigrateToDircryptoRequest { 6298 <StartMigrateToDircryptoRequest as ::protobuf::Message>::default_instance() 6299 } 6300 } 6301 6302 impl StartMigrateToDircryptoRequest { new() -> StartMigrateToDircryptoRequest6303 pub fn new() -> StartMigrateToDircryptoRequest { 6304 ::std::default::Default::default() 6305 } 6306 6307 // .cryptohome.AccountIdentifier account_id = 1; 6308 6309 get_account_id(&self) -> &super::rpc::AccountIdentifier6310 pub fn get_account_id(&self) -> &super::rpc::AccountIdentifier { 6311 self.account_id.as_ref().unwrap_or_else(|| <super::rpc::AccountIdentifier as ::protobuf::Message>::default_instance()) 6312 } clear_account_id(&mut self)6313 pub fn clear_account_id(&mut self) { 6314 self.account_id.clear(); 6315 } 6316 has_account_id(&self) -> bool6317 pub fn has_account_id(&self) -> bool { 6318 self.account_id.is_some() 6319 } 6320 6321 // Param is passed by value, moved set_account_id(&mut self, v: super::rpc::AccountIdentifier)6322 pub fn set_account_id(&mut self, v: super::rpc::AccountIdentifier) { 6323 self.account_id = ::protobuf::SingularPtrField::some(v); 6324 } 6325 6326 // Mutable pointer to the field. 6327 // If field is not initialized, it is initialized with default value first. mut_account_id(&mut self) -> &mut super::rpc::AccountIdentifier6328 pub fn mut_account_id(&mut self) -> &mut super::rpc::AccountIdentifier { 6329 if self.account_id.is_none() { 6330 self.account_id.set_default(); 6331 } 6332 self.account_id.as_mut().unwrap() 6333 } 6334 6335 // Take field take_account_id(&mut self) -> super::rpc::AccountIdentifier6336 pub fn take_account_id(&mut self) -> super::rpc::AccountIdentifier { 6337 self.account_id.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) 6338 } 6339 6340 // bool minimal_migration = 2; 6341 6342 get_minimal_migration(&self) -> bool6343 pub fn get_minimal_migration(&self) -> bool { 6344 self.minimal_migration 6345 } clear_minimal_migration(&mut self)6346 pub fn clear_minimal_migration(&mut self) { 6347 self.minimal_migration = false; 6348 } 6349 6350 // Param is passed by value, moved set_minimal_migration(&mut self, v: bool)6351 pub fn set_minimal_migration(&mut self, v: bool) { 6352 self.minimal_migration = v; 6353 } 6354 6355 // bytes auth_session_id = 3; 6356 6357 get_auth_session_id(&self) -> &[u8]6358 pub fn get_auth_session_id(&self) -> &[u8] { 6359 &self.auth_session_id 6360 } clear_auth_session_id(&mut self)6361 pub fn clear_auth_session_id(&mut self) { 6362 self.auth_session_id.clear(); 6363 } 6364 6365 // Param is passed by value, moved set_auth_session_id(&mut self, v: ::std::vec::Vec<u8>)6366 pub fn set_auth_session_id(&mut self, v: ::std::vec::Vec<u8>) { 6367 self.auth_session_id = v; 6368 } 6369 6370 // Mutable pointer to the field. 6371 // If field is not initialized, it is initialized with default value first. mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec<u8>6372 pub fn mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec<u8> { 6373 &mut self.auth_session_id 6374 } 6375 6376 // Take field take_auth_session_id(&mut self) -> ::std::vec::Vec<u8>6377 pub fn take_auth_session_id(&mut self) -> ::std::vec::Vec<u8> { 6378 ::std::mem::replace(&mut self.auth_session_id, ::std::vec::Vec::new()) 6379 } 6380 } 6381 6382 impl ::protobuf::Message for StartMigrateToDircryptoRequest { is_initialized(&self) -> bool6383 fn is_initialized(&self) -> bool { 6384 for v in &self.account_id { 6385 if !v.is_initialized() { 6386 return false; 6387 } 6388 }; 6389 true 6390 } 6391 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>6392 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 6393 while !is.eof()? { 6394 let (field_number, wire_type) = is.read_tag_unpack()?; 6395 match field_number { 6396 1 => { 6397 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account_id)?; 6398 }, 6399 2 => { 6400 if wire_type != ::protobuf::wire_format::WireTypeVarint { 6401 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); 6402 } 6403 let tmp = is.read_bool()?; 6404 self.minimal_migration = tmp; 6405 }, 6406 3 => { 6407 ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.auth_session_id)?; 6408 }, 6409 _ => { 6410 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 6411 }, 6412 }; 6413 } 6414 ::std::result::Result::Ok(()) 6415 } 6416 6417 // Compute sizes of nested messages 6418 #[allow(unused_variables)] compute_size(&self) -> u326419 fn compute_size(&self) -> u32 { 6420 let mut my_size = 0; 6421 if let Some(ref v) = self.account_id.as_ref() { 6422 let len = v.compute_size(); 6423 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 6424 } 6425 if self.minimal_migration != false { 6426 my_size += 2; 6427 } 6428 if !self.auth_session_id.is_empty() { 6429 my_size += ::protobuf::rt::bytes_size(3, &self.auth_session_id); 6430 } 6431 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 6432 self.cached_size.set(my_size); 6433 my_size 6434 } 6435 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>6436 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 6437 if let Some(ref v) = self.account_id.as_ref() { 6438 os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; 6439 os.write_raw_varint32(v.get_cached_size())?; 6440 v.write_to_with_cached_sizes(os)?; 6441 } 6442 if self.minimal_migration != false { 6443 os.write_bool(2, self.minimal_migration)?; 6444 } 6445 if !self.auth_session_id.is_empty() { 6446 os.write_bytes(3, &self.auth_session_id)?; 6447 } 6448 os.write_unknown_fields(self.get_unknown_fields())?; 6449 ::std::result::Result::Ok(()) 6450 } 6451 get_cached_size(&self) -> u326452 fn get_cached_size(&self) -> u32 { 6453 self.cached_size.get() 6454 } 6455 get_unknown_fields(&self) -> &::protobuf::UnknownFields6456 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 6457 &self.unknown_fields 6458 } 6459 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields6460 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 6461 &mut self.unknown_fields 6462 } 6463 as_any(&self) -> &dyn (::std::any::Any)6464 fn as_any(&self) -> &dyn (::std::any::Any) { 6465 self as &dyn (::std::any::Any) 6466 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)6467 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 6468 self as &mut dyn (::std::any::Any) 6469 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>6470 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 6471 self 6472 } 6473 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor6474 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 6475 Self::descriptor_static() 6476 } 6477 new() -> StartMigrateToDircryptoRequest6478 fn new() -> StartMigrateToDircryptoRequest { 6479 StartMigrateToDircryptoRequest::new() 6480 } 6481 default_instance() -> &'static StartMigrateToDircryptoRequest6482 fn default_instance() -> &'static StartMigrateToDircryptoRequest { 6483 static instance: ::protobuf::rt::LazyV2<StartMigrateToDircryptoRequest> = ::protobuf::rt::LazyV2::INIT; 6484 instance.get(StartMigrateToDircryptoRequest::new) 6485 } 6486 } 6487 6488 impl ::protobuf::Clear for StartMigrateToDircryptoRequest { clear(&mut self)6489 fn clear(&mut self) { 6490 self.account_id.clear(); 6491 self.minimal_migration = false; 6492 self.auth_session_id.clear(); 6493 self.unknown_fields.clear(); 6494 } 6495 } 6496 6497 impl ::protobuf::reflect::ProtobufValue for StartMigrateToDircryptoRequest { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef6498 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 6499 ::protobuf::reflect::ReflectValueRef::Message(self) 6500 } 6501 } 6502 6503 #[derive(PartialEq,Clone,Default,Debug)] 6504 pub struct StartMigrateToDircryptoReply { 6505 // message fields 6506 pub error: CryptohomeErrorCode, 6507 // special fields 6508 pub unknown_fields: ::protobuf::UnknownFields, 6509 pub cached_size: ::protobuf::CachedSize, 6510 } 6511 6512 impl<'a> ::std::default::Default for &'a StartMigrateToDircryptoReply { default() -> &'a StartMigrateToDircryptoReply6513 fn default() -> &'a StartMigrateToDircryptoReply { 6514 <StartMigrateToDircryptoReply as ::protobuf::Message>::default_instance() 6515 } 6516 } 6517 6518 impl StartMigrateToDircryptoReply { new() -> StartMigrateToDircryptoReply6519 pub fn new() -> StartMigrateToDircryptoReply { 6520 ::std::default::Default::default() 6521 } 6522 6523 // .user_data_auth.CryptohomeErrorCode error = 1; 6524 6525 get_error(&self) -> CryptohomeErrorCode6526 pub fn get_error(&self) -> CryptohomeErrorCode { 6527 self.error 6528 } clear_error(&mut self)6529 pub fn clear_error(&mut self) { 6530 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 6531 } 6532 6533 // Param is passed by value, moved set_error(&mut self, v: CryptohomeErrorCode)6534 pub fn set_error(&mut self, v: CryptohomeErrorCode) { 6535 self.error = v; 6536 } 6537 } 6538 6539 impl ::protobuf::Message for StartMigrateToDircryptoReply { is_initialized(&self) -> bool6540 fn is_initialized(&self) -> bool { 6541 true 6542 } 6543 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>6544 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 6545 while !is.eof()? { 6546 let (field_number, wire_type) = is.read_tag_unpack()?; 6547 match field_number { 6548 1 => { 6549 ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? 6550 }, 6551 _ => { 6552 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 6553 }, 6554 }; 6555 } 6556 ::std::result::Result::Ok(()) 6557 } 6558 6559 // Compute sizes of nested messages 6560 #[allow(unused_variables)] compute_size(&self) -> u326561 fn compute_size(&self) -> u32 { 6562 let mut my_size = 0; 6563 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 6564 my_size += ::protobuf::rt::enum_size(1, self.error); 6565 } 6566 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 6567 self.cached_size.set(my_size); 6568 my_size 6569 } 6570 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>6571 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 6572 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 6573 os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; 6574 } 6575 os.write_unknown_fields(self.get_unknown_fields())?; 6576 ::std::result::Result::Ok(()) 6577 } 6578 get_cached_size(&self) -> u326579 fn get_cached_size(&self) -> u32 { 6580 self.cached_size.get() 6581 } 6582 get_unknown_fields(&self) -> &::protobuf::UnknownFields6583 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 6584 &self.unknown_fields 6585 } 6586 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields6587 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 6588 &mut self.unknown_fields 6589 } 6590 as_any(&self) -> &dyn (::std::any::Any)6591 fn as_any(&self) -> &dyn (::std::any::Any) { 6592 self as &dyn (::std::any::Any) 6593 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)6594 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 6595 self as &mut dyn (::std::any::Any) 6596 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>6597 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 6598 self 6599 } 6600 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor6601 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 6602 Self::descriptor_static() 6603 } 6604 new() -> StartMigrateToDircryptoReply6605 fn new() -> StartMigrateToDircryptoReply { 6606 StartMigrateToDircryptoReply::new() 6607 } 6608 default_instance() -> &'static StartMigrateToDircryptoReply6609 fn default_instance() -> &'static StartMigrateToDircryptoReply { 6610 static instance: ::protobuf::rt::LazyV2<StartMigrateToDircryptoReply> = ::protobuf::rt::LazyV2::INIT; 6611 instance.get(StartMigrateToDircryptoReply::new) 6612 } 6613 } 6614 6615 impl ::protobuf::Clear for StartMigrateToDircryptoReply { clear(&mut self)6616 fn clear(&mut self) { 6617 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 6618 self.unknown_fields.clear(); 6619 } 6620 } 6621 6622 impl ::protobuf::reflect::ProtobufValue for StartMigrateToDircryptoReply { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef6623 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 6624 ::protobuf::reflect::ReflectValueRef::Message(self) 6625 } 6626 } 6627 6628 #[derive(PartialEq,Clone,Default,Debug)] 6629 pub struct DircryptoMigrationProgress { 6630 // message fields 6631 pub status: DircryptoMigrationStatus, 6632 pub current_bytes: u64, 6633 pub total_bytes: u64, 6634 // special fields 6635 pub unknown_fields: ::protobuf::UnknownFields, 6636 pub cached_size: ::protobuf::CachedSize, 6637 } 6638 6639 impl<'a> ::std::default::Default for &'a DircryptoMigrationProgress { default() -> &'a DircryptoMigrationProgress6640 fn default() -> &'a DircryptoMigrationProgress { 6641 <DircryptoMigrationProgress as ::protobuf::Message>::default_instance() 6642 } 6643 } 6644 6645 impl DircryptoMigrationProgress { new() -> DircryptoMigrationProgress6646 pub fn new() -> DircryptoMigrationProgress { 6647 ::std::default::Default::default() 6648 } 6649 6650 // .user_data_auth.DircryptoMigrationStatus status = 1; 6651 6652 get_status(&self) -> DircryptoMigrationStatus6653 pub fn get_status(&self) -> DircryptoMigrationStatus { 6654 self.status 6655 } clear_status(&mut self)6656 pub fn clear_status(&mut self) { 6657 self.status = DircryptoMigrationStatus::DIRCRYPTO_MIGRATION_SUCCESS; 6658 } 6659 6660 // Param is passed by value, moved set_status(&mut self, v: DircryptoMigrationStatus)6661 pub fn set_status(&mut self, v: DircryptoMigrationStatus) { 6662 self.status = v; 6663 } 6664 6665 // uint64 current_bytes = 2; 6666 6667 get_current_bytes(&self) -> u646668 pub fn get_current_bytes(&self) -> u64 { 6669 self.current_bytes 6670 } clear_current_bytes(&mut self)6671 pub fn clear_current_bytes(&mut self) { 6672 self.current_bytes = 0; 6673 } 6674 6675 // Param is passed by value, moved set_current_bytes(&mut self, v: u64)6676 pub fn set_current_bytes(&mut self, v: u64) { 6677 self.current_bytes = v; 6678 } 6679 6680 // uint64 total_bytes = 3; 6681 6682 get_total_bytes(&self) -> u646683 pub fn get_total_bytes(&self) -> u64 { 6684 self.total_bytes 6685 } clear_total_bytes(&mut self)6686 pub fn clear_total_bytes(&mut self) { 6687 self.total_bytes = 0; 6688 } 6689 6690 // Param is passed by value, moved set_total_bytes(&mut self, v: u64)6691 pub fn set_total_bytes(&mut self, v: u64) { 6692 self.total_bytes = v; 6693 } 6694 } 6695 6696 impl ::protobuf::Message for DircryptoMigrationProgress { is_initialized(&self) -> bool6697 fn is_initialized(&self) -> bool { 6698 true 6699 } 6700 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>6701 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 6702 while !is.eof()? { 6703 let (field_number, wire_type) = is.read_tag_unpack()?; 6704 match field_number { 6705 1 => { 6706 ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.status, 1, &mut self.unknown_fields)? 6707 }, 6708 2 => { 6709 if wire_type != ::protobuf::wire_format::WireTypeVarint { 6710 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); 6711 } 6712 let tmp = is.read_uint64()?; 6713 self.current_bytes = tmp; 6714 }, 6715 3 => { 6716 if wire_type != ::protobuf::wire_format::WireTypeVarint { 6717 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); 6718 } 6719 let tmp = is.read_uint64()?; 6720 self.total_bytes = tmp; 6721 }, 6722 _ => { 6723 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 6724 }, 6725 }; 6726 } 6727 ::std::result::Result::Ok(()) 6728 } 6729 6730 // Compute sizes of nested messages 6731 #[allow(unused_variables)] compute_size(&self) -> u326732 fn compute_size(&self) -> u32 { 6733 let mut my_size = 0; 6734 if self.status != DircryptoMigrationStatus::DIRCRYPTO_MIGRATION_SUCCESS { 6735 my_size += ::protobuf::rt::enum_size(1, self.status); 6736 } 6737 if self.current_bytes != 0 { 6738 my_size += ::protobuf::rt::value_size(2, self.current_bytes, ::protobuf::wire_format::WireTypeVarint); 6739 } 6740 if self.total_bytes != 0 { 6741 my_size += ::protobuf::rt::value_size(3, self.total_bytes, ::protobuf::wire_format::WireTypeVarint); 6742 } 6743 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 6744 self.cached_size.set(my_size); 6745 my_size 6746 } 6747 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>6748 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 6749 if self.status != DircryptoMigrationStatus::DIRCRYPTO_MIGRATION_SUCCESS { 6750 os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.status))?; 6751 } 6752 if self.current_bytes != 0 { 6753 os.write_uint64(2, self.current_bytes)?; 6754 } 6755 if self.total_bytes != 0 { 6756 os.write_uint64(3, self.total_bytes)?; 6757 } 6758 os.write_unknown_fields(self.get_unknown_fields())?; 6759 ::std::result::Result::Ok(()) 6760 } 6761 get_cached_size(&self) -> u326762 fn get_cached_size(&self) -> u32 { 6763 self.cached_size.get() 6764 } 6765 get_unknown_fields(&self) -> &::protobuf::UnknownFields6766 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 6767 &self.unknown_fields 6768 } 6769 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields6770 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 6771 &mut self.unknown_fields 6772 } 6773 as_any(&self) -> &dyn (::std::any::Any)6774 fn as_any(&self) -> &dyn (::std::any::Any) { 6775 self as &dyn (::std::any::Any) 6776 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)6777 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 6778 self as &mut dyn (::std::any::Any) 6779 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>6780 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 6781 self 6782 } 6783 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor6784 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 6785 Self::descriptor_static() 6786 } 6787 new() -> DircryptoMigrationProgress6788 fn new() -> DircryptoMigrationProgress { 6789 DircryptoMigrationProgress::new() 6790 } 6791 default_instance() -> &'static DircryptoMigrationProgress6792 fn default_instance() -> &'static DircryptoMigrationProgress { 6793 static instance: ::protobuf::rt::LazyV2<DircryptoMigrationProgress> = ::protobuf::rt::LazyV2::INIT; 6794 instance.get(DircryptoMigrationProgress::new) 6795 } 6796 } 6797 6798 impl ::protobuf::Clear for DircryptoMigrationProgress { clear(&mut self)6799 fn clear(&mut self) { 6800 self.status = DircryptoMigrationStatus::DIRCRYPTO_MIGRATION_SUCCESS; 6801 self.current_bytes = 0; 6802 self.total_bytes = 0; 6803 self.unknown_fields.clear(); 6804 } 6805 } 6806 6807 impl ::protobuf::reflect::ProtobufValue for DircryptoMigrationProgress { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef6808 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 6809 ::protobuf::reflect::ReflectValueRef::Message(self) 6810 } 6811 } 6812 6813 #[derive(PartialEq,Clone,Default,Debug)] 6814 pub struct NeedsDircryptoMigrationRequest { 6815 // message fields 6816 pub account_id: ::protobuf::SingularPtrField<super::rpc::AccountIdentifier>, 6817 // special fields 6818 pub unknown_fields: ::protobuf::UnknownFields, 6819 pub cached_size: ::protobuf::CachedSize, 6820 } 6821 6822 impl<'a> ::std::default::Default for &'a NeedsDircryptoMigrationRequest { default() -> &'a NeedsDircryptoMigrationRequest6823 fn default() -> &'a NeedsDircryptoMigrationRequest { 6824 <NeedsDircryptoMigrationRequest as ::protobuf::Message>::default_instance() 6825 } 6826 } 6827 6828 impl NeedsDircryptoMigrationRequest { new() -> NeedsDircryptoMigrationRequest6829 pub fn new() -> NeedsDircryptoMigrationRequest { 6830 ::std::default::Default::default() 6831 } 6832 6833 // .cryptohome.AccountIdentifier account_id = 1; 6834 6835 get_account_id(&self) -> &super::rpc::AccountIdentifier6836 pub fn get_account_id(&self) -> &super::rpc::AccountIdentifier { 6837 self.account_id.as_ref().unwrap_or_else(|| <super::rpc::AccountIdentifier as ::protobuf::Message>::default_instance()) 6838 } clear_account_id(&mut self)6839 pub fn clear_account_id(&mut self) { 6840 self.account_id.clear(); 6841 } 6842 has_account_id(&self) -> bool6843 pub fn has_account_id(&self) -> bool { 6844 self.account_id.is_some() 6845 } 6846 6847 // Param is passed by value, moved set_account_id(&mut self, v: super::rpc::AccountIdentifier)6848 pub fn set_account_id(&mut self, v: super::rpc::AccountIdentifier) { 6849 self.account_id = ::protobuf::SingularPtrField::some(v); 6850 } 6851 6852 // Mutable pointer to the field. 6853 // If field is not initialized, it is initialized with default value first. mut_account_id(&mut self) -> &mut super::rpc::AccountIdentifier6854 pub fn mut_account_id(&mut self) -> &mut super::rpc::AccountIdentifier { 6855 if self.account_id.is_none() { 6856 self.account_id.set_default(); 6857 } 6858 self.account_id.as_mut().unwrap() 6859 } 6860 6861 // Take field take_account_id(&mut self) -> super::rpc::AccountIdentifier6862 pub fn take_account_id(&mut self) -> super::rpc::AccountIdentifier { 6863 self.account_id.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) 6864 } 6865 } 6866 6867 impl ::protobuf::Message for NeedsDircryptoMigrationRequest { is_initialized(&self) -> bool6868 fn is_initialized(&self) -> bool { 6869 for v in &self.account_id { 6870 if !v.is_initialized() { 6871 return false; 6872 } 6873 }; 6874 true 6875 } 6876 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>6877 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 6878 while !is.eof()? { 6879 let (field_number, wire_type) = is.read_tag_unpack()?; 6880 match field_number { 6881 1 => { 6882 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account_id)?; 6883 }, 6884 _ => { 6885 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 6886 }, 6887 }; 6888 } 6889 ::std::result::Result::Ok(()) 6890 } 6891 6892 // Compute sizes of nested messages 6893 #[allow(unused_variables)] compute_size(&self) -> u326894 fn compute_size(&self) -> u32 { 6895 let mut my_size = 0; 6896 if let Some(ref v) = self.account_id.as_ref() { 6897 let len = v.compute_size(); 6898 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 6899 } 6900 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 6901 self.cached_size.set(my_size); 6902 my_size 6903 } 6904 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>6905 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 6906 if let Some(ref v) = self.account_id.as_ref() { 6907 os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; 6908 os.write_raw_varint32(v.get_cached_size())?; 6909 v.write_to_with_cached_sizes(os)?; 6910 } 6911 os.write_unknown_fields(self.get_unknown_fields())?; 6912 ::std::result::Result::Ok(()) 6913 } 6914 get_cached_size(&self) -> u326915 fn get_cached_size(&self) -> u32 { 6916 self.cached_size.get() 6917 } 6918 get_unknown_fields(&self) -> &::protobuf::UnknownFields6919 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 6920 &self.unknown_fields 6921 } 6922 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields6923 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 6924 &mut self.unknown_fields 6925 } 6926 as_any(&self) -> &dyn (::std::any::Any)6927 fn as_any(&self) -> &dyn (::std::any::Any) { 6928 self as &dyn (::std::any::Any) 6929 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)6930 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 6931 self as &mut dyn (::std::any::Any) 6932 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>6933 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 6934 self 6935 } 6936 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor6937 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 6938 Self::descriptor_static() 6939 } 6940 new() -> NeedsDircryptoMigrationRequest6941 fn new() -> NeedsDircryptoMigrationRequest { 6942 NeedsDircryptoMigrationRequest::new() 6943 } 6944 default_instance() -> &'static NeedsDircryptoMigrationRequest6945 fn default_instance() -> &'static NeedsDircryptoMigrationRequest { 6946 static instance: ::protobuf::rt::LazyV2<NeedsDircryptoMigrationRequest> = ::protobuf::rt::LazyV2::INIT; 6947 instance.get(NeedsDircryptoMigrationRequest::new) 6948 } 6949 } 6950 6951 impl ::protobuf::Clear for NeedsDircryptoMigrationRequest { clear(&mut self)6952 fn clear(&mut self) { 6953 self.account_id.clear(); 6954 self.unknown_fields.clear(); 6955 } 6956 } 6957 6958 impl ::protobuf::reflect::ProtobufValue for NeedsDircryptoMigrationRequest { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef6959 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 6960 ::protobuf::reflect::ReflectValueRef::Message(self) 6961 } 6962 } 6963 6964 #[derive(PartialEq,Clone,Default,Debug)] 6965 pub struct NeedsDircryptoMigrationReply { 6966 // message fields 6967 pub error: CryptohomeErrorCode, 6968 pub needs_dircrypto_migration: bool, 6969 // special fields 6970 pub unknown_fields: ::protobuf::UnknownFields, 6971 pub cached_size: ::protobuf::CachedSize, 6972 } 6973 6974 impl<'a> ::std::default::Default for &'a NeedsDircryptoMigrationReply { default() -> &'a NeedsDircryptoMigrationReply6975 fn default() -> &'a NeedsDircryptoMigrationReply { 6976 <NeedsDircryptoMigrationReply as ::protobuf::Message>::default_instance() 6977 } 6978 } 6979 6980 impl NeedsDircryptoMigrationReply { new() -> NeedsDircryptoMigrationReply6981 pub fn new() -> NeedsDircryptoMigrationReply { 6982 ::std::default::Default::default() 6983 } 6984 6985 // .user_data_auth.CryptohomeErrorCode error = 1; 6986 6987 get_error(&self) -> CryptohomeErrorCode6988 pub fn get_error(&self) -> CryptohomeErrorCode { 6989 self.error 6990 } clear_error(&mut self)6991 pub fn clear_error(&mut self) { 6992 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 6993 } 6994 6995 // Param is passed by value, moved set_error(&mut self, v: CryptohomeErrorCode)6996 pub fn set_error(&mut self, v: CryptohomeErrorCode) { 6997 self.error = v; 6998 } 6999 7000 // bool needs_dircrypto_migration = 2; 7001 7002 get_needs_dircrypto_migration(&self) -> bool7003 pub fn get_needs_dircrypto_migration(&self) -> bool { 7004 self.needs_dircrypto_migration 7005 } clear_needs_dircrypto_migration(&mut self)7006 pub fn clear_needs_dircrypto_migration(&mut self) { 7007 self.needs_dircrypto_migration = false; 7008 } 7009 7010 // Param is passed by value, moved set_needs_dircrypto_migration(&mut self, v: bool)7011 pub fn set_needs_dircrypto_migration(&mut self, v: bool) { 7012 self.needs_dircrypto_migration = v; 7013 } 7014 } 7015 7016 impl ::protobuf::Message for NeedsDircryptoMigrationReply { is_initialized(&self) -> bool7017 fn is_initialized(&self) -> bool { 7018 true 7019 } 7020 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>7021 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 7022 while !is.eof()? { 7023 let (field_number, wire_type) = is.read_tag_unpack()?; 7024 match field_number { 7025 1 => { 7026 ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? 7027 }, 7028 2 => { 7029 if wire_type != ::protobuf::wire_format::WireTypeVarint { 7030 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); 7031 } 7032 let tmp = is.read_bool()?; 7033 self.needs_dircrypto_migration = tmp; 7034 }, 7035 _ => { 7036 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 7037 }, 7038 }; 7039 } 7040 ::std::result::Result::Ok(()) 7041 } 7042 7043 // Compute sizes of nested messages 7044 #[allow(unused_variables)] compute_size(&self) -> u327045 fn compute_size(&self) -> u32 { 7046 let mut my_size = 0; 7047 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 7048 my_size += ::protobuf::rt::enum_size(1, self.error); 7049 } 7050 if self.needs_dircrypto_migration != false { 7051 my_size += 2; 7052 } 7053 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 7054 self.cached_size.set(my_size); 7055 my_size 7056 } 7057 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>7058 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 7059 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 7060 os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; 7061 } 7062 if self.needs_dircrypto_migration != false { 7063 os.write_bool(2, self.needs_dircrypto_migration)?; 7064 } 7065 os.write_unknown_fields(self.get_unknown_fields())?; 7066 ::std::result::Result::Ok(()) 7067 } 7068 get_cached_size(&self) -> u327069 fn get_cached_size(&self) -> u32 { 7070 self.cached_size.get() 7071 } 7072 get_unknown_fields(&self) -> &::protobuf::UnknownFields7073 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 7074 &self.unknown_fields 7075 } 7076 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields7077 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 7078 &mut self.unknown_fields 7079 } 7080 as_any(&self) -> &dyn (::std::any::Any)7081 fn as_any(&self) -> &dyn (::std::any::Any) { 7082 self as &dyn (::std::any::Any) 7083 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)7084 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 7085 self as &mut dyn (::std::any::Any) 7086 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>7087 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 7088 self 7089 } 7090 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor7091 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 7092 Self::descriptor_static() 7093 } 7094 new() -> NeedsDircryptoMigrationReply7095 fn new() -> NeedsDircryptoMigrationReply { 7096 NeedsDircryptoMigrationReply::new() 7097 } 7098 default_instance() -> &'static NeedsDircryptoMigrationReply7099 fn default_instance() -> &'static NeedsDircryptoMigrationReply { 7100 static instance: ::protobuf::rt::LazyV2<NeedsDircryptoMigrationReply> = ::protobuf::rt::LazyV2::INIT; 7101 instance.get(NeedsDircryptoMigrationReply::new) 7102 } 7103 } 7104 7105 impl ::protobuf::Clear for NeedsDircryptoMigrationReply { clear(&mut self)7106 fn clear(&mut self) { 7107 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 7108 self.needs_dircrypto_migration = false; 7109 self.unknown_fields.clear(); 7110 } 7111 } 7112 7113 impl ::protobuf::reflect::ProtobufValue for NeedsDircryptoMigrationReply { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef7114 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 7115 ::protobuf::reflect::ReflectValueRef::Message(self) 7116 } 7117 } 7118 7119 #[derive(PartialEq,Clone,Default,Debug)] 7120 pub struct GetSupportedKeyPoliciesRequest { 7121 // special fields 7122 pub unknown_fields: ::protobuf::UnknownFields, 7123 pub cached_size: ::protobuf::CachedSize, 7124 } 7125 7126 impl<'a> ::std::default::Default for &'a GetSupportedKeyPoliciesRequest { default() -> &'a GetSupportedKeyPoliciesRequest7127 fn default() -> &'a GetSupportedKeyPoliciesRequest { 7128 <GetSupportedKeyPoliciesRequest as ::protobuf::Message>::default_instance() 7129 } 7130 } 7131 7132 impl GetSupportedKeyPoliciesRequest { new() -> GetSupportedKeyPoliciesRequest7133 pub fn new() -> GetSupportedKeyPoliciesRequest { 7134 ::std::default::Default::default() 7135 } 7136 } 7137 7138 impl ::protobuf::Message for GetSupportedKeyPoliciesRequest { is_initialized(&self) -> bool7139 fn is_initialized(&self) -> bool { 7140 true 7141 } 7142 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>7143 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 7144 while !is.eof()? { 7145 let (field_number, wire_type) = is.read_tag_unpack()?; 7146 match field_number { 7147 _ => { 7148 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 7149 }, 7150 }; 7151 } 7152 ::std::result::Result::Ok(()) 7153 } 7154 7155 // Compute sizes of nested messages 7156 #[allow(unused_variables)] compute_size(&self) -> u327157 fn compute_size(&self) -> u32 { 7158 let mut my_size = 0; 7159 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 7160 self.cached_size.set(my_size); 7161 my_size 7162 } 7163 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>7164 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 7165 os.write_unknown_fields(self.get_unknown_fields())?; 7166 ::std::result::Result::Ok(()) 7167 } 7168 get_cached_size(&self) -> u327169 fn get_cached_size(&self) -> u32 { 7170 self.cached_size.get() 7171 } 7172 get_unknown_fields(&self) -> &::protobuf::UnknownFields7173 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 7174 &self.unknown_fields 7175 } 7176 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields7177 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 7178 &mut self.unknown_fields 7179 } 7180 as_any(&self) -> &dyn (::std::any::Any)7181 fn as_any(&self) -> &dyn (::std::any::Any) { 7182 self as &dyn (::std::any::Any) 7183 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)7184 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 7185 self as &mut dyn (::std::any::Any) 7186 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>7187 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 7188 self 7189 } 7190 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor7191 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 7192 Self::descriptor_static() 7193 } 7194 new() -> GetSupportedKeyPoliciesRequest7195 fn new() -> GetSupportedKeyPoliciesRequest { 7196 GetSupportedKeyPoliciesRequest::new() 7197 } 7198 default_instance() -> &'static GetSupportedKeyPoliciesRequest7199 fn default_instance() -> &'static GetSupportedKeyPoliciesRequest { 7200 static instance: ::protobuf::rt::LazyV2<GetSupportedKeyPoliciesRequest> = ::protobuf::rt::LazyV2::INIT; 7201 instance.get(GetSupportedKeyPoliciesRequest::new) 7202 } 7203 } 7204 7205 impl ::protobuf::Clear for GetSupportedKeyPoliciesRequest { clear(&mut self)7206 fn clear(&mut self) { 7207 self.unknown_fields.clear(); 7208 } 7209 } 7210 7211 impl ::protobuf::reflect::ProtobufValue for GetSupportedKeyPoliciesRequest { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef7212 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 7213 ::protobuf::reflect::ReflectValueRef::Message(self) 7214 } 7215 } 7216 7217 #[derive(PartialEq,Clone,Default,Debug)] 7218 pub struct GetSupportedKeyPoliciesReply { 7219 // message fields 7220 pub low_entropy_credentials_supported: bool, 7221 // special fields 7222 pub unknown_fields: ::protobuf::UnknownFields, 7223 pub cached_size: ::protobuf::CachedSize, 7224 } 7225 7226 impl<'a> ::std::default::Default for &'a GetSupportedKeyPoliciesReply { default() -> &'a GetSupportedKeyPoliciesReply7227 fn default() -> &'a GetSupportedKeyPoliciesReply { 7228 <GetSupportedKeyPoliciesReply as ::protobuf::Message>::default_instance() 7229 } 7230 } 7231 7232 impl GetSupportedKeyPoliciesReply { new() -> GetSupportedKeyPoliciesReply7233 pub fn new() -> GetSupportedKeyPoliciesReply { 7234 ::std::default::Default::default() 7235 } 7236 7237 // bool low_entropy_credentials_supported = 1; 7238 7239 get_low_entropy_credentials_supported(&self) -> bool7240 pub fn get_low_entropy_credentials_supported(&self) -> bool { 7241 self.low_entropy_credentials_supported 7242 } clear_low_entropy_credentials_supported(&mut self)7243 pub fn clear_low_entropy_credentials_supported(&mut self) { 7244 self.low_entropy_credentials_supported = false; 7245 } 7246 7247 // Param is passed by value, moved set_low_entropy_credentials_supported(&mut self, v: bool)7248 pub fn set_low_entropy_credentials_supported(&mut self, v: bool) { 7249 self.low_entropy_credentials_supported = v; 7250 } 7251 } 7252 7253 impl ::protobuf::Message for GetSupportedKeyPoliciesReply { is_initialized(&self) -> bool7254 fn is_initialized(&self) -> bool { 7255 true 7256 } 7257 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>7258 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 7259 while !is.eof()? { 7260 let (field_number, wire_type) = is.read_tag_unpack()?; 7261 match field_number { 7262 1 => { 7263 if wire_type != ::protobuf::wire_format::WireTypeVarint { 7264 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); 7265 } 7266 let tmp = is.read_bool()?; 7267 self.low_entropy_credentials_supported = tmp; 7268 }, 7269 _ => { 7270 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 7271 }, 7272 }; 7273 } 7274 ::std::result::Result::Ok(()) 7275 } 7276 7277 // Compute sizes of nested messages 7278 #[allow(unused_variables)] compute_size(&self) -> u327279 fn compute_size(&self) -> u32 { 7280 let mut my_size = 0; 7281 if self.low_entropy_credentials_supported != false { 7282 my_size += 2; 7283 } 7284 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 7285 self.cached_size.set(my_size); 7286 my_size 7287 } 7288 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>7289 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 7290 if self.low_entropy_credentials_supported != false { 7291 os.write_bool(1, self.low_entropy_credentials_supported)?; 7292 } 7293 os.write_unknown_fields(self.get_unknown_fields())?; 7294 ::std::result::Result::Ok(()) 7295 } 7296 get_cached_size(&self) -> u327297 fn get_cached_size(&self) -> u32 { 7298 self.cached_size.get() 7299 } 7300 get_unknown_fields(&self) -> &::protobuf::UnknownFields7301 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 7302 &self.unknown_fields 7303 } 7304 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields7305 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 7306 &mut self.unknown_fields 7307 } 7308 as_any(&self) -> &dyn (::std::any::Any)7309 fn as_any(&self) -> &dyn (::std::any::Any) { 7310 self as &dyn (::std::any::Any) 7311 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)7312 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 7313 self as &mut dyn (::std::any::Any) 7314 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>7315 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 7316 self 7317 } 7318 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor7319 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 7320 Self::descriptor_static() 7321 } 7322 new() -> GetSupportedKeyPoliciesReply7323 fn new() -> GetSupportedKeyPoliciesReply { 7324 GetSupportedKeyPoliciesReply::new() 7325 } 7326 default_instance() -> &'static GetSupportedKeyPoliciesReply7327 fn default_instance() -> &'static GetSupportedKeyPoliciesReply { 7328 static instance: ::protobuf::rt::LazyV2<GetSupportedKeyPoliciesReply> = ::protobuf::rt::LazyV2::INIT; 7329 instance.get(GetSupportedKeyPoliciesReply::new) 7330 } 7331 } 7332 7333 impl ::protobuf::Clear for GetSupportedKeyPoliciesReply { clear(&mut self)7334 fn clear(&mut self) { 7335 self.low_entropy_credentials_supported = false; 7336 self.unknown_fields.clear(); 7337 } 7338 } 7339 7340 impl ::protobuf::reflect::ProtobufValue for GetSupportedKeyPoliciesReply { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef7341 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 7342 ::protobuf::reflect::ReflectValueRef::Message(self) 7343 } 7344 } 7345 7346 #[derive(PartialEq,Clone,Default,Debug)] 7347 pub struct GetAccountDiskUsageRequest { 7348 // message fields 7349 pub identifier: ::protobuf::SingularPtrField<super::rpc::AccountIdentifier>, 7350 // special fields 7351 pub unknown_fields: ::protobuf::UnknownFields, 7352 pub cached_size: ::protobuf::CachedSize, 7353 } 7354 7355 impl<'a> ::std::default::Default for &'a GetAccountDiskUsageRequest { default() -> &'a GetAccountDiskUsageRequest7356 fn default() -> &'a GetAccountDiskUsageRequest { 7357 <GetAccountDiskUsageRequest as ::protobuf::Message>::default_instance() 7358 } 7359 } 7360 7361 impl GetAccountDiskUsageRequest { new() -> GetAccountDiskUsageRequest7362 pub fn new() -> GetAccountDiskUsageRequest { 7363 ::std::default::Default::default() 7364 } 7365 7366 // .cryptohome.AccountIdentifier identifier = 1; 7367 7368 get_identifier(&self) -> &super::rpc::AccountIdentifier7369 pub fn get_identifier(&self) -> &super::rpc::AccountIdentifier { 7370 self.identifier.as_ref().unwrap_or_else(|| <super::rpc::AccountIdentifier as ::protobuf::Message>::default_instance()) 7371 } clear_identifier(&mut self)7372 pub fn clear_identifier(&mut self) { 7373 self.identifier.clear(); 7374 } 7375 has_identifier(&self) -> bool7376 pub fn has_identifier(&self) -> bool { 7377 self.identifier.is_some() 7378 } 7379 7380 // Param is passed by value, moved set_identifier(&mut self, v: super::rpc::AccountIdentifier)7381 pub fn set_identifier(&mut self, v: super::rpc::AccountIdentifier) { 7382 self.identifier = ::protobuf::SingularPtrField::some(v); 7383 } 7384 7385 // Mutable pointer to the field. 7386 // If field is not initialized, it is initialized with default value first. mut_identifier(&mut self) -> &mut super::rpc::AccountIdentifier7387 pub fn mut_identifier(&mut self) -> &mut super::rpc::AccountIdentifier { 7388 if self.identifier.is_none() { 7389 self.identifier.set_default(); 7390 } 7391 self.identifier.as_mut().unwrap() 7392 } 7393 7394 // Take field take_identifier(&mut self) -> super::rpc::AccountIdentifier7395 pub fn take_identifier(&mut self) -> super::rpc::AccountIdentifier { 7396 self.identifier.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) 7397 } 7398 } 7399 7400 impl ::protobuf::Message for GetAccountDiskUsageRequest { is_initialized(&self) -> bool7401 fn is_initialized(&self) -> bool { 7402 for v in &self.identifier { 7403 if !v.is_initialized() { 7404 return false; 7405 } 7406 }; 7407 true 7408 } 7409 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>7410 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 7411 while !is.eof()? { 7412 let (field_number, wire_type) = is.read_tag_unpack()?; 7413 match field_number { 7414 1 => { 7415 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.identifier)?; 7416 }, 7417 _ => { 7418 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 7419 }, 7420 }; 7421 } 7422 ::std::result::Result::Ok(()) 7423 } 7424 7425 // Compute sizes of nested messages 7426 #[allow(unused_variables)] compute_size(&self) -> u327427 fn compute_size(&self) -> u32 { 7428 let mut my_size = 0; 7429 if let Some(ref v) = self.identifier.as_ref() { 7430 let len = v.compute_size(); 7431 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 7432 } 7433 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 7434 self.cached_size.set(my_size); 7435 my_size 7436 } 7437 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>7438 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 7439 if let Some(ref v) = self.identifier.as_ref() { 7440 os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; 7441 os.write_raw_varint32(v.get_cached_size())?; 7442 v.write_to_with_cached_sizes(os)?; 7443 } 7444 os.write_unknown_fields(self.get_unknown_fields())?; 7445 ::std::result::Result::Ok(()) 7446 } 7447 get_cached_size(&self) -> u327448 fn get_cached_size(&self) -> u32 { 7449 self.cached_size.get() 7450 } 7451 get_unknown_fields(&self) -> &::protobuf::UnknownFields7452 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 7453 &self.unknown_fields 7454 } 7455 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields7456 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 7457 &mut self.unknown_fields 7458 } 7459 as_any(&self) -> &dyn (::std::any::Any)7460 fn as_any(&self) -> &dyn (::std::any::Any) { 7461 self as &dyn (::std::any::Any) 7462 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)7463 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 7464 self as &mut dyn (::std::any::Any) 7465 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>7466 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 7467 self 7468 } 7469 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor7470 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 7471 Self::descriptor_static() 7472 } 7473 new() -> GetAccountDiskUsageRequest7474 fn new() -> GetAccountDiskUsageRequest { 7475 GetAccountDiskUsageRequest::new() 7476 } 7477 default_instance() -> &'static GetAccountDiskUsageRequest7478 fn default_instance() -> &'static GetAccountDiskUsageRequest { 7479 static instance: ::protobuf::rt::LazyV2<GetAccountDiskUsageRequest> = ::protobuf::rt::LazyV2::INIT; 7480 instance.get(GetAccountDiskUsageRequest::new) 7481 } 7482 } 7483 7484 impl ::protobuf::Clear for GetAccountDiskUsageRequest { clear(&mut self)7485 fn clear(&mut self) { 7486 self.identifier.clear(); 7487 self.unknown_fields.clear(); 7488 } 7489 } 7490 7491 impl ::protobuf::reflect::ProtobufValue for GetAccountDiskUsageRequest { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef7492 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 7493 ::protobuf::reflect::ReflectValueRef::Message(self) 7494 } 7495 } 7496 7497 #[derive(PartialEq,Clone,Default,Debug)] 7498 pub struct GetAccountDiskUsageReply { 7499 // message fields 7500 pub error: CryptohomeErrorCode, 7501 pub size: i64, 7502 // special fields 7503 pub unknown_fields: ::protobuf::UnknownFields, 7504 pub cached_size: ::protobuf::CachedSize, 7505 } 7506 7507 impl<'a> ::std::default::Default for &'a GetAccountDiskUsageReply { default() -> &'a GetAccountDiskUsageReply7508 fn default() -> &'a GetAccountDiskUsageReply { 7509 <GetAccountDiskUsageReply as ::protobuf::Message>::default_instance() 7510 } 7511 } 7512 7513 impl GetAccountDiskUsageReply { new() -> GetAccountDiskUsageReply7514 pub fn new() -> GetAccountDiskUsageReply { 7515 ::std::default::Default::default() 7516 } 7517 7518 // .user_data_auth.CryptohomeErrorCode error = 1; 7519 7520 get_error(&self) -> CryptohomeErrorCode7521 pub fn get_error(&self) -> CryptohomeErrorCode { 7522 self.error 7523 } clear_error(&mut self)7524 pub fn clear_error(&mut self) { 7525 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 7526 } 7527 7528 // Param is passed by value, moved set_error(&mut self, v: CryptohomeErrorCode)7529 pub fn set_error(&mut self, v: CryptohomeErrorCode) { 7530 self.error = v; 7531 } 7532 7533 // int64 size = 2; 7534 7535 get_size(&self) -> i647536 pub fn get_size(&self) -> i64 { 7537 self.size 7538 } clear_size(&mut self)7539 pub fn clear_size(&mut self) { 7540 self.size = 0; 7541 } 7542 7543 // Param is passed by value, moved set_size(&mut self, v: i64)7544 pub fn set_size(&mut self, v: i64) { 7545 self.size = v; 7546 } 7547 } 7548 7549 impl ::protobuf::Message for GetAccountDiskUsageReply { is_initialized(&self) -> bool7550 fn is_initialized(&self) -> bool { 7551 true 7552 } 7553 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>7554 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 7555 while !is.eof()? { 7556 let (field_number, wire_type) = is.read_tag_unpack()?; 7557 match field_number { 7558 1 => { 7559 ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? 7560 }, 7561 2 => { 7562 if wire_type != ::protobuf::wire_format::WireTypeVarint { 7563 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); 7564 } 7565 let tmp = is.read_int64()?; 7566 self.size = tmp; 7567 }, 7568 _ => { 7569 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 7570 }, 7571 }; 7572 } 7573 ::std::result::Result::Ok(()) 7574 } 7575 7576 // Compute sizes of nested messages 7577 #[allow(unused_variables)] compute_size(&self) -> u327578 fn compute_size(&self) -> u32 { 7579 let mut my_size = 0; 7580 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 7581 my_size += ::protobuf::rt::enum_size(1, self.error); 7582 } 7583 if self.size != 0 { 7584 my_size += ::protobuf::rt::value_size(2, self.size, ::protobuf::wire_format::WireTypeVarint); 7585 } 7586 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 7587 self.cached_size.set(my_size); 7588 my_size 7589 } 7590 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>7591 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 7592 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 7593 os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; 7594 } 7595 if self.size != 0 { 7596 os.write_int64(2, self.size)?; 7597 } 7598 os.write_unknown_fields(self.get_unknown_fields())?; 7599 ::std::result::Result::Ok(()) 7600 } 7601 get_cached_size(&self) -> u327602 fn get_cached_size(&self) -> u32 { 7603 self.cached_size.get() 7604 } 7605 get_unknown_fields(&self) -> &::protobuf::UnknownFields7606 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 7607 &self.unknown_fields 7608 } 7609 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields7610 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 7611 &mut self.unknown_fields 7612 } 7613 as_any(&self) -> &dyn (::std::any::Any)7614 fn as_any(&self) -> &dyn (::std::any::Any) { 7615 self as &dyn (::std::any::Any) 7616 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)7617 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 7618 self as &mut dyn (::std::any::Any) 7619 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>7620 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 7621 self 7622 } 7623 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor7624 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 7625 Self::descriptor_static() 7626 } 7627 new() -> GetAccountDiskUsageReply7628 fn new() -> GetAccountDiskUsageReply { 7629 GetAccountDiskUsageReply::new() 7630 } 7631 default_instance() -> &'static GetAccountDiskUsageReply7632 fn default_instance() -> &'static GetAccountDiskUsageReply { 7633 static instance: ::protobuf::rt::LazyV2<GetAccountDiskUsageReply> = ::protobuf::rt::LazyV2::INIT; 7634 instance.get(GetAccountDiskUsageReply::new) 7635 } 7636 } 7637 7638 impl ::protobuf::Clear for GetAccountDiskUsageReply { clear(&mut self)7639 fn clear(&mut self) { 7640 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 7641 self.size = 0; 7642 self.unknown_fields.clear(); 7643 } 7644 } 7645 7646 impl ::protobuf::reflect::ProtobufValue for GetAccountDiskUsageReply { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef7647 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 7648 ::protobuf::reflect::ReflectValueRef::Message(self) 7649 } 7650 } 7651 7652 #[derive(PartialEq,Clone,Default,Debug)] 7653 pub struct LowDiskSpace { 7654 // message fields 7655 pub disk_free_bytes: u64, 7656 // special fields 7657 pub unknown_fields: ::protobuf::UnknownFields, 7658 pub cached_size: ::protobuf::CachedSize, 7659 } 7660 7661 impl<'a> ::std::default::Default for &'a LowDiskSpace { default() -> &'a LowDiskSpace7662 fn default() -> &'a LowDiskSpace { 7663 <LowDiskSpace as ::protobuf::Message>::default_instance() 7664 } 7665 } 7666 7667 impl LowDiskSpace { new() -> LowDiskSpace7668 pub fn new() -> LowDiskSpace { 7669 ::std::default::Default::default() 7670 } 7671 7672 // uint64 disk_free_bytes = 1; 7673 7674 get_disk_free_bytes(&self) -> u647675 pub fn get_disk_free_bytes(&self) -> u64 { 7676 self.disk_free_bytes 7677 } clear_disk_free_bytes(&mut self)7678 pub fn clear_disk_free_bytes(&mut self) { 7679 self.disk_free_bytes = 0; 7680 } 7681 7682 // Param is passed by value, moved set_disk_free_bytes(&mut self, v: u64)7683 pub fn set_disk_free_bytes(&mut self, v: u64) { 7684 self.disk_free_bytes = v; 7685 } 7686 } 7687 7688 impl ::protobuf::Message for LowDiskSpace { is_initialized(&self) -> bool7689 fn is_initialized(&self) -> bool { 7690 true 7691 } 7692 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>7693 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 7694 while !is.eof()? { 7695 let (field_number, wire_type) = is.read_tag_unpack()?; 7696 match field_number { 7697 1 => { 7698 if wire_type != ::protobuf::wire_format::WireTypeVarint { 7699 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); 7700 } 7701 let tmp = is.read_uint64()?; 7702 self.disk_free_bytes = tmp; 7703 }, 7704 _ => { 7705 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 7706 }, 7707 }; 7708 } 7709 ::std::result::Result::Ok(()) 7710 } 7711 7712 // Compute sizes of nested messages 7713 #[allow(unused_variables)] compute_size(&self) -> u327714 fn compute_size(&self) -> u32 { 7715 let mut my_size = 0; 7716 if self.disk_free_bytes != 0 { 7717 my_size += ::protobuf::rt::value_size(1, self.disk_free_bytes, ::protobuf::wire_format::WireTypeVarint); 7718 } 7719 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 7720 self.cached_size.set(my_size); 7721 my_size 7722 } 7723 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>7724 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 7725 if self.disk_free_bytes != 0 { 7726 os.write_uint64(1, self.disk_free_bytes)?; 7727 } 7728 os.write_unknown_fields(self.get_unknown_fields())?; 7729 ::std::result::Result::Ok(()) 7730 } 7731 get_cached_size(&self) -> u327732 fn get_cached_size(&self) -> u32 { 7733 self.cached_size.get() 7734 } 7735 get_unknown_fields(&self) -> &::protobuf::UnknownFields7736 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 7737 &self.unknown_fields 7738 } 7739 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields7740 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 7741 &mut self.unknown_fields 7742 } 7743 as_any(&self) -> &dyn (::std::any::Any)7744 fn as_any(&self) -> &dyn (::std::any::Any) { 7745 self as &dyn (::std::any::Any) 7746 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)7747 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 7748 self as &mut dyn (::std::any::Any) 7749 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>7750 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 7751 self 7752 } 7753 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor7754 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 7755 Self::descriptor_static() 7756 } 7757 new() -> LowDiskSpace7758 fn new() -> LowDiskSpace { 7759 LowDiskSpace::new() 7760 } 7761 default_instance() -> &'static LowDiskSpace7762 fn default_instance() -> &'static LowDiskSpace { 7763 static instance: ::protobuf::rt::LazyV2<LowDiskSpace> = ::protobuf::rt::LazyV2::INIT; 7764 instance.get(LowDiskSpace::new) 7765 } 7766 } 7767 7768 impl ::protobuf::Clear for LowDiskSpace { clear(&mut self)7769 fn clear(&mut self) { 7770 self.disk_free_bytes = 0; 7771 self.unknown_fields.clear(); 7772 } 7773 } 7774 7775 impl ::protobuf::reflect::ProtobufValue for LowDiskSpace { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef7776 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 7777 ::protobuf::reflect::ReflectValueRef::Message(self) 7778 } 7779 } 7780 7781 #[derive(PartialEq,Clone,Default,Debug)] 7782 pub struct StartAuthSessionRequest { 7783 // message fields 7784 pub account_id: ::protobuf::SingularPtrField<super::rpc::AccountIdentifier>, 7785 pub flags: u32, 7786 pub intent: super::auth_factor::AuthIntent, 7787 // special fields 7788 pub unknown_fields: ::protobuf::UnknownFields, 7789 pub cached_size: ::protobuf::CachedSize, 7790 } 7791 7792 impl<'a> ::std::default::Default for &'a StartAuthSessionRequest { default() -> &'a StartAuthSessionRequest7793 fn default() -> &'a StartAuthSessionRequest { 7794 <StartAuthSessionRequest as ::protobuf::Message>::default_instance() 7795 } 7796 } 7797 7798 impl StartAuthSessionRequest { new() -> StartAuthSessionRequest7799 pub fn new() -> StartAuthSessionRequest { 7800 ::std::default::Default::default() 7801 } 7802 7803 // .cryptohome.AccountIdentifier account_id = 1; 7804 7805 get_account_id(&self) -> &super::rpc::AccountIdentifier7806 pub fn get_account_id(&self) -> &super::rpc::AccountIdentifier { 7807 self.account_id.as_ref().unwrap_or_else(|| <super::rpc::AccountIdentifier as ::protobuf::Message>::default_instance()) 7808 } clear_account_id(&mut self)7809 pub fn clear_account_id(&mut self) { 7810 self.account_id.clear(); 7811 } 7812 has_account_id(&self) -> bool7813 pub fn has_account_id(&self) -> bool { 7814 self.account_id.is_some() 7815 } 7816 7817 // Param is passed by value, moved set_account_id(&mut self, v: super::rpc::AccountIdentifier)7818 pub fn set_account_id(&mut self, v: super::rpc::AccountIdentifier) { 7819 self.account_id = ::protobuf::SingularPtrField::some(v); 7820 } 7821 7822 // Mutable pointer to the field. 7823 // If field is not initialized, it is initialized with default value first. mut_account_id(&mut self) -> &mut super::rpc::AccountIdentifier7824 pub fn mut_account_id(&mut self) -> &mut super::rpc::AccountIdentifier { 7825 if self.account_id.is_none() { 7826 self.account_id.set_default(); 7827 } 7828 self.account_id.as_mut().unwrap() 7829 } 7830 7831 // Take field take_account_id(&mut self) -> super::rpc::AccountIdentifier7832 pub fn take_account_id(&mut self) -> super::rpc::AccountIdentifier { 7833 self.account_id.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) 7834 } 7835 7836 // uint32 flags = 2; 7837 7838 get_flags(&self) -> u327839 pub fn get_flags(&self) -> u32 { 7840 self.flags 7841 } clear_flags(&mut self)7842 pub fn clear_flags(&mut self) { 7843 self.flags = 0; 7844 } 7845 7846 // Param is passed by value, moved set_flags(&mut self, v: u32)7847 pub fn set_flags(&mut self, v: u32) { 7848 self.flags = v; 7849 } 7850 7851 // .user_data_auth.AuthIntent intent = 3; 7852 7853 get_intent(&self) -> super::auth_factor::AuthIntent7854 pub fn get_intent(&self) -> super::auth_factor::AuthIntent { 7855 self.intent 7856 } clear_intent(&mut self)7857 pub fn clear_intent(&mut self) { 7858 self.intent = super::auth_factor::AuthIntent::AUTH_INTENT_UNSPECIFIED; 7859 } 7860 7861 // Param is passed by value, moved set_intent(&mut self, v: super::auth_factor::AuthIntent)7862 pub fn set_intent(&mut self, v: super::auth_factor::AuthIntent) { 7863 self.intent = v; 7864 } 7865 } 7866 7867 impl ::protobuf::Message for StartAuthSessionRequest { is_initialized(&self) -> bool7868 fn is_initialized(&self) -> bool { 7869 for v in &self.account_id { 7870 if !v.is_initialized() { 7871 return false; 7872 } 7873 }; 7874 true 7875 } 7876 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>7877 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 7878 while !is.eof()? { 7879 let (field_number, wire_type) = is.read_tag_unpack()?; 7880 match field_number { 7881 1 => { 7882 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account_id)?; 7883 }, 7884 2 => { 7885 if wire_type != ::protobuf::wire_format::WireTypeVarint { 7886 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); 7887 } 7888 let tmp = is.read_uint32()?; 7889 self.flags = tmp; 7890 }, 7891 3 => { 7892 ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.intent, 3, &mut self.unknown_fields)? 7893 }, 7894 _ => { 7895 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 7896 }, 7897 }; 7898 } 7899 ::std::result::Result::Ok(()) 7900 } 7901 7902 // Compute sizes of nested messages 7903 #[allow(unused_variables)] compute_size(&self) -> u327904 fn compute_size(&self) -> u32 { 7905 let mut my_size = 0; 7906 if let Some(ref v) = self.account_id.as_ref() { 7907 let len = v.compute_size(); 7908 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 7909 } 7910 if self.flags != 0 { 7911 my_size += ::protobuf::rt::value_size(2, self.flags, ::protobuf::wire_format::WireTypeVarint); 7912 } 7913 if self.intent != super::auth_factor::AuthIntent::AUTH_INTENT_UNSPECIFIED { 7914 my_size += ::protobuf::rt::enum_size(3, self.intent); 7915 } 7916 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 7917 self.cached_size.set(my_size); 7918 my_size 7919 } 7920 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>7921 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 7922 if let Some(ref v) = self.account_id.as_ref() { 7923 os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; 7924 os.write_raw_varint32(v.get_cached_size())?; 7925 v.write_to_with_cached_sizes(os)?; 7926 } 7927 if self.flags != 0 { 7928 os.write_uint32(2, self.flags)?; 7929 } 7930 if self.intent != super::auth_factor::AuthIntent::AUTH_INTENT_UNSPECIFIED { 7931 os.write_enum(3, ::protobuf::ProtobufEnum::value(&self.intent))?; 7932 } 7933 os.write_unknown_fields(self.get_unknown_fields())?; 7934 ::std::result::Result::Ok(()) 7935 } 7936 get_cached_size(&self) -> u327937 fn get_cached_size(&self) -> u32 { 7938 self.cached_size.get() 7939 } 7940 get_unknown_fields(&self) -> &::protobuf::UnknownFields7941 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 7942 &self.unknown_fields 7943 } 7944 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields7945 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 7946 &mut self.unknown_fields 7947 } 7948 as_any(&self) -> &dyn (::std::any::Any)7949 fn as_any(&self) -> &dyn (::std::any::Any) { 7950 self as &dyn (::std::any::Any) 7951 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)7952 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 7953 self as &mut dyn (::std::any::Any) 7954 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>7955 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 7956 self 7957 } 7958 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor7959 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 7960 Self::descriptor_static() 7961 } 7962 new() -> StartAuthSessionRequest7963 fn new() -> StartAuthSessionRequest { 7964 StartAuthSessionRequest::new() 7965 } 7966 default_instance() -> &'static StartAuthSessionRequest7967 fn default_instance() -> &'static StartAuthSessionRequest { 7968 static instance: ::protobuf::rt::LazyV2<StartAuthSessionRequest> = ::protobuf::rt::LazyV2::INIT; 7969 instance.get(StartAuthSessionRequest::new) 7970 } 7971 } 7972 7973 impl ::protobuf::Clear for StartAuthSessionRequest { clear(&mut self)7974 fn clear(&mut self) { 7975 self.account_id.clear(); 7976 self.flags = 0; 7977 self.intent = super::auth_factor::AuthIntent::AUTH_INTENT_UNSPECIFIED; 7978 self.unknown_fields.clear(); 7979 } 7980 } 7981 7982 impl ::protobuf::reflect::ProtobufValue for StartAuthSessionRequest { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef7983 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 7984 ::protobuf::reflect::ReflectValueRef::Message(self) 7985 } 7986 } 7987 7988 #[derive(PartialEq,Clone,Default,Debug)] 7989 pub struct AuthFactorWithStatus { 7990 // message fields 7991 pub auth_factor: ::protobuf::SingularPtrField<super::auth_factor::AuthFactor>, 7992 pub available_for_intents: ::std::vec::Vec<super::auth_factor::AuthIntent>, 7993 // special fields 7994 pub unknown_fields: ::protobuf::UnknownFields, 7995 pub cached_size: ::protobuf::CachedSize, 7996 } 7997 7998 impl<'a> ::std::default::Default for &'a AuthFactorWithStatus { default() -> &'a AuthFactorWithStatus7999 fn default() -> &'a AuthFactorWithStatus { 8000 <AuthFactorWithStatus as ::protobuf::Message>::default_instance() 8001 } 8002 } 8003 8004 impl AuthFactorWithStatus { new() -> AuthFactorWithStatus8005 pub fn new() -> AuthFactorWithStatus { 8006 ::std::default::Default::default() 8007 } 8008 8009 // .user_data_auth.AuthFactor auth_factor = 1; 8010 8011 get_auth_factor(&self) -> &super::auth_factor::AuthFactor8012 pub fn get_auth_factor(&self) -> &super::auth_factor::AuthFactor { 8013 self.auth_factor.as_ref().unwrap_or_else(|| <super::auth_factor::AuthFactor as ::protobuf::Message>::default_instance()) 8014 } clear_auth_factor(&mut self)8015 pub fn clear_auth_factor(&mut self) { 8016 self.auth_factor.clear(); 8017 } 8018 has_auth_factor(&self) -> bool8019 pub fn has_auth_factor(&self) -> bool { 8020 self.auth_factor.is_some() 8021 } 8022 8023 // Param is passed by value, moved set_auth_factor(&mut self, v: super::auth_factor::AuthFactor)8024 pub fn set_auth_factor(&mut self, v: super::auth_factor::AuthFactor) { 8025 self.auth_factor = ::protobuf::SingularPtrField::some(v); 8026 } 8027 8028 // Mutable pointer to the field. 8029 // If field is not initialized, it is initialized with default value first. mut_auth_factor(&mut self) -> &mut super::auth_factor::AuthFactor8030 pub fn mut_auth_factor(&mut self) -> &mut super::auth_factor::AuthFactor { 8031 if self.auth_factor.is_none() { 8032 self.auth_factor.set_default(); 8033 } 8034 self.auth_factor.as_mut().unwrap() 8035 } 8036 8037 // Take field take_auth_factor(&mut self) -> super::auth_factor::AuthFactor8038 pub fn take_auth_factor(&mut self) -> super::auth_factor::AuthFactor { 8039 self.auth_factor.take().unwrap_or_else(|| super::auth_factor::AuthFactor::new()) 8040 } 8041 8042 // repeated .user_data_auth.AuthIntent available_for_intents = 2; 8043 8044 get_available_for_intents(&self) -> &[super::auth_factor::AuthIntent]8045 pub fn get_available_for_intents(&self) -> &[super::auth_factor::AuthIntent] { 8046 &self.available_for_intents 8047 } clear_available_for_intents(&mut self)8048 pub fn clear_available_for_intents(&mut self) { 8049 self.available_for_intents.clear(); 8050 } 8051 8052 // Param is passed by value, moved set_available_for_intents(&mut self, v: ::std::vec::Vec<super::auth_factor::AuthIntent>)8053 pub fn set_available_for_intents(&mut self, v: ::std::vec::Vec<super::auth_factor::AuthIntent>) { 8054 self.available_for_intents = v; 8055 } 8056 8057 // Mutable pointer to the field. mut_available_for_intents(&mut self) -> &mut ::std::vec::Vec<super::auth_factor::AuthIntent>8058 pub fn mut_available_for_intents(&mut self) -> &mut ::std::vec::Vec<super::auth_factor::AuthIntent> { 8059 &mut self.available_for_intents 8060 } 8061 8062 // Take field take_available_for_intents(&mut self) -> ::std::vec::Vec<super::auth_factor::AuthIntent>8063 pub fn take_available_for_intents(&mut self) -> ::std::vec::Vec<super::auth_factor::AuthIntent> { 8064 ::std::mem::replace(&mut self.available_for_intents, ::std::vec::Vec::new()) 8065 } 8066 } 8067 8068 impl ::protobuf::Message for AuthFactorWithStatus { is_initialized(&self) -> bool8069 fn is_initialized(&self) -> bool { 8070 for v in &self.auth_factor { 8071 if !v.is_initialized() { 8072 return false; 8073 } 8074 }; 8075 true 8076 } 8077 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>8078 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 8079 while !is.eof()? { 8080 let (field_number, wire_type) = is.read_tag_unpack()?; 8081 match field_number { 8082 1 => { 8083 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.auth_factor)?; 8084 }, 8085 2 => { 8086 ::protobuf::rt::read_repeated_enum_with_unknown_fields_into(wire_type, is, &mut self.available_for_intents, 2, &mut self.unknown_fields)? 8087 }, 8088 _ => { 8089 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 8090 }, 8091 }; 8092 } 8093 ::std::result::Result::Ok(()) 8094 } 8095 8096 // Compute sizes of nested messages 8097 #[allow(unused_variables)] compute_size(&self) -> u328098 fn compute_size(&self) -> u32 { 8099 let mut my_size = 0; 8100 if let Some(ref v) = self.auth_factor.as_ref() { 8101 let len = v.compute_size(); 8102 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 8103 } 8104 for value in &self.available_for_intents { 8105 my_size += ::protobuf::rt::enum_size(2, *value); 8106 }; 8107 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 8108 self.cached_size.set(my_size); 8109 my_size 8110 } 8111 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>8112 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 8113 if let Some(ref v) = self.auth_factor.as_ref() { 8114 os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; 8115 os.write_raw_varint32(v.get_cached_size())?; 8116 v.write_to_with_cached_sizes(os)?; 8117 } 8118 for v in &self.available_for_intents { 8119 os.write_enum(2, ::protobuf::ProtobufEnum::value(v))?; 8120 }; 8121 os.write_unknown_fields(self.get_unknown_fields())?; 8122 ::std::result::Result::Ok(()) 8123 } 8124 get_cached_size(&self) -> u328125 fn get_cached_size(&self) -> u32 { 8126 self.cached_size.get() 8127 } 8128 get_unknown_fields(&self) -> &::protobuf::UnknownFields8129 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 8130 &self.unknown_fields 8131 } 8132 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields8133 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 8134 &mut self.unknown_fields 8135 } 8136 as_any(&self) -> &dyn (::std::any::Any)8137 fn as_any(&self) -> &dyn (::std::any::Any) { 8138 self as &dyn (::std::any::Any) 8139 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)8140 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 8141 self as &mut dyn (::std::any::Any) 8142 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>8143 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 8144 self 8145 } 8146 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor8147 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 8148 Self::descriptor_static() 8149 } 8150 new() -> AuthFactorWithStatus8151 fn new() -> AuthFactorWithStatus { 8152 AuthFactorWithStatus::new() 8153 } 8154 default_instance() -> &'static AuthFactorWithStatus8155 fn default_instance() -> &'static AuthFactorWithStatus { 8156 static instance: ::protobuf::rt::LazyV2<AuthFactorWithStatus> = ::protobuf::rt::LazyV2::INIT; 8157 instance.get(AuthFactorWithStatus::new) 8158 } 8159 } 8160 8161 impl ::protobuf::Clear for AuthFactorWithStatus { clear(&mut self)8162 fn clear(&mut self) { 8163 self.auth_factor.clear(); 8164 self.available_for_intents.clear(); 8165 self.unknown_fields.clear(); 8166 } 8167 } 8168 8169 impl ::protobuf::reflect::ProtobufValue for AuthFactorWithStatus { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef8170 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 8171 ::protobuf::reflect::ReflectValueRef::Message(self) 8172 } 8173 } 8174 8175 #[derive(PartialEq,Clone,Default,Debug)] 8176 pub struct StartAuthSessionReply { 8177 // message fields 8178 pub error: CryptohomeErrorCode, 8179 pub auth_session_id: ::std::vec::Vec<u8>, 8180 pub user_exists: bool, 8181 pub key_label_data: ::std::collections::HashMap<::std::string::String, super::key::KeyData>, 8182 pub auth_factors: ::protobuf::RepeatedField<super::auth_factor::AuthFactor>, 8183 pub error_info: ::protobuf::SingularPtrField<CryptohomeErrorInfo>, 8184 // special fields 8185 pub unknown_fields: ::protobuf::UnknownFields, 8186 pub cached_size: ::protobuf::CachedSize, 8187 } 8188 8189 impl<'a> ::std::default::Default for &'a StartAuthSessionReply { default() -> &'a StartAuthSessionReply8190 fn default() -> &'a StartAuthSessionReply { 8191 <StartAuthSessionReply as ::protobuf::Message>::default_instance() 8192 } 8193 } 8194 8195 impl StartAuthSessionReply { new() -> StartAuthSessionReply8196 pub fn new() -> StartAuthSessionReply { 8197 ::std::default::Default::default() 8198 } 8199 8200 // .user_data_auth.CryptohomeErrorCode error = 1; 8201 8202 get_error(&self) -> CryptohomeErrorCode8203 pub fn get_error(&self) -> CryptohomeErrorCode { 8204 self.error 8205 } clear_error(&mut self)8206 pub fn clear_error(&mut self) { 8207 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 8208 } 8209 8210 // Param is passed by value, moved set_error(&mut self, v: CryptohomeErrorCode)8211 pub fn set_error(&mut self, v: CryptohomeErrorCode) { 8212 self.error = v; 8213 } 8214 8215 // bytes auth_session_id = 2; 8216 8217 get_auth_session_id(&self) -> &[u8]8218 pub fn get_auth_session_id(&self) -> &[u8] { 8219 &self.auth_session_id 8220 } clear_auth_session_id(&mut self)8221 pub fn clear_auth_session_id(&mut self) { 8222 self.auth_session_id.clear(); 8223 } 8224 8225 // Param is passed by value, moved set_auth_session_id(&mut self, v: ::std::vec::Vec<u8>)8226 pub fn set_auth_session_id(&mut self, v: ::std::vec::Vec<u8>) { 8227 self.auth_session_id = v; 8228 } 8229 8230 // Mutable pointer to the field. 8231 // If field is not initialized, it is initialized with default value first. mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec<u8>8232 pub fn mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec<u8> { 8233 &mut self.auth_session_id 8234 } 8235 8236 // Take field take_auth_session_id(&mut self) -> ::std::vec::Vec<u8>8237 pub fn take_auth_session_id(&mut self) -> ::std::vec::Vec<u8> { 8238 ::std::mem::replace(&mut self.auth_session_id, ::std::vec::Vec::new()) 8239 } 8240 8241 // bool user_exists = 3; 8242 8243 get_user_exists(&self) -> bool8244 pub fn get_user_exists(&self) -> bool { 8245 self.user_exists 8246 } clear_user_exists(&mut self)8247 pub fn clear_user_exists(&mut self) { 8248 self.user_exists = false; 8249 } 8250 8251 // Param is passed by value, moved set_user_exists(&mut self, v: bool)8252 pub fn set_user_exists(&mut self, v: bool) { 8253 self.user_exists = v; 8254 } 8255 8256 // repeated .user_data_auth.StartAuthSessionReply.KeyLabelDataEntry key_label_data = 4; 8257 8258 get_key_label_data(&self) -> &::std::collections::HashMap<::std::string::String, super::key::KeyData>8259 pub fn get_key_label_data(&self) -> &::std::collections::HashMap<::std::string::String, super::key::KeyData> { 8260 &self.key_label_data 8261 } clear_key_label_data(&mut self)8262 pub fn clear_key_label_data(&mut self) { 8263 self.key_label_data.clear(); 8264 } 8265 8266 // Param is passed by value, moved set_key_label_data(&mut self, v: ::std::collections::HashMap<::std::string::String, super::key::KeyData>)8267 pub fn set_key_label_data(&mut self, v: ::std::collections::HashMap<::std::string::String, super::key::KeyData>) { 8268 self.key_label_data = v; 8269 } 8270 8271 // Mutable pointer to the field. mut_key_label_data(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, super::key::KeyData>8272 pub fn mut_key_label_data(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, super::key::KeyData> { 8273 &mut self.key_label_data 8274 } 8275 8276 // Take field take_key_label_data(&mut self) -> ::std::collections::HashMap<::std::string::String, super::key::KeyData>8277 pub fn take_key_label_data(&mut self) -> ::std::collections::HashMap<::std::string::String, super::key::KeyData> { 8278 ::std::mem::replace(&mut self.key_label_data, ::std::collections::HashMap::new()) 8279 } 8280 8281 // repeated .user_data_auth.AuthFactor auth_factors = 5; 8282 8283 get_auth_factors(&self) -> &[super::auth_factor::AuthFactor]8284 pub fn get_auth_factors(&self) -> &[super::auth_factor::AuthFactor] { 8285 &self.auth_factors 8286 } clear_auth_factors(&mut self)8287 pub fn clear_auth_factors(&mut self) { 8288 self.auth_factors.clear(); 8289 } 8290 8291 // Param is passed by value, moved set_auth_factors(&mut self, v: ::protobuf::RepeatedField<super::auth_factor::AuthFactor>)8292 pub fn set_auth_factors(&mut self, v: ::protobuf::RepeatedField<super::auth_factor::AuthFactor>) { 8293 self.auth_factors = v; 8294 } 8295 8296 // Mutable pointer to the field. mut_auth_factors(&mut self) -> &mut ::protobuf::RepeatedField<super::auth_factor::AuthFactor>8297 pub fn mut_auth_factors(&mut self) -> &mut ::protobuf::RepeatedField<super::auth_factor::AuthFactor> { 8298 &mut self.auth_factors 8299 } 8300 8301 // Take field take_auth_factors(&mut self) -> ::protobuf::RepeatedField<super::auth_factor::AuthFactor>8302 pub fn take_auth_factors(&mut self) -> ::protobuf::RepeatedField<super::auth_factor::AuthFactor> { 8303 ::std::mem::replace(&mut self.auth_factors, ::protobuf::RepeatedField::new()) 8304 } 8305 8306 // .user_data_auth.CryptohomeErrorInfo error_info = 6; 8307 8308 get_error_info(&self) -> &CryptohomeErrorInfo8309 pub fn get_error_info(&self) -> &CryptohomeErrorInfo { 8310 self.error_info.as_ref().unwrap_or_else(|| <CryptohomeErrorInfo as ::protobuf::Message>::default_instance()) 8311 } clear_error_info(&mut self)8312 pub fn clear_error_info(&mut self) { 8313 self.error_info.clear(); 8314 } 8315 has_error_info(&self) -> bool8316 pub fn has_error_info(&self) -> bool { 8317 self.error_info.is_some() 8318 } 8319 8320 // Param is passed by value, moved set_error_info(&mut self, v: CryptohomeErrorInfo)8321 pub fn set_error_info(&mut self, v: CryptohomeErrorInfo) { 8322 self.error_info = ::protobuf::SingularPtrField::some(v); 8323 } 8324 8325 // Mutable pointer to the field. 8326 // If field is not initialized, it is initialized with default value first. mut_error_info(&mut self) -> &mut CryptohomeErrorInfo8327 pub fn mut_error_info(&mut self) -> &mut CryptohomeErrorInfo { 8328 if self.error_info.is_none() { 8329 self.error_info.set_default(); 8330 } 8331 self.error_info.as_mut().unwrap() 8332 } 8333 8334 // Take field take_error_info(&mut self) -> CryptohomeErrorInfo8335 pub fn take_error_info(&mut self) -> CryptohomeErrorInfo { 8336 self.error_info.take().unwrap_or_else(|| CryptohomeErrorInfo::new()) 8337 } 8338 } 8339 8340 impl ::protobuf::Message for StartAuthSessionReply { is_initialized(&self) -> bool8341 fn is_initialized(&self) -> bool { 8342 for v in &self.auth_factors { 8343 if !v.is_initialized() { 8344 return false; 8345 } 8346 }; 8347 for v in &self.error_info { 8348 if !v.is_initialized() { 8349 return false; 8350 } 8351 }; 8352 true 8353 } 8354 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>8355 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 8356 while !is.eof()? { 8357 let (field_number, wire_type) = is.read_tag_unpack()?; 8358 match field_number { 8359 1 => { 8360 ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? 8361 }, 8362 2 => { 8363 ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.auth_session_id)?; 8364 }, 8365 3 => { 8366 if wire_type != ::protobuf::wire_format::WireTypeVarint { 8367 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); 8368 } 8369 let tmp = is.read_bool()?; 8370 self.user_exists = tmp; 8371 }, 8372 4 => { 8373 ::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<super::key::KeyData>>(wire_type, is, &mut self.key_label_data)?; 8374 }, 8375 5 => { 8376 ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.auth_factors)?; 8377 }, 8378 6 => { 8379 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.error_info)?; 8380 }, 8381 _ => { 8382 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 8383 }, 8384 }; 8385 } 8386 ::std::result::Result::Ok(()) 8387 } 8388 8389 // Compute sizes of nested messages 8390 #[allow(unused_variables)] compute_size(&self) -> u328391 fn compute_size(&self) -> u32 { 8392 let mut my_size = 0; 8393 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 8394 my_size += ::protobuf::rt::enum_size(1, self.error); 8395 } 8396 if !self.auth_session_id.is_empty() { 8397 my_size += ::protobuf::rt::bytes_size(2, &self.auth_session_id); 8398 } 8399 if self.user_exists != false { 8400 my_size += 2; 8401 } 8402 my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<super::key::KeyData>>(4, &self.key_label_data); 8403 for value in &self.auth_factors { 8404 let len = value.compute_size(); 8405 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 8406 }; 8407 if let Some(ref v) = self.error_info.as_ref() { 8408 let len = v.compute_size(); 8409 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 8410 } 8411 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 8412 self.cached_size.set(my_size); 8413 my_size 8414 } 8415 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>8416 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 8417 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 8418 os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; 8419 } 8420 if !self.auth_session_id.is_empty() { 8421 os.write_bytes(2, &self.auth_session_id)?; 8422 } 8423 if self.user_exists != false { 8424 os.write_bool(3, self.user_exists)?; 8425 } 8426 ::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage<super::key::KeyData>>(4, &self.key_label_data, os)?; 8427 for v in &self.auth_factors { 8428 os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?; 8429 os.write_raw_varint32(v.get_cached_size())?; 8430 v.write_to_with_cached_sizes(os)?; 8431 }; 8432 if let Some(ref v) = self.error_info.as_ref() { 8433 os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?; 8434 os.write_raw_varint32(v.get_cached_size())?; 8435 v.write_to_with_cached_sizes(os)?; 8436 } 8437 os.write_unknown_fields(self.get_unknown_fields())?; 8438 ::std::result::Result::Ok(()) 8439 } 8440 get_cached_size(&self) -> u328441 fn get_cached_size(&self) -> u32 { 8442 self.cached_size.get() 8443 } 8444 get_unknown_fields(&self) -> &::protobuf::UnknownFields8445 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 8446 &self.unknown_fields 8447 } 8448 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields8449 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 8450 &mut self.unknown_fields 8451 } 8452 as_any(&self) -> &dyn (::std::any::Any)8453 fn as_any(&self) -> &dyn (::std::any::Any) { 8454 self as &dyn (::std::any::Any) 8455 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)8456 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 8457 self as &mut dyn (::std::any::Any) 8458 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>8459 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 8460 self 8461 } 8462 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor8463 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 8464 Self::descriptor_static() 8465 } 8466 new() -> StartAuthSessionReply8467 fn new() -> StartAuthSessionReply { 8468 StartAuthSessionReply::new() 8469 } 8470 default_instance() -> &'static StartAuthSessionReply8471 fn default_instance() -> &'static StartAuthSessionReply { 8472 static instance: ::protobuf::rt::LazyV2<StartAuthSessionReply> = ::protobuf::rt::LazyV2::INIT; 8473 instance.get(StartAuthSessionReply::new) 8474 } 8475 } 8476 8477 impl ::protobuf::Clear for StartAuthSessionReply { clear(&mut self)8478 fn clear(&mut self) { 8479 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 8480 self.auth_session_id.clear(); 8481 self.user_exists = false; 8482 self.key_label_data.clear(); 8483 self.auth_factors.clear(); 8484 self.error_info.clear(); 8485 self.unknown_fields.clear(); 8486 } 8487 } 8488 8489 impl ::protobuf::reflect::ProtobufValue for StartAuthSessionReply { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef8490 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 8491 ::protobuf::reflect::ReflectValueRef::Message(self) 8492 } 8493 } 8494 8495 #[derive(PartialEq,Clone,Default,Debug)] 8496 pub struct AddCredentialsRequest { 8497 // message fields 8498 pub auth_session_id: ::std::vec::Vec<u8>, 8499 pub authorization: ::protobuf::SingularPtrField<super::rpc::AuthorizationRequest>, 8500 pub add_more_credentials: bool, 8501 // special fields 8502 pub unknown_fields: ::protobuf::UnknownFields, 8503 pub cached_size: ::protobuf::CachedSize, 8504 } 8505 8506 impl<'a> ::std::default::Default for &'a AddCredentialsRequest { default() -> &'a AddCredentialsRequest8507 fn default() -> &'a AddCredentialsRequest { 8508 <AddCredentialsRequest as ::protobuf::Message>::default_instance() 8509 } 8510 } 8511 8512 impl AddCredentialsRequest { new() -> AddCredentialsRequest8513 pub fn new() -> AddCredentialsRequest { 8514 ::std::default::Default::default() 8515 } 8516 8517 // bytes auth_session_id = 1; 8518 8519 get_auth_session_id(&self) -> &[u8]8520 pub fn get_auth_session_id(&self) -> &[u8] { 8521 &self.auth_session_id 8522 } clear_auth_session_id(&mut self)8523 pub fn clear_auth_session_id(&mut self) { 8524 self.auth_session_id.clear(); 8525 } 8526 8527 // Param is passed by value, moved set_auth_session_id(&mut self, v: ::std::vec::Vec<u8>)8528 pub fn set_auth_session_id(&mut self, v: ::std::vec::Vec<u8>) { 8529 self.auth_session_id = v; 8530 } 8531 8532 // Mutable pointer to the field. 8533 // If field is not initialized, it is initialized with default value first. mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec<u8>8534 pub fn mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec<u8> { 8535 &mut self.auth_session_id 8536 } 8537 8538 // Take field take_auth_session_id(&mut self) -> ::std::vec::Vec<u8>8539 pub fn take_auth_session_id(&mut self) -> ::std::vec::Vec<u8> { 8540 ::std::mem::replace(&mut self.auth_session_id, ::std::vec::Vec::new()) 8541 } 8542 8543 // .cryptohome.AuthorizationRequest authorization = 2; 8544 8545 get_authorization(&self) -> &super::rpc::AuthorizationRequest8546 pub fn get_authorization(&self) -> &super::rpc::AuthorizationRequest { 8547 self.authorization.as_ref().unwrap_or_else(|| <super::rpc::AuthorizationRequest as ::protobuf::Message>::default_instance()) 8548 } clear_authorization(&mut self)8549 pub fn clear_authorization(&mut self) { 8550 self.authorization.clear(); 8551 } 8552 has_authorization(&self) -> bool8553 pub fn has_authorization(&self) -> bool { 8554 self.authorization.is_some() 8555 } 8556 8557 // Param is passed by value, moved set_authorization(&mut self, v: super::rpc::AuthorizationRequest)8558 pub fn set_authorization(&mut self, v: super::rpc::AuthorizationRequest) { 8559 self.authorization = ::protobuf::SingularPtrField::some(v); 8560 } 8561 8562 // Mutable pointer to the field. 8563 // If field is not initialized, it is initialized with default value first. mut_authorization(&mut self) -> &mut super::rpc::AuthorizationRequest8564 pub fn mut_authorization(&mut self) -> &mut super::rpc::AuthorizationRequest { 8565 if self.authorization.is_none() { 8566 self.authorization.set_default(); 8567 } 8568 self.authorization.as_mut().unwrap() 8569 } 8570 8571 // Take field take_authorization(&mut self) -> super::rpc::AuthorizationRequest8572 pub fn take_authorization(&mut self) -> super::rpc::AuthorizationRequest { 8573 self.authorization.take().unwrap_or_else(|| super::rpc::AuthorizationRequest::new()) 8574 } 8575 8576 // bool add_more_credentials = 3; 8577 8578 get_add_more_credentials(&self) -> bool8579 pub fn get_add_more_credentials(&self) -> bool { 8580 self.add_more_credentials 8581 } clear_add_more_credentials(&mut self)8582 pub fn clear_add_more_credentials(&mut self) { 8583 self.add_more_credentials = false; 8584 } 8585 8586 // Param is passed by value, moved set_add_more_credentials(&mut self, v: bool)8587 pub fn set_add_more_credentials(&mut self, v: bool) { 8588 self.add_more_credentials = v; 8589 } 8590 } 8591 8592 impl ::protobuf::Message for AddCredentialsRequest { is_initialized(&self) -> bool8593 fn is_initialized(&self) -> bool { 8594 for v in &self.authorization { 8595 if !v.is_initialized() { 8596 return false; 8597 } 8598 }; 8599 true 8600 } 8601 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>8602 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 8603 while !is.eof()? { 8604 let (field_number, wire_type) = is.read_tag_unpack()?; 8605 match field_number { 8606 1 => { 8607 ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.auth_session_id)?; 8608 }, 8609 2 => { 8610 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.authorization)?; 8611 }, 8612 3 => { 8613 if wire_type != ::protobuf::wire_format::WireTypeVarint { 8614 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); 8615 } 8616 let tmp = is.read_bool()?; 8617 self.add_more_credentials = tmp; 8618 }, 8619 _ => { 8620 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 8621 }, 8622 }; 8623 } 8624 ::std::result::Result::Ok(()) 8625 } 8626 8627 // Compute sizes of nested messages 8628 #[allow(unused_variables)] compute_size(&self) -> u328629 fn compute_size(&self) -> u32 { 8630 let mut my_size = 0; 8631 if !self.auth_session_id.is_empty() { 8632 my_size += ::protobuf::rt::bytes_size(1, &self.auth_session_id); 8633 } 8634 if let Some(ref v) = self.authorization.as_ref() { 8635 let len = v.compute_size(); 8636 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 8637 } 8638 if self.add_more_credentials != false { 8639 my_size += 2; 8640 } 8641 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 8642 self.cached_size.set(my_size); 8643 my_size 8644 } 8645 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>8646 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 8647 if !self.auth_session_id.is_empty() { 8648 os.write_bytes(1, &self.auth_session_id)?; 8649 } 8650 if let Some(ref v) = self.authorization.as_ref() { 8651 os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; 8652 os.write_raw_varint32(v.get_cached_size())?; 8653 v.write_to_with_cached_sizes(os)?; 8654 } 8655 if self.add_more_credentials != false { 8656 os.write_bool(3, self.add_more_credentials)?; 8657 } 8658 os.write_unknown_fields(self.get_unknown_fields())?; 8659 ::std::result::Result::Ok(()) 8660 } 8661 get_cached_size(&self) -> u328662 fn get_cached_size(&self) -> u32 { 8663 self.cached_size.get() 8664 } 8665 get_unknown_fields(&self) -> &::protobuf::UnknownFields8666 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 8667 &self.unknown_fields 8668 } 8669 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields8670 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 8671 &mut self.unknown_fields 8672 } 8673 as_any(&self) -> &dyn (::std::any::Any)8674 fn as_any(&self) -> &dyn (::std::any::Any) { 8675 self as &dyn (::std::any::Any) 8676 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)8677 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 8678 self as &mut dyn (::std::any::Any) 8679 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>8680 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 8681 self 8682 } 8683 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor8684 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 8685 Self::descriptor_static() 8686 } 8687 new() -> AddCredentialsRequest8688 fn new() -> AddCredentialsRequest { 8689 AddCredentialsRequest::new() 8690 } 8691 default_instance() -> &'static AddCredentialsRequest8692 fn default_instance() -> &'static AddCredentialsRequest { 8693 static instance: ::protobuf::rt::LazyV2<AddCredentialsRequest> = ::protobuf::rt::LazyV2::INIT; 8694 instance.get(AddCredentialsRequest::new) 8695 } 8696 } 8697 8698 impl ::protobuf::Clear for AddCredentialsRequest { clear(&mut self)8699 fn clear(&mut self) { 8700 self.auth_session_id.clear(); 8701 self.authorization.clear(); 8702 self.add_more_credentials = false; 8703 self.unknown_fields.clear(); 8704 } 8705 } 8706 8707 impl ::protobuf::reflect::ProtobufValue for AddCredentialsRequest { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef8708 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 8709 ::protobuf::reflect::ReflectValueRef::Message(self) 8710 } 8711 } 8712 8713 #[derive(PartialEq,Clone,Default,Debug)] 8714 pub struct AddCredentialsReply { 8715 // message fields 8716 pub error: CryptohomeErrorCode, 8717 pub error_info: ::protobuf::SingularPtrField<CryptohomeErrorInfo>, 8718 // special fields 8719 pub unknown_fields: ::protobuf::UnknownFields, 8720 pub cached_size: ::protobuf::CachedSize, 8721 } 8722 8723 impl<'a> ::std::default::Default for &'a AddCredentialsReply { default() -> &'a AddCredentialsReply8724 fn default() -> &'a AddCredentialsReply { 8725 <AddCredentialsReply as ::protobuf::Message>::default_instance() 8726 } 8727 } 8728 8729 impl AddCredentialsReply { new() -> AddCredentialsReply8730 pub fn new() -> AddCredentialsReply { 8731 ::std::default::Default::default() 8732 } 8733 8734 // .user_data_auth.CryptohomeErrorCode error = 1; 8735 8736 get_error(&self) -> CryptohomeErrorCode8737 pub fn get_error(&self) -> CryptohomeErrorCode { 8738 self.error 8739 } clear_error(&mut self)8740 pub fn clear_error(&mut self) { 8741 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 8742 } 8743 8744 // Param is passed by value, moved set_error(&mut self, v: CryptohomeErrorCode)8745 pub fn set_error(&mut self, v: CryptohomeErrorCode) { 8746 self.error = v; 8747 } 8748 8749 // .user_data_auth.CryptohomeErrorInfo error_info = 2; 8750 8751 get_error_info(&self) -> &CryptohomeErrorInfo8752 pub fn get_error_info(&self) -> &CryptohomeErrorInfo { 8753 self.error_info.as_ref().unwrap_or_else(|| <CryptohomeErrorInfo as ::protobuf::Message>::default_instance()) 8754 } clear_error_info(&mut self)8755 pub fn clear_error_info(&mut self) { 8756 self.error_info.clear(); 8757 } 8758 has_error_info(&self) -> bool8759 pub fn has_error_info(&self) -> bool { 8760 self.error_info.is_some() 8761 } 8762 8763 // Param is passed by value, moved set_error_info(&mut self, v: CryptohomeErrorInfo)8764 pub fn set_error_info(&mut self, v: CryptohomeErrorInfo) { 8765 self.error_info = ::protobuf::SingularPtrField::some(v); 8766 } 8767 8768 // Mutable pointer to the field. 8769 // If field is not initialized, it is initialized with default value first. mut_error_info(&mut self) -> &mut CryptohomeErrorInfo8770 pub fn mut_error_info(&mut self) -> &mut CryptohomeErrorInfo { 8771 if self.error_info.is_none() { 8772 self.error_info.set_default(); 8773 } 8774 self.error_info.as_mut().unwrap() 8775 } 8776 8777 // Take field take_error_info(&mut self) -> CryptohomeErrorInfo8778 pub fn take_error_info(&mut self) -> CryptohomeErrorInfo { 8779 self.error_info.take().unwrap_or_else(|| CryptohomeErrorInfo::new()) 8780 } 8781 } 8782 8783 impl ::protobuf::Message for AddCredentialsReply { is_initialized(&self) -> bool8784 fn is_initialized(&self) -> bool { 8785 for v in &self.error_info { 8786 if !v.is_initialized() { 8787 return false; 8788 } 8789 }; 8790 true 8791 } 8792 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>8793 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 8794 while !is.eof()? { 8795 let (field_number, wire_type) = is.read_tag_unpack()?; 8796 match field_number { 8797 1 => { 8798 ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? 8799 }, 8800 2 => { 8801 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.error_info)?; 8802 }, 8803 _ => { 8804 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 8805 }, 8806 }; 8807 } 8808 ::std::result::Result::Ok(()) 8809 } 8810 8811 // Compute sizes of nested messages 8812 #[allow(unused_variables)] compute_size(&self) -> u328813 fn compute_size(&self) -> u32 { 8814 let mut my_size = 0; 8815 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 8816 my_size += ::protobuf::rt::enum_size(1, self.error); 8817 } 8818 if let Some(ref v) = self.error_info.as_ref() { 8819 let len = v.compute_size(); 8820 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 8821 } 8822 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 8823 self.cached_size.set(my_size); 8824 my_size 8825 } 8826 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>8827 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 8828 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 8829 os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; 8830 } 8831 if let Some(ref v) = self.error_info.as_ref() { 8832 os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; 8833 os.write_raw_varint32(v.get_cached_size())?; 8834 v.write_to_with_cached_sizes(os)?; 8835 } 8836 os.write_unknown_fields(self.get_unknown_fields())?; 8837 ::std::result::Result::Ok(()) 8838 } 8839 get_cached_size(&self) -> u328840 fn get_cached_size(&self) -> u32 { 8841 self.cached_size.get() 8842 } 8843 get_unknown_fields(&self) -> &::protobuf::UnknownFields8844 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 8845 &self.unknown_fields 8846 } 8847 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields8848 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 8849 &mut self.unknown_fields 8850 } 8851 as_any(&self) -> &dyn (::std::any::Any)8852 fn as_any(&self) -> &dyn (::std::any::Any) { 8853 self as &dyn (::std::any::Any) 8854 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)8855 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 8856 self as &mut dyn (::std::any::Any) 8857 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>8858 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 8859 self 8860 } 8861 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor8862 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 8863 Self::descriptor_static() 8864 } 8865 new() -> AddCredentialsReply8866 fn new() -> AddCredentialsReply { 8867 AddCredentialsReply::new() 8868 } 8869 default_instance() -> &'static AddCredentialsReply8870 fn default_instance() -> &'static AddCredentialsReply { 8871 static instance: ::protobuf::rt::LazyV2<AddCredentialsReply> = ::protobuf::rt::LazyV2::INIT; 8872 instance.get(AddCredentialsReply::new) 8873 } 8874 } 8875 8876 impl ::protobuf::Clear for AddCredentialsReply { clear(&mut self)8877 fn clear(&mut self) { 8878 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 8879 self.error_info.clear(); 8880 self.unknown_fields.clear(); 8881 } 8882 } 8883 8884 impl ::protobuf::reflect::ProtobufValue for AddCredentialsReply { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef8885 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 8886 ::protobuf::reflect::ReflectValueRef::Message(self) 8887 } 8888 } 8889 8890 #[derive(PartialEq,Clone,Default,Debug)] 8891 pub struct AuthenticateAuthSessionRequest { 8892 // message fields 8893 pub auth_session_id: ::std::vec::Vec<u8>, 8894 pub authorization: ::protobuf::SingularPtrField<super::rpc::AuthorizationRequest>, 8895 // special fields 8896 pub unknown_fields: ::protobuf::UnknownFields, 8897 pub cached_size: ::protobuf::CachedSize, 8898 } 8899 8900 impl<'a> ::std::default::Default for &'a AuthenticateAuthSessionRequest { default() -> &'a AuthenticateAuthSessionRequest8901 fn default() -> &'a AuthenticateAuthSessionRequest { 8902 <AuthenticateAuthSessionRequest as ::protobuf::Message>::default_instance() 8903 } 8904 } 8905 8906 impl AuthenticateAuthSessionRequest { new() -> AuthenticateAuthSessionRequest8907 pub fn new() -> AuthenticateAuthSessionRequest { 8908 ::std::default::Default::default() 8909 } 8910 8911 // bytes auth_session_id = 1; 8912 8913 get_auth_session_id(&self) -> &[u8]8914 pub fn get_auth_session_id(&self) -> &[u8] { 8915 &self.auth_session_id 8916 } clear_auth_session_id(&mut self)8917 pub fn clear_auth_session_id(&mut self) { 8918 self.auth_session_id.clear(); 8919 } 8920 8921 // Param is passed by value, moved set_auth_session_id(&mut self, v: ::std::vec::Vec<u8>)8922 pub fn set_auth_session_id(&mut self, v: ::std::vec::Vec<u8>) { 8923 self.auth_session_id = v; 8924 } 8925 8926 // Mutable pointer to the field. 8927 // If field is not initialized, it is initialized with default value first. mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec<u8>8928 pub fn mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec<u8> { 8929 &mut self.auth_session_id 8930 } 8931 8932 // Take field take_auth_session_id(&mut self) -> ::std::vec::Vec<u8>8933 pub fn take_auth_session_id(&mut self) -> ::std::vec::Vec<u8> { 8934 ::std::mem::replace(&mut self.auth_session_id, ::std::vec::Vec::new()) 8935 } 8936 8937 // .cryptohome.AuthorizationRequest authorization = 2; 8938 8939 get_authorization(&self) -> &super::rpc::AuthorizationRequest8940 pub fn get_authorization(&self) -> &super::rpc::AuthorizationRequest { 8941 self.authorization.as_ref().unwrap_or_else(|| <super::rpc::AuthorizationRequest as ::protobuf::Message>::default_instance()) 8942 } clear_authorization(&mut self)8943 pub fn clear_authorization(&mut self) { 8944 self.authorization.clear(); 8945 } 8946 has_authorization(&self) -> bool8947 pub fn has_authorization(&self) -> bool { 8948 self.authorization.is_some() 8949 } 8950 8951 // Param is passed by value, moved set_authorization(&mut self, v: super::rpc::AuthorizationRequest)8952 pub fn set_authorization(&mut self, v: super::rpc::AuthorizationRequest) { 8953 self.authorization = ::protobuf::SingularPtrField::some(v); 8954 } 8955 8956 // Mutable pointer to the field. 8957 // If field is not initialized, it is initialized with default value first. mut_authorization(&mut self) -> &mut super::rpc::AuthorizationRequest8958 pub fn mut_authorization(&mut self) -> &mut super::rpc::AuthorizationRequest { 8959 if self.authorization.is_none() { 8960 self.authorization.set_default(); 8961 } 8962 self.authorization.as_mut().unwrap() 8963 } 8964 8965 // Take field take_authorization(&mut self) -> super::rpc::AuthorizationRequest8966 pub fn take_authorization(&mut self) -> super::rpc::AuthorizationRequest { 8967 self.authorization.take().unwrap_or_else(|| super::rpc::AuthorizationRequest::new()) 8968 } 8969 } 8970 8971 impl ::protobuf::Message for AuthenticateAuthSessionRequest { is_initialized(&self) -> bool8972 fn is_initialized(&self) -> bool { 8973 for v in &self.authorization { 8974 if !v.is_initialized() { 8975 return false; 8976 } 8977 }; 8978 true 8979 } 8980 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>8981 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 8982 while !is.eof()? { 8983 let (field_number, wire_type) = is.read_tag_unpack()?; 8984 match field_number { 8985 1 => { 8986 ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.auth_session_id)?; 8987 }, 8988 2 => { 8989 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.authorization)?; 8990 }, 8991 _ => { 8992 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 8993 }, 8994 }; 8995 } 8996 ::std::result::Result::Ok(()) 8997 } 8998 8999 // Compute sizes of nested messages 9000 #[allow(unused_variables)] compute_size(&self) -> u329001 fn compute_size(&self) -> u32 { 9002 let mut my_size = 0; 9003 if !self.auth_session_id.is_empty() { 9004 my_size += ::protobuf::rt::bytes_size(1, &self.auth_session_id); 9005 } 9006 if let Some(ref v) = self.authorization.as_ref() { 9007 let len = v.compute_size(); 9008 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 9009 } 9010 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 9011 self.cached_size.set(my_size); 9012 my_size 9013 } 9014 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>9015 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 9016 if !self.auth_session_id.is_empty() { 9017 os.write_bytes(1, &self.auth_session_id)?; 9018 } 9019 if let Some(ref v) = self.authorization.as_ref() { 9020 os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; 9021 os.write_raw_varint32(v.get_cached_size())?; 9022 v.write_to_with_cached_sizes(os)?; 9023 } 9024 os.write_unknown_fields(self.get_unknown_fields())?; 9025 ::std::result::Result::Ok(()) 9026 } 9027 get_cached_size(&self) -> u329028 fn get_cached_size(&self) -> u32 { 9029 self.cached_size.get() 9030 } 9031 get_unknown_fields(&self) -> &::protobuf::UnknownFields9032 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 9033 &self.unknown_fields 9034 } 9035 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields9036 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 9037 &mut self.unknown_fields 9038 } 9039 as_any(&self) -> &dyn (::std::any::Any)9040 fn as_any(&self) -> &dyn (::std::any::Any) { 9041 self as &dyn (::std::any::Any) 9042 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)9043 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 9044 self as &mut dyn (::std::any::Any) 9045 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>9046 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 9047 self 9048 } 9049 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor9050 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 9051 Self::descriptor_static() 9052 } 9053 new() -> AuthenticateAuthSessionRequest9054 fn new() -> AuthenticateAuthSessionRequest { 9055 AuthenticateAuthSessionRequest::new() 9056 } 9057 default_instance() -> &'static AuthenticateAuthSessionRequest9058 fn default_instance() -> &'static AuthenticateAuthSessionRequest { 9059 static instance: ::protobuf::rt::LazyV2<AuthenticateAuthSessionRequest> = ::protobuf::rt::LazyV2::INIT; 9060 instance.get(AuthenticateAuthSessionRequest::new) 9061 } 9062 } 9063 9064 impl ::protobuf::Clear for AuthenticateAuthSessionRequest { clear(&mut self)9065 fn clear(&mut self) { 9066 self.auth_session_id.clear(); 9067 self.authorization.clear(); 9068 self.unknown_fields.clear(); 9069 } 9070 } 9071 9072 impl ::protobuf::reflect::ProtobufValue for AuthenticateAuthSessionRequest { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef9073 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 9074 ::protobuf::reflect::ReflectValueRef::Message(self) 9075 } 9076 } 9077 9078 #[derive(PartialEq,Clone,Default,Debug)] 9079 pub struct AuthenticateAuthSessionReply { 9080 // message fields 9081 pub error: CryptohomeErrorCode, 9082 pub authenticated: bool, 9083 pub error_info: ::protobuf::SingularPtrField<CryptohomeErrorInfo>, 9084 // message oneof groups 9085 pub _seconds_left: ::std::option::Option<AuthenticateAuthSessionReply_oneof__seconds_left>, 9086 // special fields 9087 pub unknown_fields: ::protobuf::UnknownFields, 9088 pub cached_size: ::protobuf::CachedSize, 9089 } 9090 9091 impl<'a> ::std::default::Default for &'a AuthenticateAuthSessionReply { default() -> &'a AuthenticateAuthSessionReply9092 fn default() -> &'a AuthenticateAuthSessionReply { 9093 <AuthenticateAuthSessionReply as ::protobuf::Message>::default_instance() 9094 } 9095 } 9096 9097 #[derive(Clone,PartialEq,Debug)] 9098 pub enum AuthenticateAuthSessionReply_oneof__seconds_left { 9099 seconds_left(u32), 9100 } 9101 9102 impl AuthenticateAuthSessionReply { new() -> AuthenticateAuthSessionReply9103 pub fn new() -> AuthenticateAuthSessionReply { 9104 ::std::default::Default::default() 9105 } 9106 9107 // .user_data_auth.CryptohomeErrorCode error = 1; 9108 9109 get_error(&self) -> CryptohomeErrorCode9110 pub fn get_error(&self) -> CryptohomeErrorCode { 9111 self.error 9112 } clear_error(&mut self)9113 pub fn clear_error(&mut self) { 9114 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 9115 } 9116 9117 // Param is passed by value, moved set_error(&mut self, v: CryptohomeErrorCode)9118 pub fn set_error(&mut self, v: CryptohomeErrorCode) { 9119 self.error = v; 9120 } 9121 9122 // bool authenticated = 2; 9123 9124 get_authenticated(&self) -> bool9125 pub fn get_authenticated(&self) -> bool { 9126 self.authenticated 9127 } clear_authenticated(&mut self)9128 pub fn clear_authenticated(&mut self) { 9129 self.authenticated = false; 9130 } 9131 9132 // Param is passed by value, moved set_authenticated(&mut self, v: bool)9133 pub fn set_authenticated(&mut self, v: bool) { 9134 self.authenticated = v; 9135 } 9136 9137 // .user_data_auth.CryptohomeErrorInfo error_info = 3; 9138 9139 get_error_info(&self) -> &CryptohomeErrorInfo9140 pub fn get_error_info(&self) -> &CryptohomeErrorInfo { 9141 self.error_info.as_ref().unwrap_or_else(|| <CryptohomeErrorInfo as ::protobuf::Message>::default_instance()) 9142 } clear_error_info(&mut self)9143 pub fn clear_error_info(&mut self) { 9144 self.error_info.clear(); 9145 } 9146 has_error_info(&self) -> bool9147 pub fn has_error_info(&self) -> bool { 9148 self.error_info.is_some() 9149 } 9150 9151 // Param is passed by value, moved set_error_info(&mut self, v: CryptohomeErrorInfo)9152 pub fn set_error_info(&mut self, v: CryptohomeErrorInfo) { 9153 self.error_info = ::protobuf::SingularPtrField::some(v); 9154 } 9155 9156 // Mutable pointer to the field. 9157 // If field is not initialized, it is initialized with default value first. mut_error_info(&mut self) -> &mut CryptohomeErrorInfo9158 pub fn mut_error_info(&mut self) -> &mut CryptohomeErrorInfo { 9159 if self.error_info.is_none() { 9160 self.error_info.set_default(); 9161 } 9162 self.error_info.as_mut().unwrap() 9163 } 9164 9165 // Take field take_error_info(&mut self) -> CryptohomeErrorInfo9166 pub fn take_error_info(&mut self) -> CryptohomeErrorInfo { 9167 self.error_info.take().unwrap_or_else(|| CryptohomeErrorInfo::new()) 9168 } 9169 9170 // uint32 seconds_left = 4; 9171 9172 get_seconds_left(&self) -> u329173 pub fn get_seconds_left(&self) -> u32 { 9174 match self._seconds_left { 9175 ::std::option::Option::Some(AuthenticateAuthSessionReply_oneof__seconds_left::seconds_left(v)) => v, 9176 _ => 0, 9177 } 9178 } clear_seconds_left(&mut self)9179 pub fn clear_seconds_left(&mut self) { 9180 self._seconds_left = ::std::option::Option::None; 9181 } 9182 has_seconds_left(&self) -> bool9183 pub fn has_seconds_left(&self) -> bool { 9184 match self._seconds_left { 9185 ::std::option::Option::Some(AuthenticateAuthSessionReply_oneof__seconds_left::seconds_left(..)) => true, 9186 _ => false, 9187 } 9188 } 9189 9190 // Param is passed by value, moved set_seconds_left(&mut self, v: u32)9191 pub fn set_seconds_left(&mut self, v: u32) { 9192 self._seconds_left = ::std::option::Option::Some(AuthenticateAuthSessionReply_oneof__seconds_left::seconds_left(v)) 9193 } 9194 } 9195 9196 impl ::protobuf::Message for AuthenticateAuthSessionReply { is_initialized(&self) -> bool9197 fn is_initialized(&self) -> bool { 9198 for v in &self.error_info { 9199 if !v.is_initialized() { 9200 return false; 9201 } 9202 }; 9203 true 9204 } 9205 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>9206 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 9207 while !is.eof()? { 9208 let (field_number, wire_type) = is.read_tag_unpack()?; 9209 match field_number { 9210 1 => { 9211 ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? 9212 }, 9213 2 => { 9214 if wire_type != ::protobuf::wire_format::WireTypeVarint { 9215 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); 9216 } 9217 let tmp = is.read_bool()?; 9218 self.authenticated = tmp; 9219 }, 9220 3 => { 9221 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.error_info)?; 9222 }, 9223 4 => { 9224 if wire_type != ::protobuf::wire_format::WireTypeVarint { 9225 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); 9226 } 9227 self._seconds_left = ::std::option::Option::Some(AuthenticateAuthSessionReply_oneof__seconds_left::seconds_left(is.read_uint32()?)); 9228 }, 9229 _ => { 9230 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 9231 }, 9232 }; 9233 } 9234 ::std::result::Result::Ok(()) 9235 } 9236 9237 // Compute sizes of nested messages 9238 #[allow(unused_variables)] compute_size(&self) -> u329239 fn compute_size(&self) -> u32 { 9240 let mut my_size = 0; 9241 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 9242 my_size += ::protobuf::rt::enum_size(1, self.error); 9243 } 9244 if self.authenticated != false { 9245 my_size += 2; 9246 } 9247 if let Some(ref v) = self.error_info.as_ref() { 9248 let len = v.compute_size(); 9249 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 9250 } 9251 if let ::std::option::Option::Some(ref v) = self._seconds_left { 9252 match v { 9253 &AuthenticateAuthSessionReply_oneof__seconds_left::seconds_left(v) => { 9254 my_size += ::protobuf::rt::value_size(4, v, ::protobuf::wire_format::WireTypeVarint); 9255 }, 9256 }; 9257 } 9258 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 9259 self.cached_size.set(my_size); 9260 my_size 9261 } 9262 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>9263 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 9264 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 9265 os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; 9266 } 9267 if self.authenticated != false { 9268 os.write_bool(2, self.authenticated)?; 9269 } 9270 if let Some(ref v) = self.error_info.as_ref() { 9271 os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; 9272 os.write_raw_varint32(v.get_cached_size())?; 9273 v.write_to_with_cached_sizes(os)?; 9274 } 9275 if let ::std::option::Option::Some(ref v) = self._seconds_left { 9276 match v { 9277 &AuthenticateAuthSessionReply_oneof__seconds_left::seconds_left(v) => { 9278 os.write_uint32(4, v)?; 9279 }, 9280 }; 9281 } 9282 os.write_unknown_fields(self.get_unknown_fields())?; 9283 ::std::result::Result::Ok(()) 9284 } 9285 get_cached_size(&self) -> u329286 fn get_cached_size(&self) -> u32 { 9287 self.cached_size.get() 9288 } 9289 get_unknown_fields(&self) -> &::protobuf::UnknownFields9290 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 9291 &self.unknown_fields 9292 } 9293 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields9294 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 9295 &mut self.unknown_fields 9296 } 9297 as_any(&self) -> &dyn (::std::any::Any)9298 fn as_any(&self) -> &dyn (::std::any::Any) { 9299 self as &dyn (::std::any::Any) 9300 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)9301 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 9302 self as &mut dyn (::std::any::Any) 9303 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>9304 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 9305 self 9306 } 9307 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor9308 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 9309 Self::descriptor_static() 9310 } 9311 new() -> AuthenticateAuthSessionReply9312 fn new() -> AuthenticateAuthSessionReply { 9313 AuthenticateAuthSessionReply::new() 9314 } 9315 default_instance() -> &'static AuthenticateAuthSessionReply9316 fn default_instance() -> &'static AuthenticateAuthSessionReply { 9317 static instance: ::protobuf::rt::LazyV2<AuthenticateAuthSessionReply> = ::protobuf::rt::LazyV2::INIT; 9318 instance.get(AuthenticateAuthSessionReply::new) 9319 } 9320 } 9321 9322 impl ::protobuf::Clear for AuthenticateAuthSessionReply { clear(&mut self)9323 fn clear(&mut self) { 9324 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 9325 self.authenticated = false; 9326 self.error_info.clear(); 9327 self._seconds_left = ::std::option::Option::None; 9328 self.unknown_fields.clear(); 9329 } 9330 } 9331 9332 impl ::protobuf::reflect::ProtobufValue for AuthenticateAuthSessionReply { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef9333 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 9334 ::protobuf::reflect::ReflectValueRef::Message(self) 9335 } 9336 } 9337 9338 #[derive(PartialEq,Clone,Default,Debug)] 9339 pub struct InvalidateAuthSessionRequest { 9340 // message fields 9341 pub auth_session_id: ::std::vec::Vec<u8>, 9342 // special fields 9343 pub unknown_fields: ::protobuf::UnknownFields, 9344 pub cached_size: ::protobuf::CachedSize, 9345 } 9346 9347 impl<'a> ::std::default::Default for &'a InvalidateAuthSessionRequest { default() -> &'a InvalidateAuthSessionRequest9348 fn default() -> &'a InvalidateAuthSessionRequest { 9349 <InvalidateAuthSessionRequest as ::protobuf::Message>::default_instance() 9350 } 9351 } 9352 9353 impl InvalidateAuthSessionRequest { new() -> InvalidateAuthSessionRequest9354 pub fn new() -> InvalidateAuthSessionRequest { 9355 ::std::default::Default::default() 9356 } 9357 9358 // bytes auth_session_id = 1; 9359 9360 get_auth_session_id(&self) -> &[u8]9361 pub fn get_auth_session_id(&self) -> &[u8] { 9362 &self.auth_session_id 9363 } clear_auth_session_id(&mut self)9364 pub fn clear_auth_session_id(&mut self) { 9365 self.auth_session_id.clear(); 9366 } 9367 9368 // Param is passed by value, moved set_auth_session_id(&mut self, v: ::std::vec::Vec<u8>)9369 pub fn set_auth_session_id(&mut self, v: ::std::vec::Vec<u8>) { 9370 self.auth_session_id = v; 9371 } 9372 9373 // Mutable pointer to the field. 9374 // If field is not initialized, it is initialized with default value first. mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec<u8>9375 pub fn mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec<u8> { 9376 &mut self.auth_session_id 9377 } 9378 9379 // Take field take_auth_session_id(&mut self) -> ::std::vec::Vec<u8>9380 pub fn take_auth_session_id(&mut self) -> ::std::vec::Vec<u8> { 9381 ::std::mem::replace(&mut self.auth_session_id, ::std::vec::Vec::new()) 9382 } 9383 } 9384 9385 impl ::protobuf::Message for InvalidateAuthSessionRequest { is_initialized(&self) -> bool9386 fn is_initialized(&self) -> bool { 9387 true 9388 } 9389 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>9390 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 9391 while !is.eof()? { 9392 let (field_number, wire_type) = is.read_tag_unpack()?; 9393 match field_number { 9394 1 => { 9395 ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.auth_session_id)?; 9396 }, 9397 _ => { 9398 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 9399 }, 9400 }; 9401 } 9402 ::std::result::Result::Ok(()) 9403 } 9404 9405 // Compute sizes of nested messages 9406 #[allow(unused_variables)] compute_size(&self) -> u329407 fn compute_size(&self) -> u32 { 9408 let mut my_size = 0; 9409 if !self.auth_session_id.is_empty() { 9410 my_size += ::protobuf::rt::bytes_size(1, &self.auth_session_id); 9411 } 9412 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 9413 self.cached_size.set(my_size); 9414 my_size 9415 } 9416 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>9417 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 9418 if !self.auth_session_id.is_empty() { 9419 os.write_bytes(1, &self.auth_session_id)?; 9420 } 9421 os.write_unknown_fields(self.get_unknown_fields())?; 9422 ::std::result::Result::Ok(()) 9423 } 9424 get_cached_size(&self) -> u329425 fn get_cached_size(&self) -> u32 { 9426 self.cached_size.get() 9427 } 9428 get_unknown_fields(&self) -> &::protobuf::UnknownFields9429 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 9430 &self.unknown_fields 9431 } 9432 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields9433 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 9434 &mut self.unknown_fields 9435 } 9436 as_any(&self) -> &dyn (::std::any::Any)9437 fn as_any(&self) -> &dyn (::std::any::Any) { 9438 self as &dyn (::std::any::Any) 9439 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)9440 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 9441 self as &mut dyn (::std::any::Any) 9442 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>9443 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 9444 self 9445 } 9446 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor9447 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 9448 Self::descriptor_static() 9449 } 9450 new() -> InvalidateAuthSessionRequest9451 fn new() -> InvalidateAuthSessionRequest { 9452 InvalidateAuthSessionRequest::new() 9453 } 9454 default_instance() -> &'static InvalidateAuthSessionRequest9455 fn default_instance() -> &'static InvalidateAuthSessionRequest { 9456 static instance: ::protobuf::rt::LazyV2<InvalidateAuthSessionRequest> = ::protobuf::rt::LazyV2::INIT; 9457 instance.get(InvalidateAuthSessionRequest::new) 9458 } 9459 } 9460 9461 impl ::protobuf::Clear for InvalidateAuthSessionRequest { clear(&mut self)9462 fn clear(&mut self) { 9463 self.auth_session_id.clear(); 9464 self.unknown_fields.clear(); 9465 } 9466 } 9467 9468 impl ::protobuf::reflect::ProtobufValue for InvalidateAuthSessionRequest { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef9469 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 9470 ::protobuf::reflect::ReflectValueRef::Message(self) 9471 } 9472 } 9473 9474 #[derive(PartialEq,Clone,Default,Debug)] 9475 pub struct InvalidateAuthSessionReply { 9476 // message fields 9477 pub error: CryptohomeErrorCode, 9478 pub error_info: ::protobuf::SingularPtrField<CryptohomeErrorInfo>, 9479 // special fields 9480 pub unknown_fields: ::protobuf::UnknownFields, 9481 pub cached_size: ::protobuf::CachedSize, 9482 } 9483 9484 impl<'a> ::std::default::Default for &'a InvalidateAuthSessionReply { default() -> &'a InvalidateAuthSessionReply9485 fn default() -> &'a InvalidateAuthSessionReply { 9486 <InvalidateAuthSessionReply as ::protobuf::Message>::default_instance() 9487 } 9488 } 9489 9490 impl InvalidateAuthSessionReply { new() -> InvalidateAuthSessionReply9491 pub fn new() -> InvalidateAuthSessionReply { 9492 ::std::default::Default::default() 9493 } 9494 9495 // .user_data_auth.CryptohomeErrorCode error = 1; 9496 9497 get_error(&self) -> CryptohomeErrorCode9498 pub fn get_error(&self) -> CryptohomeErrorCode { 9499 self.error 9500 } clear_error(&mut self)9501 pub fn clear_error(&mut self) { 9502 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 9503 } 9504 9505 // Param is passed by value, moved set_error(&mut self, v: CryptohomeErrorCode)9506 pub fn set_error(&mut self, v: CryptohomeErrorCode) { 9507 self.error = v; 9508 } 9509 9510 // .user_data_auth.CryptohomeErrorInfo error_info = 2; 9511 9512 get_error_info(&self) -> &CryptohomeErrorInfo9513 pub fn get_error_info(&self) -> &CryptohomeErrorInfo { 9514 self.error_info.as_ref().unwrap_or_else(|| <CryptohomeErrorInfo as ::protobuf::Message>::default_instance()) 9515 } clear_error_info(&mut self)9516 pub fn clear_error_info(&mut self) { 9517 self.error_info.clear(); 9518 } 9519 has_error_info(&self) -> bool9520 pub fn has_error_info(&self) -> bool { 9521 self.error_info.is_some() 9522 } 9523 9524 // Param is passed by value, moved set_error_info(&mut self, v: CryptohomeErrorInfo)9525 pub fn set_error_info(&mut self, v: CryptohomeErrorInfo) { 9526 self.error_info = ::protobuf::SingularPtrField::some(v); 9527 } 9528 9529 // Mutable pointer to the field. 9530 // If field is not initialized, it is initialized with default value first. mut_error_info(&mut self) -> &mut CryptohomeErrorInfo9531 pub fn mut_error_info(&mut self) -> &mut CryptohomeErrorInfo { 9532 if self.error_info.is_none() { 9533 self.error_info.set_default(); 9534 } 9535 self.error_info.as_mut().unwrap() 9536 } 9537 9538 // Take field take_error_info(&mut self) -> CryptohomeErrorInfo9539 pub fn take_error_info(&mut self) -> CryptohomeErrorInfo { 9540 self.error_info.take().unwrap_or_else(|| CryptohomeErrorInfo::new()) 9541 } 9542 } 9543 9544 impl ::protobuf::Message for InvalidateAuthSessionReply { is_initialized(&self) -> bool9545 fn is_initialized(&self) -> bool { 9546 for v in &self.error_info { 9547 if !v.is_initialized() { 9548 return false; 9549 } 9550 }; 9551 true 9552 } 9553 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>9554 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 9555 while !is.eof()? { 9556 let (field_number, wire_type) = is.read_tag_unpack()?; 9557 match field_number { 9558 1 => { 9559 ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? 9560 }, 9561 2 => { 9562 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.error_info)?; 9563 }, 9564 _ => { 9565 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 9566 }, 9567 }; 9568 } 9569 ::std::result::Result::Ok(()) 9570 } 9571 9572 // Compute sizes of nested messages 9573 #[allow(unused_variables)] compute_size(&self) -> u329574 fn compute_size(&self) -> u32 { 9575 let mut my_size = 0; 9576 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 9577 my_size += ::protobuf::rt::enum_size(1, self.error); 9578 } 9579 if let Some(ref v) = self.error_info.as_ref() { 9580 let len = v.compute_size(); 9581 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 9582 } 9583 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 9584 self.cached_size.set(my_size); 9585 my_size 9586 } 9587 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>9588 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 9589 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 9590 os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; 9591 } 9592 if let Some(ref v) = self.error_info.as_ref() { 9593 os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; 9594 os.write_raw_varint32(v.get_cached_size())?; 9595 v.write_to_with_cached_sizes(os)?; 9596 } 9597 os.write_unknown_fields(self.get_unknown_fields())?; 9598 ::std::result::Result::Ok(()) 9599 } 9600 get_cached_size(&self) -> u329601 fn get_cached_size(&self) -> u32 { 9602 self.cached_size.get() 9603 } 9604 get_unknown_fields(&self) -> &::protobuf::UnknownFields9605 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 9606 &self.unknown_fields 9607 } 9608 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields9609 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 9610 &mut self.unknown_fields 9611 } 9612 as_any(&self) -> &dyn (::std::any::Any)9613 fn as_any(&self) -> &dyn (::std::any::Any) { 9614 self as &dyn (::std::any::Any) 9615 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)9616 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 9617 self as &mut dyn (::std::any::Any) 9618 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>9619 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 9620 self 9621 } 9622 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor9623 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 9624 Self::descriptor_static() 9625 } 9626 new() -> InvalidateAuthSessionReply9627 fn new() -> InvalidateAuthSessionReply { 9628 InvalidateAuthSessionReply::new() 9629 } 9630 default_instance() -> &'static InvalidateAuthSessionReply9631 fn default_instance() -> &'static InvalidateAuthSessionReply { 9632 static instance: ::protobuf::rt::LazyV2<InvalidateAuthSessionReply> = ::protobuf::rt::LazyV2::INIT; 9633 instance.get(InvalidateAuthSessionReply::new) 9634 } 9635 } 9636 9637 impl ::protobuf::Clear for InvalidateAuthSessionReply { clear(&mut self)9638 fn clear(&mut self) { 9639 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 9640 self.error_info.clear(); 9641 self.unknown_fields.clear(); 9642 } 9643 } 9644 9645 impl ::protobuf::reflect::ProtobufValue for InvalidateAuthSessionReply { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef9646 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 9647 ::protobuf::reflect::ReflectValueRef::Message(self) 9648 } 9649 } 9650 9651 #[derive(PartialEq,Clone,Default,Debug)] 9652 pub struct ExtendAuthSessionRequest { 9653 // message fields 9654 pub auth_session_id: ::std::vec::Vec<u8>, 9655 pub extension_duration: u32, 9656 // special fields 9657 pub unknown_fields: ::protobuf::UnknownFields, 9658 pub cached_size: ::protobuf::CachedSize, 9659 } 9660 9661 impl<'a> ::std::default::Default for &'a ExtendAuthSessionRequest { default() -> &'a ExtendAuthSessionRequest9662 fn default() -> &'a ExtendAuthSessionRequest { 9663 <ExtendAuthSessionRequest as ::protobuf::Message>::default_instance() 9664 } 9665 } 9666 9667 impl ExtendAuthSessionRequest { new() -> ExtendAuthSessionRequest9668 pub fn new() -> ExtendAuthSessionRequest { 9669 ::std::default::Default::default() 9670 } 9671 9672 // bytes auth_session_id = 1; 9673 9674 get_auth_session_id(&self) -> &[u8]9675 pub fn get_auth_session_id(&self) -> &[u8] { 9676 &self.auth_session_id 9677 } clear_auth_session_id(&mut self)9678 pub fn clear_auth_session_id(&mut self) { 9679 self.auth_session_id.clear(); 9680 } 9681 9682 // Param is passed by value, moved set_auth_session_id(&mut self, v: ::std::vec::Vec<u8>)9683 pub fn set_auth_session_id(&mut self, v: ::std::vec::Vec<u8>) { 9684 self.auth_session_id = v; 9685 } 9686 9687 // Mutable pointer to the field. 9688 // If field is not initialized, it is initialized with default value first. mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec<u8>9689 pub fn mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec<u8> { 9690 &mut self.auth_session_id 9691 } 9692 9693 // Take field take_auth_session_id(&mut self) -> ::std::vec::Vec<u8>9694 pub fn take_auth_session_id(&mut self) -> ::std::vec::Vec<u8> { 9695 ::std::mem::replace(&mut self.auth_session_id, ::std::vec::Vec::new()) 9696 } 9697 9698 // uint32 extension_duration = 2; 9699 9700 get_extension_duration(&self) -> u329701 pub fn get_extension_duration(&self) -> u32 { 9702 self.extension_duration 9703 } clear_extension_duration(&mut self)9704 pub fn clear_extension_duration(&mut self) { 9705 self.extension_duration = 0; 9706 } 9707 9708 // Param is passed by value, moved set_extension_duration(&mut self, v: u32)9709 pub fn set_extension_duration(&mut self, v: u32) { 9710 self.extension_duration = v; 9711 } 9712 } 9713 9714 impl ::protobuf::Message for ExtendAuthSessionRequest { is_initialized(&self) -> bool9715 fn is_initialized(&self) -> bool { 9716 true 9717 } 9718 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>9719 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 9720 while !is.eof()? { 9721 let (field_number, wire_type) = is.read_tag_unpack()?; 9722 match field_number { 9723 1 => { 9724 ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.auth_session_id)?; 9725 }, 9726 2 => { 9727 if wire_type != ::protobuf::wire_format::WireTypeVarint { 9728 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); 9729 } 9730 let tmp = is.read_uint32()?; 9731 self.extension_duration = tmp; 9732 }, 9733 _ => { 9734 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 9735 }, 9736 }; 9737 } 9738 ::std::result::Result::Ok(()) 9739 } 9740 9741 // Compute sizes of nested messages 9742 #[allow(unused_variables)] compute_size(&self) -> u329743 fn compute_size(&self) -> u32 { 9744 let mut my_size = 0; 9745 if !self.auth_session_id.is_empty() { 9746 my_size += ::protobuf::rt::bytes_size(1, &self.auth_session_id); 9747 } 9748 if self.extension_duration != 0 { 9749 my_size += ::protobuf::rt::value_size(2, self.extension_duration, ::protobuf::wire_format::WireTypeVarint); 9750 } 9751 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 9752 self.cached_size.set(my_size); 9753 my_size 9754 } 9755 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>9756 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 9757 if !self.auth_session_id.is_empty() { 9758 os.write_bytes(1, &self.auth_session_id)?; 9759 } 9760 if self.extension_duration != 0 { 9761 os.write_uint32(2, self.extension_duration)?; 9762 } 9763 os.write_unknown_fields(self.get_unknown_fields())?; 9764 ::std::result::Result::Ok(()) 9765 } 9766 get_cached_size(&self) -> u329767 fn get_cached_size(&self) -> u32 { 9768 self.cached_size.get() 9769 } 9770 get_unknown_fields(&self) -> &::protobuf::UnknownFields9771 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 9772 &self.unknown_fields 9773 } 9774 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields9775 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 9776 &mut self.unknown_fields 9777 } 9778 as_any(&self) -> &dyn (::std::any::Any)9779 fn as_any(&self) -> &dyn (::std::any::Any) { 9780 self as &dyn (::std::any::Any) 9781 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)9782 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 9783 self as &mut dyn (::std::any::Any) 9784 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>9785 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 9786 self 9787 } 9788 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor9789 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 9790 Self::descriptor_static() 9791 } 9792 new() -> ExtendAuthSessionRequest9793 fn new() -> ExtendAuthSessionRequest { 9794 ExtendAuthSessionRequest::new() 9795 } 9796 default_instance() -> &'static ExtendAuthSessionRequest9797 fn default_instance() -> &'static ExtendAuthSessionRequest { 9798 static instance: ::protobuf::rt::LazyV2<ExtendAuthSessionRequest> = ::protobuf::rt::LazyV2::INIT; 9799 instance.get(ExtendAuthSessionRequest::new) 9800 } 9801 } 9802 9803 impl ::protobuf::Clear for ExtendAuthSessionRequest { clear(&mut self)9804 fn clear(&mut self) { 9805 self.auth_session_id.clear(); 9806 self.extension_duration = 0; 9807 self.unknown_fields.clear(); 9808 } 9809 } 9810 9811 impl ::protobuf::reflect::ProtobufValue for ExtendAuthSessionRequest { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef9812 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 9813 ::protobuf::reflect::ReflectValueRef::Message(self) 9814 } 9815 } 9816 9817 #[derive(PartialEq,Clone,Default,Debug)] 9818 pub struct ExtendAuthSessionReply { 9819 // message fields 9820 pub error: CryptohomeErrorCode, 9821 pub error_info: ::protobuf::SingularPtrField<CryptohomeErrorInfo>, 9822 // message oneof groups 9823 pub _seconds_left: ::std::option::Option<ExtendAuthSessionReply_oneof__seconds_left>, 9824 // special fields 9825 pub unknown_fields: ::protobuf::UnknownFields, 9826 pub cached_size: ::protobuf::CachedSize, 9827 } 9828 9829 impl<'a> ::std::default::Default for &'a ExtendAuthSessionReply { default() -> &'a ExtendAuthSessionReply9830 fn default() -> &'a ExtendAuthSessionReply { 9831 <ExtendAuthSessionReply as ::protobuf::Message>::default_instance() 9832 } 9833 } 9834 9835 #[derive(Clone,PartialEq,Debug)] 9836 pub enum ExtendAuthSessionReply_oneof__seconds_left { 9837 seconds_left(u32), 9838 } 9839 9840 impl ExtendAuthSessionReply { new() -> ExtendAuthSessionReply9841 pub fn new() -> ExtendAuthSessionReply { 9842 ::std::default::Default::default() 9843 } 9844 9845 // .user_data_auth.CryptohomeErrorCode error = 1; 9846 9847 get_error(&self) -> CryptohomeErrorCode9848 pub fn get_error(&self) -> CryptohomeErrorCode { 9849 self.error 9850 } clear_error(&mut self)9851 pub fn clear_error(&mut self) { 9852 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 9853 } 9854 9855 // Param is passed by value, moved set_error(&mut self, v: CryptohomeErrorCode)9856 pub fn set_error(&mut self, v: CryptohomeErrorCode) { 9857 self.error = v; 9858 } 9859 9860 // .user_data_auth.CryptohomeErrorInfo error_info = 2; 9861 9862 get_error_info(&self) -> &CryptohomeErrorInfo9863 pub fn get_error_info(&self) -> &CryptohomeErrorInfo { 9864 self.error_info.as_ref().unwrap_or_else(|| <CryptohomeErrorInfo as ::protobuf::Message>::default_instance()) 9865 } clear_error_info(&mut self)9866 pub fn clear_error_info(&mut self) { 9867 self.error_info.clear(); 9868 } 9869 has_error_info(&self) -> bool9870 pub fn has_error_info(&self) -> bool { 9871 self.error_info.is_some() 9872 } 9873 9874 // Param is passed by value, moved set_error_info(&mut self, v: CryptohomeErrorInfo)9875 pub fn set_error_info(&mut self, v: CryptohomeErrorInfo) { 9876 self.error_info = ::protobuf::SingularPtrField::some(v); 9877 } 9878 9879 // Mutable pointer to the field. 9880 // If field is not initialized, it is initialized with default value first. mut_error_info(&mut self) -> &mut CryptohomeErrorInfo9881 pub fn mut_error_info(&mut self) -> &mut CryptohomeErrorInfo { 9882 if self.error_info.is_none() { 9883 self.error_info.set_default(); 9884 } 9885 self.error_info.as_mut().unwrap() 9886 } 9887 9888 // Take field take_error_info(&mut self) -> CryptohomeErrorInfo9889 pub fn take_error_info(&mut self) -> CryptohomeErrorInfo { 9890 self.error_info.take().unwrap_or_else(|| CryptohomeErrorInfo::new()) 9891 } 9892 9893 // uint32 seconds_left = 3; 9894 9895 get_seconds_left(&self) -> u329896 pub fn get_seconds_left(&self) -> u32 { 9897 match self._seconds_left { 9898 ::std::option::Option::Some(ExtendAuthSessionReply_oneof__seconds_left::seconds_left(v)) => v, 9899 _ => 0, 9900 } 9901 } clear_seconds_left(&mut self)9902 pub fn clear_seconds_left(&mut self) { 9903 self._seconds_left = ::std::option::Option::None; 9904 } 9905 has_seconds_left(&self) -> bool9906 pub fn has_seconds_left(&self) -> bool { 9907 match self._seconds_left { 9908 ::std::option::Option::Some(ExtendAuthSessionReply_oneof__seconds_left::seconds_left(..)) => true, 9909 _ => false, 9910 } 9911 } 9912 9913 // Param is passed by value, moved set_seconds_left(&mut self, v: u32)9914 pub fn set_seconds_left(&mut self, v: u32) { 9915 self._seconds_left = ::std::option::Option::Some(ExtendAuthSessionReply_oneof__seconds_left::seconds_left(v)) 9916 } 9917 } 9918 9919 impl ::protobuf::Message for ExtendAuthSessionReply { is_initialized(&self) -> bool9920 fn is_initialized(&self) -> bool { 9921 for v in &self.error_info { 9922 if !v.is_initialized() { 9923 return false; 9924 } 9925 }; 9926 true 9927 } 9928 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>9929 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 9930 while !is.eof()? { 9931 let (field_number, wire_type) = is.read_tag_unpack()?; 9932 match field_number { 9933 1 => { 9934 ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? 9935 }, 9936 2 => { 9937 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.error_info)?; 9938 }, 9939 3 => { 9940 if wire_type != ::protobuf::wire_format::WireTypeVarint { 9941 return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); 9942 } 9943 self._seconds_left = ::std::option::Option::Some(ExtendAuthSessionReply_oneof__seconds_left::seconds_left(is.read_uint32()?)); 9944 }, 9945 _ => { 9946 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 9947 }, 9948 }; 9949 } 9950 ::std::result::Result::Ok(()) 9951 } 9952 9953 // Compute sizes of nested messages 9954 #[allow(unused_variables)] compute_size(&self) -> u329955 fn compute_size(&self) -> u32 { 9956 let mut my_size = 0; 9957 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 9958 my_size += ::protobuf::rt::enum_size(1, self.error); 9959 } 9960 if let Some(ref v) = self.error_info.as_ref() { 9961 let len = v.compute_size(); 9962 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 9963 } 9964 if let ::std::option::Option::Some(ref v) = self._seconds_left { 9965 match v { 9966 &ExtendAuthSessionReply_oneof__seconds_left::seconds_left(v) => { 9967 my_size += ::protobuf::rt::value_size(3, v, ::protobuf::wire_format::WireTypeVarint); 9968 }, 9969 }; 9970 } 9971 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 9972 self.cached_size.set(my_size); 9973 my_size 9974 } 9975 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>9976 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 9977 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 9978 os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; 9979 } 9980 if let Some(ref v) = self.error_info.as_ref() { 9981 os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; 9982 os.write_raw_varint32(v.get_cached_size())?; 9983 v.write_to_with_cached_sizes(os)?; 9984 } 9985 if let ::std::option::Option::Some(ref v) = self._seconds_left { 9986 match v { 9987 &ExtendAuthSessionReply_oneof__seconds_left::seconds_left(v) => { 9988 os.write_uint32(3, v)?; 9989 }, 9990 }; 9991 } 9992 os.write_unknown_fields(self.get_unknown_fields())?; 9993 ::std::result::Result::Ok(()) 9994 } 9995 get_cached_size(&self) -> u329996 fn get_cached_size(&self) -> u32 { 9997 self.cached_size.get() 9998 } 9999 get_unknown_fields(&self) -> &::protobuf::UnknownFields10000 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 10001 &self.unknown_fields 10002 } 10003 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields10004 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 10005 &mut self.unknown_fields 10006 } 10007 as_any(&self) -> &dyn (::std::any::Any)10008 fn as_any(&self) -> &dyn (::std::any::Any) { 10009 self as &dyn (::std::any::Any) 10010 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)10011 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 10012 self as &mut dyn (::std::any::Any) 10013 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>10014 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 10015 self 10016 } 10017 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor10018 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 10019 Self::descriptor_static() 10020 } 10021 new() -> ExtendAuthSessionReply10022 fn new() -> ExtendAuthSessionReply { 10023 ExtendAuthSessionReply::new() 10024 } 10025 default_instance() -> &'static ExtendAuthSessionReply10026 fn default_instance() -> &'static ExtendAuthSessionReply { 10027 static instance: ::protobuf::rt::LazyV2<ExtendAuthSessionReply> = ::protobuf::rt::LazyV2::INIT; 10028 instance.get(ExtendAuthSessionReply::new) 10029 } 10030 } 10031 10032 impl ::protobuf::Clear for ExtendAuthSessionReply { clear(&mut self)10033 fn clear(&mut self) { 10034 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 10035 self.error_info.clear(); 10036 self._seconds_left = ::std::option::Option::None; 10037 self.unknown_fields.clear(); 10038 } 10039 } 10040 10041 impl ::protobuf::reflect::ProtobufValue for ExtendAuthSessionReply { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef10042 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 10043 ::protobuf::reflect::ReflectValueRef::Message(self) 10044 } 10045 } 10046 10047 #[derive(PartialEq,Clone,Default,Debug)] 10048 pub struct UpdateCredentialRequest { 10049 // message fields 10050 pub auth_session_id: ::std::vec::Vec<u8>, 10051 pub old_credential_label: ::std::string::String, 10052 pub authorization: ::protobuf::SingularPtrField<super::rpc::AuthorizationRequest>, 10053 // special fields 10054 pub unknown_fields: ::protobuf::UnknownFields, 10055 pub cached_size: ::protobuf::CachedSize, 10056 } 10057 10058 impl<'a> ::std::default::Default for &'a UpdateCredentialRequest { default() -> &'a UpdateCredentialRequest10059 fn default() -> &'a UpdateCredentialRequest { 10060 <UpdateCredentialRequest as ::protobuf::Message>::default_instance() 10061 } 10062 } 10063 10064 impl UpdateCredentialRequest { new() -> UpdateCredentialRequest10065 pub fn new() -> UpdateCredentialRequest { 10066 ::std::default::Default::default() 10067 } 10068 10069 // bytes auth_session_id = 1; 10070 10071 get_auth_session_id(&self) -> &[u8]10072 pub fn get_auth_session_id(&self) -> &[u8] { 10073 &self.auth_session_id 10074 } clear_auth_session_id(&mut self)10075 pub fn clear_auth_session_id(&mut self) { 10076 self.auth_session_id.clear(); 10077 } 10078 10079 // Param is passed by value, moved set_auth_session_id(&mut self, v: ::std::vec::Vec<u8>)10080 pub fn set_auth_session_id(&mut self, v: ::std::vec::Vec<u8>) { 10081 self.auth_session_id = v; 10082 } 10083 10084 // Mutable pointer to the field. 10085 // If field is not initialized, it is initialized with default value first. mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec<u8>10086 pub fn mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec<u8> { 10087 &mut self.auth_session_id 10088 } 10089 10090 // Take field take_auth_session_id(&mut self) -> ::std::vec::Vec<u8>10091 pub fn take_auth_session_id(&mut self) -> ::std::vec::Vec<u8> { 10092 ::std::mem::replace(&mut self.auth_session_id, ::std::vec::Vec::new()) 10093 } 10094 10095 // string old_credential_label = 2; 10096 10097 get_old_credential_label(&self) -> &str10098 pub fn get_old_credential_label(&self) -> &str { 10099 &self.old_credential_label 10100 } clear_old_credential_label(&mut self)10101 pub fn clear_old_credential_label(&mut self) { 10102 self.old_credential_label.clear(); 10103 } 10104 10105 // Param is passed by value, moved set_old_credential_label(&mut self, v: ::std::string::String)10106 pub fn set_old_credential_label(&mut self, v: ::std::string::String) { 10107 self.old_credential_label = v; 10108 } 10109 10110 // Mutable pointer to the field. 10111 // If field is not initialized, it is initialized with default value first. mut_old_credential_label(&mut self) -> &mut ::std::string::String10112 pub fn mut_old_credential_label(&mut self) -> &mut ::std::string::String { 10113 &mut self.old_credential_label 10114 } 10115 10116 // Take field take_old_credential_label(&mut self) -> ::std::string::String10117 pub fn take_old_credential_label(&mut self) -> ::std::string::String { 10118 ::std::mem::replace(&mut self.old_credential_label, ::std::string::String::new()) 10119 } 10120 10121 // .cryptohome.AuthorizationRequest authorization = 3; 10122 10123 get_authorization(&self) -> &super::rpc::AuthorizationRequest10124 pub fn get_authorization(&self) -> &super::rpc::AuthorizationRequest { 10125 self.authorization.as_ref().unwrap_or_else(|| <super::rpc::AuthorizationRequest as ::protobuf::Message>::default_instance()) 10126 } clear_authorization(&mut self)10127 pub fn clear_authorization(&mut self) { 10128 self.authorization.clear(); 10129 } 10130 has_authorization(&self) -> bool10131 pub fn has_authorization(&self) -> bool { 10132 self.authorization.is_some() 10133 } 10134 10135 // Param is passed by value, moved set_authorization(&mut self, v: super::rpc::AuthorizationRequest)10136 pub fn set_authorization(&mut self, v: super::rpc::AuthorizationRequest) { 10137 self.authorization = ::protobuf::SingularPtrField::some(v); 10138 } 10139 10140 // Mutable pointer to the field. 10141 // If field is not initialized, it is initialized with default value first. mut_authorization(&mut self) -> &mut super::rpc::AuthorizationRequest10142 pub fn mut_authorization(&mut self) -> &mut super::rpc::AuthorizationRequest { 10143 if self.authorization.is_none() { 10144 self.authorization.set_default(); 10145 } 10146 self.authorization.as_mut().unwrap() 10147 } 10148 10149 // Take field take_authorization(&mut self) -> super::rpc::AuthorizationRequest10150 pub fn take_authorization(&mut self) -> super::rpc::AuthorizationRequest { 10151 self.authorization.take().unwrap_or_else(|| super::rpc::AuthorizationRequest::new()) 10152 } 10153 } 10154 10155 impl ::protobuf::Message for UpdateCredentialRequest { is_initialized(&self) -> bool10156 fn is_initialized(&self) -> bool { 10157 for v in &self.authorization { 10158 if !v.is_initialized() { 10159 return false; 10160 } 10161 }; 10162 true 10163 } 10164 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>10165 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 10166 while !is.eof()? { 10167 let (field_number, wire_type) = is.read_tag_unpack()?; 10168 match field_number { 10169 1 => { 10170 ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.auth_session_id)?; 10171 }, 10172 2 => { 10173 ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.old_credential_label)?; 10174 }, 10175 3 => { 10176 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.authorization)?; 10177 }, 10178 _ => { 10179 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 10180 }, 10181 }; 10182 } 10183 ::std::result::Result::Ok(()) 10184 } 10185 10186 // Compute sizes of nested messages 10187 #[allow(unused_variables)] compute_size(&self) -> u3210188 fn compute_size(&self) -> u32 { 10189 let mut my_size = 0; 10190 if !self.auth_session_id.is_empty() { 10191 my_size += ::protobuf::rt::bytes_size(1, &self.auth_session_id); 10192 } 10193 if !self.old_credential_label.is_empty() { 10194 my_size += ::protobuf::rt::string_size(2, &self.old_credential_label); 10195 } 10196 if let Some(ref v) = self.authorization.as_ref() { 10197 let len = v.compute_size(); 10198 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 10199 } 10200 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 10201 self.cached_size.set(my_size); 10202 my_size 10203 } 10204 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>10205 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 10206 if !self.auth_session_id.is_empty() { 10207 os.write_bytes(1, &self.auth_session_id)?; 10208 } 10209 if !self.old_credential_label.is_empty() { 10210 os.write_string(2, &self.old_credential_label)?; 10211 } 10212 if let Some(ref v) = self.authorization.as_ref() { 10213 os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; 10214 os.write_raw_varint32(v.get_cached_size())?; 10215 v.write_to_with_cached_sizes(os)?; 10216 } 10217 os.write_unknown_fields(self.get_unknown_fields())?; 10218 ::std::result::Result::Ok(()) 10219 } 10220 get_cached_size(&self) -> u3210221 fn get_cached_size(&self) -> u32 { 10222 self.cached_size.get() 10223 } 10224 get_unknown_fields(&self) -> &::protobuf::UnknownFields10225 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 10226 &self.unknown_fields 10227 } 10228 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields10229 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 10230 &mut self.unknown_fields 10231 } 10232 as_any(&self) -> &dyn (::std::any::Any)10233 fn as_any(&self) -> &dyn (::std::any::Any) { 10234 self as &dyn (::std::any::Any) 10235 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)10236 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 10237 self as &mut dyn (::std::any::Any) 10238 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>10239 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 10240 self 10241 } 10242 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor10243 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 10244 Self::descriptor_static() 10245 } 10246 new() -> UpdateCredentialRequest10247 fn new() -> UpdateCredentialRequest { 10248 UpdateCredentialRequest::new() 10249 } 10250 default_instance() -> &'static UpdateCredentialRequest10251 fn default_instance() -> &'static UpdateCredentialRequest { 10252 static instance: ::protobuf::rt::LazyV2<UpdateCredentialRequest> = ::protobuf::rt::LazyV2::INIT; 10253 instance.get(UpdateCredentialRequest::new) 10254 } 10255 } 10256 10257 impl ::protobuf::Clear for UpdateCredentialRequest { clear(&mut self)10258 fn clear(&mut self) { 10259 self.auth_session_id.clear(); 10260 self.old_credential_label.clear(); 10261 self.authorization.clear(); 10262 self.unknown_fields.clear(); 10263 } 10264 } 10265 10266 impl ::protobuf::reflect::ProtobufValue for UpdateCredentialRequest { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef10267 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 10268 ::protobuf::reflect::ReflectValueRef::Message(self) 10269 } 10270 } 10271 10272 #[derive(PartialEq,Clone,Default,Debug)] 10273 pub struct UpdateCredentialReply { 10274 // message fields 10275 pub error: CryptohomeErrorCode, 10276 pub error_info: ::protobuf::SingularPtrField<CryptohomeErrorInfo>, 10277 // special fields 10278 pub unknown_fields: ::protobuf::UnknownFields, 10279 pub cached_size: ::protobuf::CachedSize, 10280 } 10281 10282 impl<'a> ::std::default::Default for &'a UpdateCredentialReply { default() -> &'a UpdateCredentialReply10283 fn default() -> &'a UpdateCredentialReply { 10284 <UpdateCredentialReply as ::protobuf::Message>::default_instance() 10285 } 10286 } 10287 10288 impl UpdateCredentialReply { new() -> UpdateCredentialReply10289 pub fn new() -> UpdateCredentialReply { 10290 ::std::default::Default::default() 10291 } 10292 10293 // .user_data_auth.CryptohomeErrorCode error = 1; 10294 10295 get_error(&self) -> CryptohomeErrorCode10296 pub fn get_error(&self) -> CryptohomeErrorCode { 10297 self.error 10298 } clear_error(&mut self)10299 pub fn clear_error(&mut self) { 10300 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 10301 } 10302 10303 // Param is passed by value, moved set_error(&mut self, v: CryptohomeErrorCode)10304 pub fn set_error(&mut self, v: CryptohomeErrorCode) { 10305 self.error = v; 10306 } 10307 10308 // .user_data_auth.CryptohomeErrorInfo error_info = 2; 10309 10310 get_error_info(&self) -> &CryptohomeErrorInfo10311 pub fn get_error_info(&self) -> &CryptohomeErrorInfo { 10312 self.error_info.as_ref().unwrap_or_else(|| <CryptohomeErrorInfo as ::protobuf::Message>::default_instance()) 10313 } clear_error_info(&mut self)10314 pub fn clear_error_info(&mut self) { 10315 self.error_info.clear(); 10316 } 10317 has_error_info(&self) -> bool10318 pub fn has_error_info(&self) -> bool { 10319 self.error_info.is_some() 10320 } 10321 10322 // Param is passed by value, moved set_error_info(&mut self, v: CryptohomeErrorInfo)10323 pub fn set_error_info(&mut self, v: CryptohomeErrorInfo) { 10324 self.error_info = ::protobuf::SingularPtrField::some(v); 10325 } 10326 10327 // Mutable pointer to the field. 10328 // If field is not initialized, it is initialized with default value first. mut_error_info(&mut self) -> &mut CryptohomeErrorInfo10329 pub fn mut_error_info(&mut self) -> &mut CryptohomeErrorInfo { 10330 if self.error_info.is_none() { 10331 self.error_info.set_default(); 10332 } 10333 self.error_info.as_mut().unwrap() 10334 } 10335 10336 // Take field take_error_info(&mut self) -> CryptohomeErrorInfo10337 pub fn take_error_info(&mut self) -> CryptohomeErrorInfo { 10338 self.error_info.take().unwrap_or_else(|| CryptohomeErrorInfo::new()) 10339 } 10340 } 10341 10342 impl ::protobuf::Message for UpdateCredentialReply { is_initialized(&self) -> bool10343 fn is_initialized(&self) -> bool { 10344 for v in &self.error_info { 10345 if !v.is_initialized() { 10346 return false; 10347 } 10348 }; 10349 true 10350 } 10351 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>10352 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 10353 while !is.eof()? { 10354 let (field_number, wire_type) = is.read_tag_unpack()?; 10355 match field_number { 10356 1 => { 10357 ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? 10358 }, 10359 2 => { 10360 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.error_info)?; 10361 }, 10362 _ => { 10363 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 10364 }, 10365 }; 10366 } 10367 ::std::result::Result::Ok(()) 10368 } 10369 10370 // Compute sizes of nested messages 10371 #[allow(unused_variables)] compute_size(&self) -> u3210372 fn compute_size(&self) -> u32 { 10373 let mut my_size = 0; 10374 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 10375 my_size += ::protobuf::rt::enum_size(1, self.error); 10376 } 10377 if let Some(ref v) = self.error_info.as_ref() { 10378 let len = v.compute_size(); 10379 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 10380 } 10381 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 10382 self.cached_size.set(my_size); 10383 my_size 10384 } 10385 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>10386 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 10387 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 10388 os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; 10389 } 10390 if let Some(ref v) = self.error_info.as_ref() { 10391 os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; 10392 os.write_raw_varint32(v.get_cached_size())?; 10393 v.write_to_with_cached_sizes(os)?; 10394 } 10395 os.write_unknown_fields(self.get_unknown_fields())?; 10396 ::std::result::Result::Ok(()) 10397 } 10398 get_cached_size(&self) -> u3210399 fn get_cached_size(&self) -> u32 { 10400 self.cached_size.get() 10401 } 10402 get_unknown_fields(&self) -> &::protobuf::UnknownFields10403 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 10404 &self.unknown_fields 10405 } 10406 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields10407 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 10408 &mut self.unknown_fields 10409 } 10410 as_any(&self) -> &dyn (::std::any::Any)10411 fn as_any(&self) -> &dyn (::std::any::Any) { 10412 self as &dyn (::std::any::Any) 10413 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)10414 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 10415 self as &mut dyn (::std::any::Any) 10416 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>10417 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 10418 self 10419 } 10420 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor10421 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 10422 Self::descriptor_static() 10423 } 10424 new() -> UpdateCredentialReply10425 fn new() -> UpdateCredentialReply { 10426 UpdateCredentialReply::new() 10427 } 10428 default_instance() -> &'static UpdateCredentialReply10429 fn default_instance() -> &'static UpdateCredentialReply { 10430 static instance: ::protobuf::rt::LazyV2<UpdateCredentialReply> = ::protobuf::rt::LazyV2::INIT; 10431 instance.get(UpdateCredentialReply::new) 10432 } 10433 } 10434 10435 impl ::protobuf::Clear for UpdateCredentialReply { clear(&mut self)10436 fn clear(&mut self) { 10437 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 10438 self.error_info.clear(); 10439 self.unknown_fields.clear(); 10440 } 10441 } 10442 10443 impl ::protobuf::reflect::ProtobufValue for UpdateCredentialReply { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef10444 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 10445 ::protobuf::reflect::ReflectValueRef::Message(self) 10446 } 10447 } 10448 10449 #[derive(PartialEq,Clone,Default,Debug)] 10450 pub struct CreatePersistentUserRequest { 10451 // message fields 10452 pub auth_session_id: ::std::vec::Vec<u8>, 10453 // special fields 10454 pub unknown_fields: ::protobuf::UnknownFields, 10455 pub cached_size: ::protobuf::CachedSize, 10456 } 10457 10458 impl<'a> ::std::default::Default for &'a CreatePersistentUserRequest { default() -> &'a CreatePersistentUserRequest10459 fn default() -> &'a CreatePersistentUserRequest { 10460 <CreatePersistentUserRequest as ::protobuf::Message>::default_instance() 10461 } 10462 } 10463 10464 impl CreatePersistentUserRequest { new() -> CreatePersistentUserRequest10465 pub fn new() -> CreatePersistentUserRequest { 10466 ::std::default::Default::default() 10467 } 10468 10469 // bytes auth_session_id = 1; 10470 10471 get_auth_session_id(&self) -> &[u8]10472 pub fn get_auth_session_id(&self) -> &[u8] { 10473 &self.auth_session_id 10474 } clear_auth_session_id(&mut self)10475 pub fn clear_auth_session_id(&mut self) { 10476 self.auth_session_id.clear(); 10477 } 10478 10479 // Param is passed by value, moved set_auth_session_id(&mut self, v: ::std::vec::Vec<u8>)10480 pub fn set_auth_session_id(&mut self, v: ::std::vec::Vec<u8>) { 10481 self.auth_session_id = v; 10482 } 10483 10484 // Mutable pointer to the field. 10485 // If field is not initialized, it is initialized with default value first. mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec<u8>10486 pub fn mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec<u8> { 10487 &mut self.auth_session_id 10488 } 10489 10490 // Take field take_auth_session_id(&mut self) -> ::std::vec::Vec<u8>10491 pub fn take_auth_session_id(&mut self) -> ::std::vec::Vec<u8> { 10492 ::std::mem::replace(&mut self.auth_session_id, ::std::vec::Vec::new()) 10493 } 10494 } 10495 10496 impl ::protobuf::Message for CreatePersistentUserRequest { is_initialized(&self) -> bool10497 fn is_initialized(&self) -> bool { 10498 true 10499 } 10500 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>10501 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 10502 while !is.eof()? { 10503 let (field_number, wire_type) = is.read_tag_unpack()?; 10504 match field_number { 10505 1 => { 10506 ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.auth_session_id)?; 10507 }, 10508 _ => { 10509 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 10510 }, 10511 }; 10512 } 10513 ::std::result::Result::Ok(()) 10514 } 10515 10516 // Compute sizes of nested messages 10517 #[allow(unused_variables)] compute_size(&self) -> u3210518 fn compute_size(&self) -> u32 { 10519 let mut my_size = 0; 10520 if !self.auth_session_id.is_empty() { 10521 my_size += ::protobuf::rt::bytes_size(1, &self.auth_session_id); 10522 } 10523 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 10524 self.cached_size.set(my_size); 10525 my_size 10526 } 10527 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>10528 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 10529 if !self.auth_session_id.is_empty() { 10530 os.write_bytes(1, &self.auth_session_id)?; 10531 } 10532 os.write_unknown_fields(self.get_unknown_fields())?; 10533 ::std::result::Result::Ok(()) 10534 } 10535 get_cached_size(&self) -> u3210536 fn get_cached_size(&self) -> u32 { 10537 self.cached_size.get() 10538 } 10539 get_unknown_fields(&self) -> &::protobuf::UnknownFields10540 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 10541 &self.unknown_fields 10542 } 10543 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields10544 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 10545 &mut self.unknown_fields 10546 } 10547 as_any(&self) -> &dyn (::std::any::Any)10548 fn as_any(&self) -> &dyn (::std::any::Any) { 10549 self as &dyn (::std::any::Any) 10550 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)10551 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 10552 self as &mut dyn (::std::any::Any) 10553 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>10554 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 10555 self 10556 } 10557 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor10558 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 10559 Self::descriptor_static() 10560 } 10561 new() -> CreatePersistentUserRequest10562 fn new() -> CreatePersistentUserRequest { 10563 CreatePersistentUserRequest::new() 10564 } 10565 default_instance() -> &'static CreatePersistentUserRequest10566 fn default_instance() -> &'static CreatePersistentUserRequest { 10567 static instance: ::protobuf::rt::LazyV2<CreatePersistentUserRequest> = ::protobuf::rt::LazyV2::INIT; 10568 instance.get(CreatePersistentUserRequest::new) 10569 } 10570 } 10571 10572 impl ::protobuf::Clear for CreatePersistentUserRequest { clear(&mut self)10573 fn clear(&mut self) { 10574 self.auth_session_id.clear(); 10575 self.unknown_fields.clear(); 10576 } 10577 } 10578 10579 impl ::protobuf::reflect::ProtobufValue for CreatePersistentUserRequest { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef10580 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 10581 ::protobuf::reflect::ReflectValueRef::Message(self) 10582 } 10583 } 10584 10585 #[derive(PartialEq,Clone,Default,Debug)] 10586 pub struct CreatePersistentUserReply { 10587 // message fields 10588 pub error: CryptohomeErrorCode, 10589 pub sanitized_username: ::std::string::String, 10590 pub error_info: ::protobuf::SingularPtrField<CryptohomeErrorInfo>, 10591 // special fields 10592 pub unknown_fields: ::protobuf::UnknownFields, 10593 pub cached_size: ::protobuf::CachedSize, 10594 } 10595 10596 impl<'a> ::std::default::Default for &'a CreatePersistentUserReply { default() -> &'a CreatePersistentUserReply10597 fn default() -> &'a CreatePersistentUserReply { 10598 <CreatePersistentUserReply as ::protobuf::Message>::default_instance() 10599 } 10600 } 10601 10602 impl CreatePersistentUserReply { new() -> CreatePersistentUserReply10603 pub fn new() -> CreatePersistentUserReply { 10604 ::std::default::Default::default() 10605 } 10606 10607 // .user_data_auth.CryptohomeErrorCode error = 1; 10608 10609 get_error(&self) -> CryptohomeErrorCode10610 pub fn get_error(&self) -> CryptohomeErrorCode { 10611 self.error 10612 } clear_error(&mut self)10613 pub fn clear_error(&mut self) { 10614 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 10615 } 10616 10617 // Param is passed by value, moved set_error(&mut self, v: CryptohomeErrorCode)10618 pub fn set_error(&mut self, v: CryptohomeErrorCode) { 10619 self.error = v; 10620 } 10621 10622 // string sanitized_username = 2; 10623 10624 get_sanitized_username(&self) -> &str10625 pub fn get_sanitized_username(&self) -> &str { 10626 &self.sanitized_username 10627 } clear_sanitized_username(&mut self)10628 pub fn clear_sanitized_username(&mut self) { 10629 self.sanitized_username.clear(); 10630 } 10631 10632 // Param is passed by value, moved set_sanitized_username(&mut self, v: ::std::string::String)10633 pub fn set_sanitized_username(&mut self, v: ::std::string::String) { 10634 self.sanitized_username = v; 10635 } 10636 10637 // Mutable pointer to the field. 10638 // If field is not initialized, it is initialized with default value first. mut_sanitized_username(&mut self) -> &mut ::std::string::String10639 pub fn mut_sanitized_username(&mut self) -> &mut ::std::string::String { 10640 &mut self.sanitized_username 10641 } 10642 10643 // Take field take_sanitized_username(&mut self) -> ::std::string::String10644 pub fn take_sanitized_username(&mut self) -> ::std::string::String { 10645 ::std::mem::replace(&mut self.sanitized_username, ::std::string::String::new()) 10646 } 10647 10648 // .user_data_auth.CryptohomeErrorInfo error_info = 3; 10649 10650 get_error_info(&self) -> &CryptohomeErrorInfo10651 pub fn get_error_info(&self) -> &CryptohomeErrorInfo { 10652 self.error_info.as_ref().unwrap_or_else(|| <CryptohomeErrorInfo as ::protobuf::Message>::default_instance()) 10653 } clear_error_info(&mut self)10654 pub fn clear_error_info(&mut self) { 10655 self.error_info.clear(); 10656 } 10657 has_error_info(&self) -> bool10658 pub fn has_error_info(&self) -> bool { 10659 self.error_info.is_some() 10660 } 10661 10662 // Param is passed by value, moved set_error_info(&mut self, v: CryptohomeErrorInfo)10663 pub fn set_error_info(&mut self, v: CryptohomeErrorInfo) { 10664 self.error_info = ::protobuf::SingularPtrField::some(v); 10665 } 10666 10667 // Mutable pointer to the field. 10668 // If field is not initialized, it is initialized with default value first. mut_error_info(&mut self) -> &mut CryptohomeErrorInfo10669 pub fn mut_error_info(&mut self) -> &mut CryptohomeErrorInfo { 10670 if self.error_info.is_none() { 10671 self.error_info.set_default(); 10672 } 10673 self.error_info.as_mut().unwrap() 10674 } 10675 10676 // Take field take_error_info(&mut self) -> CryptohomeErrorInfo10677 pub fn take_error_info(&mut self) -> CryptohomeErrorInfo { 10678 self.error_info.take().unwrap_or_else(|| CryptohomeErrorInfo::new()) 10679 } 10680 } 10681 10682 impl ::protobuf::Message for CreatePersistentUserReply { is_initialized(&self) -> bool10683 fn is_initialized(&self) -> bool { 10684 for v in &self.error_info { 10685 if !v.is_initialized() { 10686 return false; 10687 } 10688 }; 10689 true 10690 } 10691 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>10692 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 10693 while !is.eof()? { 10694 let (field_number, wire_type) = is.read_tag_unpack()?; 10695 match field_number { 10696 1 => { 10697 ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? 10698 }, 10699 2 => { 10700 ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sanitized_username)?; 10701 }, 10702 3 => { 10703 ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.error_info)?; 10704 }, 10705 _ => { 10706 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 10707 }, 10708 }; 10709 } 10710 ::std::result::Result::Ok(()) 10711 } 10712 10713 // Compute sizes of nested messages 10714 #[allow(unused_variables)] compute_size(&self) -> u3210715 fn compute_size(&self) -> u32 { 10716 let mut my_size = 0; 10717 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 10718 my_size += ::protobuf::rt::enum_size(1, self.error); 10719 } 10720 if !self.sanitized_username.is_empty() { 10721 my_size += ::protobuf::rt::string_size(2, &self.sanitized_username); 10722 } 10723 if let Some(ref v) = self.error_info.as_ref() { 10724 let len = v.compute_size(); 10725 my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; 10726 } 10727 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 10728 self.cached_size.set(my_size); 10729 my_size 10730 } 10731 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>10732 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 10733 if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { 10734 os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; 10735 } 10736 if !self.sanitized_username.is_empty() { 10737 os.write_string(2, &self.sanitized_username)?; 10738 } 10739 if let Some(ref v) = self.error_info.as_ref() { 10740 os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; 10741 os.write_raw_varint32(v.get_cached_size())?; 10742 v.write_to_with_cached_sizes(os)?; 10743 } 10744 os.write_unknown_fields(self.get_unknown_fields())?; 10745 ::std::result::Result::Ok(()) 10746 } 10747 get_cached_size(&self) -> u3210748 fn get_cached_size(&self) -> u32 { 10749 self.cached_size.get() 10750 } 10751 get_unknown_fields(&self) -> &::protobuf::UnknownFields10752 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 10753 &self.unknown_fields 10754 } 10755 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields10756 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 10757 &mut self.unknown_fields 10758 } 10759 as_any(&self) -> &dyn (::std::any::Any)10760 fn as_any(&self) -> &dyn (::std::any::Any) { 10761 self as &dyn (::std::any::Any) 10762 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)10763 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 10764 self as &mut dyn (::std::any::Any) 10765 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>10766 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 10767 self 10768 } 10769 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor10770 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 10771 Self::descriptor_static() 10772 } 10773 new() -> CreatePersistentUserReply10774 fn new() -> CreatePersistentUserReply { 10775 CreatePersistentUserReply::new() 10776 } 10777 default_instance() -> &'static CreatePersistentUserReply10778 fn default_instance() -> &'static CreatePersistentUserReply { 10779 static instance: ::protobuf::rt::LazyV2<CreatePersistentUserReply> = ::protobuf::rt::LazyV2::INIT; 10780 instance.get(CreatePersistentUserReply::new) 10781 } 10782 } 10783 10784 impl ::protobuf::Clear for CreatePersistentUserReply { clear(&mut self)10785 fn clear(&mut self) { 10786 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 10787 self.sanitized_username.clear(); 10788 self.error_info.clear(); 10789 self.unknown_fields.clear(); 10790 } 10791 } 10792 10793 impl ::protobuf::reflect::ProtobufValue for CreatePersistentUserReply { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef10794 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 10795 ::protobuf::reflect::ReflectValueRef::Message(self) 10796 } 10797 } 10798 10799 #[derive(PartialEq,Clone,Default,Debug)] 10800 pub struct PrepareGuestVaultRequest { 10801 // special fields 10802 pub unknown_fields: ::protobuf::UnknownFields, 10803 pub cached_size: ::protobuf::CachedSize, 10804 } 10805 10806 impl<'a> ::std::default::Default for &'a PrepareGuestVaultRequest { default() -> &'a PrepareGuestVaultRequest10807 fn default() -> &'a PrepareGuestVaultRequest { 10808 <PrepareGuestVaultRequest as ::protobuf::Message>::default_instance() 10809 } 10810 } 10811 10812 impl PrepareGuestVaultRequest { new() -> PrepareGuestVaultRequest10813 pub fn new() -> PrepareGuestVaultRequest { 10814 ::std::default::Default::default() 10815 } 10816 } 10817 10818 impl ::protobuf::Message for PrepareGuestVaultRequest { is_initialized(&self) -> bool10819 fn is_initialized(&self) -> bool { 10820 true 10821 } 10822 merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()>10823 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { 10824 while !is.eof()? { 10825 let (field_number, wire_type) = is.read_tag_unpack()?; 10826 match field_number { 10827 _ => { 10828 ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; 10829 }, 10830 }; 10831 } 10832 ::std::result::Result::Ok(()) 10833 } 10834 10835 // Compute sizes of nested messages 10836 #[allow(unused_variables)] compute_size(&self) -> u3210837 fn compute_size(&self) -> u32 { 10838 let mut my_size = 0; 10839 my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); 10840 self.cached_size.set(my_size); 10841 my_size 10842 } 10843 write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()>10844 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { 10845 os.write_unknown_fields(self.get_unknown_fields())?; 10846 ::std::result::Result::Ok(()) 10847 } 10848 get_cached_size(&self) -> u3210849 fn get_cached_size(&self) -> u32 { 10850 self.cached_size.get() 10851 } 10852 get_unknown_fields(&self) -> &::protobuf::UnknownFields10853 fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { 10854 &self.unknown_fields 10855 } 10856 mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields10857 fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { 10858 &mut self.unknown_fields 10859 } 10860 as_any(&self) -> &dyn (::std::any::Any)10861 fn as_any(&self) -> &dyn (::std::any::Any) { 10862 self as &dyn (::std::any::Any) 10863 } as_any_mut(&mut self) -> &mut dyn (::std::any::Any)10864 fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { 10865 self as &mut dyn (::std::any::Any) 10866 } into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)>10867 fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> { 10868 self 10869 } 10870 descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor10871 fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { 10872 Self::descriptor_static() 10873 } 10874 new() -> PrepareGuestVaultRequest10875 fn new() -> PrepareGuestVaultRequest { 10876 PrepareGuestVaultRequest::new() 10877 } 10878 default_instance() -> &'static PrepareGuestVaultRequest10879 fn default_instance() -> &'static PrepareGuestVaultRequest { 10880 static instance: ::protobuf::rt::LazyV2<PrepareGuestVaultRequest> = ::protobuf::rt::LazyV2::INIT; 10881 instance.get(PrepareGuestVaultRequest::new) 10882 } 10883 } 10884 10885 impl ::protobuf::Clear for PrepareGuestVaultRequest { clear(&mut self)10886 fn clear(&mut self) { 10887 self.unknown_fields.clear(); 10888 } 10889 } 10890 10891 impl ::protobuf::reflect::ProtobufValue for PrepareGuestVaultRequest { as_ref(&self) -> ::protobuf::reflect::ReflectValueRef10892 fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { 10893 ::protobuf::reflect::ReflectValueRef::Message(self) 10894 } 10895 } 10896 10897 #[derive(PartialEq,Clone,Default,Debug)] 10898 pub struct PrepareGuestVaultReply { 10899 // message fields 10900 pub error: CryptohomeErrorCode, 10901 pub sanitized_username: ::std::string::String, 10902 pub error_info: ::protobuf::SingularPtrField<CryptohomeErrorInfo>, 10903 // special fields 10904 pub unknown_fields: ::protobuf::UnknownFields, 10905 pub cached_size: ::protobuf::CachedSize, 10906 } 10907 10908 impl<'a> ::std::default::Default for &'a PrepareGuestVaultReply { default() -> &'a PrepareGuestVaultReply10909 fn default() -> &'a PrepareGuestVaultReply { 10910 <PrepareGuestVaultReply as ::protobuf::Message>::default_instance() 10911 } 10912 } 10913 10914 impl PrepareGuestVaultReply { new() -> PrepareGuestVaultReply10915 pub fn new() -> PrepareGuestVaultReply { 10916 ::std::default::Default::default() 10917 } 10918 10919 // .user_data_auth.CryptohomeErrorCode error = 1; 10920 10921 get_error(&self) -> CryptohomeErrorCode10922 pub fn get_error(&self) -> CryptohomeErrorCode { 10923 self.error 10924 } clear_error(&mut self)10925 pub fn clear_error(&mut self) { 10926 self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; 10927 } 10928 10929 // Param is passed by value, moved set_error(&mut self, v: CryptohomeErrorCode)10930 pub fn set_error(&mut self, v: CryptohomeErrorCode) { 10931 self.error = v; 10932 } 10933 10934 // string sanitized_username = 2; 10935 10936 get_sanitized_username(&self) -> &str10937 pub fn get_sanitized_username(&self) -> &str { 10938 &self.sanitized_username 10939 } clear_sanitized_username(&mut self)10940