// This file is generated by rust-protobuf 3.2.0. Do not edit // .proto file is parsed by protoc --rust-out=... // @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(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(unused_results)] #![allow(unused_mut)] //! Generated file from `src/proto/internal.proto` /// Generated files are compatible only with the same version /// of protobuf runtime. const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_2_0; #[derive(PartialEq,Clone,Default,Debug)] // @@protoc_insertion_point(message:observation_tools.proto.PublicGlobalId) pub struct PublicGlobalId { // message oneof groups pub data: ::std::option::Option, // special fields // @@protoc_insertion_point(special_field:observation_tools.proto.PublicGlobalId.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a PublicGlobalId { fn default() -> &'a PublicGlobalId { ::default_instance() } } impl PublicGlobalId { pub fn new() -> PublicGlobalId { ::std::default::Default::default() } // .observation_tools.proto.ProjectId project_id = 1; pub fn project_id(&self) -> &super::project_id::ProjectId { match self.data { ::std::option::Option::Some(public_global_id::Data::ProjectId(ref v)) => v, _ => ::default_instance(), } } pub fn clear_project_id(&mut self) { self.data = ::std::option::Option::None; } pub fn has_project_id(&self) -> bool { match self.data { ::std::option::Option::Some(public_global_id::Data::ProjectId(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_project_id(&mut self, v: super::project_id::ProjectId) { self.data = ::std::option::Option::Some(public_global_id::Data::ProjectId(v)) } // Mutable pointer to the field. pub fn mut_project_id(&mut self) -> &mut super::project_id::ProjectId { if let ::std::option::Option::Some(public_global_id::Data::ProjectId(_)) = self.data { } else { self.data = ::std::option::Option::Some(public_global_id::Data::ProjectId(super::project_id::ProjectId::new())); } match self.data { ::std::option::Option::Some(public_global_id::Data::ProjectId(ref mut v)) => v, _ => panic!(), } } // Take field pub fn take_project_id(&mut self) -> super::project_id::ProjectId { if self.has_project_id() { match self.data.take() { ::std::option::Option::Some(public_global_id::Data::ProjectId(v)) => v, _ => panic!(), } } else { super::project_id::ProjectId::new() } } // .observation_tools.proto.CanonicalArtifactId canonical_artifact_id = 3; pub fn canonical_artifact_id(&self) -> &CanonicalArtifactId { match self.data { ::std::option::Option::Some(public_global_id::Data::CanonicalArtifactId(ref v)) => v, _ => ::default_instance(), } } pub fn clear_canonical_artifact_id(&mut self) { self.data = ::std::option::Option::None; } pub fn has_canonical_artifact_id(&self) -> bool { match self.data { ::std::option::Option::Some(public_global_id::Data::CanonicalArtifactId(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_canonical_artifact_id(&mut self, v: CanonicalArtifactId) { self.data = ::std::option::Option::Some(public_global_id::Data::CanonicalArtifactId(v)) } // Mutable pointer to the field. pub fn mut_canonical_artifact_id(&mut self) -> &mut CanonicalArtifactId { if let ::std::option::Option::Some(public_global_id::Data::CanonicalArtifactId(_)) = self.data { } else { self.data = ::std::option::Option::Some(public_global_id::Data::CanonicalArtifactId(CanonicalArtifactId::new())); } match self.data { ::std::option::Option::Some(public_global_id::Data::CanonicalArtifactId(ref mut v)) => v, _ => panic!(), } } // Take field pub fn take_canonical_artifact_id(&mut self) -> CanonicalArtifactId { if self.has_canonical_artifact_id() { match self.data.take() { ::std::option::Option::Some(public_global_id::Data::CanonicalArtifactId(v)) => v, _ => panic!(), } } else { CanonicalArtifactId::new() } } 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(1); fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, super::project_id::ProjectId>( "project_id", PublicGlobalId::has_project_id, PublicGlobalId::project_id, PublicGlobalId::mut_project_id, PublicGlobalId::set_project_id, )); fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, CanonicalArtifactId>( "canonical_artifact_id", PublicGlobalId::has_canonical_artifact_id, PublicGlobalId::canonical_artifact_id, PublicGlobalId::mut_canonical_artifact_id, PublicGlobalId::set_canonical_artifact_id, )); oneofs.push(public_global_id::Data::generated_oneof_descriptor_data()); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "PublicGlobalId", fields, oneofs, ) } } impl ::protobuf::Message for PublicGlobalId { const NAME: &'static str = "PublicGlobalId"; 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.data = ::std::option::Option::Some(public_global_id::Data::ProjectId(is.read_message()?)); }, 26 => { self.data = ::std::option::Option::Some(public_global_id::Data::CanonicalArtifactId(is.read_message()?)); }, 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 let ::std::option::Option::Some(ref v) = self.data { match v { &public_global_id::Data::ProjectId(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }, &public_global_id::Data::CanonicalArtifactId(ref v) => { 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 let ::std::option::Option::Some(ref v) = self.data { match v { &public_global_id::Data::ProjectId(ref v) => { ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; }, &public_global_id::Data::CanonicalArtifactId(ref v) => { ::protobuf::rt::write_message_field_with_cached_size(3, 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() -> PublicGlobalId { PublicGlobalId::new() } fn clear(&mut self) { self.data = ::std::option::Option::None; self.data = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static PublicGlobalId { static instance: PublicGlobalId = PublicGlobalId { data: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for PublicGlobalId { 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("PublicGlobalId").unwrap()).clone() } } impl ::std::fmt::Display for PublicGlobalId { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for PublicGlobalId { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } /// Nested message and enums of message `PublicGlobalId` pub mod public_global_id { #[derive(Clone,PartialEq,Debug)] #[non_exhaustive] // @@protoc_insertion_point(oneof:observation_tools.proto.PublicGlobalId.data) pub enum Data { // @@protoc_insertion_point(oneof_field:observation_tools.proto.PublicGlobalId.project_id) ProjectId(super::super::project_id::ProjectId), // @@protoc_insertion_point(oneof_field:observation_tools.proto.PublicGlobalId.canonical_artifact_id) CanonicalArtifactId(super::CanonicalArtifactId), } impl ::protobuf::Oneof for Data { } impl ::protobuf::OneofFull for Data { fn descriptor() -> ::protobuf::reflect::OneofDescriptor { static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::OneofDescriptor> = ::protobuf::rt::Lazy::new(); descriptor.get(|| ::descriptor().oneof_by_name("data").unwrap()).clone() } } impl Data { pub(in super) fn generated_oneof_descriptor_data() -> ::protobuf::reflect::GeneratedOneofDescriptorData { ::protobuf::reflect::GeneratedOneofDescriptorData::new::("data") } } } #[derive(PartialEq,Clone,Default,Debug)] // @@protoc_insertion_point(message:observation_tools.proto.CanonicalArtifactId) pub struct CanonicalArtifactId { // message fields // @@protoc_insertion_point(field:observation_tools.proto.CanonicalArtifactId.project_id) pub project_id: ::protobuf::MessageField, // @@protoc_insertion_point(field:observation_tools.proto.CanonicalArtifactId.artifact_id) pub artifact_id: ::protobuf::MessageField, // special fields // @@protoc_insertion_point(special_field:observation_tools.proto.CanonicalArtifactId.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a CanonicalArtifactId { fn default() -> &'a CanonicalArtifactId { ::default_instance() } } impl CanonicalArtifactId { pub fn new() -> CanonicalArtifactId { ::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_message_field_accessor::<_, super::project_id::ProjectId>( "project_id", |m: &CanonicalArtifactId| { &m.project_id }, |m: &mut CanonicalArtifactId| { &mut m.project_id }, )); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::artifact::ArtifactId>( "artifact_id", |m: &CanonicalArtifactId| { &m.artifact_id }, |m: &mut CanonicalArtifactId| { &mut m.artifact_id }, )); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "CanonicalArtifactId", fields, oneofs, ) } } impl ::protobuf::Message for CanonicalArtifactId { const NAME: &'static str = "CanonicalArtifactId"; 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 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.project_id)?; }, 18 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.artifact_id)?; }, 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 let Some(v) = self.project_id.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } if let Some(v) = self.artifact_id.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 let Some(v) = self.project_id.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; } if let Some(v) = self.artifact_id.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() -> CanonicalArtifactId { CanonicalArtifactId::new() } fn clear(&mut self) { self.project_id.clear(); self.artifact_id.clear(); self.special_fields.clear(); } fn default_instance() -> &'static CanonicalArtifactId { static instance: CanonicalArtifactId = CanonicalArtifactId { project_id: ::protobuf::MessageField::none(), artifact_id: ::protobuf::MessageField::none(), special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for CanonicalArtifactId { 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("CanonicalArtifactId").unwrap()).clone() } } impl ::std::fmt::Display for CanonicalArtifactId { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for CanonicalArtifactId { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } static file_descriptor_proto_data: &'static [u8] = b"\ \n\x18src/proto/internal.proto\x12\x17observation_tools.proto\x1a\x1asrc\ /proto/project_id.proto\x1a\x18src/proto/artifact.proto\x1a\x14src/proto\ /uuid.proto\"\xc7\x01\n\x0ePublicGlobalId\x12C\n\nproject_id\x18\x01\x20\ \x01(\x0b2\".observation_tools.proto.ProjectIdH\0R\tprojectId\x12b\n\x15\ canonical_artifact_id\x18\x03\x20\x01(\x0b2,.observation_tools.proto.Can\ onicalArtifactIdH\0R\x13canonicalArtifactIdB\x06\n\x04dataJ\x04\x08\x02\ \x10\x03\"\x9e\x01\n\x13CanonicalArtifactId\x12A\n\nproject_id\x18\x01\ \x20\x01(\x0b2\".observation_tools.proto.ProjectIdR\tprojectId\x12D\n\ \x0bartifact_id\x18\x02\x20\x01(\x0b2#.observation_tools.proto.ArtifactI\ dR\nartifactIdB\x1b\n\x17tools.observation.protoP\x01b\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(3); deps.push(super::project_id::file_descriptor().clone()); deps.push(super::artifact::file_descriptor().clone()); deps.push(super::uuid::file_descriptor().clone()); let mut messages = ::std::vec::Vec::with_capacity(2); messages.push(PublicGlobalId::generated_message_descriptor_data()); messages.push(CanonicalArtifactId::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) }) }