// This file is generated by rust-protobuf 3.7.2. Do not edit // .proto file is parsed by protoc 24.4 // @generated // https://github.com/rust-lang/rust-clippy/issues/702 #![allow(unknown_lints)] #![allow(clippy::all)] #![allow(unused_attributes)] #![cfg_attr(rustfmt, rustfmt::skip)] #![allow(dead_code)] #![allow(missing_docs)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] #![allow(non_upper_case_globals)] #![allow(trivial_casts)] #![allow(unused_results)] #![allow(unused_mut)] //! Generated file from `in_toto_attestation/predicates/scai/v0/scai.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_2; use crate::v1::resource_descriptor; // @@protoc_insertion_point(message:in_toto_attestation.predicates.scai.v0.AttributeAssertion) #[derive(PartialEq,Clone,Default,Debug)] pub struct AttributeAssertion { // message fields // @@protoc_insertion_point(field:in_toto_attestation.predicates.scai.v0.AttributeAssertion.attribute) pub attribute: ::std::string::String, // @@protoc_insertion_point(field:in_toto_attestation.predicates.scai.v0.AttributeAssertion.target) pub target: ::protobuf::MessageField, // @@protoc_insertion_point(field:in_toto_attestation.predicates.scai.v0.AttributeAssertion.conditions) pub conditions: ::protobuf::MessageField<::protobuf::well_known_types::struct_::Struct>, // @@protoc_insertion_point(field:in_toto_attestation.predicates.scai.v0.AttributeAssertion.evidence) pub evidence: ::protobuf::MessageField, // special fields // @@protoc_insertion_point(special_field:in_toto_attestation.predicates.scai.v0.AttributeAssertion.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a AttributeAssertion { fn default() -> &'a AttributeAssertion { ::default_instance() } } impl AttributeAssertion { pub fn new() -> AttributeAssertion { ::std::default::Default::default() } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(4); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>( "attribute", |m: &AttributeAssertion| { &m.attribute }, |m: &mut AttributeAssertion| { &mut m.attribute }, )); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, resource_descriptor::ResourceDescriptor>( "target", |m: &AttributeAssertion| { &m.target }, |m: &mut AttributeAssertion| { &mut m.target }, )); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ::protobuf::well_known_types::struct_::Struct>( "conditions", |m: &AttributeAssertion| { &m.conditions }, |m: &mut AttributeAssertion| { &mut m.conditions }, )); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, resource_descriptor::ResourceDescriptor>( "evidence", |m: &AttributeAssertion| { &m.evidence }, |m: &mut AttributeAssertion| { &mut m.evidence }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "AttributeAssertion", fields, oneofs, ) } } impl ::protobuf::Message for AttributeAssertion { const NAME: &'static str = "AttributeAssertion"; fn is_initialized(&self) -> bool { true } 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.attribute = is.read_string()?; }, 18 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.target)?; }, 26 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.conditions)?; }, 34 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.evidence)?; }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; if !self.attribute.is_empty() { my_size += ::protobuf::rt::string_size(1, &self.attribute); } if let Some(v) = self.target.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } if let Some(v) = self.conditions.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } if let Some(v) = self.evidence.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } 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.attribute.is_empty() { os.write_string(1, &self.attribute)?; } if let Some(v) = self.target.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; } if let Some(v) = self.conditions.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; } if let Some(v) = self.evidence.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> AttributeAssertion { AttributeAssertion::new() } fn clear(&mut self) { self.attribute.clear(); self.target.clear(); self.conditions.clear(); self.evidence.clear(); self.special_fields.clear(); } fn default_instance() -> &'static AttributeAssertion { static instance: AttributeAssertion = AttributeAssertion { attribute: ::std::string::String::new(), target: ::protobuf::MessageField::none(), conditions: ::protobuf::MessageField::none(), evidence: ::protobuf::MessageField::none(), special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for AttributeAssertion { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("AttributeAssertion").unwrap()).clone() } } impl ::std::fmt::Display for AttributeAssertion { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for AttributeAssertion { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } // @@protoc_insertion_point(message:in_toto_attestation.predicates.scai.v0.AttributeReport) #[derive(PartialEq,Clone,Default,Debug)] pub struct AttributeReport { // message fields // @@protoc_insertion_point(field:in_toto_attestation.predicates.scai.v0.AttributeReport.attributes) pub attributes: ::std::vec::Vec, // @@protoc_insertion_point(field:in_toto_attestation.predicates.scai.v0.AttributeReport.producer) pub producer: ::protobuf::MessageField, // special fields // @@protoc_insertion_point(special_field:in_toto_attestation.predicates.scai.v0.AttributeReport.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a AttributeReport { fn default() -> &'a AttributeReport { ::default_instance() } } impl AttributeReport { pub fn new() -> AttributeReport { ::std::default::Default::default() } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(2); let mut oneofs = ::std::vec::Vec::with_capacity(0); fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>( "attributes", |m: &AttributeReport| { &m.attributes }, |m: &mut AttributeReport| { &mut m.attributes }, )); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, resource_descriptor::ResourceDescriptor>( "producer", |m: &AttributeReport| { &m.producer }, |m: &mut AttributeReport| { &mut m.producer }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "AttributeReport", fields, oneofs, ) } } impl ::protobuf::Message for AttributeReport { const NAME: &'static str = "AttributeReport"; fn is_initialized(&self) -> bool { true } 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.attributes.push(is.read_message()?); }, 18 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.producer)?; }, tag => { ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; }, }; } ::std::result::Result::Ok(()) } // Compute sizes of nested messages #[allow(unused_variables)] fn compute_size(&self) -> u64 { let mut my_size = 0; for value in &self.attributes { let len = value.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }; if let Some(v) = self.producer.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } 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<()> { for v in &self.attributes { ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; }; if let Some(v) = self.producer.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; } os.write_unknown_fields(self.special_fields.unknown_fields())?; ::std::result::Result::Ok(()) } fn special_fields(&self) -> &::protobuf::SpecialFields { &self.special_fields } fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { &mut self.special_fields } fn new() -> AttributeReport { AttributeReport::new() } fn clear(&mut self) { self.attributes.clear(); self.producer.clear(); self.special_fields.clear(); } fn default_instance() -> &'static AttributeReport { static instance: AttributeReport = AttributeReport { attributes: ::std::vec::Vec::new(), producer: ::protobuf::MessageField::none(), special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for AttributeReport { fn descriptor() -> ::protobuf::reflect::MessageDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| file_descriptor().message_by_package_relative_name("AttributeReport").unwrap()).clone() } } impl ::std::fmt::Display for AttributeReport { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for AttributeReport { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } static file_descriptor_proto_data: &'static [u8] = b"\ \n1in_toto_attestation/predicates/scai/v0/scai.proto\x12&in_toto_attesta\ tion.predicates.scai.v0\x1a\x1cgoogle/protobuf/struct.proto\x1a0in_toto_\ attestation/v1/resource_descriptor.proto\"\xf7\x01\n\x12AttributeAsserti\ on\x12\x1c\n\tattribute\x18\x01\x20\x01(\tR\tattribute\x12B\n\x06target\ \x18\x02\x20\x01(\x0b2*.in_toto_attestation.v1.ResourceDescriptorR\x06ta\ rget\x127\n\nconditions\x18\x03\x20\x01(\x0b2\x17.google.protobuf.Struct\ R\nconditions\x12F\n\x08evidence\x18\x04\x20\x01(\x0b2*.in_toto_attestat\ ion.v1.ResourceDescriptorR\x08evidence\"\xb5\x01\n\x0fAttributeReport\ \x12Z\n\nattributes\x18\x01\x20\x03(\x0b2:.in_toto_attestation.predicate\ s.scai.v0.AttributeAssertionR\nattributes\x12F\n\x08producer\x18\x02\x20\ \x01(\x0b2*.in_toto_attestation.v1.ResourceDescriptorR\x08producerBg\n/i\ o.github.intoto.attestation.predicates.scai.v0Z4github.com/in-toto/attes\ tation/go/predicates/scai/v0b\x06proto3\ "; /// `FileDescriptorProto` object which was a source for this generated file fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto { static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new(); file_descriptor_proto_lazy.get(|| { ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap() }) } /// `FileDescriptor` object which allows dynamic access to files pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor { static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new(); static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new(); file_descriptor.get(|| { let generated_file_descriptor = generated_file_descriptor_lazy.get(|| { let mut deps = ::std::vec::Vec::with_capacity(2); deps.push(::protobuf::well_known_types::struct_::file_descriptor().clone()); deps.push(resource_descriptor::file_descriptor().clone()); let mut messages = ::std::vec::Vec::with_capacity(2); messages.push(AttributeAssertion::generated_message_descriptor_data()); messages.push(AttributeReport::generated_message_descriptor_data()); let mut enums = ::std::vec::Vec::with_capacity(0); ::protobuf::reflect::GeneratedFileDescriptor::new_generated( file_descriptor_proto(), deps, messages, enums, ) }); ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor) }) }