Skip to content

Commit

Permalink
devired_key: cleaning pass #10
Browse files Browse the repository at this point in the history
  • Loading branch information
eldios committed Jan 28, 2025
1 parent 4c99015 commit b2f52de
Showing 1 changed file with 28 additions and 9 deletions.
37 changes: 28 additions & 9 deletions api-server-rest/src/ttrpc_proto/attestation_agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,9 @@ impl ::protobuf::reflect::ProtobufValue for GetTokenResponse {
// @@protoc_insertion_point(message:attestation_agent.GetDerivedKeyRequest)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct GetDerivedKeyRequest {
// message fields
// @@protoc_insertion_point(field:attestation_agent.GetDerivedKeyRequest.KeyId)
pub KeyId: ::std::vec::Vec<u8>,
// special fields
// @@protoc_insertion_point(special_field:attestation_agent.GetDerivedKeyRequest.special_fields)
pub special_fields: ::protobuf::SpecialFields,
Expand All @@ -532,8 +535,13 @@ impl GetDerivedKeyRequest {
}

fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(0);
let mut fields = ::std::vec::Vec::with_capacity(1);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"KeyId",
|m: &GetDerivedKeyRequest| { &m.KeyId },
|m: &mut GetDerivedKeyRequest| { &mut m.KeyId },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<GetDerivedKeyRequest>(
"GetDerivedKeyRequest",
fields,
Expand All @@ -552,6 +560,9 @@ impl ::protobuf::Message for GetDerivedKeyRequest {
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
10 => {
self.KeyId = is.read_bytes()?;
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
Expand All @@ -564,12 +575,18 @@ impl ::protobuf::Message for GetDerivedKeyRequest {
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if !self.KeyId.is_empty() {
my_size += ::protobuf::rt::bytes_size(1, &self.KeyId);
}
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}

fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
if !self.KeyId.is_empty() {
os.write_bytes(1, &self.KeyId)?;
}
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
Expand All @@ -587,11 +604,13 @@ impl ::protobuf::Message for GetDerivedKeyRequest {
}

fn clear(&mut self) {
self.KeyId.clear();
self.special_fields.clear();
}

fn default_instance() -> &'static GetDerivedKeyRequest {
static instance: GetDerivedKeyRequest = GetDerivedKeyRequest {
KeyId: ::std::vec::Vec::new(),
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
Expand Down Expand Up @@ -743,14 +762,14 @@ static file_descriptor_proto_data: &'static [u8] = b"\
\"1\n\x13GetEvidenceResponse\x12\x1a\n\x08Evidence\x18\x01\x20\x01(\x0cR\
\x08Evidence\"/\n\x0fGetTokenRequest\x12\x1c\n\tTokenType\x18\x01\x20\
\x01(\tR\tTokenType\"(\n\x10GetTokenResponse\x12\x14\n\x05Token\x18\x01\
\x20\x01(\x0cR\x05Token\"\x16\n\x14GetDerivedKeyRequest\"7\n\x15GetDeriv\
edKeyResponse\x12\x1e\n\nDerivedKey\x18\x01\x20\x01(\x0cR\nDerivedKey2\
\xb0\x02\n\x17AttestationAgentService\x12b\n\rGetDerivedKey\x12'.attesta\
tion_agent.GetDerivedKeyRequest\x1a(.attestation_agent.GetDerivedKeyResp\
onse\x12\\\n\x0bGetEvidence\x12%.attestation_agent.GetEvidenceRequest\
\x1a&.attestation_agent.GetEvidenceResponse\x12S\n\x08GetToken\x12\".att\
estation_agent.GetTokenRequest\x1a#.attestation_agent.GetTokenResponseb\
\x06proto3\
\x20\x01(\x0cR\x05Token\",\n\x14GetDerivedKeyRequest\x12\x14\n\x05KeyId\
\x18\x01\x20\x01(\x0cR\x05KeyId\"7\n\x15GetDerivedKeyResponse\x12\x1e\n\
\nDerivedKey\x18\x01\x20\x01(\x0cR\nDerivedKey2\xb0\x02\n\x17Attestation\
AgentService\x12b\n\rGetDerivedKey\x12'.attestation_agent.GetDerivedKeyR\
equest\x1a(.attestation_agent.GetDerivedKeyResponse\x12\\\n\x0bGetEviden\
ce\x12%.attestation_agent.GetEvidenceRequest\x1a&.attestation_agent.GetE\
videnceResponse\x12S\n\x08GetToken\x12\".attestation_agent.GetTokenReque\
st\x1a#.attestation_agent.GetTokenResponseb\x06proto3\
";

/// `FileDescriptorProto` object which was a source for this generated file
Expand Down

0 comments on commit b2f52de

Please sign in to comment.