// 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/create_artifact.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.CreateArtifactRequest) pub struct CreateArtifactRequest { // message fields // @@protoc_insertion_point(field:observation_tools.proto.CreateArtifactRequest.project_id) pub project_id: ::protobuf::MessageField, // @@protoc_insertion_point(field:observation_tools.proto.CreateArtifactRequest.run_id) pub run_id: ::protobuf::MessageField, // @@protoc_insertion_point(field:observation_tools.proto.CreateArtifactRequest.artifact_id) pub artifact_id: ::protobuf::MessageField, // @@protoc_insertion_point(field:observation_tools.proto.CreateArtifactRequest.series_point) pub series_point: ::protobuf::MessageField, // message oneof groups pub data: ::std::option::Option, // special fields // @@protoc_insertion_point(special_field:observation_tools.proto.CreateArtifactRequest.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a CreateArtifactRequest { fn default() -> &'a CreateArtifactRequest { ::default_instance() } } impl CreateArtifactRequest { pub fn new() -> CreateArtifactRequest { ::std::default::Default::default() } // .observation_tools.proto.ArtifactData artifact_data = 2; pub fn artifact_data(&self) -> &super::artifact::ArtifactData { match self.data { ::std::option::Option::Some(create_artifact_request::Data::ArtifactData(ref v)) => v, _ => ::default_instance(), } } pub fn clear_artifact_data(&mut self) { self.data = ::std::option::Option::None; } pub fn has_artifact_data(&self) -> bool { match self.data { ::std::option::Option::Some(create_artifact_request::Data::ArtifactData(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_artifact_data(&mut self, v: super::artifact::ArtifactData) { self.data = ::std::option::Option::Some(create_artifact_request::Data::ArtifactData(v)) } // Mutable pointer to the field. pub fn mut_artifact_data(&mut self) -> &mut super::artifact::ArtifactData { if let ::std::option::Option::Some(create_artifact_request::Data::ArtifactData(_)) = self.data { } else { self.data = ::std::option::Option::Some(create_artifact_request::Data::ArtifactData(super::artifact::ArtifactData::new())); } match self.data { ::std::option::Option::Some(create_artifact_request::Data::ArtifactData(ref mut v)) => v, _ => panic!(), } } // Take field pub fn take_artifact_data(&mut self) -> super::artifact::ArtifactData { if self.has_artifact_data() { match self.data.take() { ::std::option::Option::Some(create_artifact_request::Data::ArtifactData(v)) => v, _ => panic!(), } } else { super::artifact::ArtifactData::new() } } // .observation_tools.proto.ArtifactUpdate artifact_update = 6; pub fn artifact_update(&self) -> &super::artifact::ArtifactUpdate { match self.data { ::std::option::Option::Some(create_artifact_request::Data::ArtifactUpdate(ref v)) => v, _ => ::default_instance(), } } pub fn clear_artifact_update(&mut self) { self.data = ::std::option::Option::None; } pub fn has_artifact_update(&self) -> bool { match self.data { ::std::option::Option::Some(create_artifact_request::Data::ArtifactUpdate(..)) => true, _ => false, } } // Param is passed by value, moved pub fn set_artifact_update(&mut self, v: super::artifact::ArtifactUpdate) { self.data = ::std::option::Option::Some(create_artifact_request::Data::ArtifactUpdate(v)) } // Mutable pointer to the field. pub fn mut_artifact_update(&mut self) -> &mut super::artifact::ArtifactUpdate { if let ::std::option::Option::Some(create_artifact_request::Data::ArtifactUpdate(_)) = self.data { } else { self.data = ::std::option::Option::Some(create_artifact_request::Data::ArtifactUpdate(super::artifact::ArtifactUpdate::new())); } match self.data { ::std::option::Option::Some(create_artifact_request::Data::ArtifactUpdate(ref mut v)) => v, _ => panic!(), } } // Take field pub fn take_artifact_update(&mut self) -> super::artifact::ArtifactUpdate { if self.has_artifact_update() { match self.data.take() { ::std::option::Option::Some(create_artifact_request::Data::ArtifactUpdate(v)) => v, _ => panic!(), } } else { super::artifact::ArtifactUpdate::new() } } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(6); let mut oneofs = ::std::vec::Vec::with_capacity(1); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::project_id::ProjectId>( "project_id", |m: &CreateArtifactRequest| { &m.project_id }, |m: &mut CreateArtifactRequest| { &mut m.project_id }, )); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::run_id::RunId>( "run_id", |m: &CreateArtifactRequest| { &m.run_id }, |m: &mut CreateArtifactRequest| { &mut m.run_id }, )); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::artifact::ArtifactId>( "artifact_id", |m: &CreateArtifactRequest| { &m.artifact_id }, |m: &mut CreateArtifactRequest| { &mut m.artifact_id }, )); fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::artifact::SeriesPoint>( "series_point", |m: &CreateArtifactRequest| { &m.series_point }, |m: &mut CreateArtifactRequest| { &mut m.series_point }, )); fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, super::artifact::ArtifactData>( "artifact_data", CreateArtifactRequest::has_artifact_data, CreateArtifactRequest::artifact_data, CreateArtifactRequest::mut_artifact_data, CreateArtifactRequest::set_artifact_data, )); fields.push(::protobuf::reflect::rt::v2::make_oneof_message_has_get_mut_set_accessor::<_, super::artifact::ArtifactUpdate>( "artifact_update", CreateArtifactRequest::has_artifact_update, CreateArtifactRequest::artifact_update, CreateArtifactRequest::mut_artifact_update, CreateArtifactRequest::set_artifact_update, )); oneofs.push(create_artifact_request::Data::generated_oneof_descriptor_data()); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "CreateArtifactRequest", fields, oneofs, ) } } impl ::protobuf::Message for CreateArtifactRequest { const NAME: &'static str = "CreateArtifactRequest"; 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 { 66 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.project_id)?; }, 34 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.run_id)?; }, 42 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.artifact_id)?; }, 58 => { ::protobuf::rt::read_singular_message_into_field(is, &mut self.series_point)?; }, 18 => { self.data = ::std::option::Option::Some(create_artifact_request::Data::ArtifactData(is.read_message()?)); }, 50 => { self.data = ::std::option::Option::Some(create_artifact_request::Data::ArtifactUpdate(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 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.run_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; } if let Some(v) = self.series_point.as_ref() { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; } if let ::std::option::Option::Some(ref v) = self.data { match v { &create_artifact_request::Data::ArtifactData(ref v) => { let len = v.compute_size(); my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; }, &create_artifact_request::Data::ArtifactUpdate(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 Some(v) = self.project_id.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(8, v, os)?; } if let Some(v) = self.run_id.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; } if let Some(v) = self.artifact_id.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?; } if let Some(v) = self.series_point.as_ref() { ::protobuf::rt::write_message_field_with_cached_size(7, v, os)?; } if let ::std::option::Option::Some(ref v) = self.data { match v { &create_artifact_request::Data::ArtifactData(ref v) => { ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; }, &create_artifact_request::Data::ArtifactUpdate(ref v) => { ::protobuf::rt::write_message_field_with_cached_size(6, 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() -> CreateArtifactRequest { CreateArtifactRequest::new() } fn clear(&mut self) { self.project_id.clear(); self.run_id.clear(); self.artifact_id.clear(); self.series_point.clear(); self.data = ::std::option::Option::None; self.data = ::std::option::Option::None; self.special_fields.clear(); } fn default_instance() -> &'static CreateArtifactRequest { static instance: CreateArtifactRequest = CreateArtifactRequest { project_id: ::protobuf::MessageField::none(), run_id: ::protobuf::MessageField::none(), artifact_id: ::protobuf::MessageField::none(), series_point: ::protobuf::MessageField::none(), data: ::std::option::Option::None, special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for CreateArtifactRequest { 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("CreateArtifactRequest").unwrap()).clone() } } impl ::std::fmt::Display for CreateArtifactRequest { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for CreateArtifactRequest { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } /// Nested message and enums of message `CreateArtifactRequest` pub mod create_artifact_request { #[derive(Clone,PartialEq,Debug)] #[non_exhaustive] // @@protoc_insertion_point(oneof:observation_tools.proto.CreateArtifactRequest.data) pub enum Data { // @@protoc_insertion_point(oneof_field:observation_tools.proto.CreateArtifactRequest.artifact_data) ArtifactData(super::super::artifact::ArtifactData), // @@protoc_insertion_point(oneof_field:observation_tools.proto.CreateArtifactRequest.artifact_update) ArtifactUpdate(super::super::artifact::ArtifactUpdate), } 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.CreateArtifactResponse) pub struct CreateArtifactResponse { // special fields // @@protoc_insertion_point(special_field:observation_tools.proto.CreateArtifactResponse.special_fields) pub special_fields: ::protobuf::SpecialFields, } impl<'a> ::std::default::Default for &'a CreateArtifactResponse { fn default() -> &'a CreateArtifactResponse { ::default_instance() } } impl CreateArtifactResponse { pub fn new() -> CreateArtifactResponse { ::std::default::Default::default() } fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData { let mut fields = ::std::vec::Vec::with_capacity(0); let mut oneofs = ::std::vec::Vec::with_capacity(0); ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::( "CreateArtifactResponse", fields, oneofs, ) } } impl ::protobuf::Message for CreateArtifactResponse { const NAME: &'static str = "CreateArtifactResponse"; 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 { 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; 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<()> { 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() -> CreateArtifactResponse { CreateArtifactResponse::new() } fn clear(&mut self) { self.special_fields.clear(); } fn default_instance() -> &'static CreateArtifactResponse { static instance: CreateArtifactResponse = CreateArtifactResponse { special_fields: ::protobuf::SpecialFields::new(), }; &instance } } impl ::protobuf::MessageFull for CreateArtifactResponse { 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("CreateArtifactResponse").unwrap()).clone() } } impl ::std::fmt::Display for CreateArtifactResponse { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } impl ::protobuf::reflect::ProtobufValue for CreateArtifactResponse { type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage; } static file_descriptor_proto_data: &'static [u8] = b"\ \n\x1fsrc/proto/create_artifact.proto\x12\x17observation_tools.proto\x1a\ \x18src/proto/artifact.proto\x1a\x16src/proto/run_id.proto\x1a\x1asrc/pr\ oto/project_id.proto\"\xd6\x03\n\x15CreateArtifactRequest\x12A\n\nprojec\ t_id\x18\x08\x20\x01(\x0b2\".observation_tools.proto.ProjectIdR\tproject\ Id\x125\n\x06run_id\x18\x04\x20\x01(\x0b2\x1e.observation_tools.proto.Ru\ nIdR\x05runId\x12D\n\x0bartifact_id\x18\x05\x20\x01(\x0b2#.observation_t\ ools.proto.ArtifactIdR\nartifactId\x12G\n\x0cseries_point\x18\x07\x20\ \x01(\x0b2$.observation_tools.proto.SeriesPointR\x0bseriesPoint\x12L\n\r\ artifact_data\x18\x02\x20\x01(\x0b2%.observation_tools.proto.ArtifactDat\ aH\0R\x0cartifactData\x12R\n\x0fartifact_update\x18\x06\x20\x01(\x0b2'.o\ bservation_tools.proto.ArtifactUpdateH\0R\x0eartifactUpdateB\x06\n\x04da\ taJ\x04\x08\x01\x10\x02J\x04\x08\x03\x10\x04\"\x18\n\x16CreateArtifactRe\ sponseB\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::artifact::file_descriptor().clone()); deps.push(super::run_id::file_descriptor().clone()); deps.push(super::project_id::file_descriptor().clone()); let mut messages = ::std::vec::Vec::with_capacity(2); messages.push(CreateArtifactRequest::generated_message_descriptor_data()); messages.push(CreateArtifactResponse::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) }) }