pub mod proto {pub mod transform {
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unsafe_code)]
#![allow(unused_imports)]
#![allow(unused_results)]
use protobuf::Message as Message_imported_for_functions;
use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
#[derive(PartialEq,Clone,Default)]
pub struct PublicKey {
pub x: ::bytes::Bytes,
pub y: ::bytes::Bytes,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a PublicKey {
fn default() -> &'a PublicKey {
<PublicKey as ::protobuf::Message>::default_instance()
}
}
impl PublicKey {
pub fn new() -> PublicKey {
::std::default::Default::default()
}
pub fn get_x(&self) -> &[u8] {
&self.x
}
pub fn clear_x(&mut self) {
self.x.clear();
}
pub fn set_x(&mut self, v: ::bytes::Bytes) {
self.x = v;
}
pub fn mut_x(&mut self) -> &mut ::bytes::Bytes {
&mut self.x
}
pub fn take_x(&mut self) -> ::bytes::Bytes {
::std::mem::replace(&mut self.x, ::bytes::Bytes::new())
}
pub fn get_y(&self) -> &[u8] {
&self.y
}
pub fn clear_y(&mut self) {
self.y.clear();
}
pub fn set_y(&mut self, v: ::bytes::Bytes) {
self.y = v;
}
pub fn mut_y(&mut self) -> &mut ::bytes::Bytes {
&mut self.y
}
pub fn take_y(&mut self) -> ::bytes::Bytes {
::std::mem::replace(&mut self.y, ::bytes::Bytes::new())
}
}
impl ::protobuf::Message for PublicKey {
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_singular_proto3_carllerche_bytes_into(wire_type, is, &mut self.x)?;
},
2 => {
::protobuf::rt::read_singular_proto3_carllerche_bytes_into(wire_type, is, &mut self.y)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if !self.x.is_empty() {
my_size += ::protobuf::rt::bytes_size(1, &self.x);
}
if !self.y.is_empty() {
my_size += ::protobuf::rt::bytes_size(2, &self.y);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if !self.x.is_empty() {
os.write_bytes(1, &self.x)?;
}
if !self.y.is_empty() {
os.write_bytes(2, &self.y)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> PublicKey {
PublicKey::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeCarllercheBytes>(
"x",
|m: &PublicKey| { &m.x },
|m: &mut PublicKey| { &mut m.x },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeCarllercheBytes>(
"y",
|m: &PublicKey| { &m.y },
|m: &mut PublicKey| { &mut m.y },
));
::protobuf::reflect::MessageDescriptor::new::<PublicKey>(
"PublicKey",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static PublicKey {
static mut instance: ::protobuf::lazy::Lazy<PublicKey> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const PublicKey,
};
unsafe {
instance.get(PublicKey::new)
}
}
}
impl ::protobuf::Clear for PublicKey {
fn clear(&mut self) {
self.x.clear();
self.y.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for PublicKey {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for PublicKey {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct UserOrGroup {
pub masterPublicKey: ::protobuf::SingularPtrField<PublicKey>,
pub UserOrGroupId: ::std::option::Option<UserOrGroup_oneof_UserOrGroupId>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a UserOrGroup {
fn default() -> &'a UserOrGroup {
<UserOrGroup as ::protobuf::Message>::default_instance()
}
}
#[derive(Clone,PartialEq,Debug)]
pub enum UserOrGroup_oneof_UserOrGroupId {
userId(::protobuf::Chars),
groupId(::protobuf::Chars),
}
impl UserOrGroup {
pub fn new() -> UserOrGroup {
::std::default::Default::default()
}
pub fn get_masterPublicKey(&self) -> &PublicKey {
self.masterPublicKey.as_ref().unwrap_or_else(|| PublicKey::default_instance())
}
pub fn clear_masterPublicKey(&mut self) {
self.masterPublicKey.clear();
}
pub fn has_masterPublicKey(&self) -> bool {
self.masterPublicKey.is_some()
}
pub fn set_masterPublicKey(&mut self, v: PublicKey) {
self.masterPublicKey = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_masterPublicKey(&mut self) -> &mut PublicKey {
if self.masterPublicKey.is_none() {
self.masterPublicKey.set_default();
}
self.masterPublicKey.as_mut().unwrap()
}
pub fn take_masterPublicKey(&mut self) -> PublicKey {
self.masterPublicKey.take().unwrap_or_else(|| PublicKey::new())
}
pub fn get_userId(&self) -> &str {
match self.UserOrGroupId {
::std::option::Option::Some(UserOrGroup_oneof_UserOrGroupId::userId(ref v)) => v,
_ => "",
}
}
pub fn clear_userId(&mut self) {
self.UserOrGroupId = ::std::option::Option::None;
}
pub fn has_userId(&self) -> bool {
match self.UserOrGroupId {
::std::option::Option::Some(UserOrGroup_oneof_UserOrGroupId::userId(..)) => true,
_ => false,
}
}
pub fn set_userId(&mut self, v: ::protobuf::Chars) {
self.UserOrGroupId = ::std::option::Option::Some(UserOrGroup_oneof_UserOrGroupId::userId(v))
}
pub fn mut_userId(&mut self) -> &mut ::protobuf::Chars {
if let ::std::option::Option::Some(UserOrGroup_oneof_UserOrGroupId::userId(_)) = self.UserOrGroupId {
} else {
self.UserOrGroupId = ::std::option::Option::Some(UserOrGroup_oneof_UserOrGroupId::userId(::protobuf::Chars::new()));
}
match self.UserOrGroupId {
::std::option::Option::Some(UserOrGroup_oneof_UserOrGroupId::userId(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_userId(&mut self) -> ::protobuf::Chars {
if self.has_userId() {
match self.UserOrGroupId.take() {
::std::option::Option::Some(UserOrGroup_oneof_UserOrGroupId::userId(v)) => v,
_ => panic!(),
}
} else {
::protobuf::Chars::new()
}
}
pub fn get_groupId(&self) -> &str {
match self.UserOrGroupId {
::std::option::Option::Some(UserOrGroup_oneof_UserOrGroupId::groupId(ref v)) => v,
_ => "",
}
}
pub fn clear_groupId(&mut self) {
self.UserOrGroupId = ::std::option::Option::None;
}
pub fn has_groupId(&self) -> bool {
match self.UserOrGroupId {
::std::option::Option::Some(UserOrGroup_oneof_UserOrGroupId::groupId(..)) => true,
_ => false,
}
}
pub fn set_groupId(&mut self, v: ::protobuf::Chars) {
self.UserOrGroupId = ::std::option::Option::Some(UserOrGroup_oneof_UserOrGroupId::groupId(v))
}
pub fn mut_groupId(&mut self) -> &mut ::protobuf::Chars {
if let ::std::option::Option::Some(UserOrGroup_oneof_UserOrGroupId::groupId(_)) = self.UserOrGroupId {
} else {
self.UserOrGroupId = ::std::option::Option::Some(UserOrGroup_oneof_UserOrGroupId::groupId(::protobuf::Chars::new()));
}
match self.UserOrGroupId {
::std::option::Option::Some(UserOrGroup_oneof_UserOrGroupId::groupId(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_groupId(&mut self) -> ::protobuf::Chars {
if self.has_groupId() {
match self.UserOrGroupId.take() {
::std::option::Option::Some(UserOrGroup_oneof_UserOrGroupId::groupId(v)) => v,
_ => panic!(),
}
} else {
::protobuf::Chars::new()
}
}
}
impl ::protobuf::Message for UserOrGroup {
fn is_initialized(&self) -> bool {
for v in &self.masterPublicKey {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
3 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.masterPublicKey)?;
},
1 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.UserOrGroupId = ::std::option::Option::Some(UserOrGroup_oneof_UserOrGroupId::userId(is.read_carllerche_chars()?));
},
2 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.UserOrGroupId = ::std::option::Option::Some(UserOrGroup_oneof_UserOrGroupId::groupId(is.read_carllerche_chars()?));
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let Some(ref v) = self.masterPublicKey.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if let ::std::option::Option::Some(ref v) = self.UserOrGroupId {
match v {
&UserOrGroup_oneof_UserOrGroupId::userId(ref v) => {
my_size += ::protobuf::rt::string_size(1, &v);
},
&UserOrGroup_oneof_UserOrGroupId::groupId(ref v) => {
my_size += ::protobuf::rt::string_size(2, &v);
},
};
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if let Some(ref v) = self.masterPublicKey.as_ref() {
os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if let ::std::option::Option::Some(ref v) = self.UserOrGroupId {
match v {
&UserOrGroup_oneof_UserOrGroupId::userId(ref v) => {
os.write_string(1, v)?;
},
&UserOrGroup_oneof_UserOrGroupId::groupId(ref v) => {
os.write_string(2, v)?;
},
};
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> UserOrGroup {
UserOrGroup::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<PublicKey>>(
"masterPublicKey",
|m: &UserOrGroup| { &m.masterPublicKey },
|m: &mut UserOrGroup| { &mut m.masterPublicKey },
));
fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
"userId",
UserOrGroup::has_userId,
UserOrGroup::get_userId,
));
fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
"groupId",
UserOrGroup::has_groupId,
UserOrGroup::get_groupId,
));
::protobuf::reflect::MessageDescriptor::new::<UserOrGroup>(
"UserOrGroup",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static UserOrGroup {
static mut instance: ::protobuf::lazy::Lazy<UserOrGroup> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const UserOrGroup,
};
unsafe {
instance.get(UserOrGroup::new)
}
}
}
impl ::protobuf::Clear for UserOrGroup {
fn clear(&mut self) {
self.masterPublicKey.clear();
self.UserOrGroupId = ::std::option::Option::None;
self.UserOrGroupId = ::std::option::Option::None;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for UserOrGroup {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for UserOrGroup {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct EncryptedDekData {
pub encryptedBytes: ::bytes::Bytes,
pub ephemeralPublicKey: ::protobuf::SingularPtrField<PublicKey>,
pub signature: ::bytes::Bytes,
pub authHash: ::bytes::Bytes,
pub publicSigningKey: ::bytes::Bytes,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a EncryptedDekData {
fn default() -> &'a EncryptedDekData {
<EncryptedDekData as ::protobuf::Message>::default_instance()
}
}
impl EncryptedDekData {
pub fn new() -> EncryptedDekData {
::std::default::Default::default()
}
pub fn get_encryptedBytes(&self) -> &[u8] {
&self.encryptedBytes
}
pub fn clear_encryptedBytes(&mut self) {
self.encryptedBytes.clear();
}
pub fn set_encryptedBytes(&mut self, v: ::bytes::Bytes) {
self.encryptedBytes = v;
}
pub fn mut_encryptedBytes(&mut self) -> &mut ::bytes::Bytes {
&mut self.encryptedBytes
}
pub fn take_encryptedBytes(&mut self) -> ::bytes::Bytes {
::std::mem::replace(&mut self.encryptedBytes, ::bytes::Bytes::new())
}
pub fn get_ephemeralPublicKey(&self) -> &PublicKey {
self.ephemeralPublicKey.as_ref().unwrap_or_else(|| PublicKey::default_instance())
}
pub fn clear_ephemeralPublicKey(&mut self) {
self.ephemeralPublicKey.clear();
}
pub fn has_ephemeralPublicKey(&self) -> bool {
self.ephemeralPublicKey.is_some()
}
pub fn set_ephemeralPublicKey(&mut self, v: PublicKey) {
self.ephemeralPublicKey = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_ephemeralPublicKey(&mut self) -> &mut PublicKey {
if self.ephemeralPublicKey.is_none() {
self.ephemeralPublicKey.set_default();
}
self.ephemeralPublicKey.as_mut().unwrap()
}
pub fn take_ephemeralPublicKey(&mut self) -> PublicKey {
self.ephemeralPublicKey.take().unwrap_or_else(|| PublicKey::new())
}
pub fn get_signature(&self) -> &[u8] {
&self.signature
}
pub fn clear_signature(&mut self) {
self.signature.clear();
}
pub fn set_signature(&mut self, v: ::bytes::Bytes) {
self.signature = v;
}
pub fn mut_signature(&mut self) -> &mut ::bytes::Bytes {
&mut self.signature
}
pub fn take_signature(&mut self) -> ::bytes::Bytes {
::std::mem::replace(&mut self.signature, ::bytes::Bytes::new())
}
pub fn get_authHash(&self) -> &[u8] {
&self.authHash
}
pub fn clear_authHash(&mut self) {
self.authHash.clear();
}
pub fn set_authHash(&mut self, v: ::bytes::Bytes) {
self.authHash = v;
}
pub fn mut_authHash(&mut self) -> &mut ::bytes::Bytes {
&mut self.authHash
}
pub fn take_authHash(&mut self) -> ::bytes::Bytes {
::std::mem::replace(&mut self.authHash, ::bytes::Bytes::new())
}
pub fn get_publicSigningKey(&self) -> &[u8] {
&self.publicSigningKey
}
pub fn clear_publicSigningKey(&mut self) {
self.publicSigningKey.clear();
}
pub fn set_publicSigningKey(&mut self, v: ::bytes::Bytes) {
self.publicSigningKey = v;
}
pub fn mut_publicSigningKey(&mut self) -> &mut ::bytes::Bytes {
&mut self.publicSigningKey
}
pub fn take_publicSigningKey(&mut self) -> ::bytes::Bytes {
::std::mem::replace(&mut self.publicSigningKey, ::bytes::Bytes::new())
}
}
impl ::protobuf::Message for EncryptedDekData {
fn is_initialized(&self) -> bool {
for v in &self.ephemeralPublicKey {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_singular_proto3_carllerche_bytes_into(wire_type, is, &mut self.encryptedBytes)?;
},
2 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.ephemeralPublicKey)?;
},
3 => {
::protobuf::rt::read_singular_proto3_carllerche_bytes_into(wire_type, is, &mut self.signature)?;
},
4 => {
::protobuf::rt::read_singular_proto3_carllerche_bytes_into(wire_type, is, &mut self.authHash)?;
},
5 => {
::protobuf::rt::read_singular_proto3_carllerche_bytes_into(wire_type, is, &mut self.publicSigningKey)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if !self.encryptedBytes.is_empty() {
my_size += ::protobuf::rt::bytes_size(1, &self.encryptedBytes);
}
if let Some(ref v) = self.ephemeralPublicKey.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if !self.signature.is_empty() {
my_size += ::protobuf::rt::bytes_size(3, &self.signature);
}
if !self.authHash.is_empty() {
my_size += ::protobuf::rt::bytes_size(4, &self.authHash);
}
if !self.publicSigningKey.is_empty() {
my_size += ::protobuf::rt::bytes_size(5, &self.publicSigningKey);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if !self.encryptedBytes.is_empty() {
os.write_bytes(1, &self.encryptedBytes)?;
}
if let Some(ref v) = self.ephemeralPublicKey.as_ref() {
os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if !self.signature.is_empty() {
os.write_bytes(3, &self.signature)?;
}
if !self.authHash.is_empty() {
os.write_bytes(4, &self.authHash)?;
}
if !self.publicSigningKey.is_empty() {
os.write_bytes(5, &self.publicSigningKey)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> EncryptedDekData {
EncryptedDekData::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeCarllercheBytes>(
"encryptedBytes",
|m: &EncryptedDekData| { &m.encryptedBytes },
|m: &mut EncryptedDekData| { &mut m.encryptedBytes },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<PublicKey>>(
"ephemeralPublicKey",
|m: &EncryptedDekData| { &m.ephemeralPublicKey },
|m: &mut EncryptedDekData| { &mut m.ephemeralPublicKey },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeCarllercheBytes>(
"signature",
|m: &EncryptedDekData| { &m.signature },
|m: &mut EncryptedDekData| { &mut m.signature },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeCarllercheBytes>(
"authHash",
|m: &EncryptedDekData| { &m.authHash },
|m: &mut EncryptedDekData| { &mut m.authHash },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeCarllercheBytes>(
"publicSigningKey",
|m: &EncryptedDekData| { &m.publicSigningKey },
|m: &mut EncryptedDekData| { &mut m.publicSigningKey },
));
::protobuf::reflect::MessageDescriptor::new::<EncryptedDekData>(
"EncryptedDekData",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static EncryptedDekData {
static mut instance: ::protobuf::lazy::Lazy<EncryptedDekData> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const EncryptedDekData,
};
unsafe {
instance.get(EncryptedDekData::new)
}
}
}
impl ::protobuf::Clear for EncryptedDekData {
fn clear(&mut self) {
self.encryptedBytes.clear();
self.ephemeralPublicKey.clear();
self.signature.clear();
self.authHash.clear();
self.publicSigningKey.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for EncryptedDekData {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for EncryptedDekData {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct EncryptedDek {
pub userOrGroup: ::protobuf::SingularPtrField<UserOrGroup>,
pub encryptedDekData: ::protobuf::SingularPtrField<EncryptedDekData>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a EncryptedDek {
fn default() -> &'a EncryptedDek {
<EncryptedDek as ::protobuf::Message>::default_instance()
}
}
impl EncryptedDek {
pub fn new() -> EncryptedDek {
::std::default::Default::default()
}
pub fn get_userOrGroup(&self) -> &UserOrGroup {
self.userOrGroup.as_ref().unwrap_or_else(|| UserOrGroup::default_instance())
}
pub fn clear_userOrGroup(&mut self) {
self.userOrGroup.clear();
}
pub fn has_userOrGroup(&self) -> bool {
self.userOrGroup.is_some()
}
pub fn set_userOrGroup(&mut self, v: UserOrGroup) {
self.userOrGroup = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_userOrGroup(&mut self) -> &mut UserOrGroup {
if self.userOrGroup.is_none() {
self.userOrGroup.set_default();
}
self.userOrGroup.as_mut().unwrap()
}
pub fn take_userOrGroup(&mut self) -> UserOrGroup {
self.userOrGroup.take().unwrap_or_else(|| UserOrGroup::new())
}
pub fn get_encryptedDekData(&self) -> &EncryptedDekData {
self.encryptedDekData.as_ref().unwrap_or_else(|| EncryptedDekData::default_instance())
}
pub fn clear_encryptedDekData(&mut self) {
self.encryptedDekData.clear();
}
pub fn has_encryptedDekData(&self) -> bool {
self.encryptedDekData.is_some()
}
pub fn set_encryptedDekData(&mut self, v: EncryptedDekData) {
self.encryptedDekData = ::protobuf::SingularPtrField::some(v);
}
pub fn mut_encryptedDekData(&mut self) -> &mut EncryptedDekData {
if self.encryptedDekData.is_none() {
self.encryptedDekData.set_default();
}
self.encryptedDekData.as_mut().unwrap()
}
pub fn take_encryptedDekData(&mut self) -> EncryptedDekData {
self.encryptedDekData.take().unwrap_or_else(|| EncryptedDekData::new())
}
}
impl ::protobuf::Message for EncryptedDek {
fn is_initialized(&self) -> bool {
for v in &self.userOrGroup {
if !v.is_initialized() {
return false;
}
};
for v in &self.encryptedDekData {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.userOrGroup)?;
},
2 => {
::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.encryptedDekData)?;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if let Some(ref v) = self.userOrGroup.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
if let Some(ref v) = self.encryptedDekData.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
if let Some(ref v) = self.userOrGroup.as_ref() {
os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
if let Some(ref v) = self.encryptedDekData.as_ref() {
os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> EncryptedDek {
EncryptedDek::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<UserOrGroup>>(
"userOrGroup",
|m: &EncryptedDek| { &m.userOrGroup },
|m: &mut EncryptedDek| { &mut m.userOrGroup },
));
fields.push(::protobuf::reflect::accessor::make_singular_ptr_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<EncryptedDekData>>(
"encryptedDekData",
|m: &EncryptedDek| { &m.encryptedDekData },
|m: &mut EncryptedDek| { &mut m.encryptedDekData },
));
::protobuf::reflect::MessageDescriptor::new::<EncryptedDek>(
"EncryptedDek",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static EncryptedDek {
static mut instance: ::protobuf::lazy::Lazy<EncryptedDek> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const EncryptedDek,
};
unsafe {
instance.get(EncryptedDek::new)
}
}
}
impl ::protobuf::Clear for EncryptedDek {
fn clear(&mut self) {
self.userOrGroup.clear();
self.encryptedDekData.clear();
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for EncryptedDek {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for EncryptedDek {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct EncryptedDeks {
pub edeks: ::protobuf::RepeatedField<EncryptedDek>,
pub documentId: ::protobuf::Chars,
pub segmentId: i32,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a EncryptedDeks {
fn default() -> &'a EncryptedDeks {
<EncryptedDeks as ::protobuf::Message>::default_instance()
}
}
impl EncryptedDeks {
pub fn new() -> EncryptedDeks {
::std::default::Default::default()
}
pub fn get_edeks(&self) -> &[EncryptedDek] {
&self.edeks
}
pub fn clear_edeks(&mut self) {
self.edeks.clear();
}
pub fn set_edeks(&mut self, v: ::protobuf::RepeatedField<EncryptedDek>) {
self.edeks = v;
}
pub fn mut_edeks(&mut self) -> &mut ::protobuf::RepeatedField<EncryptedDek> {
&mut self.edeks
}
pub fn take_edeks(&mut self) -> ::protobuf::RepeatedField<EncryptedDek> {
::std::mem::replace(&mut self.edeks, ::protobuf::RepeatedField::new())
}
pub fn get_documentId(&self) -> &str {
&self.documentId
}
pub fn clear_documentId(&mut self) {
::protobuf::Clear::clear(&mut self.documentId);
}
pub fn set_documentId(&mut self, v: ::protobuf::Chars) {
self.documentId = v;
}
pub fn mut_documentId(&mut self) -> &mut ::protobuf::Chars {
&mut self.documentId
}
pub fn take_documentId(&mut self) -> ::protobuf::Chars {
::std::mem::replace(&mut self.documentId, ::protobuf::Chars::new())
}
pub fn get_segmentId(&self) -> i32 {
self.segmentId
}
pub fn clear_segmentId(&mut self) {
self.segmentId = 0;
}
pub fn set_segmentId(&mut self, v: i32) {
self.segmentId = v;
}
}
impl ::protobuf::Message for EncryptedDeks {
fn is_initialized(&self) -> bool {
for v in &self.edeks {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
while !is.eof()? {
let (field_number, wire_type) = is.read_tag_unpack()?;
match field_number {
1 => {
::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.edeks)?;
},
2 => {
::protobuf::rt::read_singular_proto3_carllerche_string_into(wire_type, is, &mut self.documentId)?;
},
3 => {
if wire_type != ::protobuf::wire_format::WireTypeVarint {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
let tmp = is.read_int32()?;
self.segmentId = tmp;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
for value in &self.edeks {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
};
if !self.documentId.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.documentId);
}
if self.segmentId != 0 {
my_size += ::protobuf::rt::value_size(3, self.segmentId, ::protobuf::wire_format::WireTypeVarint);
}
my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
self.cached_size.set(my_size);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
for v in &self.edeks {
os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
};
if !self.documentId.is_empty() {
os.write_string(2, &self.documentId)?;
}
if self.segmentId != 0 {
os.write_int32(3, self.segmentId)?;
}
os.write_unknown_fields(self.get_unknown_fields())?;
::std::result::Result::Ok(())
}
fn get_cached_size(&self) -> u32 {
self.cached_size.get()
}
fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
&self.unknown_fields
}
fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
&mut self.unknown_fields
}
fn as_any(&self) -> &dyn (::std::any::Any) {
self as &dyn (::std::any::Any)
}
fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
self as &mut dyn (::std::any::Any)
}
fn into_any(self: Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
self
}
fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
Self::descriptor_static()
}
fn new() -> EncryptedDeks {
EncryptedDeks::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static mut descriptor: ::protobuf::lazy::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::reflect::MessageDescriptor,
};
unsafe {
descriptor.get(|| {
let mut fields = ::std::vec::Vec::new();
fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<EncryptedDek>>(
"edeks",
|m: &EncryptedDeks| { &m.edeks },
|m: &mut EncryptedDeks| { &mut m.edeks },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeCarllercheChars>(
"documentId",
|m: &EncryptedDeks| { &m.documentId },
|m: &mut EncryptedDeks| { &mut m.documentId },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeInt32>(
"segmentId",
|m: &EncryptedDeks| { &m.segmentId },
|m: &mut EncryptedDeks| { &mut m.segmentId },
));
::protobuf::reflect::MessageDescriptor::new::<EncryptedDeks>(
"EncryptedDeks",
fields,
file_descriptor_proto()
)
})
}
}
fn default_instance() -> &'static EncryptedDeks {
static mut instance: ::protobuf::lazy::Lazy<EncryptedDeks> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const EncryptedDeks,
};
unsafe {
instance.get(EncryptedDeks::new)
}
}
}
impl ::protobuf::Clear for EncryptedDeks {
fn clear(&mut self) {
self.edeks.clear();
::protobuf::Clear::clear(&mut self.documentId);
self.segmentId = 0;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for EncryptedDeks {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for EncryptedDeks {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Message(self)
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x0ftransform.proto\x12\x12ironcorelabs.proto\"'\n\tPublicKey\x12\x0b\
\n\x01x\x18\x01\x20\x01(\x0cB\0\x12\x0b\n\x01y\x18\x02\x20\x01(\x0cB\0:\
\0\"\x83\x01\n\x0bUserOrGroup\x128\n\x0fmasterPublicKey\x18\x03\x20\x01(\
\x0b2\x1d.ironcorelabs.proto.PublicKeyB\0\x12\x12\n\x06userId\x18\x01\
\x20\x01(\tH\0B\0\x12\x13\n\x07groupId\x18\x02\x20\x01(\tH\0B\0B\x0f\n\r\
UserOrGroupId:\0\"\xb0\x01\n\x10EncryptedDekData\x12\x18\n\x0eencryptedB\
ytes\x18\x01\x20\x01(\x0cB\0\x12;\n\x12ephemeralPublicKey\x18\x02\x20\
\x01(\x0b2\x1d.ironcorelabs.proto.PublicKeyB\0\x12\x13\n\tsignature\x18\
\x03\x20\x01(\x0cB\0\x12\x12\n\x08authHash\x18\x04\x20\x01(\x0cB\0\x12\
\x1a\n\x10publicSigningKey\x18\x05\x20\x01(\x0cB\0:\0\"\x8a\x01\n\x0cEnc\
ryptedDek\x126\n\x0buserOrGroup\x18\x01\x20\x01(\x0b2\x1f.ironcorelabs.p\
roto.UserOrGroupB\0\x12@\n\x10encryptedDekData\x18\x02\x20\x01(\x0b2$.ir\
oncorelabs.proto.EncryptedDekDataB\0:\0\"o\n\rEncryptedDeks\x121\n\x05ed\
eks\x18\x01\x20\x03(\x0b2\x20.ironcorelabs.proto.EncryptedDekB\0\x12\x14\
\n\ndocumentId\x18\x02\x20\x01(\tB\0\x12\x13\n\tsegmentId\x18\x03\x20\
\x01(\x05B\0:\0B\0b\x06proto3\
";
static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {
lock: ::protobuf::lazy::ONCE_INIT,
ptr: 0 as *const ::protobuf::descriptor::FileDescriptorProto,
};
fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
::protobuf::parse_from_bytes(file_descriptor_proto_data).unwrap()
}
pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
unsafe {
file_descriptor_proto_lazy.get(|| {
parse_descriptor_proto()
})
}
}
}}